From 6b3f0d3d8af7f487856d3b28753921d9bbb2ebe6 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 15 Sep 2016 17:10:32 -0400 Subject: [PATCH 01/25] Playground update; update SB2 spec map for list, _ of _ blocks (#184) * Playground update * Update SB2 spec map for list, _ of _ blocks --- playground/index.html | 1365 ++++++++++++++++++++------------------ src/import/sb2specmap.js | 53 +- 2 files changed, 741 insertions(+), 677 deletions(-) diff --git a/playground/index.html b/playground/index.html index 12a545d99..7cfa2cd10 100644 --- a/playground/index.html +++ b/playground/index.html @@ -53,661 +53,716 @@ + + + + 10 + + + + + + + 15 + + + + + + + 15 + + + + + + + 90 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + 10 + + + + + + + 0 + + + + + + + 10 + + + + + + + 0 + + + + + + + + + + + + + + + + + + Hello! + + + + + 2 + + + + + + + Hello! + + + + + + + Hmm... + + + + + 2 + + + + + + + Hmm... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + 10 + + + + + + + + 10 + + + + + + + 100 + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + 0.25 + + + + + + + 0.25 + + + + + + + 1 + + + + + 0.5 + + + + + + + 1 + + + + + + + -10 + + + + + + + 100 + + + + + + + + 20 + + + + + + + 60 + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + 0 + + + + + + + 10 + + + + + + + 50 + + + + + + + 1 + + + + + + + 1 + + + + + + + + + + + + thing + + + + + + + 1 + + + + + + + 1 + + + + + thing + + + + + + + 1 + + + + + thing + + + + + + + 1 + + + + + + + + thing + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + What's your name? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hello + + + + + world + + + + + + + 1 + + + + + world + + + + + + + world + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js index 9cb60d203..adfd11af3 100644 --- a/src/import/sb2specmap.js +++ b/src/import/sb2specmap.js @@ -905,12 +905,12 @@ var specMap = { 'argMap':[ { 'type':'input', - 'inputOp':'sensing_ofattributemenu', - 'inputName':'ATTRIBUTE' + 'inputOp':'sensing_of_property_menu', + 'inputName':'PROPERTY' }, { 'type':'input', - 'inputOp':'sensing_ofobjectmenu', + 'inputOp':'sensing_of_object_menu', 'inputName':'OBJECT' } ] @@ -1230,13 +1230,22 @@ var specMap = { } ] }, + 'contentsOfList:':{ + 'opcode':'data_list', + 'argMap':[ + { + 'type':'field', + 'fieldName':'LIST' + } + ] + }, 'append:toList:':{ - 'opcode':'data_listadd', + 'opcode':'data_addtolist', 'argMap':[ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' }, { 'type':'field', @@ -1245,12 +1254,12 @@ var specMap = { ] }, 'deleteLine:ofList:':{ - 'opcode':'data_listdelete', + 'opcode':'data_deleteoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -1259,17 +1268,17 @@ var specMap = { ] }, 'insert:at:ofList:':{ - 'opcode':'data_listinsert', + 'opcode':'data_insertatlist', 'argMap':[ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' }, { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -1278,12 +1287,12 @@ var specMap = { ] }, 'setLine:ofList:to:':{ - 'opcode':'data_listreplace', + 'opcode':'data_replaceitemoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -1292,17 +1301,17 @@ var specMap = { { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' } ] }, 'getLine:ofList:':{ - 'opcode':'data_listitem', + 'opcode':'data_itemoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -1311,7 +1320,7 @@ var specMap = { ] }, 'lineCountOfList:':{ - 'opcode':'data_listlength', + 'opcode':'data_lengthoflist', 'argMap':[ { 'type':'field', @@ -1320,7 +1329,7 @@ var specMap = { ] }, 'list:contains:':{ - 'opcode':'data_listcontains', + 'opcode':'data_listcontainsitem', 'argMap':[ { 'type':'field', @@ -1329,7 +1338,7 @@ var specMap = { { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' } ] }, From 542899949eefb8921a8dcbd24b7127497caa34d3 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 15 Sep 2016 19:02:03 -0400 Subject: [PATCH 02/25] Update for RenderWebGLLocal -> RenderWebGL (#181) * Update for RenderWebGLLocal -> RenderWebGL * Move button under title --- playground/index.html | 4 ++-- playground/playground.js | 5 +++-- src/io/mouse.js | 21 +++++++++------------ src/sprites/clone.js | 9 ++------- 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/playground/index.html b/playground/index.html index 7cfa2cd10..c0c2f6ca3 100644 --- a/playground/index.html +++ b/playground/index.html @@ -35,10 +35,10 @@

         
         
-
Import/Export
Project ID: -
+ +

  diff --git a/playground/playground.js b/playground/playground.js index 9c3f00690..d672a393b 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -30,7 +30,8 @@ window.onload = function() { document.location = '#' + document.getElementById('projectId').value; location.reload(); }; - document.getElementById('createEmptyProject').addEventListener('click', function() { + document.getElementById('createEmptyProject').addEventListener('click', + function() { document.location = '#' + 'createEmptyProject'; location.reload(); }); @@ -38,7 +39,7 @@ window.onload = function() { // Instantiate the renderer and connect it to the VM. var canvas = document.getElementById('scratch-stage'); - window.renderer = new window.RenderWebGLLocal(canvas); + window.renderer = new window.RenderWebGL(canvas); // Instantiate scratch-blocks and attach it to the DOM. var toolbox = document.getElementById('toolbox'); diff --git a/src/io/mouse.js b/src/io/mouse.js index 990ba96f1..278ac1c09 100644 --- a/src/io/mouse.js +++ b/src/io/mouse.js @@ -29,19 +29,16 @@ Mouse.prototype.postData = function(data) { Mouse.prototype._activateClickHats = function (x, y) { if (self.renderer) { - var pickPromise = self.renderer.pick(x, y); - var instance = this; - pickPromise.then(function(drawableID) { - for (var i = 0; i < instance.runtime.targets.length; i++) { - var target = instance.runtime.targets[i]; - if (target.hasOwnProperty('drawableID') && - target.drawableID == drawableID) { - instance.runtime.startHats('event_whenthisspriteclicked', - null, target); - return; - } + var drawableID = self.renderer.pick(x, y); + for (var i = 0; i < this.runtime.targets.length; i++) { + var target = this.runtime.targets[i]; + if (target.hasOwnProperty('drawableID') && + target.drawableID == drawableID) { + this.runtime.startHats('event_whenthisspriteclicked', + null, target); + return; } - }); + } } }; diff --git a/src/sprites/clone.js b/src/sprites/clone.js index b24ea4368..46a3bb32f 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -39,13 +39,8 @@ util.inherits(Clone, Target); */ Clone.prototype.initDrawable = function () { if (this.renderer) { - var createPromise = this.renderer.createDrawable(); - var instance = this; - createPromise.then(function (id) { - instance.drawableID = id; - // Once the drawable is created, send our current set of properties. - instance.updateAllDrawableProperties(); - }); + this.drawableID = this.renderer.createDrawable(); + this.updateAllDrawableProperties(); } }; From 9744bcbb7060a7266168bb84e76a7b6ed9eb6810 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 15 Sep 2016 19:37:12 -0400 Subject: [PATCH 03/25] Clones (#150) * Provide property to Clone to distinguish "original" clones * Provide method to clone a clone's properties * Don't report clones in the UI target list * Add target info to Thread * Allow hats to skip clones (for green flag) * Green flag skips clones * Implement "create clone" and hat * Pass the runtime to sprites and clones (for start hats) * Clone disposal; trigger hats after drawable initializes. * Separate stop threads for target; fix handling of stop button * Remove extraneous `skipClones` property * Add global clone limit * Don't allow a non-clone to delete itself. * Rename `cloneClone` -> `makeClone` * Variable updates in runtime.js * Synchronous drawable initialization (until we put it back to promises) --- src/blocks/scratch3_control.js | 39 ++++++++++- src/engine/execute.js | 2 +- src/engine/runtime.js | 117 ++++++++++++++++++++++++++------- src/engine/sequencer.js | 5 +- src/engine/target.js | 8 +++ src/engine/thread.js | 22 +++++++ src/import/sb2import.js | 2 +- src/index.js | 5 +- src/sprites/clone.js | 55 +++++++++++++++- src/sprites/sprite.js | 11 +++- 10 files changed, 229 insertions(+), 37 deletions(-) diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js index bc9213f2a..5f3370895 100644 --- a/src/blocks/scratch3_control.js +++ b/src/blocks/scratch3_control.js @@ -21,7 +21,18 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() { 'control_wait': this.wait, 'control_if': this.if, 'control_if_else': this.ifElse, - 'control_stop': this.stop + 'control_stop': this.stop, + 'control_create_clone_of_menu': this.createCloneMenu, + 'control_create_clone_of': this.createClone, + 'control_delete_this_clone': this.deleteClone + }; +}; + +Scratch3ControlBlocks.prototype.getHats = function () { + return { + 'control_start_as_clone': { + restartExistingThreads: false + } }; }; @@ -118,4 +129,30 @@ Scratch3ControlBlocks.prototype.stop = function() { this.runtime.stopAll(); }; +// @todo (GH-146): remove. +Scratch3ControlBlocks.prototype.createCloneMenu = function (args) { + return args.CLONE_OPTION; +}; + +Scratch3ControlBlocks.prototype.createClone = function (args, util) { + var cloneTarget; + if (args.CLONE_OPTION == '_myself_') { + cloneTarget = util.target; + } else { + cloneTarget = this.runtime.getSpriteTargetByName(args.CLONE_OPTION); + } + if (!cloneTarget) { + return; + } + var newClone = cloneTarget.makeClone(); + if (newClone) { + this.runtime.targets.push(newClone); + } +}; + +Scratch3ControlBlocks.prototype.deleteClone = function (args, util) { + this.runtime.disposeTarget(util.target); + this.runtime.stopForTarget(util.target); +}; + module.exports = Scratch3ControlBlocks; diff --git a/src/engine/execute.js b/src/engine/execute.js index 7754852e9..29116d5e5 100644 --- a/src/engine/execute.js +++ b/src/engine/execute.js @@ -16,7 +16,7 @@ var isPromise = function (value) { */ var execute = function (sequencer, thread) { var runtime = sequencer.runtime; - var target = runtime.targetForThread(thread); + var target = thread.target; // Current block to execute is the one on the top of the stack. var currentBlockId = thread.peekStack(); diff --git a/src/engine/runtime.js b/src/engine/runtime.js index b085dd3d9..ddca44f29 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -60,6 +60,11 @@ function Runtime () { this._scriptGlowsPreviousFrame = []; this._editingTarget = null; + /** + * Currently known number of clones. + * @type {number} + */ + this._cloneCounter = 0; } /** @@ -102,6 +107,11 @@ util.inherits(Runtime, EventEmitter); */ Runtime.THREAD_STEP_INTERVAL = 1000 / 60; +/** + * How many clones can be created at a time. + * @const {number} + */ +Runtime.MAX_CLONES = 300; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -194,11 +204,13 @@ Runtime.prototype.clearEdgeActivatedValues = function () { /** * Create a thread and push it to the list of threads. - * @param {!string} id ID of block that starts the stack + * @param {!string} id ID of block that starts the stack. + * @param {!Target} target Target to run thread on. * @return {!Thread} The newly created thread. */ -Runtime.prototype._pushThread = function (id) { +Runtime.prototype._pushThread = function (id, target) { var thread = new Thread(id); + thread.setTarget(target); thread.pushStack(id); this.threads.push(thread); return thread; @@ -237,7 +249,7 @@ Runtime.prototype.toggleScript = function (topBlockId) { } } // Otherwise add it. - this._pushThread(topBlockId); + this._pushThread(topBlockId, this._editingTarget); }; /** @@ -306,7 +318,8 @@ Runtime.prototype.startHats = function (requestedHatOpcode, // If `restartExistingThreads` is true, we should stop // any existing threads starting with the top block. for (var i = 0; i < instance.threads.length; i++) { - if (instance.threads[i].topBlock === topBlockId) { + if (instance.threads[i].topBlock === topBlockId && + (!opt_target || instance.threads[i].target == opt_target)) { instance._removeThread(instance.threads[i]); } } @@ -314,31 +327,72 @@ Runtime.prototype.startHats = function (requestedHatOpcode, // If `restartExistingThreads` is false, we should // give up if any threads with the top block are running. for (var j = 0; j < instance.threads.length; j++) { - if (instance.threads[j].topBlock === topBlockId) { + if (instance.threads[j].topBlock === topBlockId && + (!opt_target || instance.threads[j].target == opt_target)) { // Some thread is already running. return; } } } // Start the thread with this top block. - newThreads.push(instance._pushThread(topBlockId)); + newThreads.push(instance._pushThread(topBlockId, target)); }, opt_target); return newThreads; }; +/** + * Dispose of a target. + * @param {!Target} target Target to dispose of. + */ +Runtime.prototype.disposeTarget = function (target) { + // Allow target to do dispose actions. + target.dispose(); + // Remove from list of targets. + var index = this.targets.indexOf(target); + if (index > -1) { + this.targets.splice(index, 1); + } +}; + +/** + * Stop any threads acting on the target. + * @param {!Target} target Target to stop threads for. + */ +Runtime.prototype.stopForTarget = function (target) { + // Stop any threads on the target. + for (var i = 0; i < this.threads.length; i++) { + if (this.threads[i].target == target) { + this._removeThread(this.threads[i]); + } + } +}; + /** * Start all threads that start with the green flag. */ Runtime.prototype.greenFlag = function () { + this.stopAll(); this.ioDevices.clock.resetProjectTimer(); this.clearEdgeActivatedValues(); this.startHats('event_whenflagclicked'); }; /** - * Stop "everything" + * Stop "everything." */ Runtime.prototype.stopAll = function () { + // Dispose all clones. + var newTargets = []; + for (var i = 0; i < this.targets.length; i++) { + if (this.targets[i].hasOwnProperty('isOriginal') && + !this.targets[i].isOriginal) { + this.targets[i].dispose(); + } else { + newTargets.push(this.targets[i]); + } + } + this.targets = newTargets; + // Dispose all threads. var threadsCopy = this.threads.slice(); while (threadsCopy.length > 0) { var poppedThread = threadsCopy.pop(); @@ -379,7 +433,7 @@ Runtime.prototype._updateScriptGlows = function () { // Find all scripts that should be glowing. for (var i = 0; i < this.threads.length; i++) { var thread = this.threads[i]; - var target = this.targetForThread(thread); + var target = thread.target; if (thread.requestScriptGlowInFrame && target == this._editingTarget) { var blockForThread = thread.peekStack() || thread.topBlock; var script = target.blocks.getTopLevelScript(blockForThread); @@ -458,23 +512,6 @@ Runtime.prototype.visualReport = function (blockId, value) { this.emit(Runtime.VISUAL_REPORT, blockId, String(value)); }; -/** - * Return the Target for a particular thread. - * @param {!Thread} thread Thread to determine target for. - * @return {?Target} Target object, if one exists. - */ -Runtime.prototype.targetForThread = function (thread) { - // @todo This is a messy solution, - // but prevents having circular data references. - // Have a map or some other way to associate target with threads. - for (var t = 0; t < this.targets.length; t++) { - var target = this.targets[t]; - if (target.blocks.getBlock(thread.topBlock)) { - return target; - } - } -}; - /** * Get a target by its id. * @param {string} targetId Id of target to find. @@ -489,6 +526,36 @@ Runtime.prototype.getTargetById = function (targetId) { } }; +/** + * Get the first original (non-clone-block-created) sprite given a name. + * @param {string} spriteName Name of sprite to look for. + * @return {?Target} Target representing a sprite of the given name. + */ +Runtime.prototype.getSpriteTargetByName = function (spriteName) { + for (var i = 0; i < this.targets.length; i++) { + var target = this.targets[i]; + if (target.sprite && target.sprite.name == spriteName) { + return target; + } + } +}; + +/** + * Update the clone counter to track how many clones are created. + * @param {number} changeAmount How many clones have been created/destroyed. + */ +Runtime.prototype.changeCloneCounter = function (changeAmount) { + this._cloneCounter += changeAmount; +}; + +/** + * Return whether there are clones available. + * @return {boolean} True until the number of clones hits Runtime.MAX_CLONES. + */ +Runtime.prototype.clonesAvailable = function () { + return this._cloneCounter < Runtime.MAX_CLONES; +}; + /** * Get a target representing the Scratch stage, if one exists. * @return {?Target} The target, if found. diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js index a515095bc..690ab61a7 100644 --- a/src/engine/sequencer.js +++ b/src/engine/sequencer.js @@ -111,7 +111,7 @@ Sequencer.prototype.stepToBranch = function (thread, branchNum) { branchNum = 1; } var currentBlockId = thread.peekStack(); - var branchId = this.runtime.targetForThread(thread).blocks.getBranch( + var branchId = thread.target.blocks.getBranch( currentBlockId, branchNum ); @@ -155,8 +155,7 @@ Sequencer.prototype.proceedThread = function (thread) { // Pop from the stack - finished this level of execution. thread.popStack(); // Push next connected block, if there is one. - var nextBlockId = (this.runtime.targetForThread(thread). - blocks.getNextBlock(currentBlockId)); + var nextBlockId = thread.target.blocks.getNextBlock(currentBlockId); if (nextBlockId) { thread.pushStack(nextBlockId); } diff --git a/src/engine/target.js b/src/engine/target.js index acb2b30a6..63f90b0d9 100644 --- a/src/engine/target.js +++ b/src/engine/target.js @@ -37,4 +37,12 @@ Target.prototype.getName = function () { return this.id; }; +/** + * Call to destroy a target. + * @abstract + */ +Target.prototype.dispose = function () { + +}; + module.exports = Target; diff --git a/src/engine/thread.js b/src/engine/thread.js index 0dc982702..3bb53596b 100644 --- a/src/engine/thread.js +++ b/src/engine/thread.js @@ -29,6 +29,12 @@ function Thread (firstBlock) { */ this.status = 0; /* Thread.STATUS_RUNNING */ + /** + * Target of this thread. + * @type {?Target} + */ + this.target = null; + /** * Whether the thread requests its script to glow during this frame. * @type {boolean} @@ -145,4 +151,20 @@ Thread.prototype.setStatus = function (status) { this.status = status; }; +/** + * Set thread target. + * @param {?Target} target Target for this thread. + */ +Thread.prototype.setTarget = function (target) { + this.target = target; +}; + +/** + * Get thread target. + * @return {?Target} Target for this thread, if available. + */ +Thread.prototype.getTarget = function () { + return this.target; +}; + module.exports = Thread; diff --git a/src/import/sb2import.js b/src/import/sb2import.js index 494f528cd..45f738942 100644 --- a/src/import/sb2import.js +++ b/src/import/sb2import.js @@ -40,7 +40,7 @@ function parseScratchObject (object, runtime, topLevel) { // Blocks container for this object. var blocks = new Blocks(); // @todo: For now, load all Scratch objects (stage/sprites) as a Sprite. - var sprite = new Sprite(blocks); + var sprite = new Sprite(blocks, runtime); // Sprite/stage name from JSON. if (object.hasOwnProperty('objName')) { sprite.name = object.objName; diff --git a/src/index.js b/src/index.js index a51bae135..0db13bbe8 100644 --- a/src/index.js +++ b/src/index.js @@ -207,7 +207,10 @@ VirtualMachine.prototype.setEditingTarget = function (targetId) { VirtualMachine.prototype.emitTargetsUpdate = function () { this.emit('targetsUpdate', { // [[target id, human readable target name], ...]. - targetList: this.runtime.targets.map(function(target) { + targetList: this.runtime.targets.filter(function (target) { + // Don't report clones. + return !target.hasOwnProperty('isOriginal') || target.isOriginal; + }).map(function(target) { return [target.id, target.getName()]; }), // Currently editing target id. diff --git a/src/sprites/clone.js b/src/sprites/clone.js index 46a3bb32f..4ea277225 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -5,10 +5,12 @@ var Target = require('../engine/target'); /** * Clone (instance) of a sprite. * @param {!Sprite} sprite Reference to the sprite. + * @param {Runtime} runtime Reference to the runtime. * @constructor */ -function Clone(sprite) { +function Clone(sprite, runtime) { Target.call(this, sprite.blocks); + this.runtime = runtime; /** * Reference to the sprite that this is a clone of. * @type {!Sprite} @@ -29,8 +31,6 @@ function Clone(sprite) { * @type {?Number} */ this.drawableID = null; - - this.initDrawable(); } util.inherits(Clone, Target); @@ -42,9 +42,22 @@ Clone.prototype.initDrawable = function () { this.drawableID = this.renderer.createDrawable(); this.updateAllDrawableProperties(); } + // If we're a clone, start the hats. + if (!this.isOriginal) { + this.runtime.startHats( + 'control_start_as_clone', null, this + ); + } }; // Clone-level properties. +/** + * Whether this represents an "original" clone, i.e., created by the editor + * and not clone blocks. In interface terms, this true for a "sprite." + * @type {boolean} + */ +Clone.prototype.isOriginal = true; + /** * Whether this clone represents the Scratch stage. * @type {boolean} @@ -298,4 +311,40 @@ Clone.prototype.colorIsTouchingColor = function (targetRgb, maskRgb) { return false; }; +/** + * Make a clone of this clone, copying any run-time properties. + * If we've hit the global clone limit, returns null. + * @return {!Clone} New clone object. + */ +Clone.prototype.makeClone = function () { + if (!this.runtime.clonesAvailable()) { + return; // Hit max clone limit. + } + this.runtime.changeCloneCounter(1); + var newClone = this.sprite.createClone(); + newClone.x = this.x; + newClone.y = this.y; + newClone.direction = this.direction; + newClone.visible = this.visible; + newClone.size = this.size; + newClone.currentCostume = this.currentCostume; + newClone.effects = JSON.parse(JSON.stringify(this.effects)); + newClone.initDrawable(); + newClone.updateAllDrawableProperties(); + return newClone; +}; + +/** + * Dispose of this clone, destroying any run-time properties. + */ +Clone.prototype.dispose = function () { + if (this.isOriginal) { // Don't allow a non-clone to delete itself. + return; + } + this.runtime.changeCloneCounter(-1); + if (this.renderer && this.drawableID !== null) { + this.renderer.destroyDrawable(this.drawableID); + } +}; + module.exports = Clone; diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js index 0d2b6b70e..687e30f72 100644 --- a/src/sprites/sprite.js +++ b/src/sprites/sprite.js @@ -5,9 +5,11 @@ var Blocks = require('../engine/blocks'); * Sprite to be used on the Scratch stage. * All clones of a sprite have shared blocks, shared costumes, shared variables. * @param {?Blocks} blocks Shared blocks object for all clones of sprite. + * @param {Runtime} runtime Reference to the runtime. * @constructor */ -function Sprite (blocks) { +function Sprite (blocks, runtime) { + this.runtime = runtime; if (!blocks) { // Shared set of blocks for all clones. blocks = new Blocks(); @@ -43,8 +45,13 @@ function Sprite (blocks) { * @returns {!Clone} Newly created clone. */ Sprite.prototype.createClone = function () { - var newClone = new Clone(this); + var newClone = new Clone(this, this.runtime); + newClone.isOriginal = this.clones.length == 0; this.clones.push(newClone); + if (newClone.isOriginal) { + newClone.initDrawable(); + newClone.updateAllDrawableProperties(); + } return newClone; }; From 470f686662ac5e057c05fa5739ed46f85cf4e2da Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 18 Sep 2016 11:32:24 -0400 Subject: [PATCH 04/25] Update Playground With Procedure Blocks (#191) --- playground/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/index.html b/playground/index.html index c0c2f6ca3..fa007fa27 100644 --- a/playground/index.html +++ b/playground/index.html @@ -761,7 +761,7 @@ - + From 13f287e8712fdd2cfeed31a0d61893f4279385a3 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Mon, 19 Sep 2016 14:40:01 -0400 Subject: [PATCH 05/25] Fix up property imports from SB2 (#196) * Update target's drawable properties after SB2 import * Always use `hasOwnProperty` parsing SB2 JSON --- src/import/sb2import.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/import/sb2import.js b/src/import/sb2import.js index 45f738942..cf97efa1d 100644 --- a/src/import/sb2import.js +++ b/src/import/sb2import.js @@ -51,7 +51,7 @@ function parseScratchObject (object, runtime, topLevel) { var costume = object.costumes[i]; // @todo: Make sure all the relevant metadata is being pulled out. sprite.costumes.push({ - skin: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/' + skin: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/' + costume.baseLayerMD5 + '/get/', name: costume.costumeName, bitmapResolution: costume.bitmapResolution, @@ -68,26 +68,27 @@ function parseScratchObject (object, runtime, topLevel) { var target = sprite.createClone(); // Add it to the runtime's list of targets. runtime.targets.push(target); - if (object.scratchX) { + if (object.hasOwnProperty('scratchX')) { target.x = object.scratchX; } - if (object.scratchY) { + if (object.hasOwnProperty('scratchY')) { target.y = object.scratchY; } - if (object.direction) { + if (object.hasOwnProperty('direction')) { target.direction = object.direction; } - if (object.scale) { + if (object.hasOwnProperty('scale')) { // SB2 stores as 1.0 = 100%; we use % in the VM. target.size = object.scale * 100; } - if (object.visible) { + if (object.hasOwnProperty('visible')) { target.visible = object.visible; } - if (object.currentCostumeIndex) { + if (object.hasOwnProperty('currentCostumeIndex')) { target.currentCostume = object.currentCostumeIndex; } target.isStage = topLevel; + target.updateAllDrawableProperties(); // The stage will have child objects; recursively process them. if (object.children) { for (var j = 0; j < object.children.length; j++) { From c02ee88d0247528f8fc0911c0fa057f60131d205 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Mon, 19 Sep 2016 15:24:46 -0400 Subject: [PATCH 06/25] Add some more info/links to sb2specmap (#197) --- src/import/sb2specmap.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js index adfd11af3..693d82f81 100644 --- a/src/import/sb2specmap.js +++ b/src/import/sb2specmap.js @@ -4,9 +4,22 @@ * the SB2 JSON format and the data we need to run a project * in the Scratch 3.0 VM. * Notably: - * - Map 2.0-format opcodes (forward:) into 3.0-format (motion_movesteps). + * - Map 2.0 and 1.4 opcodes (forward:) into 3.0-format (motion_movesteps). * - Map ordered, unnamed args to unordered, named inputs and fields. * Keep this up-to-date as 3.0 blocks are renamed, changed, etc. + * Originally this was generated largely by a hand-guided scripting process. + * The relevant data lives here: + * https://github.com/LLK/scratch-flash/blob/master/src/Specs.as + * (for the old opcode and argument order). + * and here: + * https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical + * (for the new opcodes and argument names). + * and here: + * https://github.com/LLK/scratch-blocks/blob/develop/tests/ + * (for the shadow blocks created for each block). + * I started with the `commands` array in Specs.as, and discarded irrelevant + * properties. By hand, I matched the opcode name to the 3.0 opcode. + * Finally, I filled in the expected arguments as below. */ var specMap = { 'forward:':{ From 499ba5235ca0316fccb95660ee0cef069a4996e6 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Sep 2016 02:42:05 -0400 Subject: [PATCH 07/25] Scope renderer to instance This allows usage without global scope to attach a renderer to the VM. It also provides the ability to have multiple VMs/renderers to be used at once. --- playground/playground.js | 10 +++++----- src/engine/runtime.js | 13 ++++++++++--- src/index.js | 5 +++-- src/io/mouse.js | 4 ++-- src/sprites/clone.js | 6 ++---- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/playground/playground.js b/playground/playground.js index d672a393b..7b9431a2a 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -21,8 +21,12 @@ var loadProject = function () { window.onload = function() { // Lots of global variables to make debugging easier + // Instantiate the renderer and connect it to the VM. + var canvas = document.getElementById('scratch-stage'); + window.renderer = new window.RenderWebGL(canvas); + // Instantiate the VM worker. - var vm = new window.VirtualMachine(); + var vm = new window.VirtualMachine(window.renderer); window.vm = vm; // Loading projects from the server. @@ -37,10 +41,6 @@ window.onload = function() { }); loadProject(); - // Instantiate the renderer and connect it to the VM. - var canvas = document.getElementById('scratch-stage'); - window.renderer = new window.RenderWebGL(canvas); - // Instantiate scratch-blocks and attach it to the DOM. var toolbox = document.getElementById('toolbox'); var workspace = window.Blockly.inject('blocks', { diff --git a/src/engine/runtime.js b/src/engine/runtime.js index ddca44f29..ccfbe6622 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -19,13 +19,20 @@ var defaultBlockPackages = { /** * Manages targets, scripts, and the sequencer. + * @param {!RenderWebGL} renderer Renderer for the VM */ -function Runtime () { +function Runtime (renderer) { // Bind event emitter EventEmitter.call(this); // State for the runtime + /** + * Renderer + * @type {!RenderWebGL} + */ + this.renderer = renderer; + /** * Target management and storage. * @type {Array.} @@ -573,8 +580,8 @@ Runtime.prototype.getTargetForStage = function () { * Handle an animation frame from the main thread. */ Runtime.prototype.animationFrame = function () { - if (self.renderer) { - self.renderer.draw(); + if (this.renderer) { + this.renderer.draw(); } }; diff --git a/src/index.js b/src/index.js index 0db13bbe8..62baa53e5 100644 --- a/src/index.js +++ b/src/index.js @@ -10,8 +10,9 @@ var Blocks = require('./engine/blocks'); * Handles connections between blocks, stage, and extensions. * * @author Andrew Sliwinski + * @param {!RenderWebGL} renderer Renderer for the VM */ -function VirtualMachine () { +function VirtualMachine (renderer) { var instance = this; // Bind event emitter and runtime to VM instance EventEmitter.call(instance); @@ -19,7 +20,7 @@ function VirtualMachine () { * VM runtime, to store blocks, I/O devices, sprites/targets, etc. * @type {!Runtime} */ - instance.runtime = new Runtime(); + instance.runtime = new Runtime(renderer); /** * The "currently editing"/selected target ID for the VM. * Block events from any Blockly workspace are routed to this target. diff --git a/src/io/mouse.js b/src/io/mouse.js index 278ac1c09..6b9860ee7 100644 --- a/src/io/mouse.js +++ b/src/io/mouse.js @@ -28,8 +28,8 @@ Mouse.prototype.postData = function(data) { }; Mouse.prototype._activateClickHats = function (x, y) { - if (self.renderer) { - var drawableID = self.renderer.pick(x, y); + if (this.runtime.renderer) { + var drawableID = this.runtime.renderer.pick(x, y); for (var i = 0; i < this.runtime.targets.length; i++) { var target = this.runtime.targets[i]; if (target.hasOwnProperty('drawableID') && diff --git a/src/sprites/clone.js b/src/sprites/clone.js index 4ea277225..9e4364806 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -21,10 +21,8 @@ function Clone(sprite, runtime) { * @type {?RenderWebGLWorker} */ this.renderer = null; - // If this is not true, there is no renderer (e.g., running in a test env). - if (typeof self !== 'undefined' && self.renderer) { - // Pull from `self.renderer`. - this.renderer = self.renderer; + if (this.runtime) { + this.renderer = this.runtime.renderer; } /** * ID of the drawable for this clone returned by the renderer, if rendered. From fa10a2279acc8450baedcb583b9b01a1ab2744e6 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Sep 2016 10:29:47 -0400 Subject: [PATCH 08/25] Only expose VirtualMachine to window for bundles --- package.json | 1 + src/index.js | 5 +- vm.js | 1177 ++++++++++++++++++++++++++++++--------------- vm.min.js | 12 +- webpack.config.js | 3 + 5 files changed, 788 insertions(+), 410 deletions(-) diff --git a/package.json b/package.json index f6e1ba3d8..33d5ab255 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ }, "devDependencies": { "eslint": "2.7.0", + "expose-loader": "0.7.1", "highlightjs": "8.7.0", "json-loader": "0.5.4", "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop", diff --git a/src/index.js b/src/index.js index 62baa53e5..a1981fe23 100644 --- a/src/index.js +++ b/src/index.js @@ -228,8 +228,5 @@ VirtualMachine.prototype.emitWorkspaceUpdate = function () { 'xml': this.editingTarget.blocks.toXML() }); }; -/** - * Export and bind to `window` - */ + module.exports = VirtualMachine; -if (typeof window !== 'undefined') window.VirtualMachine = module.exports; diff --git a/vm.js b/vm.js index 83bd76738..c09ec22aa 100644 --- a/vm.js +++ b/vm.js @@ -44,20 +44,28 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - var EventEmitter = __webpack_require__(1); - var util = __webpack_require__(2); + /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["VirtualMachine"] = __webpack_require__(1); + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - var Runtime = __webpack_require__(6); - var sb2import = __webpack_require__(33); - var Sprite = __webpack_require__(85); - var Blocks = __webpack_require__(34); +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var EventEmitter = __webpack_require__(2); + var util = __webpack_require__(3); + + var Runtime = __webpack_require__(7); + var sb2import = __webpack_require__(34); + var Sprite = __webpack_require__(89); + var Blocks = __webpack_require__(35); /** * Handles connections between blocks, stage, and extensions. * * @author Andrew Sliwinski + * @param {!RenderWebGL} renderer Renderer for the VM */ - function VirtualMachine () { + function VirtualMachine (renderer) { var instance = this; // Bind event emitter and runtime to VM instance EventEmitter.call(instance); @@ -65,7 +73,7 @@ * VM runtime, to store blocks, I/O devices, sprites/targets, etc. * @type {!Runtime} */ - instance.runtime = new Runtime(); + instance.runtime = new Runtime(renderer); /** * The "currently editing"/selected target ID for the VM. * Block events from any Blockly workspace are routed to this target. @@ -253,7 +261,10 @@ VirtualMachine.prototype.emitTargetsUpdate = function () { this.emit('targetsUpdate', { // [[target id, human readable target name], ...]. - targetList: this.runtime.targets.map(function(target) { + targetList: this.runtime.targets.filter(function (target) { + // Don't report clones. + return !target.hasOwnProperty('isOriginal') || target.isOriginal; + }).map(function(target) { return [target.id, target.getName()]; }), // Currently editing target id. @@ -270,15 +281,12 @@ 'xml': this.editingTarget.blocks.toXML() }); }; - /** - * Export and bind to `window` - */ + module.exports = VirtualMachine; - if (typeof window !== 'undefined') window.VirtualMachine = module.exports; /***/ }, -/* 1 */ +/* 2 */ /***/ function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. @@ -586,7 +594,7 @@ /***/ }, -/* 2 */ +/* 3 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors. @@ -1114,7 +1122,7 @@ } exports.isPrimitive = isPrimitive; - exports.isBuffer = __webpack_require__(4); + exports.isBuffer = __webpack_require__(5); function objectToString(o) { return Object.prototype.toString.call(o); @@ -1158,7 +1166,7 @@ * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ - exports.inherits = __webpack_require__(5); + exports.inherits = __webpack_require__(6); exports._extend = function(origin, add) { // Don't do anything if add isn't an object @@ -1176,10 +1184,10 @@ return Object.prototype.hasOwnProperty.call(obj, prop); } - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(3))) + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(4))) /***/ }, -/* 3 */ +/* 4 */ /***/ function(module, exports) { // shim for using process in browser @@ -1193,20 +1201,30 @@ var cachedSetTimeout; var cachedClearTimeout; + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); + } (function () { try { - cachedSetTimeout = setTimeout; - } catch (e) { - cachedSetTimeout = function () { - throw new Error('setTimeout is not defined'); + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; } + } catch (e) { + cachedSetTimeout = defaultSetTimout; } try { - cachedClearTimeout = clearTimeout; - } catch (e) { - cachedClearTimeout = function () { - throw new Error('clearTimeout is not defined'); + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { @@ -1214,6 +1232,11 @@ //normal enviroments in sane situations return setTimeout(fun, 0); } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); @@ -1234,6 +1257,11 @@ //normal enviroments in sane situations return clearTimeout(marker); } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); @@ -1345,7 +1373,7 @@ /***/ }, -/* 4 */ +/* 5 */ /***/ function(module, exports) { module.exports = function isBuffer(arg) { @@ -1356,7 +1384,7 @@ } /***/ }, -/* 5 */ +/* 6 */ /***/ function(module, exports) { if (typeof Object.create === 'function') { @@ -1385,37 +1413,44 @@ /***/ }, -/* 6 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { - var EventEmitter = __webpack_require__(1); - var Sequencer = __webpack_require__(7); - var Thread = __webpack_require__(9); - var util = __webpack_require__(2); + var EventEmitter = __webpack_require__(2); + var Sequencer = __webpack_require__(8); + var Thread = __webpack_require__(10); + var util = __webpack_require__(3); // Virtual I/O devices. - var Clock = __webpack_require__(11); - var Keyboard = __webpack_require__(12); - var Mouse = __webpack_require__(15); + var Clock = __webpack_require__(12); + var Keyboard = __webpack_require__(13); + var Mouse = __webpack_require__(16); var defaultBlockPackages = { - 'scratch3_control': __webpack_require__(17), - 'scratch3_event': __webpack_require__(28), - 'scratch3_looks': __webpack_require__(29), - 'scratch3_motion': __webpack_require__(30), - 'scratch3_operators': __webpack_require__(31), - 'scratch3_sensing': __webpack_require__(32) + 'scratch3_control': __webpack_require__(18), + 'scratch3_event': __webpack_require__(29), + 'scratch3_looks': __webpack_require__(30), + 'scratch3_motion': __webpack_require__(31), + 'scratch3_operators': __webpack_require__(32), + 'scratch3_sensing': __webpack_require__(33) }; /** * Manages targets, scripts, and the sequencer. + * @param {!RenderWebGL} renderer Renderer for the VM */ - function Runtime () { + function Runtime (renderer) { // Bind event emitter EventEmitter.call(this); // State for the runtime + /** + * Renderer + * @type {!RenderWebGL} + */ + this.renderer = renderer; + /** * Target management and storage. * @type {Array.} @@ -1450,6 +1485,11 @@ this._scriptGlowsPreviousFrame = []; this._editingTarget = null; + /** + * Currently known number of clones. + * @type {number} + */ + this._cloneCounter = 0; } /** @@ -1492,6 +1532,11 @@ */ Runtime.THREAD_STEP_INTERVAL = 1000 / 60; + /** + * How many clones can be created at a time. + * @const {number} + */ + Runtime.MAX_CLONES = 300; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -1584,11 +1629,13 @@ /** * Create a thread and push it to the list of threads. - * @param {!string} id ID of block that starts the stack + * @param {!string} id ID of block that starts the stack. + * @param {!Target} target Target to run thread on. * @return {!Thread} The newly created thread. */ - Runtime.prototype._pushThread = function (id) { + Runtime.prototype._pushThread = function (id, target) { var thread = new Thread(id); + thread.setTarget(target); thread.pushStack(id); this.threads.push(thread); return thread; @@ -1627,7 +1674,7 @@ } } // Otherwise add it. - this._pushThread(topBlockId); + this._pushThread(topBlockId, this._editingTarget); }; /** @@ -1696,7 +1743,8 @@ // If `restartExistingThreads` is true, we should stop // any existing threads starting with the top block. for (var i = 0; i < instance.threads.length; i++) { - if (instance.threads[i].topBlock === topBlockId) { + if (instance.threads[i].topBlock === topBlockId && + (!opt_target || instance.threads[i].target == opt_target)) { instance._removeThread(instance.threads[i]); } } @@ -1704,31 +1752,72 @@ // If `restartExistingThreads` is false, we should // give up if any threads with the top block are running. for (var j = 0; j < instance.threads.length; j++) { - if (instance.threads[j].topBlock === topBlockId) { + if (instance.threads[j].topBlock === topBlockId && + (!opt_target || instance.threads[j].target == opt_target)) { // Some thread is already running. return; } } } // Start the thread with this top block. - newThreads.push(instance._pushThread(topBlockId)); + newThreads.push(instance._pushThread(topBlockId, target)); }, opt_target); return newThreads; }; + /** + * Dispose of a target. + * @param {!Target} target Target to dispose of. + */ + Runtime.prototype.disposeTarget = function (target) { + // Allow target to do dispose actions. + target.dispose(); + // Remove from list of targets. + var index = this.targets.indexOf(target); + if (index > -1) { + this.targets.splice(index, 1); + } + }; + + /** + * Stop any threads acting on the target. + * @param {!Target} target Target to stop threads for. + */ + Runtime.prototype.stopForTarget = function (target) { + // Stop any threads on the target. + for (var i = 0; i < this.threads.length; i++) { + if (this.threads[i].target == target) { + this._removeThread(this.threads[i]); + } + } + }; + /** * Start all threads that start with the green flag. */ Runtime.prototype.greenFlag = function () { + this.stopAll(); this.ioDevices.clock.resetProjectTimer(); this.clearEdgeActivatedValues(); this.startHats('event_whenflagclicked'); }; /** - * Stop "everything" + * Stop "everything." */ Runtime.prototype.stopAll = function () { + // Dispose all clones. + var newTargets = []; + for (var i = 0; i < this.targets.length; i++) { + if (this.targets[i].hasOwnProperty('isOriginal') && + !this.targets[i].isOriginal) { + this.targets[i].dispose(); + } else { + newTargets.push(this.targets[i]); + } + } + this.targets = newTargets; + // Dispose all threads. var threadsCopy = this.threads.slice(); while (threadsCopy.length > 0) { var poppedThread = threadsCopy.pop(); @@ -1769,11 +1858,13 @@ // Find all scripts that should be glowing. for (var i = 0; i < this.threads.length; i++) { var thread = this.threads[i]; - var target = this.targetForThread(thread); + var target = thread.target; if (thread.requestScriptGlowInFrame && target == this._editingTarget) { var blockForThread = thread.peekStack() || thread.topBlock; var script = target.blocks.getTopLevelScript(blockForThread); - requestedGlowsThisFrame.push(script); + if (script) { + requestedGlowsThisFrame.push(script); + } } } // Compare to previous frame. @@ -1798,6 +1889,19 @@ this._scriptGlowsPreviousFrame = finalScriptGlows; }; + /** + * "Quiet" a script's glow: stop the VM from generating glow/unglow events + * about that script. Use when a script has just been deleted, but we may + * still be tracking glow data about it. + * @param {!string} scriptBlockId Id of top-level block in script to quiet. + */ + Runtime.prototype.quietGlow = function (scriptBlockId) { + var index = this._scriptGlowsPreviousFrame.indexOf(scriptBlockId); + if (index > -1) { + this._scriptGlowsPreviousFrame.splice(index, 1); + } + }; + /** * Emit feedback for block glowing (used in the sequencer). * @param {?string} blockId ID for the block to update glow @@ -1833,23 +1937,6 @@ this.emit(Runtime.VISUAL_REPORT, blockId, String(value)); }; - /** - * Return the Target for a particular thread. - * @param {!Thread} thread Thread to determine target for. - * @return {?Target} Target object, if one exists. - */ - Runtime.prototype.targetForThread = function (thread) { - // @todo This is a messy solution, - // but prevents having circular data references. - // Have a map or some other way to associate target with threads. - for (var t = 0; t < this.targets.length; t++) { - var target = this.targets[t]; - if (target.blocks.getBlock(thread.topBlock)) { - return target; - } - } - }; - /** * Get a target by its id. * @param {string} targetId Id of target to find. @@ -1864,6 +1951,36 @@ } }; + /** + * Get the first original (non-clone-block-created) sprite given a name. + * @param {string} spriteName Name of sprite to look for. + * @return {?Target} Target representing a sprite of the given name. + */ + Runtime.prototype.getSpriteTargetByName = function (spriteName) { + for (var i = 0; i < this.targets.length; i++) { + var target = this.targets[i]; + if (target.sprite && target.sprite.name == spriteName) { + return target; + } + } + }; + + /** + * Update the clone counter to track how many clones are created. + * @param {number} changeAmount How many clones have been created/destroyed. + */ + Runtime.prototype.changeCloneCounter = function (changeAmount) { + this._cloneCounter += changeAmount; + }; + + /** + * Return whether there are clones available. + * @return {boolean} True until the number of clones hits Runtime.MAX_CLONES. + */ + Runtime.prototype.clonesAvailable = function () { + return this._cloneCounter < Runtime.MAX_CLONES; + }; + /** * Get a target representing the Scratch stage, if one exists. * @return {?Target} The target, if found. @@ -1881,8 +1998,8 @@ * Handle an animation frame from the main thread. */ Runtime.prototype.animationFrame = function () { - if (self.renderer) { - self.renderer.draw(); + if (this.renderer) { + this.renderer.draw(); } }; @@ -1899,12 +2016,12 @@ /***/ }, -/* 7 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { - var Timer = __webpack_require__(8); - var Thread = __webpack_require__(9); - var execute = __webpack_require__(10); + var Timer = __webpack_require__(9); + var Thread = __webpack_require__(10); + var execute = __webpack_require__(11); function Sequencer (runtime) { /** @@ -2015,7 +2132,7 @@ branchNum = 1; } var currentBlockId = thread.peekStack(); - var branchId = this.runtime.targetForThread(thread).blocks.getBranch( + var branchId = thread.target.blocks.getBranch( currentBlockId, branchNum ); @@ -2059,8 +2176,7 @@ // Pop from the stack - finished this level of execution. thread.popStack(); // Push next connected block, if there is one. - var nextBlockId = (this.runtime.targetForThread(thread). - blocks.getNextBlock(currentBlockId)); + var nextBlockId = thread.target.blocks.getNextBlock(currentBlockId); if (nextBlockId) { thread.pushStack(nextBlockId); } @@ -2077,6 +2193,7 @@ Sequencer.prototype.retireThread = function (thread) { thread.stack = []; thread.stackFrame = []; + thread.requestScriptGlowInFrame = false; thread.setStatus(Thread.STATUS_DONE); }; @@ -2084,7 +2201,7 @@ /***/ }, -/* 8 */ +/* 9 */ /***/ function(module, exports) { /** @@ -2160,7 +2277,7 @@ /***/ }, -/* 9 */ +/* 10 */ /***/ function(module, exports) { /** @@ -2194,6 +2311,12 @@ */ this.status = 0; /* Thread.STATUS_RUNNING */ + /** + * Target of this thread. + * @type {?Target} + */ + this.target = null; + /** * Whether the thread requests its script to glow during this frame. * @type {boolean} @@ -2310,14 +2433,30 @@ this.status = status; }; + /** + * Set thread target. + * @param {?Target} target Target for this thread. + */ + Thread.prototype.setTarget = function (target) { + this.target = target; + }; + + /** + * Get thread target. + * @return {?Target} Target for this thread, if available. + */ + Thread.prototype.getTarget = function () { + return this.target; + }; + module.exports = Thread; /***/ }, -/* 10 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { - var Thread = __webpack_require__(9); + var Thread = __webpack_require__(10); /** * Utility function to determine if a value is a Promise. @@ -2335,12 +2474,19 @@ */ var execute = function (sequencer, thread) { var runtime = sequencer.runtime; - var target = runtime.targetForThread(thread); + var target = thread.target; // Current block to execute is the one on the top of the stack. var currentBlockId = thread.peekStack(); var currentStackFrame = thread.peekStackFrame(); + // Verify that the block still exists. + if (!target || + typeof target.blocks.getBlock(currentBlockId) === 'undefined') { + // No block found: stop the thread; script no longer exists. + sequencer.retireThread(thread); + return; + } // Query info about the block. var opcode = target.blocks.getOpcode(currentBlockId); var blockFunction = runtime.getOpcodeFunction(opcode); @@ -2513,10 +2659,10 @@ /***/ }, -/* 11 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { - var Timer = __webpack_require__(8); + var Timer = __webpack_require__(9); function Clock () { this._projectTimer = new Timer(); @@ -2535,10 +2681,10 @@ /***/ }, -/* 12 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); + var Cast = __webpack_require__(14); function Keyboard (runtime) { /** @@ -2626,10 +2772,10 @@ /***/ }, -/* 13 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { - var Color = __webpack_require__(14); + var Color = __webpack_require__(15); function Cast () {} @@ -2733,11 +2879,34 @@ } }; + /** + * Determine if a Scratch argument number represents a round integer. + * @param {*} val Value to check. + * @return {boolean} True if number looks like an integer. + */ + Cast.isInt = function (val) { + // Values that are already numbers. + if (typeof val === 'number') { + if (isNaN(val)) { // NaN is considered an integer. + return true; + } + // True if it's "round" (e.g., 2.0 and 2). + return val == parseInt(val); + } else if (typeof val === 'boolean') { + // `True` and `false` always represent integer after Scratch cast. + return true; + } else if (typeof val === 'string') { + // If it contains a decimal point, don't consider it an int. + return val.indexOf('.') < 0; + } + return false; + }; + module.exports = Cast; /***/ }, -/* 14 */ +/* 15 */ /***/ function(module, exports) { function Color () {} @@ -2819,10 +2988,10 @@ /***/ }, -/* 15 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { - var MathUtil = __webpack_require__(16); + var MathUtil = __webpack_require__(17); function Mouse (runtime) { this._x = 0; @@ -2852,20 +3021,17 @@ }; Mouse.prototype._activateClickHats = function (x, y) { - if (self.renderer) { - var pickPromise = self.renderer.pick(x, y); - var instance = this; - pickPromise.then(function(drawableID) { - for (var i = 0; i < instance.runtime.targets.length; i++) { - var target = instance.runtime.targets[i]; - if (target.hasOwnProperty('drawableID') && - target.drawableID == drawableID) { - instance.runtime.startHats('event_whenthisspriteclicked', - null, target); - return; - } + if (this.runtime.renderer) { + var drawableID = this.runtime.renderer.pick(x, y); + for (var i = 0; i < this.runtime.targets.length; i++) { + var target = this.runtime.targets[i]; + if (target.hasOwnProperty('drawableID') && + target.drawableID == drawableID) { + this.runtime.startHats('event_whenthisspriteclicked', + null, target); + return; } - }); + } } }; @@ -2885,7 +3051,7 @@ /***/ }, -/* 16 */ +/* 17 */ /***/ function(module, exports) { function MathUtil () {} @@ -2939,11 +3105,11 @@ /***/ }, -/* 17 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); - var Promise = __webpack_require__(18); + var Cast = __webpack_require__(14); + var Promise = __webpack_require__(19); function Scratch3ControlBlocks(runtime) { /** @@ -2965,7 +3131,18 @@ 'control_wait': this.wait, 'control_if': this.if, 'control_if_else': this.ifElse, - 'control_stop': this.stop + 'control_stop': this.stop, + 'control_create_clone_of_menu': this.createCloneMenu, + 'control_create_clone_of': this.createClone, + 'control_delete_this_clone': this.deleteClone + }; + }; + + Scratch3ControlBlocks.prototype.getHats = function () { + return { + 'control_start_as_clone': { + restartExistingThreads: false + } }; }; @@ -3062,30 +3239,42 @@ this.runtime.stopAll(); }; + // @todo (GH-146): remove. + Scratch3ControlBlocks.prototype.createCloneMenu = function (args) { + return args.CLONE_OPTION; + }; + + Scratch3ControlBlocks.prototype.createClone = function (args, util) { + var cloneTarget; + if (args.CLONE_OPTION == '_myself_') { + cloneTarget = util.target; + } else { + cloneTarget = this.runtime.getSpriteTargetByName(args.CLONE_OPTION); + } + if (!cloneTarget) { + return; + } + var newClone = cloneTarget.makeClone(); + if (newClone) { + this.runtime.targets.push(newClone); + } + }; + + Scratch3ControlBlocks.prototype.deleteClone = function (args, util) { + this.runtime.disposeTarget(util.target); + this.runtime.stopForTarget(util.target); + }; + module.exports = Scratch3ControlBlocks; -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - module.exports = __webpack_require__(19) - - /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(20); - __webpack_require__(22); - __webpack_require__(23); - __webpack_require__(24); - __webpack_require__(25); - __webpack_require__(27); + module.exports = __webpack_require__(20) /***/ }, @@ -3094,7 +3283,21 @@ 'use strict'; - var asap = __webpack_require__(21); + module.exports = __webpack_require__(21); + __webpack_require__(23); + __webpack_require__(24); + __webpack_require__(25); + __webpack_require__(26); + __webpack_require__(28); + + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var asap = __webpack_require__(22); function noop() {} @@ -3308,7 +3511,7 @@ /***/ }, -/* 21 */ +/* 22 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {"use strict"; @@ -3535,12 +3738,12 @@ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 22 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Promise = __webpack_require__(20); + var Promise = __webpack_require__(21); module.exports = Promise; Promise.prototype.done = function (onFulfilled, onRejected) { @@ -3554,12 +3757,12 @@ /***/ }, -/* 23 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Promise = __webpack_require__(20); + var Promise = __webpack_require__(21); module.exports = Promise; Promise.prototype['finally'] = function (f) { @@ -3576,14 +3779,14 @@ /***/ }, -/* 24 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; //This file contains the ES6 extensions to the core Promises/A+ API - var Promise = __webpack_require__(20); + var Promise = __webpack_require__(21); module.exports = Promise; @@ -3689,7 +3892,7 @@ /***/ }, -/* 25 */ +/* 26 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3697,8 +3900,8 @@ // This file contains then/promise specific extensions that are only useful // for node.js interop - var Promise = __webpack_require__(20); - var asap = __webpack_require__(26); + var Promise = __webpack_require__(21); + var asap = __webpack_require__(27); module.exports = Promise; @@ -3825,13 +4028,13 @@ /***/ }, -/* 26 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { "use strict"; // rawAsap provides everything we need except exception management. - var rawAsap = __webpack_require__(21); + var rawAsap = __webpack_require__(22); // RawTasks are recycled to reduce GC churn. var freeTasks = []; // We queue errors to ensure they are thrown in right order (FIFO). @@ -3897,12 +4100,12 @@ /***/ }, -/* 27 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Promise = __webpack_require__(20); + var Promise = __webpack_require__(21); module.exports = Promise; Promise.enableSynchronous = function () { @@ -3965,10 +4168,10 @@ /***/ }, -/* 28 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); + var Cast = __webpack_require__(14); function Scratch3EventBlocks(runtime) { /** @@ -4060,10 +4263,10 @@ /***/ }, -/* 29 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); + var Cast = __webpack_require__(14); function Scratch3LooksBlocks(runtime) { /** @@ -4277,12 +4480,12 @@ /***/ }, -/* 30 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); - var MathUtil = __webpack_require__(16); - var Timer = __webpack_require__(8); + var Cast = __webpack_require__(14); + var MathUtil = __webpack_require__(17); + var Timer = __webpack_require__(9); function Scratch3MotionBlocks(runtime) { /** @@ -4414,10 +4617,10 @@ /***/ }, -/* 31 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); + var Cast = __webpack_require__(14); function Scratch3OperatorsBlocks(runtime) { /** @@ -4499,10 +4702,8 @@ var low = nFrom <= nTo ? nFrom : nTo; var high = nFrom <= nTo ? nTo : nFrom; if (low == high) return low; - // If both low and high are ints, truncate the result to an int. - var lowInt = low == parseInt(low); - var highInt = high == parseInt(high); - if (lowInt && highInt) { + // If both arguments are ints, truncate the result to an int. + if (Cast.isInt(args.FROM) && Cast.isInt(args.TO)) { return low + parseInt(Math.random() * ((high + 1) - low)); } return (Math.random() * (high - low)) + low; @@ -4565,10 +4766,10 @@ /***/ }, -/* 32 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { - var Cast = __webpack_require__(13); + var Cast = __webpack_require__(14); function Scratch3SensingBlocks(runtime) { /** @@ -4650,7 +4851,7 @@ /***/ }, -/* 33 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4660,11 +4861,11 @@ * scratch-vm runtime structures. */ - var Blocks = __webpack_require__(34); - var Sprite = __webpack_require__(85); - var Color = __webpack_require__(14); - var uid = __webpack_require__(88); - var specMap = __webpack_require__(89); + var Blocks = __webpack_require__(35); + var Sprite = __webpack_require__(89); + var Color = __webpack_require__(15); + var uid = __webpack_require__(92); + var specMap = __webpack_require__(93); /** * Top-level handler. Parse provided JSON, @@ -4695,7 +4896,7 @@ // Blocks container for this object. var blocks = new Blocks(); // @todo: For now, load all Scratch objects (stage/sprites) as a Sprite. - var sprite = new Sprite(blocks); + var sprite = new Sprite(blocks, runtime); // Sprite/stage name from JSON. if (object.hasOwnProperty('objName')) { sprite.name = object.objName; @@ -4706,7 +4907,7 @@ var costume = object.costumes[i]; // @todo: Make sure all the relevant metadata is being pulled out. sprite.costumes.push({ - skin: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/' + skin: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/' + costume.baseLayerMD5 + '/get/', name: costume.costumeName, bitmapResolution: costume.bitmapResolution, @@ -4723,26 +4924,27 @@ var target = sprite.createClone(); // Add it to the runtime's list of targets. runtime.targets.push(target); - if (object.scratchX) { + if (object.hasOwnProperty('scratchX')) { target.x = object.scratchX; } - if (object.scratchY) { + if (object.hasOwnProperty('scratchY')) { target.y = object.scratchY; } - if (object.direction) { + if (object.hasOwnProperty('direction')) { target.direction = object.direction; } - if (object.scale) { + if (object.hasOwnProperty('scale')) { // SB2 stores as 1.0 = 100%; we use % in the VM. target.size = object.scale * 100; } - if (object.visible) { + if (object.hasOwnProperty('visible')) { target.visible = object.visible; } - if (object.currentCostumeIndex) { + if (object.hasOwnProperty('currentCostumeIndex')) { target.currentCostume = object.currentCostumeIndex; } target.isStage = topLevel; + target.updateAllDrawableProperties(); // The stage will have child objects; recursively process them. if (object.children) { for (var j = 0; j < object.children.length; j++) { @@ -4955,10 +5157,11 @@ /***/ }, -/* 34 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { - var adapter = __webpack_require__(35); + var adapter = __webpack_require__(36); + var xmlEscape = __webpack_require__(88); /** * @fileoverview @@ -5144,6 +5347,10 @@ if (this._blocks[e.blockId].shadow) { return; } + // Inform any runtime to forget about glows on this script. + if (opt_runtime && this._blocks[e.blockId].topLevel) { + opt_runtime.quietGlow(e.blockId); + } this.deleteBlock({ id: e.blockId }); @@ -5329,8 +5536,12 @@ // Add any fields on this block. for (var field in block.fields) { var blockField = block.fields[field]; + var value = blockField.value; + if (typeof value === 'string') { + value = xmlEscape(blockField.value); + } xmlString += '' + - blockField.value + ''; + value + ''; } // Add blocks connected to the next connection. if (block.next) { @@ -5369,10 +5580,10 @@ /***/ }, -/* 35 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { - var html = __webpack_require__(36); + var html = __webpack_require__(37); /** * Adapter between block creation events and block representation which can be @@ -5518,11 +5729,11 @@ /***/ }, -/* 36 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { - var Parser = __webpack_require__(37), - DomHandler = __webpack_require__(44); + var Parser = __webpack_require__(38), + DomHandler = __webpack_require__(45); function defineProp(name, value){ delete module.exports[name]; @@ -5532,26 +5743,26 @@ module.exports = { Parser: Parser, - Tokenizer: __webpack_require__(38), - ElementType: __webpack_require__(45), + Tokenizer: __webpack_require__(39), + ElementType: __webpack_require__(46), DomHandler: DomHandler, get FeedHandler(){ - return defineProp("FeedHandler", __webpack_require__(48)); + return defineProp("FeedHandler", __webpack_require__(49)); }, get Stream(){ - return defineProp("Stream", __webpack_require__(49)); + return defineProp("Stream", __webpack_require__(50)); }, get WritableStream(){ - return defineProp("WritableStream", __webpack_require__(50)); + return defineProp("WritableStream", __webpack_require__(51)); }, get ProxyHandler(){ - return defineProp("ProxyHandler", __webpack_require__(71)); + return defineProp("ProxyHandler", __webpack_require__(74)); }, get DomUtils(){ - return defineProp("DomUtils", __webpack_require__(72)); + return defineProp("DomUtils", __webpack_require__(75)); }, get CollectingHandler(){ - return defineProp("CollectingHandler", __webpack_require__(84)); + return defineProp("CollectingHandler", __webpack_require__(87)); }, // For legacy support DefaultHandler: DomHandler, @@ -5592,10 +5803,10 @@ /***/ }, -/* 37 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { - var Tokenizer = __webpack_require__(38); + var Tokenizer = __webpack_require__(39); /* Options: @@ -5716,7 +5927,7 @@ if(this._cbs.onparserinit) this._cbs.onparserinit(this); } - __webpack_require__(2).inherits(Parser, __webpack_require__(1).EventEmitter); + __webpack_require__(3).inherits(Parser, __webpack_require__(2).EventEmitter); Parser.prototype._updatePosition = function(initialOffset){ if(this.endIndex === null){ @@ -5950,15 +6161,15 @@ /***/ }, -/* 38 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { module.exports = Tokenizer; - var decodeCodePoint = __webpack_require__(39), - entityMap = __webpack_require__(41), - legacyMap = __webpack_require__(42), - xmlMap = __webpack_require__(43), + var decodeCodePoint = __webpack_require__(40), + entityMap = __webpack_require__(42), + legacyMap = __webpack_require__(43), + xmlMap = __webpack_require__(44), i = 0, @@ -6862,10 +7073,10 @@ /***/ }, -/* 39 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { - var decodeMap = __webpack_require__(40); + var decodeMap = __webpack_require__(41); module.exports = decodeCodePoint; @@ -6894,7 +7105,7 @@ /***/ }, -/* 40 */ +/* 41 */ /***/ function(module, exports) { module.exports = { @@ -6929,7 +7140,7 @@ }; /***/ }, -/* 41 */ +/* 42 */ /***/ function(module, exports) { module.exports = { @@ -9061,7 +9272,7 @@ }; /***/ }, -/* 42 */ +/* 43 */ /***/ function(module, exports) { module.exports = { @@ -9174,7 +9385,7 @@ }; /***/ }, -/* 43 */ +/* 44 */ /***/ function(module, exports) { module.exports = { @@ -9186,14 +9397,14 @@ }; /***/ }, -/* 44 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { - var ElementType = __webpack_require__(45); + var ElementType = __webpack_require__(46); var re_whitespace = /\s+/g; - var NodePrototype = __webpack_require__(46); - var ElementPrototype = __webpack_require__(47); + var NodePrototype = __webpack_require__(47); + var ElementPrototype = __webpack_require__(48); function DomHandler(callback, options, elementCB){ if(typeof callback === "object"){ @@ -9374,7 +9585,7 @@ /***/ }, -/* 45 */ +/* 46 */ /***/ function(module, exports) { //Types of elements found in the DOM @@ -9395,7 +9606,7 @@ /***/ }, -/* 46 */ +/* 47 */ /***/ function(module, exports) { // This object will be used as the prototype for Nodes when creating a @@ -9445,11 +9656,11 @@ /***/ }, -/* 47 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { // DOM-Level-1-compliant structure - var NodePrototype = __webpack_require__(46); + var NodePrototype = __webpack_require__(47); var ElementPrototype = module.exports = Object.create(NodePrototype); var domLvl1 = { @@ -9471,10 +9682,10 @@ /***/ }, -/* 48 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { - var index = __webpack_require__(36), + var index = __webpack_require__(37), DomHandler = index.DomHandler, DomUtils = index.DomUtils; @@ -9483,7 +9694,7 @@ this.init(callback, options); } - __webpack_require__(2).inherits(FeedHandler, DomHandler); + __webpack_require__(3).inherits(FeedHandler, DomHandler); FeedHandler.prototype.init = DomHandler; @@ -9572,18 +9783,18 @@ /***/ }, -/* 49 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { module.exports = Stream; - var Parser = __webpack_require__(50); + var Parser = __webpack_require__(51); function Stream(options){ Parser.call(this, new Cbs(this), options); } - __webpack_require__(2).inherits(Stream, Parser); + __webpack_require__(3).inherits(Stream, Parser); Stream.prototype.readable = true; @@ -9591,7 +9802,7 @@ this.scope = scope; } - var EVENTS = __webpack_require__(36).EVENTS; + var EVENTS = __webpack_require__(37).EVENTS; Object.keys(EVENTS).forEach(function(name){ if(EVENTS[name] === 0){ @@ -9612,13 +9823,13 @@ }); /***/ }, -/* 50 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { module.exports = Stream; - var Parser = __webpack_require__(37), - WritableStream = __webpack_require__(51).Writable || __webpack_require__(70).Writable; + var Parser = __webpack_require__(38), + WritableStream = __webpack_require__(52).Writable || __webpack_require__(73).Writable; function Stream(cbs, options){ var parser = this._parser = new Parser(cbs, options); @@ -9630,7 +9841,7 @@ }); } - __webpack_require__(2).inherits(Stream, WritableStream); + __webpack_require__(3).inherits(Stream, WritableStream); WritableStream.prototype._write = function(chunk, encoding, cb){ this._parser.write(chunk); @@ -9638,7 +9849,7 @@ }; /***/ }, -/* 51 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -9664,15 +9875,15 @@ module.exports = Stream; - var EE = __webpack_require__(1).EventEmitter; - var inherits = __webpack_require__(5); + var EE = __webpack_require__(2).EventEmitter; + var inherits = __webpack_require__(53); inherits(Stream, EE); - Stream.Readable = __webpack_require__(52); - Stream.Writable = __webpack_require__(66); - Stream.Duplex = __webpack_require__(67); - Stream.Transform = __webpack_require__(68); - Stream.PassThrough = __webpack_require__(69); + Stream.Readable = __webpack_require__(54); + Stream.Writable = __webpack_require__(69); + Stream.Duplex = __webpack_require__(70); + Stream.Transform = __webpack_require__(71); + Stream.PassThrough = __webpack_require__(72); // Backwards-compat with node 0.4.x Stream.Stream = Stream; @@ -9771,24 +9982,53 @@ /***/ }, -/* 52 */ -/***/ function(module, exports, __webpack_require__) { +/* 53 */ +/***/ function(module, exports) { - /* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(53); - exports.Stream = __webpack_require__(51); - exports.Readable = exports; - exports.Writable = __webpack_require__(62); - exports.Duplex = __webpack_require__(61); - exports.Transform = __webpack_require__(64); - exports.PassThrough = __webpack_require__(65); - if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = __webpack_require__(51); + 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 + } } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, -/* 53 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(55); + exports.Stream = __webpack_require__(52); + exports.Readable = exports; + exports.Writable = __webpack_require__(65); + exports.Duplex = __webpack_require__(64); + exports.Transform = __webpack_require__(67); + exports.PassThrough = __webpack_require__(68); + if (!process.browser && process.env.READABLE_STREAM === 'disable') { + module.exports = __webpack_require__(52); + } + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }, +/* 55 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. @@ -9815,17 +10055,17 @@ module.exports = Readable; /**/ - var isArray = __webpack_require__(54); + var isArray = __webpack_require__(56); /**/ /**/ - var Buffer = __webpack_require__(55).Buffer; + var Buffer = __webpack_require__(57).Buffer; /**/ Readable.ReadableState = ReadableState; - var EE = __webpack_require__(1).EventEmitter; + var EE = __webpack_require__(2).EventEmitter; /**/ if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { @@ -9833,18 +10073,18 @@ }; /**/ - var Stream = __webpack_require__(51); + var Stream = __webpack_require__(52); /**/ - var util = __webpack_require__(59); - util.inherits = __webpack_require__(5); + var util = __webpack_require__(61); + util.inherits = __webpack_require__(62); /**/ var StringDecoder; /**/ - var debug = __webpack_require__(60); + var debug = __webpack_require__(63); if (debug && debug.debuglog) { debug = debug.debuglog('stream'); } else { @@ -9856,7 +10096,7 @@ util.inherits(Readable, Stream); function ReadableState(options, stream) { - var Duplex = __webpack_require__(61); + var Duplex = __webpack_require__(64); options = options || {}; @@ -9917,14 +10157,14 @@ this.encoding = null; if (options.encoding) { if (!StringDecoder) - StringDecoder = __webpack_require__(63).StringDecoder; + StringDecoder = __webpack_require__(66).StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { - var Duplex = __webpack_require__(61); + var Duplex = __webpack_require__(64); if (!(this instanceof Readable)) return new Readable(options); @@ -10027,7 +10267,7 @@ // backwards compatibility. Readable.prototype.setEncoding = function(enc) { if (!StringDecoder) - StringDecoder = __webpack_require__(63).StringDecoder; + StringDecoder = __webpack_require__(66).StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; return this; @@ -10743,10 +10983,10 @@ return -1; } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 54 */ +/* 56 */ /***/ function(module, exports) { module.exports = Array.isArray || function (arr) { @@ -10755,7 +10995,7 @@ /***/ }, -/* 55 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer, global) {/*! @@ -10768,9 +11008,9 @@ 'use strict' - var base64 = __webpack_require__(56) - var ieee754 = __webpack_require__(57) - var isArray = __webpack_require__(58) + var base64 = __webpack_require__(58) + var ieee754 = __webpack_require__(59) + var isArray = __webpack_require__(60) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -12548,10 +12788,10 @@ return val !== val // eslint-disable-line no-self-compare } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55).Buffer, (function() { return this; }()))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(57).Buffer, (function() { return this; }()))) /***/ }, -/* 56 */ +/* 58 */ /***/ function(module, exports) { 'use strict' @@ -12666,7 +12906,7 @@ /***/ }, -/* 57 */ +/* 59 */ /***/ function(module, exports) { exports.read = function (buffer, offset, isLE, mLen, nBytes) { @@ -12756,7 +12996,7 @@ /***/ }, -/* 58 */ +/* 60 */ /***/ function(module, exports) { var toString = {}.toString; @@ -12767,7 +13007,7 @@ /***/ }, -/* 59 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. @@ -12878,16 +13118,45 @@ return Object.prototype.toString.call(o); } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55).Buffer)) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(57).Buffer)) /***/ }, -/* 60 */ +/* 62 */ +/***/ function(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 + } + } + + +/***/ }, +/* 63 */ /***/ function(module, exports) { /* (ignored) */ /***/ }, -/* 61 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. @@ -12928,12 +13197,12 @@ /**/ - var util = __webpack_require__(59); - util.inherits = __webpack_require__(5); + var util = __webpack_require__(61); + util.inherits = __webpack_require__(62); /**/ - var Readable = __webpack_require__(53); - var Writable = __webpack_require__(62); + var Readable = __webpack_require__(55); + var Writable = __webpack_require__(65); util.inherits(Duplex, Readable); @@ -12980,10 +13249,10 @@ } } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 62 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. @@ -13014,18 +13283,18 @@ module.exports = Writable; /**/ - var Buffer = __webpack_require__(55).Buffer; + var Buffer = __webpack_require__(57).Buffer; /**/ Writable.WritableState = WritableState; /**/ - var util = __webpack_require__(59); - util.inherits = __webpack_require__(5); + var util = __webpack_require__(61); + util.inherits = __webpack_require__(62); /**/ - var Stream = __webpack_require__(51); + var Stream = __webpack_require__(52); util.inherits(Writable, Stream); @@ -13036,7 +13305,7 @@ } function WritableState(options, stream) { - var Duplex = __webpack_require__(61); + var Duplex = __webpack_require__(64); options = options || {}; @@ -13124,7 +13393,7 @@ } function Writable(options) { - var Duplex = __webpack_require__(61); + var Duplex = __webpack_require__(64); // Writable ctor is applied to Duplexes, though they're not // instanceof Writable, they're instanceof Readable. @@ -13464,10 +13733,10 @@ state.ended = true; } - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 63 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -13491,7 +13760,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - var Buffer = __webpack_require__(55).Buffer; + var Buffer = __webpack_require__(57).Buffer; var isBufferEncoding = Buffer.isEncoding || function(encoding) { @@ -13694,7 +13963,7 @@ /***/ }, -/* 64 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -13763,11 +14032,11 @@ module.exports = Transform; - var Duplex = __webpack_require__(61); + var Duplex = __webpack_require__(64); /**/ - var util = __webpack_require__(59); - util.inherits = __webpack_require__(5); + var util = __webpack_require__(61); + util.inherits = __webpack_require__(62); /**/ util.inherits(Transform, Duplex); @@ -13909,7 +14178,7 @@ /***/ }, -/* 65 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -13939,11 +14208,11 @@ module.exports = PassThrough; - var Transform = __webpack_require__(64); + var Transform = __webpack_require__(67); /**/ - var util = __webpack_require__(59); - util.inherits = __webpack_require__(5); + var util = __webpack_require__(61); + util.inherits = __webpack_require__(62); /**/ util.inherits(PassThrough, Transform); @@ -13960,27 +14229,6 @@ }; -/***/ }, -/* 66 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(62) - - -/***/ }, -/* 67 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(61) - - -/***/ }, -/* 68 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(64) - - /***/ }, /* 69 */ /***/ function(module, exports, __webpack_require__) { @@ -13990,12 +14238,33 @@ /***/ }, /* 70 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(64) + + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(67) + + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(68) + + +/***/ }, +/* 73 */ /***/ function(module, exports) { /* (ignored) */ /***/ }, -/* 71 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { module.exports = ProxyHandler; @@ -14004,7 +14273,7 @@ this._cbs = cbs || {}; } - var EVENTS = __webpack_require__(36).EVENTS; + var EVENTS = __webpack_require__(37).EVENTS; Object.keys(EVENTS).forEach(function(name){ if(EVENTS[name] === 0){ name = "on" + name; @@ -14027,18 +14296,18 @@ }); /***/ }, -/* 72 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { var DomUtils = module.exports; [ - __webpack_require__(73), - __webpack_require__(79), - __webpack_require__(80), - __webpack_require__(81), + __webpack_require__(76), __webpack_require__(82), - __webpack_require__(83) + __webpack_require__(83), + __webpack_require__(84), + __webpack_require__(85), + __webpack_require__(86) ].forEach(function(ext){ Object.keys(ext).forEach(function(key){ DomUtils[key] = ext[key].bind(DomUtils); @@ -14047,11 +14316,11 @@ /***/ }, -/* 73 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { - var ElementType = __webpack_require__(45), - getOuterHTML = __webpack_require__(74), + var ElementType = __webpack_require__(46), + getOuterHTML = __webpack_require__(77), isTag = ElementType.isTag; module.exports = { @@ -14075,14 +14344,14 @@ /***/ }, -/* 74 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { /* Module dependencies */ - var ElementType = __webpack_require__(75); - var entities = __webpack_require__(76); + var ElementType = __webpack_require__(78); + var entities = __webpack_require__(79); /* Boolean Attributes @@ -14259,7 +14528,7 @@ /***/ }, -/* 75 */ +/* 78 */ /***/ function(module, exports) { //Types of elements found in the DOM @@ -14278,11 +14547,11 @@ }; /***/ }, -/* 76 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { - var encode = __webpack_require__(77), - decode = __webpack_require__(78); + var encode = __webpack_require__(80), + decode = __webpack_require__(81); exports.decode = function(data, level){ return (!level || level <= 0 ? decode.XML : decode.HTML)(data); @@ -14317,15 +14586,15 @@ /***/ }, -/* 77 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var inverseXML = getInverseObj(__webpack_require__(43)), + var inverseXML = getInverseObj(__webpack_require__(44)), xmlReplacer = getInverseReplacer(inverseXML); exports.XML = getInverse(inverseXML, xmlReplacer); - var inverseHTML = getInverseObj(__webpack_require__(41)), + var inverseHTML = getInverseObj(__webpack_require__(42)), htmlReplacer = getInverseReplacer(inverseHTML); exports.HTML = getInverse(inverseHTML, htmlReplacer); @@ -14396,13 +14665,13 @@ /***/ }, -/* 78 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { - var entityMap = __webpack_require__(41), - legacyMap = __webpack_require__(42), - xmlMap = __webpack_require__(43), - decodeCodePoint = __webpack_require__(39); + var entityMap = __webpack_require__(42), + legacyMap = __webpack_require__(43), + xmlMap = __webpack_require__(44), + decodeCodePoint = __webpack_require__(40); var decodeXMLStrict = getStrictDecoder(xmlMap), decodeHTMLStrict = getStrictDecoder(entityMap); @@ -14473,7 +14742,7 @@ }; /***/ }, -/* 79 */ +/* 82 */ /***/ function(module, exports) { var getChildren = exports.getChildren = function(elem){ @@ -14503,7 +14772,7 @@ /***/ }, -/* 80 */ +/* 83 */ /***/ function(module, exports) { exports.removeElement = function(elem){ @@ -14586,10 +14855,10 @@ /***/ }, -/* 81 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { - var isTag = __webpack_require__(45).isTag; + var isTag = __webpack_require__(46).isTag; module.exports = { filter: filter, @@ -14686,10 +14955,10 @@ /***/ }, -/* 82 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { - var ElementType = __webpack_require__(45); + var ElementType = __webpack_require__(46); var isTag = exports.isTag = ElementType.isTag; exports.testElement = function(options, element){ @@ -14779,7 +15048,7 @@ /***/ }, -/* 83 */ +/* 86 */ /***/ function(module, exports) { // removeSubsets @@ -14926,7 +15195,7 @@ /***/ }, -/* 84 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { module.exports = CollectingHandler; @@ -14936,7 +15205,7 @@ this.events = []; } - var EVENTS = __webpack_require__(36).EVENTS; + var EVENTS = __webpack_require__(37).EVENTS; Object.keys(EVENTS).forEach(function(name){ if(EVENTS[name] === 0){ name = "on" + name; @@ -14987,19 +15256,48 @@ /***/ }, -/* 85 */ +/* 88 */ +/***/ function(module, exports) { + + /** + * Escape a string to be safe to use in XML content. + * CC-BY-SA: hgoebl + * https://stackoverflow.com/questions/7918868/ + * how-to-escape-xml-entities-in-javascript + * @param {!string} unsafe Unsafe string. + * @return {string} XML-escaped string, for use within an XML tag. + */ + var xmlEscape = function (unsafe) { + return unsafe.replace(/[<>&'"]/g, function (c) { + switch (c) { + case '<': return '<'; + case '>': return '>'; + case '&': return '&'; + case '\'': return '''; + case '"': return '"'; + } + }); + }; + + module.exports = xmlEscape; + + +/***/ }, +/* 89 */ /***/ function(module, exports, __webpack_require__) { - var Clone = __webpack_require__(86); - var Blocks = __webpack_require__(34); + var Clone = __webpack_require__(90); + var Blocks = __webpack_require__(35); /** * Sprite to be used on the Scratch stage. * All clones of a sprite have shared blocks, shared costumes, shared variables. * @param {?Blocks} blocks Shared blocks object for all clones of sprite. + * @param {Runtime} runtime Reference to the runtime. * @constructor */ - function Sprite (blocks) { + function Sprite (blocks, runtime) { + this.runtime = runtime; if (!blocks) { // Shared set of blocks for all clones. blocks = new Blocks(); @@ -15035,8 +15333,13 @@ * @returns {!Clone} Newly created clone. */ Sprite.prototype.createClone = function () { - var newClone = new Clone(this); + var newClone = new Clone(this, this.runtime); + newClone.isOriginal = this.clones.length == 0; this.clones.push(newClone); + if (newClone.isOriginal) { + newClone.initDrawable(); + newClone.updateAllDrawableProperties(); + } return newClone; }; @@ -15044,20 +15347,22 @@ /***/ }, -/* 86 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { - var util = __webpack_require__(2); - var MathUtil = __webpack_require__(16); - var Target = __webpack_require__(87); + var util = __webpack_require__(3); + var MathUtil = __webpack_require__(17); + var Target = __webpack_require__(91); /** * Clone (instance) of a sprite. * @param {!Sprite} sprite Reference to the sprite. + * @param {Runtime} runtime Reference to the runtime. * @constructor */ - function Clone(sprite) { + function Clone(sprite, runtime) { Target.call(this, sprite.blocks); + this.runtime = runtime; /** * Reference to the sprite that this is a clone of. * @type {!Sprite} @@ -15068,18 +15373,14 @@ * @type {?RenderWebGLWorker} */ this.renderer = null; - // If this is not true, there is no renderer (e.g., running in a test env). - if (typeof self !== 'undefined' && self.renderer) { - // Pull from `self.renderer`. - this.renderer = self.renderer; + if (this.runtime) { + this.renderer = this.runtime.renderer; } /** * ID of the drawable for this clone returned by the renderer, if rendered. * @type {?Number} */ this.drawableID = null; - - this.initDrawable(); } util.inherits(Clone, Target); @@ -15088,17 +15389,25 @@ */ Clone.prototype.initDrawable = function () { if (this.renderer) { - var createPromise = this.renderer.createDrawable(); - var instance = this; - createPromise.then(function (id) { - instance.drawableID = id; - // Once the drawable is created, send our current set of properties. - instance.updateAllDrawableProperties(); - }); + this.drawableID = this.renderer.createDrawable(); + this.updateAllDrawableProperties(); + } + // If we're a clone, start the hats. + if (!this.isOriginal) { + this.runtime.startHats( + 'control_start_as_clone', null, this + ); } }; // Clone-level properties. + /** + * Whether this represents an "original" clone, i.e., created by the editor + * and not clone blocks. In interface terms, this true for a "sprite." + * @type {boolean} + */ + Clone.prototype.isOriginal = true; + /** * Whether this clone represents the Scratch stage. * @type {boolean} @@ -15352,15 +15661,51 @@ return false; }; + /** + * Make a clone of this clone, copying any run-time properties. + * If we've hit the global clone limit, returns null. + * @return {!Clone} New clone object. + */ + Clone.prototype.makeClone = function () { + if (!this.runtime.clonesAvailable()) { + return; // Hit max clone limit. + } + this.runtime.changeCloneCounter(1); + var newClone = this.sprite.createClone(); + newClone.x = this.x; + newClone.y = this.y; + newClone.direction = this.direction; + newClone.visible = this.visible; + newClone.size = this.size; + newClone.currentCostume = this.currentCostume; + newClone.effects = JSON.parse(JSON.stringify(this.effects)); + newClone.initDrawable(); + newClone.updateAllDrawableProperties(); + return newClone; + }; + + /** + * Dispose of this clone, destroying any run-time properties. + */ + Clone.prototype.dispose = function () { + if (this.isOriginal) { // Don't allow a non-clone to delete itself. + return; + } + this.runtime.changeCloneCounter(-1); + if (this.renderer && this.drawableID !== null) { + this.renderer.destroyDrawable(this.drawableID); + } + }; + module.exports = Clone; /***/ }, -/* 87 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { - var Blocks = __webpack_require__(34); - var uid = __webpack_require__(88); + var Blocks = __webpack_require__(35); + var uid = __webpack_require__(92); /** * @fileoverview @@ -15398,11 +15743,19 @@ return this.id; }; + /** + * Call to destroy a target. + * @abstract + */ + Target.prototype.dispose = function () { + + }; + module.exports = Target; /***/ }, -/* 88 */ +/* 92 */ /***/ function(module, exports) { /** @@ -15437,7 +15790,7 @@ /***/ }, -/* 89 */ +/* 93 */ /***/ function(module, exports) { /** @@ -15446,9 +15799,22 @@ * the SB2 JSON format and the data we need to run a project * in the Scratch 3.0 VM. * Notably: - * - Map 2.0-format opcodes (forward:) into 3.0-format (motion_movesteps). + * - Map 2.0 and 1.4 opcodes (forward:) into 3.0-format (motion_movesteps). * - Map ordered, unnamed args to unordered, named inputs and fields. * Keep this up-to-date as 3.0 blocks are renamed, changed, etc. + * Originally this was generated largely by a hand-guided scripting process. + * The relevant data lives here: + * https://github.com/LLK/scratch-flash/blob/master/src/Specs.as + * (for the old opcode and argument order). + * and here: + * https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical + * (for the new opcodes and argument names). + * and here: + * https://github.com/LLK/scratch-blocks/blob/develop/tests/ + * (for the shadow blocks created for each block). + * I started with the `commands` array in Specs.as, and discarded irrelevant + * properties. By hand, I matched the opcode name to the 3.0 opcode. + * Finally, I filled in the expected arguments as below. */ var specMap = { 'forward:':{ @@ -16076,8 +16442,9 @@ 'opcode':'event_broadcast', 'argMap':[ { - 'type':'field', - 'fieldName':'BROADCAST_OPTION' + 'type':'input', + 'inputOp':'event_broadcast_menu', + 'inputName':'BROADCAST_OPTION' } ] }, @@ -16085,8 +16452,9 @@ 'opcode':'event_broadcastandwait', 'argMap':[ { - 'type':'field', - 'fieldName':'BROADCAST_OPTION' + 'type':'input', + 'inputOp':'event_broadcast_menu', + 'inputName':'BROADCAST_OPTION' } ] }, @@ -16345,12 +16713,12 @@ 'argMap':[ { 'type':'input', - 'inputOp':'sensing_ofattributemenu', - 'inputName':'ATTRIBUTE' + 'inputOp':'sensing_of_property_menu', + 'inputName':'PROPERTY' }, { 'type':'input', - 'inputOp':'sensing_ofobjectmenu', + 'inputOp':'sensing_of_object_menu', 'inputName':'OBJECT' } ] @@ -16670,13 +17038,22 @@ } ] }, + 'contentsOfList:':{ + 'opcode':'data_list', + 'argMap':[ + { + 'type':'field', + 'fieldName':'LIST' + } + ] + }, 'append:toList:':{ - 'opcode':'data_listadd', + 'opcode':'data_addtolist', 'argMap':[ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' }, { 'type':'field', @@ -16685,12 +17062,12 @@ ] }, 'deleteLine:ofList:':{ - 'opcode':'data_listdelete', + 'opcode':'data_deleteoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -16699,17 +17076,17 @@ ] }, 'insert:at:ofList:':{ - 'opcode':'data_listinsert', + 'opcode':'data_insertatlist', 'argMap':[ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' }, { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -16718,12 +17095,12 @@ ] }, 'setLine:ofList:to:':{ - 'opcode':'data_listreplace', + 'opcode':'data_replaceitemoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -16732,17 +17109,17 @@ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' } ] }, 'getLine:ofList:':{ - 'opcode':'data_listitem', + 'opcode':'data_itemoflist', 'argMap':[ { 'type':'input', - 'inputOp':'text', - 'inputName':'LINE' + 'inputOp':'math_integer', + 'inputName':'INDEX' }, { 'type':'field', @@ -16751,7 +17128,7 @@ ] }, 'lineCountOfList:':{ - 'opcode':'data_listlength', + 'opcode':'data_lengthoflist', 'argMap':[ { 'type':'field', @@ -16760,7 +17137,7 @@ ] }, 'list:contains:':{ - 'opcode':'data_listcontains', + 'opcode':'data_listcontainsitem', 'argMap':[ { 'type':'field', @@ -16769,7 +17146,7 @@ { 'type':'input', 'inputOp':'text', - 'inputName':'VALUE' + 'inputName':'ITEM' } ] }, diff --git a/vm.min.js b/vm.min.js index ce44c7510..6a800a5a1 100644 --- a/vm.min.js +++ b/vm.min.js @@ -1,11 +1,11 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(){var t=this;i.call(t),t.runtime=new s,t.editingTarget=null,t.runtime.on(s.SCRIPT_GLOW_ON,function(e){t.emit(s.SCRIPT_GLOW_ON,{id:e})}),t.runtime.on(s.SCRIPT_GLOW_OFF,function(e){t.emit(s.SCRIPT_GLOW_OFF,{id:e})}),t.runtime.on(s.BLOCK_GLOW_ON,function(e){t.emit(s.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(s.BLOCK_GLOW_OFF,function(e){t.emit(s.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(s.VISUAL_REPORT,function(e,r){t.emit(s.VISUAL_REPORT,{id:e,value:r})}),this.blockListener=this.blockListener.bind(this)}var i=r(1),o=r(2),s=r(6),a=r(33),u=r(85),c=r(34);o.inherits(n,i),n.prototype.start=function(){this.runtime.start()},n.prototype.greenFlag=function(){this.runtime.greenFlag()},n.prototype.stopAll=function(){this.runtime.stopAll()},n.prototype.getPlaygroundData=function(){this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},n.prototype.postIOData=function(t,e){this.runtime.ioDevices[t]&&this.runtime.ioDevices[t].postData(e)},n.prototype.loadProject=function(t){a(t,this.runtime),this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget)},n.prototype.createEmptyProject=function(){var t=new c,e=new u(t);e.name="Stage",e.costumes.push({skin:"/assets/stage.png",name:"backdrop1",bitmapResolution:1,rotationCenterX:240,rotationCenterY:180});var r=e.createClone();this.runtime.targets.push(r),r.x=0,r.y=0,r.direction=90,r.size=200,r.visible=!0,r.isStage=!0;var n=new c,i=new u(n);i.name="Sprite1",i.costumes.push({skin:"/assets/scratch_cat.svg",name:"costume1",bitmapResolution:1,rotationCenterX:47,rotationCenterY:55});var o=i.createClone();this.runtime.targets.push(o),o.x=0,o.y=0,o.direction=90,o.size=100,o.visible=!0,this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate()},n.prototype.blockListener=function(t){this.editingTarget&&this.editingTarget.blocks.blocklyListen(t,!1,this.runtime)},n.prototype.setEditingTarget=function(t){if(t!=this.editingTarget.id){var e=this.runtime.getTargetById(t);e&&(this.editingTarget=e,this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(e))}},n.prototype.emitTargetsUpdate=function(){this.emit("targetsUpdate",{targetList:this.runtime.targets.map(function(t){return[t.id,t.getName()]}),editingTarget:this.editingTarget.id})},n.prototype.emitWorkspaceUpdate=function(){this.emit("workspaceUpdate",{xml:this.editingTarget.blocks.toXML()})},t.exports=n,"undefined"!=typeof window&&(window.VirtualMachine=t.exports)},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var p=new Error('Uncaught, unspecified "error" event. ('+e+")");throw p.context=e,p}if(r=this._events[t],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(x(r)){var m=r.name?": "+r.name:"";return t.stylize("[Function"+m+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return p(r)}var _="",y=!1,v=["{","}"];if(d(r)&&(y=!0,v=["[","]"]),x(r)){var w=r.name?": "+r.name:"";_=" [Function"+w+"]"}if(S(r)&&(_=" "+RegExp.prototype.toString.call(r)),T(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+p(r)),0===s.length&&(!y||0==r.length))return v[0]+_+v[1];if(n<0)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=y?h(t,r,n,g,s):s.map(function(e){return l(t,r,n,g,e,y)}),t.seen.pop(),f(k,_,v)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return k(t)&&"[object RegExp]"===O(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===O(t)}function E(t){return k(t)&&("[object Error]"===O(t)||t instanceof Error)}function x(t){return"function"==typeof t}function N(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];r1)for(var n=1;n-1&&this.threads.splice(e,1)},n.prototype.isActiveThread=function(t){return this.threads.indexOf(t)>-1},n.prototype.toggleScript=function(t){for(var e=0;e0;){var e=t.pop();this._removeThread(e)}},n.prototype._step=function(){for(var t in this._hats){var e=this._hats[t];e.edgeActivated&&this.startHats(t)}var r=this.sequencer.stepThreads(this.threads);this._updateScriptGlows();for(var n=0;n0&&t.length>r&&this.timer.timeElapsed()this.stackFrames.length&&this.stackFrames.push({reported:{},waitingReporter:null,executionContext:{}})},r.prototype.popStack=function(){return this.stackFrames.pop(),this.stack.pop()},r.prototype.peekStack=function(){return this.stack[this.stack.length-1]},r.prototype.peekStackFrame=function(){return this.stackFrames[this.stackFrames.length-1]},r.prototype.peekParentStackFrame=function(){return this.stackFrames[this.stackFrames.length-2]},r.prototype.pushReportedValue=function(t){var e=this.peekParentStackFrame();if(e){var r=e.waitingReporter;e.reported[r]=t,e.waitingReporter=null}},r.prototype.atStackTop=function(){return this.peekStack()===this.topBlock},r.prototype.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(9),i=function(t){return t&&t.then&&"function"==typeof t.then},o=function(t,e){var r=t.runtime,o=r.targetForThread(e),s=e.peekStack(),a=e.peekStackFrame(),u=o.blocks.getOpcode(s),c=r.getOpcodeFunction(u),p=r.getIsHat(u),h=o.blocks.getFields(s),l=o.blocks.getInputs(s);if(!u)return void console.warn("Could not get opcode for block: "+s);var f=function(i){if(e.pushReportedValue(i),p)if(r.getIsEdgeActivatedHat(u)){var o=r.updateEdgeActivatedValue(s,i),a=!o&&i;a||t.retireThread(e)}else i||t.retireThread(e);else"undefined"!=typeof i&&e.atStackTop()&&r.visualReport(s,i),e.setStatus(n.STATUS_RUNNING)};if(!c){if(p)return;if(1==Object.keys(h).length&&0==Object.keys(l).length)for(var d in h)f(h[d].value);else console.warn("Could not get implementation for opcode: "+u);return void(e.requestScriptGlowInFrame=!0)}var g={};for(var m in h)g[m]=h[m].value;for(var _ in l){var y=l[_],b=y.block;if("undefined"==typeof a.reported[_]){var v=t.stepToReporter(e,b,_);if(v)return}g[_]=a.reported[_]}a.reported={};var w=null;w=c(g,{stackFrame:a.executionContext,target:o,"yield":function(){e.setStatus(n.STATUS_YIELD)},yieldFrame:function(){e.setStatus(n.STATUS_YIELD_FRAME)},done:function(){e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},startBranch:function(r){t.stepToBranch(e,r)},startHats:function(t,e,n){return r.startHats(t,e,n)},ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}}),"undefined"==typeof w&&(e.requestScriptGlowInFrame=!0),i(w)?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),w.then(function(r){f(r),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&f(w)};t.exports=o},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(8);n.prototype.projectTimer=function(){return this._projectTimer.timeElapsed()/1e3},n.prototype.resetProjectTimer=function(){this._projectTimer.start()},t.exports=n},function(t,e,r){function n(t){this._keysPressed=[],this.runtime=t}var i=r(13);n.prototype._scratchKeyToKeyCode=function(t){if("number"==typeof t)return t;var e=i.toString(t);switch(e){case"space":return 32;case"left arrow":return 37;case"up arrow":return 38;case"right arrow":return 39;case"down arrow":return 40}return e.toUpperCase().charCodeAt(0)},n.prototype._keyCodeToScratchKey=function(t){if(t>=48&&t<=90)return String.fromCharCode(t).toLowerCase();switch(t){case 32:return"space";case 37:return"left arrow";case 38:return"up arrow";case 39:return"right arrow";case 40:return"down arrow"}return null},n.prototype.postData=function(t){if(t.keyCode){var e=this._keysPressed.indexOf(t.keyCode);t.isDown?(e<0&&this._keysPressed.push(t.keyCode),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:this._keyCodeToScratchKey(t.keyCode)}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})):e>-1&&this._keysPressed.splice(e,1)}},n.prototype.getKeyIsDown=function(t){if("any"==t)return this._keysPressed.length>0;var e=this._scratchKeyToKeyCode(t);return this._keysPressed.indexOf(e)>-1},t.exports=n},function(t,e,r){function n(){}var i=r(14);n.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},n.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},n.toString=function(t){return String(t)},n.toRgbColorList=function(t){var e;return e="string"==typeof t&&"#"==t.substring(0,1)?i.hexToRgb(t):i.decimalToRgb(n.toNumber(t)),[e.r,e.g,e.b]},n.compare=function(t,e){var r=Number(t),n=Number(e);if(isNaN(r)||isNaN(n)){var i=String(t).toLowerCase(),o=String(e).toLowerCase();return i.localeCompare(o)}return r-n},t.exports=n},function(t,e){function r(){}r.decimalToHex=function(t){t<0&&(t+=16777216);var e=Number(t).toString(16);return e="#"+"000000".substr(0,6-e.length)+e},r.decimalToRgb=function(t){var e=t>>16&255,r=t>>8&255,n=255&t;return{r:e,g:r,b:n}},r.hexToRgb=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},r.rgbToHex=function(t){return r.decimalToHex(r.rgbToDecimal(t))},r.rgbToDecimal=function(t){return(t.r<<16)+(t.g<<8)+t.b},r.hexToDecimal=function(t){return r.rgbToDecimal(r.hexToRgb(t))},t.exports=r},function(t,e,r){function n(t){this._x=0,this._y=0,this._isDown=!1,this.runtime=t}var i=r(16);n.prototype.postData=function(t){t.x&&(this._x=t.x-t.canvasWidth/2),t.y&&(this._y=t.y-t.canvasHeight/2),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown,this._isDown&&this._activateClickHats(t.x,t.y))},n.prototype._activateClickHats=function(t,e){if(self.renderer){var r=self.renderer.pick(t,e),n=this;r.then(function(t){for(var e=0;e=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){var r=i.toBoolean(t.CONDITION);e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,r||e.startBranch())},n.prototype.forever=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.startBranch())},n.prototype.wait=function(t){var e=i.toNumber(t.DURATION);return new o(function(t){setTimeout(function(){t()},1e3*e)})},n.prototype["if"]=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r&&e.startBranch())},n.prototype.ifElse=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r?e.startBranch(1):e.startBranch(2))},n.prototype.stop=function(){this.runtime.stopAll()},t.exports=n},function(t,e,r){"use strict";t.exports=r(19)},function(t,e,r){"use strict";t.exports=r(20),r(22),r(23),r(24),r(25),r(27)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return _=e,y}}function o(t,e){try{return t(e)}catch(r){return _=r,y}}function s(t,e,r){try{t(e,r)}catch(n){return _=n,y}}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==n&&g(t,this)}function u(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),c(t,new d(e,r,s))})}function c(t,e){for(;3===t._81;)t=t._65;return a._10&&a._10(t),0===t._81?0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e):void p(t,e)}function p(t,e){m(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?h(e.promise,t._65):l(e.promise,t._65));var n=o(r,t._65);n===y?l(e.promise,_):h(e.promise,n)})}function h(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===y)return l(t,_);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void f(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,f(t)}function l(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(c(t,t._54),t._54=null),2===t._45){for(var e=0;ep){for(var e=0,r=a.length-c;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+a+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}var o=r(20),s=r(26);t.exports=o,o.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?n(t,e):i(t)};var a="function (err, res) {if (err) { rj(err); } else { rs(res); }}";o.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(i){if(null===r||"undefined"==typeof r)return new o(function(t,e){e(i)});s(function(){r.call(n,i)})}}},o.prototype.nodeify=function(t,e){return"function"!=typeof t?this:void this.then(function(r){s(function(){t.call(e,null,r)})},function(r){s(function(){t.call(e,r)})})}},function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=a.length?a.pop():new o,e.task=t,s(e)}function o(){this.task=null}var s=r(21),a=[],u=[],c=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),c())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(20);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._65},n.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._65},n.prototype.getState=function(){return 3===this._81?this._65.getState():this._81===-1||this._81===-2?0:this._81}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},function(t,e,r){function n(t){this.runtime=t}var i=r(13);n.prototype.getPrimitives=function(){return{event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}},n.prototype.getHats=function(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}},n.prototype.hatGreaterThanPredicate=function(t,e){var r=i.toString(t.WHENGREATERTHANMENU).toLowerCase(),n=i.toNumber(t.VALUE);return"timer"==r&&e.ioQuery("clock","projectTimer")>n},n.prototype.broadcast=function(t,e){var r=i.toString(t.BROADCAST_OPTION);e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r})},n.prototype.broadcastAndWait=function(t,e){var r=i.toString(t.BROADCAST_OPTION);if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r}),0!=e.stackFrame.startedThreads.length)){var n=this,o=e.stackFrame.startedThreads.some(function(t){return n.runtime.isActiveThread(t)});o&&e.yieldFrame()}},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(13);n.prototype.getPrimitives=function(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.sayforsecs,looks_show:this.show,looks_hide:this.hide,looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize,looks_costumeorder:this.getCostumeIndex,looks_backdroporder:this.getBackdropIndex,looks_backdropname:this.getBackdropName}},n.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},n.prototype.sayforsecs=function(t,e){return e.target.setSay("say",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},n.prototype.thinkforsecs=function(t,e){return e.target.setSay("think",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.show=function(t,e){e.target.setVisible(!0)},n.prototype.hide=function(t,e){e.target.setVisible(!1)},n.prototype._setCostumeOrBackdrop=function(t,e,r){if("number"==typeof e)t.setCostume(r?e:e-1);else{var n=t.getCostumeIndexByName(e);if(n>-1)t.setCostume(n);else if("previous costume"==n||"previous backdrop"==n)t.setCostume(t.currentCostume-1);else if("next costume"==n||"next backdrop"==n)t.setCostume(t.currentCostume+1);else{var o=i.toNumber(e);isNaN(o)||t.setCostume(r?o:o-1)}}if(t==this.runtime.getTargetForStage()){var s=t.sprite.costumes[t.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:s})}return[]},n.prototype.switchCostume=function(t,e){this._setCostumeOrBackdrop(e.target,t.COSTUME)},n.prototype.nextCostume=function(t,e){this._setCostumeOrBackdrop(e.target,e.target.currentCostume+1,!0)},n.prototype.switchBackdrop=function(t){this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP)},n.prototype.switchBackdropAndWait=function(t,e){if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP),0!=e.stackFrame.startedThreads.length)){var r=this,n=e.stackFrame.startedThreads.some(function(t){return r.runtime.isActiveThread(t)});n&&e.yieldFrame()}},n.prototype.nextBackdrop=function(){var t=this.runtime.getTargetForStage();this._setCostumeOrBackdrop(t,t.currentCostume+1,!0)},n.prototype.changeEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.CHANGE);if(e.target.effects.hasOwnProperty(r)){var o=n+e.target.effects[r];e.target.setEffect(r,o)}},n.prototype.setEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);e.target.setEffect(r,n)},n.prototype.clearEffects=function(t,e){e.target.clearEffects()},n.prototype.changeSize=function(t,e){var r=i.toNumber(t.CHANGE);e.target.setSize(e.target.size+r)},n.prototype.setSize=function(t,e){var r=i.toNumber(t.SIZE);e.target.setSize(r)},n.prototype.getSize=function(t,e){return e.target.size},n.prototype.getBackdropIndex=function(){var t=this.runtime.getTargetForStage();return t.currentCostume+1},n.prototype.getBackdropName=function(){var t=this.runtime.getTargetForStage();return t.sprite.costumes[t.currentCostume].name},n.prototype.getCostumeIndex=function(t,e){return e.target.currentCostume+1},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(13),o=r(16),s=r(8);n.prototype.getPrimitives=function(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_glidesecstoxy:this.glide,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection}},n.prototype.moveSteps=function(t,e){var r=i.toNumber(t.STEPS),n=o.degToRad(e.target.direction),s=r*Math.cos(n),a=r*Math.sin(n);e.target.setXY(e.target.x+s,e.target.y+a)},n.prototype.goToXY=function(t,e){var r=i.toNumber(t.X),n=i.toNumber(t.Y);e.target.setXY(r,n)},n.prototype.turnRight=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction+r)},n.prototype.turnLeft=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction-r)},n.prototype.pointInDirection=function(t,e){var r=i.toNumber(t.DIRECTION);e.target.setDirection(r)},n.prototype.glide=function(t,e){if(e.stackFrame.timer){var r=e.stackFrame.timer.timeElapsed();if(r<1e3*e.stackFrame.duration){var n=r/(1e3*e.stackFrame.duration),o=n*(e.stackFrame.endX-e.stackFrame.startX),a=n*(e.stackFrame.endY-e.stackFrame.startY);e.target.setXY(e.stackFrame.startX+o,e.stackFrame.startY+a),e.yieldFrame()}else e.target.setXY(e.stackFrame.endX,e.stackFrame.endY)}else{if(e.stackFrame.timer=new s,e.stackFrame.timer.start(),e.stackFrame.duration=i.toNumber(t.SECS),e.stackFrame.startX=e.target.x,e.stackFrame.startY=e.target.y,e.stackFrame.endX=i.toNumber(t.X),e.stackFrame.endY=i.toNumber(t.Y),e.stackFrame.duration<=0)return void e.target.setXY(e.stackFrame.endX,e.stackFrame.endY);e.yieldFrame()}},n.prototype.changeX=function(t,e){var r=i.toNumber(t.DX);e.target.setXY(e.target.x+r,e.target.y)},n.prototype.setX=function(t,e){var r=i.toNumber(t.X);e.target.setXY(r,e.target.y)},n.prototype.changeY=function(t,e){var r=i.toNumber(t.DY);e.target.setXY(e.target.x,e.target.y+r)},n.prototype.setY=function(t,e){var r=i.toNumber(t.Y);e.target.setXY(e.target.x,r)},n.prototype.getX=function(t,e){return e.target.x},n.prototype.getY=function(t,e){return e.target.y},n.prototype.getDirection=function(t,e){return e.target.direction},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(13);n.prototype.getPrimitives=function(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}},n.prototype.add=function(t){return i.toNumber(t.NUM1)+i.toNumber(t.NUM2)},n.prototype.subtract=function(t){return i.toNumber(t.NUM1)-i.toNumber(t.NUM2)},n.prototype.multiply=function(t){return i.toNumber(t.NUM1)*i.toNumber(t.NUM2)},n.prototype.divide=function(t){return i.toNumber(t.NUM1)/i.toNumber(t.NUM2)},n.prototype.lt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)<0},n.prototype.equals=function(t){return 0==i.compare(t.OPERAND1,t.OPERAND2)},n.prototype.gt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)>0},n.prototype.and=function(t){return i.toBoolean(t.OPERAND1)&&i.toBoolean(t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1)||i.toBoolean(t.OPERAND2)},n.prototype.not=function(t){return!i.toBoolean(t.OPERAND)},n.prototype.random=function(t){var e=i.toNumber(t.FROM),r=i.toNumber(t.TO),n=e<=r?e:r,o=e<=r?r:e;if(n==o)return n;var s=n==parseInt(n),a=o==parseInt(o);return s&&a?n+parseInt(Math.random()*(o+1-n)):Math.random()*(o-n)+n},n.prototype.join=function(t){return i.toString(t.STRING1)+i.toString(t.STRING2)},n.prototype.letterOf=function(t){var e=i.toNumber(t.LETTER)-1,r=i.toString(t.STRING);return e<0||e>=r.length?"":r.charAt(e)},n.prototype.length=function(t){return i.toString(t.STRING).length},n.prototype.mod=function(t){var e=i.toNumber(t.NUM1),r=i.toNumber(t.NUM2),n=e%r;return n/r<0&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathop=function(t){var e=i.toString(t.OPERATOR).toLowerCase(),r=i.toNumber(t.NUM);switch(e){case"abs":return Math.abs(r);case"floor":return Math.floor(r);case"ceiling":return Math.ceil(r);case"sqrt":return Math.sqrt(r);case"sin":return Math.sin(Math.PI*r/180);case"cos":return Math.cos(Math.PI*r/180);case"tan":return Math.tan(Math.PI*r/180);case"asin":return 180*Math.asin(r)/Math.PI;case"acos":return 180*Math.acos(r)/Math.PI;case"atan":return 180*Math.atan(r)/Math.PI;case"ln":return Math.log(r);case"log":return Math.log(r)/Math.LN10;case"e ^":return Math.exp(r);case"10 ^":return Math.pow(10,r)}return 0},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(13);n.prototype.getPrimitives=function(){return{sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current}},n.prototype.touchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR);return e.target.isTouchingColor(r)},n.prototype.colorTouchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR),n=i.toRgbColorList(t.COLOR2);return e.target.colorIsTouchingColor(n,r)},n.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},n.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},n.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},n.prototype.getMouseY=function(t,e){return e.ioQuery("mouse","getY")},n.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},n.prototype.current=function(t){var e=i.toString(t.CURRENTMENU).toLowerCase(),r=new Date;switch(e){case"year":return r.getFullYear();case"month":return r.getMonth()+1;case"date":return r.getDate();case"dayofweek":return r.getDay()+1;case"hour":return r.getHours();case"minute":return r.getMinutes();case"second":return r.getSeconds()}return 0},n.prototype.getKeyPressed=function(t,e){return e.ioQuery("keyboard","getKeyIsDown",t.KEY_OPTION)},t.exports=n},function(t,e,r){function n(t,e){i(JSON.parse(t),e,!0)}function i(t,e,r){if(t.hasOwnProperty("objName")){var n=new c,s=new p(n);if(t.hasOwnProperty("objName")&&(s.name=t.objName),t.hasOwnProperty("costumes"))for(var a=0;a1&&(i+=e),i in r.inputs?r.inputs[i].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.getFields=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].fields},n.prototype.getInputs=function(t){if("undefined"==typeof this._blocks[t])return null;var e={};for(var r in this._blocks[t].inputs)r.substring(0,n.BRANCH_INPUT_PREFIX.length)!=n.BRANCH_INPUT_PREFIX&&(e[r]=this._blocks[t].inputs[r]);return e},n.prototype.getTopLevelScript=function(t){if("undefined"==typeof this._blocks[t])return null;for(var e=this._blocks[t];null!==e.parent;)e=this._blocks[e.parent];return e.id},n.prototype.blocklyListen=function(t,e,r){if("object"==typeof t&&"string"==typeof t.blockId){if("stackclick"===t.element)return void(r&&r.toggleScript(t.blockId));switch(t.type){case"create":for(var n=i(t),o=0;o"},n.prototype.blockToXML=function(t){var e=this._blocks[t],r=e.shadow?"shadow":"block",n=e.topLevel?' x="'+e.x+'" y="'+e.y+'"':"",i="";i+="<"+r+' id="'+e.id+'" type="'+e.opcode+'"'+n+">";for(var o in e.inputs){var s=e.inputs[o];(s.block||s.shadow)&&(i+='',s.block&&(i+=this.blockToXML(s.block)),s.shadow&&s.shadow!=s.block&&(i+=this.blockToXML(s.shadow)),i+="")}for(var a in e.fields){var u=e.fields[a];i+=''+u.value+""}return e.next&&(i+=""+this.blockToXML(e.next)+""),i+=""},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteScript=function(t){var e=this._scripts.indexOf(t);e>-1&&this._scripts.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r0&&a.children[0].data?a.children[0].data:"",o.fields[f]={name:f,value:d};break;case"value":case"statement":i(u,e,!1,o.id),c&&u!=c&&i(c,e,!1,o.id);var g=a.attribs.name;o.inputs[g]={name:g,block:u.attribs.id,shadow:c?c.attribs.id:null};break;case"next":if(!u||!u.attribs)continue;i(u,e,!1,o.id),o.next=u.attribs.id}}}var o=r(36);t.exports=function(t){if("object"==typeof t&&"object"==typeof t.xml)return n(o.parseDOM(t.xml.outerHTML))}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(37),o=r(44);t.exports={Parser:i,Tokenizer:r(38),ElementType:r(45),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(48))},get Stream(){return n("Stream",r(49))},get WritableStream(){return n("WritableStream",r(50))},get ProxyHandler(){return n("ProxyHandler",r(71))},get DomUtils(){return n("DomUtils",r(72))},get CollectingHandler(){return n("CollectingHandler",r(84))},DefaultHandler:o,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new o(e);return new i(r,e).end(t),r.dom},parseFeed:function(e,r){var n=new t.exports.FeedHandler(r);return new i(n,r).end(e),n.dom},createDomStream:function(t,e,r){var n=new o(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(38),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},s={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;r(2).inherits(n,r(1).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in s)for(var e;(e=this._stack[this._stack.length-1])in s[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function o(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function s(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var u=r(39),c=r(41),p=r(42),h=r(43),l=0,f=l++,d=l++,g=l++,m=l++,_=l++,y=l++,b=l++,v=l++,w=l++,S=l++,k=l++,T=l++,E=l++,x=l++,N=l++,O=l++,A=l++,C=l++,M=l++,L=l++,R=l++,D=l++,I=l++,B=l++,P=l++,U=l++,q=l++,F=l++,j=l++,G=l++,V=l++,H=l++,Y=l++,z=l++,X=l++,W=l++,K=l++,Q=l++,J=l++,Z=l++,$=l++,tt=l++,et=l++,rt=l++,nt=l++,it=l++,ot=l++,st=l++,at=l++,ut=l++,ct=l++,pt=l++,ht=l++,lt=l++,ft=l++,dt=0,gt=dt++,mt=dt++,_t=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=_:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=N,this._sectionStart=this._index+1):"?"===t?(this._state=A,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:V,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=f:this._special!==gt?"s"===t||"S"===t?this._state=H:(this._state=f, -this._index--):(this._state=y,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===t?this._state=m:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=S,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=k:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=T,this._sectionStart=this._index+1):"'"===t?(this._state=E,this._sectionStart=this._index+1):n(t)||(this._state=x,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?D:"-"===t?C:O},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=M,this._sectionStart=this._index+1):this._state=O},a.prototype._stateInComment=function(t){"-"===t&&(this._state=L)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=R:this._state=M},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==t&&(this._state=M)},a.prototype._stateBeforeCdata1=o("C",I,O),a.prototype._stateBeforeCdata2=o("D",B,O),a.prototype._stateBeforeCdata3=o("A",P,O),a.prototype._stateBeforeCdata4=o("T",U,O),a.prototype._stateBeforeCdata5=o("A",q,O),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=O,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=j)},a.prototype._stateAfterCdata1=i("]",G),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=Y:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==mt||"c"!==t&&"C"!==t?this._special!==_t||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=Q},a.prototype._stateBeforeScript1=s("R",z),a.prototype._stateBeforeScript2=s("I",X),a.prototype._stateBeforeScript3=s("P",W),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",J,f),a.prototype._stateAfterScript2=o("I",Z,f),a.prototype._stateAfterScript3=o("P",$,f),a.prototype._stateAfterScript4=o("T",tt,f),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-6,this._index--):this._state=f},a.prototype._stateBeforeStyle1=s("Y",rt),a.prototype._stateBeforeStyle2=s("L",nt),a.prototype._stateBeforeStyle3=s("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ut,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",pt,ht),a.prototype._stateBeforeNumericEntity=o("X",ft,lt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(p.hasOwnProperty(r))return this._emitPartial(p[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._index=0,this._bufferOffset+=this._index):this._sectionStart===this._index?(this._buffer="",this._index=0,this._bufferOffset+=this._index):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index=55296&&t<=57343||t>1114111)return"�";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(40);t.exports=n},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";", -seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(t,e){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(45),o=/\s+/g,s=r(46),a=r(47),u={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:s),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:(r&&(t=t.replace(o," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},t.exports=n},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){var n=r(46),i=t.exports=Object.create(n),o={tagName:"name"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return p.getElementsByTagName(t,e,!0)}function o(t,e){return p.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return p.getText(p.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var u=r(36),c=u.DomHandler,p=u.DomUtils;r(2).inherits(n,c),n.prototype.init=c;var h=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(h,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=s("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=s("summary",t)||s("content",t))&&(r.description=e),(e=s("updated",t))&&(r.pubDate=new Date(e)),r})):(e=o("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=s("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=s("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(50);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(36).EVENTS;Object.keys(s).forEach(function(t){if(0===s[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===s[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==s[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e);o.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end()})}t.exports=n;var i=r(37),o=r(51).Writable||r(70).Writable;r(2).inherits(n,o),o.prototype._write=function(t,e,r){this._parser.write(t),r()}},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(1).EventEmitter,o=r(5);o(n,i),n.Readable=r(52),n.Writable=r(66),n.Duplex=r(67),n.Transform=r(68),n.PassThrough=r(69),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){p||(p=!0,t.end())}function s(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var p=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e,r){(function(n){e=t.exports=r(53),e.Stream=r(51),e.Readable=e,e.Writable=r(62),e.Duplex=r(61),e.Transform=r(64),e.PassThrough=r(65),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(51))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(61);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=r(63).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(t){r(61);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void x.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(N.isNullOrUndefined(r))e.reading=!1,e.ended||p(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length=C)t=C;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||N.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return N.isBuffer(e)||N.isString(e)||N.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),y(t)}function f(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t0?b(t,e):null,N.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&v(this),N.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),p(),t.removeListener("error",a),0===E.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),p()}function c(){A("onfinish"),t.removeListener("close",u),p()}function p(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var m=g(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?k(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",c),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&N(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(N(r)){var m=r.name?": "+r.name:"";return t.stylize("[Function"+m+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return p(r)}var _="",y=!1,v=["{","}"];if(d(r)&&(y=!0,v=["[","]"]),N(r)){var w=r.name?": "+r.name:"";_=" [Function"+w+"]"}if(S(r)&&(_=" "+RegExp.prototype.toString.call(r)),T(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+p(r)),0===s.length&&(!y||0==r.length))return v[0]+_+v[1];if(n<0)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=y?h(t,r,n,g,s):s.map(function(e){return l(t,r,n,g,e,y)}),t.seen.pop(),f(k,_,v)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return k(t)&&"[object RegExp]"===O(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===O(t)}function E(t){return k(t)&&("[object Error]"===O(t)||t instanceof Error)}function N(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];r1)for(var r=1;r-1&&this.threads.splice(e,1)},n.prototype.isActiveThread=function(t){return this.threads.indexOf(t)>-1},n.prototype.toggleScript=function(t){for(var e=0;e-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e0;){var n=r.pop();this._removeThread(n)}},n.prototype._step=function(){for(var t in this._hats){var e=this._hats[t];e.edgeActivated&&this.startHats(t)}var r=this.sequencer.stepThreads(this.threads);this._updateScriptGlows();for(var n=0;n-1&&this._scriptGlowsPreviousFrame.splice(e,1)},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.glowScript=function(t,e){e?this.emit(n.SCRIPT_GLOW_ON,t):this.emit(n.SCRIPT_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.getTargetById=function(t){for(var e=0;e0&&t.length>r&&this.timer.timeElapsed()this.stackFrames.length&&this.stackFrames.push({reported:{},waitingReporter:null,executionContext:{}})},r.prototype.popStack=function(){return this.stackFrames.pop(),this.stack.pop()},r.prototype.peekStack=function(){return this.stack[this.stack.length-1]},r.prototype.peekStackFrame=function(){return this.stackFrames[this.stackFrames.length-1]},r.prototype.peekParentStackFrame=function(){return this.stackFrames[this.stackFrames.length-2]},r.prototype.pushReportedValue=function(t){var e=this.peekParentStackFrame();if(e){var r=e.waitingReporter;e.reported[r]=t,e.waitingReporter=null}},r.prototype.atStackTop=function(){return this.peekStack()===this.topBlock},r.prototype.setStatus=function(t){this.status=t},r.prototype.setTarget=function(t){this.target=t},r.prototype.getTarget=function(){return this.target},t.exports=r},function(t,e,r){var n=r(10),i=function(t){return t&&t.then&&"function"==typeof t.then},o=function(t,e){var r=t.runtime,o=e.target,s=e.peekStack(),a=e.peekStackFrame();if(!o||"undefined"==typeof o.blocks.getBlock(s))return void t.retireThread(e);var u=o.blocks.getOpcode(s),c=r.getOpcodeFunction(u),p=r.getIsHat(u),h=o.blocks.getFields(s),l=o.blocks.getInputs(s);if(!u)return void console.warn("Could not get opcode for block: "+s);var f=function(i){if(e.pushReportedValue(i),p)if(r.getIsEdgeActivatedHat(u)){var o=r.updateEdgeActivatedValue(s,i),a=!o&&i;a||t.retireThread(e)}else i||t.retireThread(e);else"undefined"!=typeof i&&e.atStackTop()&&r.visualReport(s,i),e.setStatus(n.STATUS_RUNNING)};if(!c){if(p)return;if(1==Object.keys(h).length&&0==Object.keys(l).length)for(var d in h)f(h[d].value);else console.warn("Could not get implementation for opcode: "+u);return void(e.requestScriptGlowInFrame=!0)}var g={};for(var m in h)g[m]=h[m].value;for(var _ in l){var y=l[_],b=y.block;if("undefined"==typeof a.reported[_]){var v=t.stepToReporter(e,b,_);if(v)return}g[_]=a.reported[_]}a.reported={};var w=null;w=c(g,{stackFrame:a.executionContext,target:o,"yield":function(){e.setStatus(n.STATUS_YIELD)},yieldFrame:function(){e.setStatus(n.STATUS_YIELD_FRAME)},done:function(){e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},startBranch:function(r){t.stepToBranch(e,r)},startHats:function(t,e,n){return r.startHats(t,e,n)},ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}}),"undefined"==typeof w&&(e.requestScriptGlowInFrame=!0),i(w)?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),w.then(function(r){f(r),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&f(w)};t.exports=o},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(9);n.prototype.projectTimer=function(){return this._projectTimer.timeElapsed()/1e3},n.prototype.resetProjectTimer=function(){this._projectTimer.start()},t.exports=n},function(t,e,r){function n(t){this._keysPressed=[],this.runtime=t}var i=r(14);n.prototype._scratchKeyToKeyCode=function(t){if("number"==typeof t)return t;var e=i.toString(t);switch(e){case"space":return 32;case"left arrow":return 37;case"up arrow":return 38;case"right arrow":return 39;case"down arrow":return 40}return e.toUpperCase().charCodeAt(0)},n.prototype._keyCodeToScratchKey=function(t){if(t>=48&&t<=90)return String.fromCharCode(t).toLowerCase();switch(t){case 32:return"space";case 37:return"left arrow";case 38:return"up arrow";case 39:return"right arrow";case 40:return"down arrow"}return null},n.prototype.postData=function(t){if(t.keyCode){var e=this._keysPressed.indexOf(t.keyCode);t.isDown?(e<0&&this._keysPressed.push(t.keyCode),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:this._keyCodeToScratchKey(t.keyCode)}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})):e>-1&&this._keysPressed.splice(e,1)}},n.prototype.getKeyIsDown=function(t){if("any"==t)return this._keysPressed.length>0;var e=this._scratchKeyToKeyCode(t);return this._keysPressed.indexOf(e)>-1},t.exports=n},function(t,e,r){function n(){}var i=r(15);n.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},n.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},n.toString=function(t){return String(t)},n.toRgbColorList=function(t){var e;return e="string"==typeof t&&"#"==t.substring(0,1)?i.hexToRgb(t):i.decimalToRgb(n.toNumber(t)),[e.r,e.g,e.b]},n.compare=function(t,e){var r=Number(t),n=Number(e);if(isNaN(r)||isNaN(n)){var i=String(t).toLowerCase(),o=String(e).toLowerCase();return i.localeCompare(o)}return r-n},n.isInt=function(t){return"number"==typeof t?!!isNaN(t)||t==parseInt(t):"boolean"==typeof t||"string"==typeof t&&t.indexOf(".")<0},t.exports=n},function(t,e){function r(){}r.decimalToHex=function(t){t<0&&(t+=16777216);var e=Number(t).toString(16);return e="#"+"000000".substr(0,6-e.length)+e},r.decimalToRgb=function(t){var e=t>>16&255,r=t>>8&255,n=255&t;return{r:e,g:r,b:n}},r.hexToRgb=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},r.rgbToHex=function(t){return r.decimalToHex(r.rgbToDecimal(t))},r.rgbToDecimal=function(t){return(t.r<<16)+(t.g<<8)+t.b},r.hexToDecimal=function(t){return r.rgbToDecimal(r.hexToRgb(t))},t.exports=r},function(t,e,r){function n(t){this._x=0,this._y=0,this._isDown=!1,this.runtime=t}var i=r(17);n.prototype.postData=function(t){t.x&&(this._x=t.x-t.canvasWidth/2),t.y&&(this._y=t.y-t.canvasHeight/2),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown,this._isDown&&this._activateClickHats(t.x,t.y))},n.prototype._activateClickHats=function(t,e){if(this.runtime.renderer)for(var r=this.runtime.renderer.pick(t,e),n=0;n=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){var r=i.toBoolean(t.CONDITION);e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,r||e.startBranch())},n.prototype.forever=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.startBranch())},n.prototype.wait=function(t){var e=i.toNumber(t.DURATION);return new o(function(t){setTimeout(function(){t()},1e3*e)})},n.prototype["if"]=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r&&e.startBranch())},n.prototype.ifElse=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r?e.startBranch(1):e.startBranch(2))},n.prototype.stop=function(){this.runtime.stopAll()},n.prototype.createCloneMenu=function(t){return t.CLONE_OPTION},n.prototype.createClone=function(t,e){var r;if(r="_myself_"==t.CLONE_OPTION?e.target:this.runtime.getSpriteTargetByName(t.CLONE_OPTION)){var n=r.makeClone();n&&this.runtime.targets.push(n)}},n.prototype.deleteClone=function(t,e){this.runtime.disposeTarget(e.target),this.runtime.stopForTarget(e.target)},t.exports=n},function(t,e,r){"use strict";t.exports=r(20)},function(t,e,r){"use strict";t.exports=r(21),r(23),r(24),r(25),r(26),r(28)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return _=e,y}}function o(t,e){try{return t(e)}catch(r){return _=r,y}}function s(t,e,r){try{t(e,r)}catch(n){return _=n,y}}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==n&&g(t,this)}function u(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),c(t,new d(e,r,s))})}function c(t,e){for(;3===t._81;)t=t._65;return a._10&&a._10(t),0===t._81?0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e):void p(t,e)}function p(t,e){m(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?h(e.promise,t._65):l(e.promise,t._65));var n=o(r,t._65);n===y?l(e.promise,_):h(e.promise,n); +})}function h(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===y)return l(t,_);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void f(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,f(t)}function l(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(c(t,t._54),t._54=null),2===t._45){for(var e=0;ep){for(var e=0,r=a.length-c;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+a+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}var o=r(21),s=r(27);t.exports=o,o.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?n(t,e):i(t)};var a="function (err, res) {if (err) { rj(err); } else { rs(res); }}";o.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(i){if(null===r||"undefined"==typeof r)return new o(function(t,e){e(i)});s(function(){r.call(n,i)})}}},o.prototype.nodeify=function(t,e){return"function"!=typeof t?this:void this.then(function(r){s(function(){t.call(e,null,r)})},function(r){s(function(){t.call(e,r)})})}},function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=a.length?a.pop():new o,e.task=t,s(e)}function o(){this.task=null}var s=r(22),a=[],u=[],c=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),c())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._65},n.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._65},n.prototype.getState=function(){return 3===this._81?this._65.getState():this._81===-1||this._81===-2?0:this._81}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}},n.prototype.getHats=function(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}},n.prototype.hatGreaterThanPredicate=function(t,e){var r=i.toString(t.WHENGREATERTHANMENU).toLowerCase(),n=i.toNumber(t.VALUE);return"timer"==r&&e.ioQuery("clock","projectTimer")>n},n.prototype.broadcast=function(t,e){var r=i.toString(t.BROADCAST_OPTION);e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r})},n.prototype.broadcastAndWait=function(t,e){var r=i.toString(t.BROADCAST_OPTION);if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r}),0!=e.stackFrame.startedThreads.length)){var n=this,o=e.stackFrame.startedThreads.some(function(t){return n.runtime.isActiveThread(t)});o&&e.yieldFrame()}},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.sayforsecs,looks_show:this.show,looks_hide:this.hide,looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize,looks_costumeorder:this.getCostumeIndex,looks_backdroporder:this.getBackdropIndex,looks_backdropname:this.getBackdropName}},n.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},n.prototype.sayforsecs=function(t,e){return e.target.setSay("say",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},n.prototype.thinkforsecs=function(t,e){return e.target.setSay("think",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.show=function(t,e){e.target.setVisible(!0)},n.prototype.hide=function(t,e){e.target.setVisible(!1)},n.prototype._setCostumeOrBackdrop=function(t,e,r){if("number"==typeof e)t.setCostume(r?e:e-1);else{var n=t.getCostumeIndexByName(e);if(n>-1)t.setCostume(n);else if("previous costume"==n||"previous backdrop"==n)t.setCostume(t.currentCostume-1);else if("next costume"==n||"next backdrop"==n)t.setCostume(t.currentCostume+1);else{var o=i.toNumber(e);isNaN(o)||t.setCostume(r?o:o-1)}}if(t==this.runtime.getTargetForStage()){var s=t.sprite.costumes[t.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:s})}return[]},n.prototype.switchCostume=function(t,e){this._setCostumeOrBackdrop(e.target,t.COSTUME)},n.prototype.nextCostume=function(t,e){this._setCostumeOrBackdrop(e.target,e.target.currentCostume+1,!0)},n.prototype.switchBackdrop=function(t){this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP)},n.prototype.switchBackdropAndWait=function(t,e){if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP),0!=e.stackFrame.startedThreads.length)){var r=this,n=e.stackFrame.startedThreads.some(function(t){return r.runtime.isActiveThread(t)});n&&e.yieldFrame()}},n.prototype.nextBackdrop=function(){var t=this.runtime.getTargetForStage();this._setCostumeOrBackdrop(t,t.currentCostume+1,!0)},n.prototype.changeEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.CHANGE);if(e.target.effects.hasOwnProperty(r)){var o=n+e.target.effects[r];e.target.setEffect(r,o)}},n.prototype.setEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);e.target.setEffect(r,n)},n.prototype.clearEffects=function(t,e){e.target.clearEffects()},n.prototype.changeSize=function(t,e){var r=i.toNumber(t.CHANGE);e.target.setSize(e.target.size+r)},n.prototype.setSize=function(t,e){var r=i.toNumber(t.SIZE);e.target.setSize(r)},n.prototype.getSize=function(t,e){return e.target.size},n.prototype.getBackdropIndex=function(){var t=this.runtime.getTargetForStage();return t.currentCostume+1},n.prototype.getBackdropName=function(){var t=this.runtime.getTargetForStage();return t.sprite.costumes[t.currentCostume].name},n.prototype.getCostumeIndex=function(t,e){return e.target.currentCostume+1},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(17),s=r(9);n.prototype.getPrimitives=function(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_glidesecstoxy:this.glide,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection}},n.prototype.moveSteps=function(t,e){var r=i.toNumber(t.STEPS),n=o.degToRad(e.target.direction),s=r*Math.cos(n),a=r*Math.sin(n);e.target.setXY(e.target.x+s,e.target.y+a)},n.prototype.goToXY=function(t,e){var r=i.toNumber(t.X),n=i.toNumber(t.Y);e.target.setXY(r,n)},n.prototype.turnRight=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction+r)},n.prototype.turnLeft=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction-r)},n.prototype.pointInDirection=function(t,e){var r=i.toNumber(t.DIRECTION);e.target.setDirection(r)},n.prototype.glide=function(t,e){if(e.stackFrame.timer){var r=e.stackFrame.timer.timeElapsed();if(r<1e3*e.stackFrame.duration){var n=r/(1e3*e.stackFrame.duration),o=n*(e.stackFrame.endX-e.stackFrame.startX),a=n*(e.stackFrame.endY-e.stackFrame.startY);e.target.setXY(e.stackFrame.startX+o,e.stackFrame.startY+a),e.yieldFrame()}else e.target.setXY(e.stackFrame.endX,e.stackFrame.endY)}else{if(e.stackFrame.timer=new s,e.stackFrame.timer.start(),e.stackFrame.duration=i.toNumber(t.SECS),e.stackFrame.startX=e.target.x,e.stackFrame.startY=e.target.y,e.stackFrame.endX=i.toNumber(t.X),e.stackFrame.endY=i.toNumber(t.Y),e.stackFrame.duration<=0)return void e.target.setXY(e.stackFrame.endX,e.stackFrame.endY);e.yieldFrame()}},n.prototype.changeX=function(t,e){var r=i.toNumber(t.DX);e.target.setXY(e.target.x+r,e.target.y)},n.prototype.setX=function(t,e){var r=i.toNumber(t.X);e.target.setXY(r,e.target.y)},n.prototype.changeY=function(t,e){var r=i.toNumber(t.DY);e.target.setXY(e.target.x,e.target.y+r)},n.prototype.setY=function(t,e){var r=i.toNumber(t.Y);e.target.setXY(e.target.x,r)},n.prototype.getX=function(t,e){return e.target.x},n.prototype.getY=function(t,e){return e.target.y},n.prototype.getDirection=function(t,e){return e.target.direction},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}},n.prototype.add=function(t){return i.toNumber(t.NUM1)+i.toNumber(t.NUM2)},n.prototype.subtract=function(t){return i.toNumber(t.NUM1)-i.toNumber(t.NUM2)},n.prototype.multiply=function(t){return i.toNumber(t.NUM1)*i.toNumber(t.NUM2)},n.prototype.divide=function(t){return i.toNumber(t.NUM1)/i.toNumber(t.NUM2)},n.prototype.lt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)<0},n.prototype.equals=function(t){return 0==i.compare(t.OPERAND1,t.OPERAND2)},n.prototype.gt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)>0},n.prototype.and=function(t){return i.toBoolean(t.OPERAND1)&&i.toBoolean(t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1)||i.toBoolean(t.OPERAND2)},n.prototype.not=function(t){return!i.toBoolean(t.OPERAND)},n.prototype.random=function(t){var e=i.toNumber(t.FROM),r=i.toNumber(t.TO),n=e<=r?e:r,o=e<=r?r:e;return n==o?n:i.isInt(t.FROM)&&i.isInt(t.TO)?n+parseInt(Math.random()*(o+1-n)):Math.random()*(o-n)+n},n.prototype.join=function(t){return i.toString(t.STRING1)+i.toString(t.STRING2)},n.prototype.letterOf=function(t){var e=i.toNumber(t.LETTER)-1,r=i.toString(t.STRING);return e<0||e>=r.length?"":r.charAt(e)},n.prototype.length=function(t){return i.toString(t.STRING).length},n.prototype.mod=function(t){var e=i.toNumber(t.NUM1),r=i.toNumber(t.NUM2),n=e%r;return n/r<0&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathop=function(t){var e=i.toString(t.OPERATOR).toLowerCase(),r=i.toNumber(t.NUM);switch(e){case"abs":return Math.abs(r);case"floor":return Math.floor(r);case"ceiling":return Math.ceil(r);case"sqrt":return Math.sqrt(r);case"sin":return Math.sin(Math.PI*r/180);case"cos":return Math.cos(Math.PI*r/180);case"tan":return Math.tan(Math.PI*r/180);case"asin":return 180*Math.asin(r)/Math.PI;case"acos":return 180*Math.acos(r)/Math.PI;case"atan":return 180*Math.atan(r)/Math.PI;case"ln":return Math.log(r);case"log":return Math.log(r)/Math.LN10;case"e ^":return Math.exp(r);case"10 ^":return Math.pow(10,r)}return 0},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current}},n.prototype.touchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR);return e.target.isTouchingColor(r)},n.prototype.colorTouchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR),n=i.toRgbColorList(t.COLOR2);return e.target.colorIsTouchingColor(n,r)},n.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},n.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},n.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},n.prototype.getMouseY=function(t,e){return e.ioQuery("mouse","getY")},n.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},n.prototype.current=function(t){var e=i.toString(t.CURRENTMENU).toLowerCase(),r=new Date;switch(e){case"year":return r.getFullYear();case"month":return r.getMonth()+1;case"date":return r.getDate();case"dayofweek":return r.getDay()+1;case"hour":return r.getHours();case"minute":return r.getMinutes();case"second":return r.getSeconds()}return 0},n.prototype.getKeyPressed=function(t,e){return e.ioQuery("keyboard","getKeyIsDown",t.KEY_OPTION)},t.exports=n},function(t,e,r){function n(t,e){i(JSON.parse(t),e,!0)}function i(t,e,r){if(t.hasOwnProperty("objName")){var n=new c,s=new p(n,e);if(t.hasOwnProperty("objName")&&(s.name=t.objName),t.hasOwnProperty("costumes"))for(var a=0;a1&&(i+=e),i in r.inputs?r.inputs[i].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.getFields=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].fields},n.prototype.getInputs=function(t){if("undefined"==typeof this._blocks[t])return null;var e={};for(var r in this._blocks[t].inputs)r.substring(0,n.BRANCH_INPUT_PREFIX.length)!=n.BRANCH_INPUT_PREFIX&&(e[r]=this._blocks[t].inputs[r]);return e},n.prototype.getTopLevelScript=function(t){if("undefined"==typeof this._blocks[t])return null;for(var e=this._blocks[t];null!==e.parent;)e=this._blocks[e.parent];return e.id},n.prototype.blocklyListen=function(t,e,r){if("object"==typeof t&&"string"==typeof t.blockId){if("stackclick"===t.element)return void(r&&r.toggleScript(t.blockId));switch(t.type){case"create":for(var n=i(t),o=0;o"},n.prototype.blockToXML=function(t){var e=this._blocks[t],r=e.shadow?"shadow":"block",n=e.topLevel?' x="'+e.x+'" y="'+e.y+'"':"",i="";i+="<"+r+' id="'+e.id+'" type="'+e.opcode+'"'+n+">";for(var s in e.inputs){var a=e.inputs[s];(a.block||a.shadow)&&(i+='',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+=''+p+""}return e.next&&(i+=""+this.blockToXML(e.next)+""),i+=""},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteScript=function(t){var e=this._scripts.indexOf(t);e>-1&&this._scripts.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r0&&a.children[0].data?a.children[0].data:"",o.fields[f]={name:f,value:d};break;case"value":case"statement":i(u,e,!1,o.id),c&&u!=c&&i(c,e,!1,o.id);var g=a.attribs.name;o.inputs[g]={name:g,block:u.attribs.id,shadow:c?c.attribs.id:null};break;case"next":if(!u||!u.attribs)continue;i(u,e,!1,o.id),o.next=u.attribs.id}}}var o=r(37);t.exports=function(t){if("object"==typeof t&&"object"==typeof t.xml)return n(o.parseDOM(t.xml.outerHTML))}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(38),o=r(45);t.exports={Parser:i,Tokenizer:r(39),ElementType:r(46),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(49))},get Stream(){return n("Stream",r(50))},get WritableStream(){return n("WritableStream",r(51))},get ProxyHandler(){return n("ProxyHandler",r(74))},get DomUtils(){return n("DomUtils",r(75))},get CollectingHandler(){return n("CollectingHandler",r(87))},DefaultHandler:o,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new o(e);return new i(r,e).end(t),r.dom},parseFeed:function(e,r){var n=new t.exports.FeedHandler(r);return new i(n,r).end(e),n.dom},createDomStream:function(t,e,r){var n=new o(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(39),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},s={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;r(3).inherits(n,r(2).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in s)for(var e;(e=this._stack[this._stack.length-1])in s[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){ +this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function o(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function s(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var u=r(40),c=r(42),p=r(43),h=r(44),l=0,f=l++,d=l++,g=l++,m=l++,_=l++,y=l++,b=l++,v=l++,w=l++,S=l++,k=l++,T=l++,E=l++,N=l++,x=l++,O=l++,A=l++,C=l++,M=l++,L=l++,R=l++,D=l++,I=l++,P=l++,B=l++,U=l++,q=l++,F=l++,j=l++,G=l++,H=l++,Y=l++,V=l++,z=l++,X=l++,W=l++,K=l++,J=l++,Q=l++,Z=l++,$=l++,tt=l++,et=l++,rt=l++,nt=l++,it=l++,ot=l++,st=l++,at=l++,ut=l++,ct=l++,pt=l++,ht=l++,lt=l++,ft=l++,dt=0,gt=dt++,mt=dt++,_t=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=_:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=x,this._sectionStart=this._index+1):"?"===t?(this._state=A,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:H,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=f:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=f,this._index--):(this._state=y,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===t?this._state=m:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=S,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=k:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=T,this._sectionStart=this._index+1):"'"===t?(this._state=E,this._sectionStart=this._index+1):n(t)||(this._state=N,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?D:"-"===t?C:O},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=M,this._sectionStart=this._index+1):this._state=O},a.prototype._stateInComment=function(t){"-"===t&&(this._state=L)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=R:this._state=M},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==t&&(this._state=M)},a.prototype._stateBeforeCdata1=o("C",I,O),a.prototype._stateBeforeCdata2=o("D",P,O),a.prototype._stateBeforeCdata3=o("A",B,O),a.prototype._stateBeforeCdata4=o("T",U,O),a.prototype._stateBeforeCdata5=o("A",q,O),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=O,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=j)},a.prototype._stateAfterCdata1=i("]",G),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=V:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==mt||"c"!==t&&"C"!==t?this._special!==_t||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=J},a.prototype._stateBeforeScript1=s("R",z),a.prototype._stateBeforeScript2=s("I",X),a.prototype._stateBeforeScript3=s("P",W),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,f),a.prototype._stateAfterScript2=o("I",Z,f),a.prototype._stateAfterScript3=o("P",$,f),a.prototype._stateAfterScript4=o("T",tt,f),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-6,this._index--):this._state=f},a.prototype._stateBeforeStyle1=s("Y",rt),a.prototype._stateBeforeStyle2=s("L",nt),a.prototype._stateBeforeStyle3=s("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ut,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",pt,ht),a.prototype._stateBeforeNumericEntity=o("X",ft,lt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(p.hasOwnProperty(r))return this._emitPartial(p[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._index=0,this._bufferOffset+=this._index):this._sectionStart===this._index?(this._buffer="",this._index=0,this._bufferOffset+=this._index):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index=55296&&t<=57343||t>1114111)return"�";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(41);t.exports=n},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ", +puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(t,e){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(46),o=/\s+/g,s=r(47),a=r(48),u={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:s),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:(r&&(t=t.replace(o," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},t.exports=n},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){var n=r(47),i=t.exports=Object.create(n),o={tagName:"name"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return p.getElementsByTagName(t,e,!0)}function o(t,e){return p.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return p.getText(p.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var u=r(37),c=u.DomHandler,p=u.DomUtils;r(3).inherits(n,c),n.prototype.init=c;var h=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(h,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=s("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=s("summary",t)||s("content",t))&&(r.description=e),(e=s("updated",t))&&(r.pubDate=new Date(e)),r})):(e=o("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=s("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=s("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(51);r(3).inherits(n,o),n.prototype.readable=!0;var s=r(37).EVENTS;Object.keys(s).forEach(function(t){if(0===s[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===s[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==s[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e);o.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end()})}t.exports=n;var i=r(38),o=r(52).Writable||r(73).Writable;r(3).inherits(n,o),o.prototype._write=function(t,e,r){this._parser.write(t),r()}},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(53);o(n,i),n.Readable=r(54),n.Writable=r(69),n.Duplex=r(70),n.Transform=r(71),n.PassThrough=r(72),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){p||(p=!0,t.end())}function s(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var p=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(55),e.Stream=r(52),e.Readable=e,e.Writable=r(65),e.Duplex=r(64),e.Transform=r(67),e.PassThrough=r(68),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(52))}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e){var n=r(64);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=r(66).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(t){r(64);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void N.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(x.isNullOrUndefined(r))e.reading=!1,e.ended||p(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length=C)t=C;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||x.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return x.isBuffer(e)||x.isString(e)||x.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),y(t)}function f(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t0?b(t,e):null,x.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&v(this),x.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),p(),t.removeListener("error",a),0===E.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),p()}function c(){A("onfinish"),t.removeListener("close",u),p()}function p(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var m=g(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?k(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",c),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i * @license MIT */ -"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e){return+e!=e&&(e=0),t.alloc(+e)}function _(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return Y(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var c;if(i){var p=-1;for(c=r;ca&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;li&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,c,p,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],c=t[i+2],p=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&p)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&p,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return C(n)}function C(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function B(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function G(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function W(t){return J.toByteArray(G(t))}function K(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Q(t){return t!==t}var J=r(56),Z=r(57),$=r(58);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return p(null,t)},t.allocUnsafeSlow=function(t){return p(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),c=this.slice(i,o),p=e.slice(r,n),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;B(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):P(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):P(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):P(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):P(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||B(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new c(3*a/4-o),n=o>0?a-4:a;var p=0;for(e=0,r=0;e>16&255,s[p++]=i>>8&255,s[p++]=255&i;return 2===o?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,s[p++]=255&i):1===o&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,s[p++]=i>>8&255,s[p++]=255&i),s}function i(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}function o(t,e,r){for(var n,o=[],s=e;sp?p:c+u));return 1===n?(e=t[r-1],i+=a[e>>2],i+=a[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=a[e>>10],i+=a[e>>4&63],i+=a[e<<2&63],i+="="),s.push(i),s.join("")}e.toByteArray=n,e.fromByteArray=s;var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,p=-7,h=r?i-1:0,l=r?-1:1,f=t[e+h];for(h+=l,o=f&(1<<-p)-1,f>>=-p,p+=a;p>0;o=256*o+t[e+h],h+=l,p-=8);for(s=o&(1<<-p)-1,o>>=-p,p+=n;p>0;s=256*s+t[e+h],h+=l,p-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,p=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=p):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=p?(a=0,s=p):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<0;t[r+f]=255&s,f+=d,s/=256,c-=8);t[r+f-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===m(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function c(t){return void 0===t}function p(t){return"[object RegExp]"===m(t)}function h(t){return"object"==typeof t&&null!==t}function l(t){return"[object Date]"===m(t)}function f(t){return"[object Error]"===m(t)||t instanceof Error}function d(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function m(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=u,e.isUndefined=c,e.isRegExp=p,e.isObject=h,e.isDate=l,e.isError=f,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(55).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r1){for(var r=[],n=0;n=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="")):r+="/>",r}function o(t){return"<"+t.data+">"}function s(t,e){var r=t.data||"";return!e.decodeEntities||t.parent&&t.parent.name in l||(r=p.encodeXML(r)),r}function a(t){return""}function u(t){return""}var c=r(75),p=r(76),h={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},l={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},f={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(var r="",n=0;n0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,n<=0)));a++);return s}function o(t,e){for(var r=0,n=e.length;r0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n0&&(r=r.concat(u(t,e[n].children))));return r}var c=r(45).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:u}},function(t,e,r){function n(t,e){return"function"==typeof e?function(r){return r.attribs&&e(r.attribs[t])}:function(r){return r.attribs&&r.attribs[t]===e}}function i(t,e){return function(r){return t(r)||e(r)}}var o=r(45),s=e.isTag=o.isTag;e.testElement=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){if("tag_name"===r){if(!s(e)||!t.tag_name(e.name))return!1}else if("tag_type"===r){if(!t.tag_type(e.type))return!1}else if("tag_contains"===r){if(s(e)||!t.tag_contains(e.data))return!1}else if(!e.attribs||!t[r](e.attribs[r]))return!1}else;return!0};var a={tag_name:function(t){return"function"==typeof t?function(e){return s(e)&&t(e.name)}:"*"===t?s:function(e){return s(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return!s(e)&&t(e.data)}:function(e){return!s(e)&&e.data===t}}};e.getElements=function(t,e,r,o){var s=Object.keys(t).map(function(e){var r=t[e];return e in a?a[e](r):n(e,r)});return 0===s.length?[]:this.filter(s.reduce(i),e,r,o)},e.getElementById=function(t,e,r){return Array.isArray(e)||(e=[e]),this.findOne(n("id",t),e,r!==!1)},e.getElementsByTagName=function(t,e,r,n){return this.filter(a.tag_name(t),e,r,n)},e.getElementsByTagType=function(t,e,r,n){return this.filter(a.tag_type(t),e,r,n)}},function(t,e){e.removeSubsets=function(t){for(var e,r,n,i=t.length;--i>-1;){for(e=r=t[i],t[i]=null,n=!0;r;){if(t.indexOf(r)>-1){n=!1,t.splice(i,1);break}r=r.parent}n&&(t[i]=e)}return t};var r={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},n=e.compareDocumentPosition=function(t,e){var n,i,o,s,a,u,c=[],p=[];if(t===e)return 0;for(n=t;n;)c.unshift(n),n=n.parent;for(n=e;n;)p.unshift(n),n=n.parent;for(u=0;c[u]===p[u];)u++;return 0===u?r.DISCONNECTED:(i=c[u-1],o=i.children,s=c[u],a=p[u],o.indexOf(s)>o.indexOf(a)?i===e?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:i===t?r.PRECEDING|r.CONTAINS:r.PRECEDING)};e.uniqueSort=function(t){var e,i,o=t.length;for(t=t.slice();--o>-1;)e=t[o],i=t.indexOf(e),i>-1&&i":{opcode:"operator_gt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"&":{opcode:"operator_and",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},"|":{opcode:"operator_or",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},not:{opcode:"operator_not",argMap:[{type:"input",inputName:"OPERAND"}]},"concatenate:with:":{opcode:"operator_join",argMap:[{type:"input",inputOp:"text",inputName:"STRING1"},{type:"input",inputOp:"text",inputName:"STRING2"}]},"letter:of:":{opcode:"operator_letter_of",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"LETTER"},{type:"input",inputOp:"text",inputName:"STRING"}]},"stringLength:":{opcode:"operator_length",argMap:[{type:"input",inputOp:"text",inputName:"STRING"}]},"%":{opcode:"operator_mod",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},rounded:{opcode:"operator_round",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM"}]},"computeFunction:of:":{opcode:"operator_mathop",argMap:[{type:"input",inputOp:"operator_mathop_menu",inputName:"OPERATOR"},{type:"input",inputOp:"math_number",inputName:"NUM"}]},readVariable:{opcode:"data_variable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"setVar:to:":{opcode:"data_setvariableto",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"text",inputName:"VALUE"}]},"changeVar:by:":{opcode:"data_changevariableby",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},"showVariable:":{opcode:"data_showvariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"hideVariable:":{opcode:"data_hidevariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"append:toList:":{opcode:"data_listadd",argMap:[{type:"input",inputOp:"text",inputName:"VALUE"},{type:"field",fieldName:"LIST"}]},"deleteLine:ofList:":{opcode:"data_listdelete",argMap:[{type:"input",inputOp:"text",inputName:"LINE"},{type:"field",fieldName:"LIST"}]},"insert:at:ofList:":{opcode:"data_listinsert",argMap:[{type:"input",inputOp:"text",inputName:"VALUE"},{type:"input",inputOp:"text",inputName:"LINE"},{type:"field",fieldName:"LIST"}]},"setLine:ofList:to:":{opcode:"data_listreplace",argMap:[{type:"input",inputOp:"text",inputName:"LINE"},{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"VALUE"}]},"getLine:ofList:":{opcode:"data_listitem",argMap:[{type:"input",inputOp:"text",inputName:"LINE"},{type:"field",fieldName:"LIST"}]},"lineCountOfList:":{opcode:"data_listlength",argMap:[{type:"field",fieldName:"LIST"}]},"list:contains:":{opcode:"data_listcontains",argMap:[{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"VALUE"}]},"showList:":{opcode:"data_showlist",argMap:[{type:"field",fieldName:"LIST"}]},"hideList:":{opcode:"data_hidelist",argMap:[{type:"field",fieldName:"LIST"}]},procDef:{opcode:"proc_def",argMap:[]},getParam:{opcode:"proc_param",argMap:[]},call:{opcode:"proc_call",argMap:[]}};t.exports=r}]); \ No newline at end of file +"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e){return+e!=e&&(e=0),t.alloc(+e)}function _(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return V(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var c;if(i){var p=-1;for(c=r;ca&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;li&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,c,p,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],c=t[i+2],p=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&p)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&p,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return C(n)}function C(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function G(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function W(t){return Q.toByteArray(G(t))}function K(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var Q=r(58),Z=r(59),$=r(60);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return p(null,t)},t.allocUnsafeSlow=function(t){return p(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),c=this.slice(i,o),p=e.slice(r,n),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return N(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;P(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new c(3*a/4-o),n=o>0?a-4:a;var p=0;for(e=0,r=0;e>16&255,s[p++]=i>>8&255,s[p++]=255&i;return 2===o?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,s[p++]=255&i):1===o&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,s[p++]=i>>8&255,s[p++]=255&i),s}function i(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}function o(t,e,r){for(var n,o=[],s=e;sp?p:c+u));return 1===n?(e=t[r-1],i+=a[e>>2],i+=a[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=a[e>>10],i+=a[e>>4&63],i+=a[e<<2&63],i+="="),s.push(i),s.join("")}e.toByteArray=n,e.fromByteArray=s;var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,p=-7,h=r?i-1:0,l=r?-1:1,f=t[e+h];for(h+=l,o=f&(1<<-p)-1,f>>=-p,p+=a;p>0;o=256*o+t[e+h],h+=l,p-=8);for(s=o&(1<<-p)-1,o>>=-p,p+=n;p>0;s=256*s+t[e+h],h+=l,p-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,p=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=p):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=p?(a=0,s=p):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<0;t[r+f]=255&s,f+=d,s/=256,c-=8);t[r+f-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===m(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function c(t){return void 0===t}function p(t){return"[object RegExp]"===m(t)}function h(t){return"object"==typeof t&&null!==t}function l(t){return"[object Date]"===m(t)}function f(t){return"[object Error]"===m(t)||t instanceof Error}function d(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function m(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=u,e.isUndefined=c,e.isRegExp=p,e.isObject=h,e.isDate=l,e.isError=f,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(57).Buffer)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r1){for(var r=[],n=0;n=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="")):r+="/>",r}function o(t){return"<"+t.data+">"}function s(t,e){var r=t.data||"";return!e.decodeEntities||t.parent&&t.parent.name in l||(r=p.encodeXML(r)),r}function a(t){return""}function u(t){return""}var c=r(78),p=r(79),h={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},l={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},f={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(var r="",n=0;n0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,n<=0)));a++);return s}function o(t,e){for(var r=0,n=e.length;r0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n0&&(r=r.concat(u(t,e[n].children))));return r}var c=r(46).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:u}},function(t,e,r){function n(t,e){return"function"==typeof e?function(r){return r.attribs&&e(r.attribs[t])}:function(r){return r.attribs&&r.attribs[t]===e}}function i(t,e){return function(r){return t(r)||e(r)}}var o=r(46),s=e.isTag=o.isTag;e.testElement=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){if("tag_name"===r){if(!s(e)||!t.tag_name(e.name))return!1}else if("tag_type"===r){if(!t.tag_type(e.type))return!1}else if("tag_contains"===r){if(s(e)||!t.tag_contains(e.data))return!1}else if(!e.attribs||!t[r](e.attribs[r]))return!1}else;return!0};var a={tag_name:function(t){return"function"==typeof t?function(e){return s(e)&&t(e.name)}:"*"===t?s:function(e){return s(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return!s(e)&&t(e.data)}:function(e){return!s(e)&&e.data===t}}};e.getElements=function(t,e,r,o){var s=Object.keys(t).map(function(e){var r=t[e];return e in a?a[e](r):n(e,r)});return 0===s.length?[]:this.filter(s.reduce(i),e,r,o)},e.getElementById=function(t,e,r){return Array.isArray(e)||(e=[e]),this.findOne(n("id",t),e,r!==!1)},e.getElementsByTagName=function(t,e,r,n){return this.filter(a.tag_name(t),e,r,n)},e.getElementsByTagType=function(t,e,r,n){return this.filter(a.tag_type(t),e,r,n)}},function(t,e){e.removeSubsets=function(t){for(var e,r,n,i=t.length;--i>-1;){for(e=r=t[i],t[i]=null,n=!0;r;){if(t.indexOf(r)>-1){n=!1,t.splice(i,1);break}r=r.parent}n&&(t[i]=e)}return t};var r={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},n=e.compareDocumentPosition=function(t,e){var n,i,o,s,a,u,c=[],p=[];if(t===e)return 0;for(n=t;n;)c.unshift(n),n=n.parent;for(n=e;n;)p.unshift(n),n=n.parent;for(u=0;c[u]===p[u];)u++;return 0===u?r.DISCONNECTED:(i=c[u-1],o=i.children,s=c[u],a=p[u],o.indexOf(s)>o.indexOf(a)?i===e?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:i===t?r.PRECEDING|r.CONTAINS:r.PRECEDING)};e.uniqueSort=function(t){var e,i,o=t.length;for(t=t.slice();--o>-1;)e=t[o],i=t.indexOf(e),i>-1&&i&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})};t.exports=r},function(t,e,r){function n(t,e){this.runtime=e,t||(t=new o),this.blocks=t,this.name="",this.costumes=[],this.clones=[]}var i=r(90),o=r(35);n.prototype.createClone=function(){var t=new i(this,this.runtime);return t.isOriginal=0==this.clones.length,this.clones.push(t),t.isOriginal&&(t.initDrawable(),t.updateAllDrawableProperties()),t},t.exports=n},function(t,e,r){function n(t,e){s.call(this,t.blocks),this.runtime=e,this.sprite=t,this.renderer=null,this.runtime&&(this.renderer=this.runtime.renderer),this.drawableID=null}var i=r(3),o=r(17),s=r(91);i.inherits(n,s),n.prototype.initDrawable=function(){this.renderer&&(this.drawableID=this.renderer.createDrawable(),this.updateAllDrawableProperties()),this.isOriginal||this.runtime.startHats("control_start_as_clone",null,this)},n.prototype.isOriginal=!0,n.prototype.isStage=!1,n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.currentCostume=0,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.isStage||(this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]}))},n.prototype.setDirection=function(t){this.isStage||(this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction}))},n.prototype.setSay=function(t,e){if(!this.isStage)return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.isStage||(this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible}))},n.prototype.setSize=function(t){this.isStage||(this.size=o.clamp(t,5,535),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{scale:[this.size,this.size]}))},n.prototype.setEffect=function(t,e){if(this.effects.hasOwnProperty(t)&&(this.effects[t]=e,this.renderer)){var r={};r[t]=this.effects[t],this.renderer.updateDrawableProperties(this.drawableID,r)}},n.prototype.clearEffects=function(){for(var t in this.effects)this.effects[t]=0;this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,this.effects)},n.prototype.setCostume=function(t){this.currentCostume=o.wrapClamp(t,0,this.sprite.costumes.length-1),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{skin:this.sprite.costumes[this.currentCostume].skin})},n.prototype.getCostumeIndexByName=function(t){for(var e=0;e":{opcode:"operator_gt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"&":{opcode:"operator_and",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},"|":{opcode:"operator_or",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},not:{opcode:"operator_not",argMap:[{type:"input",inputName:"OPERAND"}]},"concatenate:with:":{opcode:"operator_join",argMap:[{type:"input",inputOp:"text",inputName:"STRING1"},{type:"input",inputOp:"text",inputName:"STRING2"}]},"letter:of:":{opcode:"operator_letter_of",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"LETTER"},{type:"input",inputOp:"text",inputName:"STRING"}]},"stringLength:":{opcode:"operator_length",argMap:[{type:"input",inputOp:"text",inputName:"STRING"}]},"%":{opcode:"operator_mod",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},rounded:{opcode:"operator_round",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM"}]},"computeFunction:of:":{opcode:"operator_mathop",argMap:[{type:"input",inputOp:"operator_mathop_menu",inputName:"OPERATOR"},{type:"input",inputOp:"math_number",inputName:"NUM"}]},readVariable:{opcode:"data_variable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"setVar:to:":{opcode:"data_setvariableto",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"text",inputName:"VALUE"}]},"changeVar:by:":{opcode:"data_changevariableby",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},"showVariable:":{opcode:"data_showvariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"hideVariable:":{opcode:"data_hidevariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"contentsOfList:":{opcode:"data_list",argMap:[{type:"field",fieldName:"LIST"}]},"append:toList:":{opcode:"data_addtolist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"field",fieldName:"LIST"}]},"deleteLine:ofList:":{opcode:"data_deleteoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"insert:at:ofList:":{opcode:"data_insertatlist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"setLine:ofList:to:":{opcode:"data_replaceitemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"ITEM"}]},"getLine:ofList:":{opcode:"data_itemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"lineCountOfList:":{opcode:"data_lengthoflist",argMap:[{type:"field",fieldName:"LIST"}]},"list:contains:":{opcode:"data_listcontainsitem",argMap:[{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"ITEM"}]},"showList:":{opcode:"data_showlist",argMap:[{type:"field",fieldName:"LIST"}]},"hideList:":{opcode:"data_hidelist",argMap:[{type:"field",fieldName:"LIST"}]},procDef:{opcode:"proc_def",argMap:[]},getParam:{opcode:"proc_param",argMap:[]},call:{opcode:"proc_call",argMap:[]}};t.exports=r}]); \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 6badafd2f..9f80fb086 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,6 +14,9 @@ module.exports = { { test: /\.json$/, loader: 'json-loader' + }, { + test: require.resolve('./src/index.js'), + loader: 'expose?VirtualMachine' } ] }, From 4e547556a8065353e34009f798e170103404c0d0 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Sep 2016 15:07:05 -0400 Subject: [PATCH 09/25] Use attachRenderer rather than the constructor This makes the renderer optional as well as making the order of instantiation flexible. --- playground/playground.js | 14 ++++++++------ src/engine/runtime.js | 17 +++++++++-------- src/index.js | 13 ++++++++++--- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/playground/playground.js b/playground/playground.js index 7b9431a2a..4a7e23bf0 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -21,12 +21,8 @@ var loadProject = function () { window.onload = function() { // Lots of global variables to make debugging easier - // Instantiate the renderer and connect it to the VM. - var canvas = document.getElementById('scratch-stage'); - window.renderer = new window.RenderWebGL(canvas); - - // Instantiate the VM worker. - var vm = new window.VirtualMachine(window.renderer); + // Instantiate the VM. + var vm = new window.VirtualMachine(); window.vm = vm; // Loading projects from the server. @@ -41,6 +37,12 @@ window.onload = function() { }); loadProject(); + // Instantiate the renderer and connect it to the VM. + var canvas = document.getElementById('scratch-stage'); + var renderer = new window.RenderWebGL(canvas); + window.renderer = renderer; + vm.attachRenderer(renderer); + // Instantiate scratch-blocks and attach it to the DOM. var toolbox = document.getElementById('toolbox'); var workspace = window.Blockly.inject('blocks', { diff --git a/src/engine/runtime.js b/src/engine/runtime.js index ccfbe6622..041ee625c 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -19,20 +19,13 @@ var defaultBlockPackages = { /** * Manages targets, scripts, and the sequencer. - * @param {!RenderWebGL} renderer Renderer for the VM */ -function Runtime (renderer) { +function Runtime () { // Bind event emitter EventEmitter.call(this); // State for the runtime - /** - * Renderer - * @type {!RenderWebGL} - */ - this.renderer = renderer; - /** * Target management and storage. * @type {Array.} @@ -206,6 +199,14 @@ Runtime.prototype.clearEdgeActivatedValues = function () { this._edgeActivatedHatValues = {}; }; +/** + * Attach the renderer + * @param {!RenderWebGL} renderer The renderer to attach + */ +Runtime.prototype.attachRenderer = function (renderer) { + this.renderer = renderer; +}; + // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- diff --git a/src/index.js b/src/index.js index a1981fe23..bf4a159c2 100644 --- a/src/index.js +++ b/src/index.js @@ -10,9 +10,8 @@ var Blocks = require('./engine/blocks'); * Handles connections between blocks, stage, and extensions. * * @author Andrew Sliwinski - * @param {!RenderWebGL} renderer Renderer for the VM */ -function VirtualMachine (renderer) { +function VirtualMachine () { var instance = this; // Bind event emitter and runtime to VM instance EventEmitter.call(instance); @@ -20,7 +19,7 @@ function VirtualMachine (renderer) { * VM runtime, to store blocks, I/O devices, sprites/targets, etc. * @type {!Runtime} */ - instance.runtime = new Runtime(renderer); + instance.runtime = new Runtime(); /** * The "currently editing"/selected target ID for the VM. * Block events from any Blockly workspace are routed to this target. @@ -163,6 +162,14 @@ VirtualMachine.prototype.createEmptyProject = function () { this.emitWorkspaceUpdate(); }; +/** + * Set the renderer for the VM/runtime + * @param {!RenderWebGL} renderer The renderer to attach + */ +VirtualMachine.prototype.attachRenderer = function (renderer) { + this.runtime.attachRenderer(renderer); +}; + /** * Handle a Blockly event for the current editing target. * @param {!Blockly.Event} e Any Blockly event. From e6896647331ffdfb6464fcbf2d4e91d9b8206c43 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Sep 2016 15:52:35 -0400 Subject: [PATCH 10/25] Build the module to be imported This puts the details of the loaders needed to build index.js out of the concern of the packages that require it. --- .gitignore | 1 + package.json | 15 ++++++++------- webpack.config.js | 31 ++++++++++++++++++++++--------- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index db98532d4..4c1329820 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ npm-* # Testing /.nyc_output /coverage +/dist.js diff --git a/package.json b/package.json index 33d5ab255..0511ebe0e 100644 --- a/package.json +++ b/package.json @@ -9,25 +9,26 @@ "type": "git", "url": "git+ssh://git@github.com/LLK/scratch-vm.git" }, - "main": "./src/index.js", + "main": "./dist.js", "scripts": { - "test": "make test", - "start": "webpack-dev-server --host 0.0.0.0 --content-base ." + "postinstall": "./node_modules/.bin/webpack", + "start": "webpack-dev-server --host 0.0.0.0 --content-base .", + "test": "make test" }, "dependencies": { + "expose-loader": "0.7.1", "htmlparser2": "3.9.0", - "promise": "7.1.1" + "json-loader": "0.5.4", + "promise": "7.1.1", + "webpack": "1.13.0" }, "devDependencies": { "eslint": "2.7.0", - "expose-loader": "0.7.1", "highlightjs": "8.7.0", - "json-loader": "0.5.4", "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop", "scratch-render": "git+https://git@github.com/LLK/scratch-render.git#develop", "stats.js": "0.16.0", "tap": "5.7.1", - "webpack": "1.13.0", "webpack-dev-server": "1.14.1" } } diff --git a/webpack.config.js b/webpack.config.js index 9f80fb086..376ccd25d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,14 +1,6 @@ var webpack = require('webpack'); -module.exports = { - entry: { - 'vm': './src/index.js', - 'vm.min': './src/index.js' - }, - output: { - path: __dirname, - filename: '[name].js' - }, +var base = { module: { loaders: [ { @@ -30,3 +22,24 @@ module.exports = { }) ] }; + +module.exports = [Object.assign({}, base, { + entry: { + 'vm': './src/index.js', + 'vm.min': './src/index.js' + }, + output: { + path: __dirname, + filename: '[name].js' + } +}), Object.assign({}, base, { + entry: { + 'dist': './src/index.js' + }, + output: { + library: 'VirtualMachine', + libraryTarget: 'commonjs2', + path: __dirname, + filename: '[name].js' + } +})]; From bb7dee60871cf630cc6eb3dced549a939edd9975 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Sep 2016 16:50:48 -0400 Subject: [PATCH 11/25] Build for 9884c I forgot to include these as a part of GH-200 --- vm.js | 30 +++++++++++++++++++----------- vm.min.js | 8 ++++---- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/vm.js b/vm.js index c09ec22aa..f9efc15ed 100644 --- a/vm.js +++ b/vm.js @@ -63,9 +63,8 @@ * Handles connections between blocks, stage, and extensions. * * @author Andrew Sliwinski - * @param {!RenderWebGL} renderer Renderer for the VM */ - function VirtualMachine (renderer) { + function VirtualMachine () { var instance = this; // Bind event emitter and runtime to VM instance EventEmitter.call(instance); @@ -73,7 +72,7 @@ * VM runtime, to store blocks, I/O devices, sprites/targets, etc. * @type {!Runtime} */ - instance.runtime = new Runtime(renderer); + instance.runtime = new Runtime(); /** * The "currently editing"/selected target ID for the VM. * Block events from any Blockly workspace are routed to this target. @@ -216,6 +215,14 @@ this.emitWorkspaceUpdate(); }; + /** + * Set the renderer for the VM/runtime + * @param {!RenderWebGL} renderer The renderer to attach + */ + VirtualMachine.prototype.attachRenderer = function (renderer) { + this.runtime.attachRenderer(renderer); + }; + /** * Handle a Blockly event for the current editing target. * @param {!Blockly.Event} e Any Blockly event. @@ -1437,20 +1444,13 @@ /** * Manages targets, scripts, and the sequencer. - * @param {!RenderWebGL} renderer Renderer for the VM */ - function Runtime (renderer) { + function Runtime () { // Bind event emitter EventEmitter.call(this); // State for the runtime - /** - * Renderer - * @type {!RenderWebGL} - */ - this.renderer = renderer; - /** * Target management and storage. * @type {Array.} @@ -1624,6 +1624,14 @@ this._edgeActivatedHatValues = {}; }; + /** + * Attach the renderer + * @param {!RenderWebGL} renderer The renderer to attach + */ + Runtime.prototype.attachRenderer = function (renderer) { + this.renderer = renderer; + }; + // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- diff --git a/vm.min.js b/vm.min.js index 6a800a5a1..6a53aaea7 100644 --- a/vm.min.js +++ b/vm.min.js @@ -1,7 +1,7 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){(function(e){t.exports=e.VirtualMachine=r(1)}).call(e,function(){return this}())},function(t,e,r){function n(t){var e=this;i.call(e),e.runtime=new s(t),e.editingTarget=null,e.runtime.on(s.SCRIPT_GLOW_ON,function(t){e.emit(s.SCRIPT_GLOW_ON,{id:t})}),e.runtime.on(s.SCRIPT_GLOW_OFF,function(t){e.emit(s.SCRIPT_GLOW_OFF,{id:t})}),e.runtime.on(s.BLOCK_GLOW_ON,function(t){e.emit(s.BLOCK_GLOW_ON,{id:t})}),e.runtime.on(s.BLOCK_GLOW_OFF,function(t){e.emit(s.BLOCK_GLOW_OFF,{id:t})}),e.runtime.on(s.VISUAL_REPORT,function(t,r){e.emit(s.VISUAL_REPORT,{id:t,value:r})}),this.blockListener=this.blockListener.bind(this)}var i=r(2),o=r(3),s=r(7),a=r(34),u=r(89),c=r(35);o.inherits(n,i),n.prototype.start=function(){this.runtime.start()},n.prototype.greenFlag=function(){this.runtime.greenFlag()},n.prototype.stopAll=function(){this.runtime.stopAll()},n.prototype.getPlaygroundData=function(){this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},n.prototype.postIOData=function(t,e){this.runtime.ioDevices[t]&&this.runtime.ioDevices[t].postData(e)},n.prototype.loadProject=function(t){a(t,this.runtime),this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget)},n.prototype.createEmptyProject=function(){var t=new c,e=new u(t);e.name="Stage",e.costumes.push({skin:"/assets/stage.png",name:"backdrop1",bitmapResolution:1,rotationCenterX:240,rotationCenterY:180});var r=e.createClone();this.runtime.targets.push(r),r.x=0,r.y=0,r.direction=90,r.size=200,r.visible=!0,r.isStage=!0;var n=new c,i=new u(n);i.name="Sprite1",i.costumes.push({skin:"/assets/scratch_cat.svg",name:"costume1",bitmapResolution:1,rotationCenterX:47,rotationCenterY:55});var o=i.createClone();this.runtime.targets.push(o),o.x=0,o.y=0,o.direction=90,o.size=100,o.visible=!0,this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate()},n.prototype.blockListener=function(t){this.editingTarget&&this.editingTarget.blocks.blocklyListen(t,!1,this.runtime)},n.prototype.setEditingTarget=function(t){if(t!=this.editingTarget.id){var e=this.runtime.getTargetById(t);e&&(this.editingTarget=e,this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(e))}},n.prototype.emitTargetsUpdate=function(){this.emit("targetsUpdate",{targetList:this.runtime.targets.filter(function(t){return!t.hasOwnProperty("isOriginal")||t.isOriginal}).map(function(t){return[t.id,t.getName()]}),editingTarget:this.editingTarget.id})},n.prototype.emitWorkspaceUpdate=function(){this.emit("workspaceUpdate",{xml:this.editingTarget.blocks.toXML()})},t.exports=n},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var p=new Error('Uncaught, unspecified "error" event. ('+e+")");throw p.context=e,p}if(r=this._events[t],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&N(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(N(r)){var m=r.name?": "+r.name:"";return t.stylize("[Function"+m+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return p(r)}var _="",y=!1,v=["{","}"];if(d(r)&&(y=!0,v=["[","]"]),N(r)){var w=r.name?": "+r.name:"";_=" [Function"+w+"]"}if(S(r)&&(_=" "+RegExp.prototype.toString.call(r)),T(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+p(r)),0===s.length&&(!y||0==r.length))return v[0]+_+v[1];if(n<0)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=y?h(t,r,n,g,s):s.map(function(e){return l(t,r,n,g,e,y)}),t.seen.pop(),f(k,_,v)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return k(t)&&"[object RegExp]"===O(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===O(t)}function E(t){return k(t)&&("[object Error]"===O(t)||t instanceof Error)}function N(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];r1)for(var r=1;r-1&&this.threads.splice(e,1)},n.prototype.isActiveThread=function(t){return this.threads.indexOf(t)>-1},n.prototype.toggleScript=function(t){for(var e=0;e-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e0;){var n=r.pop();this._removeThread(n)}},n.prototype._step=function(){for(var t in this._hats){var e=this._hats[t];e.edgeActivated&&this.startHats(t)}var r=this.sequencer.stepThreads(this.threads);this._updateScriptGlows();for(var n=0;n-1&&this._scriptGlowsPreviousFrame.splice(e,1)},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.glowScript=function(t,e){e?this.emit(n.SCRIPT_GLOW_ON,t):this.emit(n.SCRIPT_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.getTargetById=function(t){for(var e=0;e0&&t.length>r&&this.timer.timeElapsed()this.stackFrames.length&&this.stackFrames.push({reported:{},waitingReporter:null,executionContext:{}})},r.prototype.popStack=function(){return this.stackFrames.pop(),this.stack.pop()},r.prototype.peekStack=function(){return this.stack[this.stack.length-1]},r.prototype.peekStackFrame=function(){return this.stackFrames[this.stackFrames.length-1]},r.prototype.peekParentStackFrame=function(){return this.stackFrames[this.stackFrames.length-2]},r.prototype.pushReportedValue=function(t){var e=this.peekParentStackFrame();if(e){var r=e.waitingReporter;e.reported[r]=t,e.waitingReporter=null}},r.prototype.atStackTop=function(){return this.peekStack()===this.topBlock},r.prototype.setStatus=function(t){this.status=t},r.prototype.setTarget=function(t){this.target=t},r.prototype.getTarget=function(){return this.target},t.exports=r},function(t,e,r){var n=r(10),i=function(t){return t&&t.then&&"function"==typeof t.then},o=function(t,e){var r=t.runtime,o=e.target,s=e.peekStack(),a=e.peekStackFrame();if(!o||"undefined"==typeof o.blocks.getBlock(s))return void t.retireThread(e);var u=o.blocks.getOpcode(s),c=r.getOpcodeFunction(u),p=r.getIsHat(u),h=o.blocks.getFields(s),l=o.blocks.getInputs(s);if(!u)return void console.warn("Could not get opcode for block: "+s);var f=function(i){if(e.pushReportedValue(i),p)if(r.getIsEdgeActivatedHat(u)){var o=r.updateEdgeActivatedValue(s,i),a=!o&&i;a||t.retireThread(e)}else i||t.retireThread(e);else"undefined"!=typeof i&&e.atStackTop()&&r.visualReport(s,i),e.setStatus(n.STATUS_RUNNING)};if(!c){if(p)return;if(1==Object.keys(h).length&&0==Object.keys(l).length)for(var d in h)f(h[d].value);else console.warn("Could not get implementation for opcode: "+u);return void(e.requestScriptGlowInFrame=!0)}var g={};for(var m in h)g[m]=h[m].value;for(var _ in l){var y=l[_],b=y.block;if("undefined"==typeof a.reported[_]){var v=t.stepToReporter(e,b,_);if(v)return}g[_]=a.reported[_]}a.reported={};var w=null;w=c(g,{stackFrame:a.executionContext,target:o,"yield":function(){e.setStatus(n.STATUS_YIELD)},yieldFrame:function(){e.setStatus(n.STATUS_YIELD_FRAME)},done:function(){e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},startBranch:function(r){t.stepToBranch(e,r)},startHats:function(t,e,n){return r.startHats(t,e,n)},ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}}),"undefined"==typeof w&&(e.requestScriptGlowInFrame=!0),i(w)?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),w.then(function(r){f(r),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&f(w)};t.exports=o},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(9);n.prototype.projectTimer=function(){return this._projectTimer.timeElapsed()/1e3},n.prototype.resetProjectTimer=function(){this._projectTimer.start()},t.exports=n},function(t,e,r){function n(t){this._keysPressed=[],this.runtime=t}var i=r(14);n.prototype._scratchKeyToKeyCode=function(t){if("number"==typeof t)return t;var e=i.toString(t);switch(e){case"space":return 32;case"left arrow":return 37;case"up arrow":return 38;case"right arrow":return 39;case"down arrow":return 40}return e.toUpperCase().charCodeAt(0)},n.prototype._keyCodeToScratchKey=function(t){if(t>=48&&t<=90)return String.fromCharCode(t).toLowerCase();switch(t){case 32:return"space";case 37:return"left arrow";case 38:return"up arrow";case 39:return"right arrow";case 40:return"down arrow"}return null},n.prototype.postData=function(t){if(t.keyCode){var e=this._keysPressed.indexOf(t.keyCode);t.isDown?(e<0&&this._keysPressed.push(t.keyCode),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:this._keyCodeToScratchKey(t.keyCode)}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})):e>-1&&this._keysPressed.splice(e,1)}},n.prototype.getKeyIsDown=function(t){if("any"==t)return this._keysPressed.length>0;var e=this._scratchKeyToKeyCode(t);return this._keysPressed.indexOf(e)>-1},t.exports=n},function(t,e,r){function n(){}var i=r(15);n.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},n.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},n.toString=function(t){return String(t)},n.toRgbColorList=function(t){var e;return e="string"==typeof t&&"#"==t.substring(0,1)?i.hexToRgb(t):i.decimalToRgb(n.toNumber(t)),[e.r,e.g,e.b]},n.compare=function(t,e){var r=Number(t),n=Number(e);if(isNaN(r)||isNaN(n)){var i=String(t).toLowerCase(),o=String(e).toLowerCase();return i.localeCompare(o)}return r-n},n.isInt=function(t){return"number"==typeof t?!!isNaN(t)||t==parseInt(t):"boolean"==typeof t||"string"==typeof t&&t.indexOf(".")<0},t.exports=n},function(t,e){function r(){}r.decimalToHex=function(t){t<0&&(t+=16777216);var e=Number(t).toString(16);return e="#"+"000000".substr(0,6-e.length)+e},r.decimalToRgb=function(t){var e=t>>16&255,r=t>>8&255,n=255&t;return{r:e,g:r,b:n}},r.hexToRgb=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},r.rgbToHex=function(t){return r.decimalToHex(r.rgbToDecimal(t))},r.rgbToDecimal=function(t){return(t.r<<16)+(t.g<<8)+t.b},r.hexToDecimal=function(t){return r.rgbToDecimal(r.hexToRgb(t))},t.exports=r},function(t,e,r){function n(t){this._x=0,this._y=0,this._isDown=!1,this.runtime=t}var i=r(17);n.prototype.postData=function(t){t.x&&(this._x=t.x-t.canvasWidth/2),t.y&&(this._y=t.y-t.canvasHeight/2),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown,this._isDown&&this._activateClickHats(t.x,t.y))},n.prototype._activateClickHats=function(t,e){if(this.runtime.renderer)for(var r=this.runtime.renderer.pick(t,e),n=0;n=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){var r=i.toBoolean(t.CONDITION);e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,r||e.startBranch())},n.prototype.forever=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.startBranch())},n.prototype.wait=function(t){var e=i.toNumber(t.DURATION);return new o(function(t){setTimeout(function(){t()},1e3*e)})},n.prototype["if"]=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r&&e.startBranch())},n.prototype.ifElse=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r?e.startBranch(1):e.startBranch(2))},n.prototype.stop=function(){this.runtime.stopAll()},n.prototype.createCloneMenu=function(t){return t.CLONE_OPTION},n.prototype.createClone=function(t,e){var r;if(r="_myself_"==t.CLONE_OPTION?e.target:this.runtime.getSpriteTargetByName(t.CLONE_OPTION)){var n=r.makeClone();n&&this.runtime.targets.push(n)}},n.prototype.deleteClone=function(t,e){this.runtime.disposeTarget(e.target),this.runtime.stopForTarget(e.target)},t.exports=n},function(t,e,r){"use strict";t.exports=r(20)},function(t,e,r){"use strict";t.exports=r(21),r(23),r(24),r(25),r(26),r(28)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return _=e,y}}function o(t,e){try{return t(e)}catch(r){return _=r,y}}function s(t,e,r){try{t(e,r)}catch(n){return _=n,y}}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==n&&g(t,this)}function u(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),c(t,new d(e,r,s))})}function c(t,e){for(;3===t._81;)t=t._65;return a._10&&a._10(t),0===t._81?0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e):void p(t,e)}function p(t,e){m(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?h(e.promise,t._65):l(e.promise,t._65));var n=o(r,t._65);n===y?l(e.promise,_):h(e.promise,n); -})}function h(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===y)return l(t,_);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void f(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,f(t)}function l(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(c(t,t._54),t._54=null),2===t._45){for(var e=0;ep){for(var e=0,r=a.length-c;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+a+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}var o=r(21),s=r(27);t.exports=o,o.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?n(t,e):i(t)};var a="function (err, res) {if (err) { rj(err); } else { rs(res); }}";o.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(i){if(null===r||"undefined"==typeof r)return new o(function(t,e){e(i)});s(function(){r.call(n,i)})}}},o.prototype.nodeify=function(t,e){return"function"!=typeof t?this:void this.then(function(r){s(function(){t.call(e,null,r)})},function(r){s(function(){t.call(e,r)})})}},function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=a.length?a.pop():new o,e.task=t,s(e)}function o(){this.task=null}var s=r(22),a=[],u=[],c=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),c())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._65},n.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._65},n.prototype.getState=function(){return 3===this._81?this._65.getState():this._81===-1||this._81===-2?0:this._81}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}},n.prototype.getHats=function(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}},n.prototype.hatGreaterThanPredicate=function(t,e){var r=i.toString(t.WHENGREATERTHANMENU).toLowerCase(),n=i.toNumber(t.VALUE);return"timer"==r&&e.ioQuery("clock","projectTimer")>n},n.prototype.broadcast=function(t,e){var r=i.toString(t.BROADCAST_OPTION);e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r})},n.prototype.broadcastAndWait=function(t,e){var r=i.toString(t.BROADCAST_OPTION);if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r}),0!=e.stackFrame.startedThreads.length)){var n=this,o=e.stackFrame.startedThreads.some(function(t){return n.runtime.isActiveThread(t)});o&&e.yieldFrame()}},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.sayforsecs,looks_show:this.show,looks_hide:this.hide,looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize,looks_costumeorder:this.getCostumeIndex,looks_backdroporder:this.getBackdropIndex,looks_backdropname:this.getBackdropName}},n.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},n.prototype.sayforsecs=function(t,e){return e.target.setSay("say",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},n.prototype.thinkforsecs=function(t,e){return e.target.setSay("think",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.show=function(t,e){e.target.setVisible(!0)},n.prototype.hide=function(t,e){e.target.setVisible(!1)},n.prototype._setCostumeOrBackdrop=function(t,e,r){if("number"==typeof e)t.setCostume(r?e:e-1);else{var n=t.getCostumeIndexByName(e);if(n>-1)t.setCostume(n);else if("previous costume"==n||"previous backdrop"==n)t.setCostume(t.currentCostume-1);else if("next costume"==n||"next backdrop"==n)t.setCostume(t.currentCostume+1);else{var o=i.toNumber(e);isNaN(o)||t.setCostume(r?o:o-1)}}if(t==this.runtime.getTargetForStage()){var s=t.sprite.costumes[t.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:s})}return[]},n.prototype.switchCostume=function(t,e){this._setCostumeOrBackdrop(e.target,t.COSTUME)},n.prototype.nextCostume=function(t,e){this._setCostumeOrBackdrop(e.target,e.target.currentCostume+1,!0)},n.prototype.switchBackdrop=function(t){this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP)},n.prototype.switchBackdropAndWait=function(t,e){if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP),0!=e.stackFrame.startedThreads.length)){var r=this,n=e.stackFrame.startedThreads.some(function(t){return r.runtime.isActiveThread(t)});n&&e.yieldFrame()}},n.prototype.nextBackdrop=function(){var t=this.runtime.getTargetForStage();this._setCostumeOrBackdrop(t,t.currentCostume+1,!0)},n.prototype.changeEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.CHANGE);if(e.target.effects.hasOwnProperty(r)){var o=n+e.target.effects[r];e.target.setEffect(r,o)}},n.prototype.setEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);e.target.setEffect(r,n)},n.prototype.clearEffects=function(t,e){e.target.clearEffects()},n.prototype.changeSize=function(t,e){var r=i.toNumber(t.CHANGE);e.target.setSize(e.target.size+r)},n.prototype.setSize=function(t,e){var r=i.toNumber(t.SIZE);e.target.setSize(r)},n.prototype.getSize=function(t,e){return e.target.size},n.prototype.getBackdropIndex=function(){var t=this.runtime.getTargetForStage();return t.currentCostume+1},n.prototype.getBackdropName=function(){var t=this.runtime.getTargetForStage();return t.sprite.costumes[t.currentCostume].name},n.prototype.getCostumeIndex=function(t,e){return e.target.currentCostume+1},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(17),s=r(9);n.prototype.getPrimitives=function(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_glidesecstoxy:this.glide,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection}},n.prototype.moveSteps=function(t,e){var r=i.toNumber(t.STEPS),n=o.degToRad(e.target.direction),s=r*Math.cos(n),a=r*Math.sin(n);e.target.setXY(e.target.x+s,e.target.y+a)},n.prototype.goToXY=function(t,e){var r=i.toNumber(t.X),n=i.toNumber(t.Y);e.target.setXY(r,n)},n.prototype.turnRight=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction+r)},n.prototype.turnLeft=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction-r)},n.prototype.pointInDirection=function(t,e){var r=i.toNumber(t.DIRECTION);e.target.setDirection(r)},n.prototype.glide=function(t,e){if(e.stackFrame.timer){var r=e.stackFrame.timer.timeElapsed();if(r<1e3*e.stackFrame.duration){var n=r/(1e3*e.stackFrame.duration),o=n*(e.stackFrame.endX-e.stackFrame.startX),a=n*(e.stackFrame.endY-e.stackFrame.startY);e.target.setXY(e.stackFrame.startX+o,e.stackFrame.startY+a),e.yieldFrame()}else e.target.setXY(e.stackFrame.endX,e.stackFrame.endY)}else{if(e.stackFrame.timer=new s,e.stackFrame.timer.start(),e.stackFrame.duration=i.toNumber(t.SECS),e.stackFrame.startX=e.target.x,e.stackFrame.startY=e.target.y,e.stackFrame.endX=i.toNumber(t.X),e.stackFrame.endY=i.toNumber(t.Y),e.stackFrame.duration<=0)return void e.target.setXY(e.stackFrame.endX,e.stackFrame.endY);e.yieldFrame()}},n.prototype.changeX=function(t,e){var r=i.toNumber(t.DX);e.target.setXY(e.target.x+r,e.target.y)},n.prototype.setX=function(t,e){var r=i.toNumber(t.X);e.target.setXY(r,e.target.y)},n.prototype.changeY=function(t,e){var r=i.toNumber(t.DY);e.target.setXY(e.target.x,e.target.y+r)},n.prototype.setY=function(t,e){var r=i.toNumber(t.Y);e.target.setXY(e.target.x,r)},n.prototype.getX=function(t,e){return e.target.x},n.prototype.getY=function(t,e){return e.target.y},n.prototype.getDirection=function(t,e){return e.target.direction},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}},n.prototype.add=function(t){return i.toNumber(t.NUM1)+i.toNumber(t.NUM2)},n.prototype.subtract=function(t){return i.toNumber(t.NUM1)-i.toNumber(t.NUM2)},n.prototype.multiply=function(t){return i.toNumber(t.NUM1)*i.toNumber(t.NUM2)},n.prototype.divide=function(t){return i.toNumber(t.NUM1)/i.toNumber(t.NUM2)},n.prototype.lt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)<0},n.prototype.equals=function(t){return 0==i.compare(t.OPERAND1,t.OPERAND2)},n.prototype.gt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)>0},n.prototype.and=function(t){return i.toBoolean(t.OPERAND1)&&i.toBoolean(t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1)||i.toBoolean(t.OPERAND2)},n.prototype.not=function(t){return!i.toBoolean(t.OPERAND)},n.prototype.random=function(t){var e=i.toNumber(t.FROM),r=i.toNumber(t.TO),n=e<=r?e:r,o=e<=r?r:e;return n==o?n:i.isInt(t.FROM)&&i.isInt(t.TO)?n+parseInt(Math.random()*(o+1-n)):Math.random()*(o-n)+n},n.prototype.join=function(t){return i.toString(t.STRING1)+i.toString(t.STRING2)},n.prototype.letterOf=function(t){var e=i.toNumber(t.LETTER)-1,r=i.toString(t.STRING);return e<0||e>=r.length?"":r.charAt(e)},n.prototype.length=function(t){return i.toString(t.STRING).length},n.prototype.mod=function(t){var e=i.toNumber(t.NUM1),r=i.toNumber(t.NUM2),n=e%r;return n/r<0&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathop=function(t){var e=i.toString(t.OPERATOR).toLowerCase(),r=i.toNumber(t.NUM);switch(e){case"abs":return Math.abs(r);case"floor":return Math.floor(r);case"ceiling":return Math.ceil(r);case"sqrt":return Math.sqrt(r);case"sin":return Math.sin(Math.PI*r/180);case"cos":return Math.cos(Math.PI*r/180);case"tan":return Math.tan(Math.PI*r/180);case"asin":return 180*Math.asin(r)/Math.PI;case"acos":return 180*Math.acos(r)/Math.PI;case"atan":return 180*Math.atan(r)/Math.PI;case"ln":return Math.log(r);case"log":return Math.log(r)/Math.LN10;case"e ^":return Math.exp(r);case"10 ^":return Math.pow(10,r)}return 0},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current}},n.prototype.touchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR);return e.target.isTouchingColor(r)},n.prototype.colorTouchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR),n=i.toRgbColorList(t.COLOR2);return e.target.colorIsTouchingColor(n,r)},n.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},n.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},n.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},n.prototype.getMouseY=function(t,e){return e.ioQuery("mouse","getY")},n.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},n.prototype.current=function(t){var e=i.toString(t.CURRENTMENU).toLowerCase(),r=new Date;switch(e){case"year":return r.getFullYear();case"month":return r.getMonth()+1;case"date":return r.getDate();case"dayofweek":return r.getDay()+1;case"hour":return r.getHours();case"minute":return r.getMinutes();case"second":return r.getSeconds()}return 0},n.prototype.getKeyPressed=function(t,e){return e.ioQuery("keyboard","getKeyIsDown",t.KEY_OPTION)},t.exports=n},function(t,e,r){function n(t,e){i(JSON.parse(t),e,!0)}function i(t,e,r){if(t.hasOwnProperty("objName")){var n=new c,s=new p(n,e);if(t.hasOwnProperty("objName")&&(s.name=t.objName),t.hasOwnProperty("costumes"))for(var a=0;a1&&(i+=e),i in r.inputs?r.inputs[i].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.getFields=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].fields},n.prototype.getInputs=function(t){if("undefined"==typeof this._blocks[t])return null;var e={};for(var r in this._blocks[t].inputs)r.substring(0,n.BRANCH_INPUT_PREFIX.length)!=n.BRANCH_INPUT_PREFIX&&(e[r]=this._blocks[t].inputs[r]);return e},n.prototype.getTopLevelScript=function(t){if("undefined"==typeof this._blocks[t])return null;for(var e=this._blocks[t];null!==e.parent;)e=this._blocks[e.parent];return e.id},n.prototype.blocklyListen=function(t,e,r){if("object"==typeof t&&"string"==typeof t.blockId){if("stackclick"===t.element)return void(r&&r.toggleScript(t.blockId));switch(t.type){case"create":for(var n=i(t),o=0;o"},n.prototype.blockToXML=function(t){var e=this._blocks[t],r=e.shadow?"shadow":"block",n=e.topLevel?' x="'+e.x+'" y="'+e.y+'"':"",i="";i+="<"+r+' id="'+e.id+'" type="'+e.opcode+'"'+n+">";for(var s in e.inputs){var a=e.inputs[s];(a.block||a.shadow)&&(i+='',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+=''+p+""}return e.next&&(i+=""+this.blockToXML(e.next)+""),i+=""},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteScript=function(t){var e=this._scripts.indexOf(t);e>-1&&this._scripts.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r0&&a.children[0].data?a.children[0].data:"",o.fields[f]={name:f,value:d};break;case"value":case"statement":i(u,e,!1,o.id),c&&u!=c&&i(c,e,!1,o.id);var g=a.attribs.name;o.inputs[g]={name:g,block:u.attribs.id,shadow:c?c.attribs.id:null};break;case"next":if(!u||!u.attribs)continue;i(u,e,!1,o.id),o.next=u.attribs.id}}}var o=r(37);t.exports=function(t){if("object"==typeof t&&"object"==typeof t.xml)return n(o.parseDOM(t.xml.outerHTML))}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(38),o=r(45);t.exports={Parser:i,Tokenizer:r(39),ElementType:r(46),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(49))},get Stream(){return n("Stream",r(50))},get WritableStream(){return n("WritableStream",r(51))},get ProxyHandler(){return n("ProxyHandler",r(74))},get DomUtils(){return n("DomUtils",r(75))},get CollectingHandler(){return n("CollectingHandler",r(87))},DefaultHandler:o,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new o(e);return new i(r,e).end(t),r.dom},parseFeed:function(e,r){var n=new t.exports.FeedHandler(r);return new i(n,r).end(e),n.dom},createDomStream:function(t,e,r){var n=new o(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(39),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},s={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;r(3).inherits(n,r(2).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in s)for(var e;(e=this._stack[this._stack.length-1])in s[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){ -this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function o(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function s(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var u=r(40),c=r(42),p=r(43),h=r(44),l=0,f=l++,d=l++,g=l++,m=l++,_=l++,y=l++,b=l++,v=l++,w=l++,S=l++,k=l++,T=l++,E=l++,N=l++,x=l++,O=l++,A=l++,C=l++,M=l++,L=l++,R=l++,D=l++,I=l++,P=l++,B=l++,U=l++,q=l++,F=l++,j=l++,G=l++,H=l++,Y=l++,V=l++,z=l++,X=l++,W=l++,K=l++,J=l++,Q=l++,Z=l++,$=l++,tt=l++,et=l++,rt=l++,nt=l++,it=l++,ot=l++,st=l++,at=l++,ut=l++,ct=l++,pt=l++,ht=l++,lt=l++,ft=l++,dt=0,gt=dt++,mt=dt++,_t=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=_:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=x,this._sectionStart=this._index+1):"?"===t?(this._state=A,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:H,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=f:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=f,this._index--):(this._state=y,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===t?this._state=m:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=S,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=k:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=T,this._sectionStart=this._index+1):"'"===t?(this._state=E,this._sectionStart=this._index+1):n(t)||(this._state=N,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?D:"-"===t?C:O},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=M,this._sectionStart=this._index+1):this._state=O},a.prototype._stateInComment=function(t){"-"===t&&(this._state=L)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=R:this._state=M},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==t&&(this._state=M)},a.prototype._stateBeforeCdata1=o("C",I,O),a.prototype._stateBeforeCdata2=o("D",P,O),a.prototype._stateBeforeCdata3=o("A",B,O),a.prototype._stateBeforeCdata4=o("T",U,O),a.prototype._stateBeforeCdata5=o("A",q,O),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=O,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=j)},a.prototype._stateAfterCdata1=i("]",G),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=V:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==mt||"c"!==t&&"C"!==t?this._special!==_t||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=J},a.prototype._stateBeforeScript1=s("R",z),a.prototype._stateBeforeScript2=s("I",X),a.prototype._stateBeforeScript3=s("P",W),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,f),a.prototype._stateAfterScript2=o("I",Z,f),a.prototype._stateAfterScript3=o("P",$,f),a.prototype._stateAfterScript4=o("T",tt,f),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-6,this._index--):this._state=f},a.prototype._stateBeforeStyle1=s("Y",rt),a.prototype._stateBeforeStyle2=s("L",nt),a.prototype._stateBeforeStyle3=s("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ut,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",pt,ht),a.prototype._stateBeforeNumericEntity=o("X",ft,lt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(p.hasOwnProperty(r))return this._emitPartial(p[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._index=0,this._bufferOffset+=this._index):this._sectionStart===this._index?(this._buffer="",this._index=0,this._bufferOffset+=this._index):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index=55296&&t<=57343||t>1114111)return"�";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(41);t.exports=n},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ", -puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(t,e){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(46),o=/\s+/g,s=r(47),a=r(48),u={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:s),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:(r&&(t=t.replace(o," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},t.exports=n},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){var n=r(47),i=t.exports=Object.create(n),o={tagName:"name"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return p.getElementsByTagName(t,e,!0)}function o(t,e){return p.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return p.getText(p.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var u=r(37),c=u.DomHandler,p=u.DomUtils;r(3).inherits(n,c),n.prototype.init=c;var h=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(h,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=s("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=s("summary",t)||s("content",t))&&(r.description=e),(e=s("updated",t))&&(r.pubDate=new Date(e)),r})):(e=o("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=s("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=s("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(51);r(3).inherits(n,o),n.prototype.readable=!0;var s=r(37).EVENTS;Object.keys(s).forEach(function(t){if(0===s[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===s[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==s[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e);o.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end()})}t.exports=n;var i=r(38),o=r(52).Writable||r(73).Writable;r(3).inherits(n,o),o.prototype._write=function(t,e,r){this._parser.write(t),r()}},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(53);o(n,i),n.Readable=r(54),n.Writable=r(69),n.Duplex=r(70),n.Transform=r(71),n.PassThrough=r(72),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){p||(p=!0,t.end())}function s(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var p=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(55),e.Stream=r(52),e.Readable=e,e.Writable=r(65),e.Duplex=r(64),e.Transform=r(67),e.PassThrough=r(68),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(52))}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e){var n=r(64);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=r(66).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(t){r(64);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void N.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(x.isNullOrUndefined(r))e.reading=!1,e.ended||p(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length=C)t=C;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||x.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return x.isBuffer(e)||x.isString(e)||x.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),y(t)}function f(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t0?b(t,e):null,x.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&v(this),x.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),p(),t.removeListener("error",a),0===E.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),p()}function c(){A("onfinish"),t.removeListener("close",u),p()}function p(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var m=g(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?k(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",c),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&N(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(N(r)){var m=r.name?": "+r.name:"";return t.stylize("[Function"+m+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return p(r)}var _="",y=!1,v=["{","}"];if(d(r)&&(y=!0,v=["[","]"]),N(r)){var w=r.name?": "+r.name:"";_=" [Function"+w+"]"}if(S(r)&&(_=" "+RegExp.prototype.toString.call(r)),T(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+p(r)),0===s.length&&(!y||0==r.length))return v[0]+_+v[1];if(n<0)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=y?h(t,r,n,g,s):s.map(function(e){return l(t,r,n,g,e,y)}),t.seen.pop(),f(k,_,v)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return k(t)&&"[object RegExp]"===O(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===O(t)}function E(t){return k(t)&&("[object Error]"===O(t)||t instanceof Error)}function N(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];r1)for(var r=1;r-1&&this.threads.splice(e,1)},n.prototype.isActiveThread=function(t){return this.threads.indexOf(t)>-1},n.prototype.toggleScript=function(t){for(var e=0;e-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e0;){var n=r.pop();this._removeThread(n)}},n.prototype._step=function(){for(var t in this._hats){var e=this._hats[t];e.edgeActivated&&this.startHats(t)}var r=this.sequencer.stepThreads(this.threads);this._updateScriptGlows();for(var n=0;n-1&&this._scriptGlowsPreviousFrame.splice(e,1)},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.glowScript=function(t,e){e?this.emit(n.SCRIPT_GLOW_ON,t):this.emit(n.SCRIPT_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.getTargetById=function(t){for(var e=0;e0&&t.length>r&&this.timer.timeElapsed()this.stackFrames.length&&this.stackFrames.push({reported:{},waitingReporter:null,executionContext:{}})},r.prototype.popStack=function(){return this.stackFrames.pop(),this.stack.pop()},r.prototype.peekStack=function(){return this.stack[this.stack.length-1]},r.prototype.peekStackFrame=function(){return this.stackFrames[this.stackFrames.length-1]},r.prototype.peekParentStackFrame=function(){return this.stackFrames[this.stackFrames.length-2]},r.prototype.pushReportedValue=function(t){var e=this.peekParentStackFrame();if(e){var r=e.waitingReporter;e.reported[r]=t,e.waitingReporter=null}},r.prototype.atStackTop=function(){return this.peekStack()===this.topBlock},r.prototype.setStatus=function(t){this.status=t},r.prototype.setTarget=function(t){this.target=t},r.prototype.getTarget=function(){return this.target},t.exports=r},function(t,e,r){var n=r(10),i=function(t){return t&&t.then&&"function"==typeof t.then},o=function(t,e){var r=t.runtime,o=e.target,s=e.peekStack(),a=e.peekStackFrame();if(!o||"undefined"==typeof o.blocks.getBlock(s))return void t.retireThread(e);var u=o.blocks.getOpcode(s),c=r.getOpcodeFunction(u),p=r.getIsHat(u),h=o.blocks.getFields(s),l=o.blocks.getInputs(s);if(!u)return void console.warn("Could not get opcode for block: "+s);var f=function(i){if(e.pushReportedValue(i),p)if(r.getIsEdgeActivatedHat(u)){var o=r.updateEdgeActivatedValue(s,i),a=!o&&i;a||t.retireThread(e)}else i||t.retireThread(e);else"undefined"!=typeof i&&e.atStackTop()&&r.visualReport(s,i),e.setStatus(n.STATUS_RUNNING)};if(!c){if(p)return;if(1==Object.keys(h).length&&0==Object.keys(l).length)for(var d in h)f(h[d].value);else console.warn("Could not get implementation for opcode: "+u);return void(e.requestScriptGlowInFrame=!0)}var g={};for(var m in h)g[m]=h[m].value;for(var _ in l){var y=l[_],b=y.block;if("undefined"==typeof a.reported[_]){var v=t.stepToReporter(e,b,_);if(v)return}g[_]=a.reported[_]}a.reported={};var w=null;w=c(g,{stackFrame:a.executionContext,target:o,"yield":function(){e.setStatus(n.STATUS_YIELD)},yieldFrame:function(){e.setStatus(n.STATUS_YIELD_FRAME)},done:function(){e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},startBranch:function(r){t.stepToBranch(e,r)},startHats:function(t,e,n){return r.startHats(t,e,n)},ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}}),"undefined"==typeof w&&(e.requestScriptGlowInFrame=!0),i(w)?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),w.then(function(r){f(r),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&f(w)};t.exports=o},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(9);n.prototype.projectTimer=function(){return this._projectTimer.timeElapsed()/1e3},n.prototype.resetProjectTimer=function(){this._projectTimer.start()},t.exports=n},function(t,e,r){function n(t){this._keysPressed=[],this.runtime=t}var i=r(14);n.prototype._scratchKeyToKeyCode=function(t){if("number"==typeof t)return t;var e=i.toString(t);switch(e){case"space":return 32;case"left arrow":return 37;case"up arrow":return 38;case"right arrow":return 39;case"down arrow":return 40}return e.toUpperCase().charCodeAt(0)},n.prototype._keyCodeToScratchKey=function(t){if(t>=48&&t<=90)return String.fromCharCode(t).toLowerCase();switch(t){case 32:return"space";case 37:return"left arrow";case 38:return"up arrow";case 39:return"right arrow";case 40:return"down arrow"}return null},n.prototype.postData=function(t){if(t.keyCode){var e=this._keysPressed.indexOf(t.keyCode);t.isDown?(e<0&&this._keysPressed.push(t.keyCode),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:this._keyCodeToScratchKey(t.keyCode)}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})):e>-1&&this._keysPressed.splice(e,1)}},n.prototype.getKeyIsDown=function(t){if("any"==t)return this._keysPressed.length>0;var e=this._scratchKeyToKeyCode(t);return this._keysPressed.indexOf(e)>-1},t.exports=n},function(t,e,r){function n(){}var i=r(15);n.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},n.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},n.toString=function(t){return String(t)},n.toRgbColorList=function(t){var e;return e="string"==typeof t&&"#"==t.substring(0,1)?i.hexToRgb(t):i.decimalToRgb(n.toNumber(t)),[e.r,e.g,e.b]},n.compare=function(t,e){var r=Number(t),n=Number(e);if(isNaN(r)||isNaN(n)){var i=String(t).toLowerCase(),o=String(e).toLowerCase();return i.localeCompare(o)}return r-n},n.isInt=function(t){return"number"==typeof t?!!isNaN(t)||t==parseInt(t):"boolean"==typeof t||"string"==typeof t&&t.indexOf(".")<0},t.exports=n},function(t,e){function r(){}r.decimalToHex=function(t){t<0&&(t+=16777216);var e=Number(t).toString(16);return e="#"+"000000".substr(0,6-e.length)+e},r.decimalToRgb=function(t){var e=t>>16&255,r=t>>8&255,n=255&t;return{r:e,g:r,b:n}},r.hexToRgb=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},r.rgbToHex=function(t){return r.decimalToHex(r.rgbToDecimal(t))},r.rgbToDecimal=function(t){return(t.r<<16)+(t.g<<8)+t.b},r.hexToDecimal=function(t){return r.rgbToDecimal(r.hexToRgb(t))},t.exports=r},function(t,e,r){function n(t){this._x=0,this._y=0,this._isDown=!1,this.runtime=t}var i=r(17);n.prototype.postData=function(t){t.x&&(this._x=t.x-t.canvasWidth/2),t.y&&(this._y=t.y-t.canvasHeight/2),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown,this._isDown&&this._activateClickHats(t.x,t.y))},n.prototype._activateClickHats=function(t,e){if(this.runtime.renderer)for(var r=this.runtime.renderer.pick(t,e),n=0;n=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){var r=i.toBoolean(t.CONDITION);e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,r||e.startBranch())},n.prototype.forever=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.startBranch())},n.prototype.wait=function(t){var e=i.toNumber(t.DURATION);return new o(function(t){setTimeout(function(){t()},1e3*e)})},n.prototype["if"]=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r&&e.startBranch())},n.prototype.ifElse=function(t,e){var r=i.toBoolean(t.CONDITION);void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,r?e.startBranch(1):e.startBranch(2))},n.prototype.stop=function(){this.runtime.stopAll()},n.prototype.createCloneMenu=function(t){return t.CLONE_OPTION},n.prototype.createClone=function(t,e){var r;if(r="_myself_"==t.CLONE_OPTION?e.target:this.runtime.getSpriteTargetByName(t.CLONE_OPTION)){var n=r.makeClone();n&&this.runtime.targets.push(n)}},n.prototype.deleteClone=function(t,e){this.runtime.disposeTarget(e.target),this.runtime.stopForTarget(e.target)},t.exports=n},function(t,e,r){"use strict";t.exports=r(20)},function(t,e,r){"use strict";t.exports=r(21),r(23),r(24),r(25),r(26),r(28)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return _=e,y}}function o(t,e){try{return t(e)}catch(r){return _=r,y}}function s(t,e,r){try{t(e,r)}catch(n){return _=n,y}}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==n&&g(t,this)}function u(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),c(t,new d(e,r,s))})}function c(t,e){for(;3===t._81;)t=t._65;return a._10&&a._10(t),0===t._81?0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e):void p(t,e)}function p(t,e){m(function(){var r=1===t._81?e.onFulfilled:e.onRejected; +if(null===r)return void(1===t._81?h(e.promise,t._65):l(e.promise,t._65));var n=o(r,t._65);n===y?l(e.promise,_):h(e.promise,n)})}function h(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===y)return l(t,_);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void f(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,f(t)}function l(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(c(t,t._54),t._54=null),2===t._45){for(var e=0;ep){for(var e=0,r=a.length-c;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+a+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}var o=r(21),s=r(27);t.exports=o,o.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?n(t,e):i(t)};var a="function (err, res) {if (err) { rj(err); } else { rs(res); }}";o.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(i){if(null===r||"undefined"==typeof r)return new o(function(t,e){e(i)});s(function(){r.call(n,i)})}}},o.prototype.nodeify=function(t,e){return"function"!=typeof t?this:void this.then(function(r){s(function(){t.call(e,null,r)})},function(r){s(function(){t.call(e,r)})})}},function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=a.length?a.pop():new o,e.task=t,s(e)}function o(){this.task=null}var s=r(22),a=[],u=[],c=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),c())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._65},n.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._65},n.prototype.getState=function(){return 3===this._81?this._65.getState():this._81===-1||this._81===-2?0:this._81}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}},n.prototype.getHats=function(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}},n.prototype.hatGreaterThanPredicate=function(t,e){var r=i.toString(t.WHENGREATERTHANMENU).toLowerCase(),n=i.toNumber(t.VALUE);return"timer"==r&&e.ioQuery("clock","projectTimer")>n},n.prototype.broadcast=function(t,e){var r=i.toString(t.BROADCAST_OPTION);e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r})},n.prototype.broadcastAndWait=function(t,e){var r=i.toString(t.BROADCAST_OPTION);if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r}),0!=e.stackFrame.startedThreads.length)){var n=this,o=e.stackFrame.startedThreads.some(function(t){return n.runtime.isActiveThread(t)});o&&e.yieldFrame()}},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.sayforsecs,looks_show:this.show,looks_hide:this.hide,looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize,looks_costumeorder:this.getCostumeIndex,looks_backdroporder:this.getBackdropIndex,looks_backdropname:this.getBackdropName}},n.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},n.prototype.sayforsecs=function(t,e){return e.target.setSay("say",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},n.prototype.thinkforsecs=function(t,e){return e.target.setSay("think",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},n.prototype.show=function(t,e){e.target.setVisible(!0)},n.prototype.hide=function(t,e){e.target.setVisible(!1)},n.prototype._setCostumeOrBackdrop=function(t,e,r){if("number"==typeof e)t.setCostume(r?e:e-1);else{var n=t.getCostumeIndexByName(e);if(n>-1)t.setCostume(n);else if("previous costume"==n||"previous backdrop"==n)t.setCostume(t.currentCostume-1);else if("next costume"==n||"next backdrop"==n)t.setCostume(t.currentCostume+1);else{var o=i.toNumber(e);isNaN(o)||t.setCostume(r?o:o-1)}}if(t==this.runtime.getTargetForStage()){var s=t.sprite.costumes[t.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:s})}return[]},n.prototype.switchCostume=function(t,e){this._setCostumeOrBackdrop(e.target,t.COSTUME)},n.prototype.nextCostume=function(t,e){this._setCostumeOrBackdrop(e.target,e.target.currentCostume+1,!0)},n.prototype.switchBackdrop=function(t){this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP)},n.prototype.switchBackdropAndWait=function(t,e){if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP),0!=e.stackFrame.startedThreads.length)){var r=this,n=e.stackFrame.startedThreads.some(function(t){return r.runtime.isActiveThread(t)});n&&e.yieldFrame()}},n.prototype.nextBackdrop=function(){var t=this.runtime.getTargetForStage();this._setCostumeOrBackdrop(t,t.currentCostume+1,!0)},n.prototype.changeEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.CHANGE);if(e.target.effects.hasOwnProperty(r)){var o=n+e.target.effects[r];e.target.setEffect(r,o)}},n.prototype.setEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);e.target.setEffect(r,n)},n.prototype.clearEffects=function(t,e){e.target.clearEffects()},n.prototype.changeSize=function(t,e){var r=i.toNumber(t.CHANGE);e.target.setSize(e.target.size+r)},n.prototype.setSize=function(t,e){var r=i.toNumber(t.SIZE);e.target.setSize(r)},n.prototype.getSize=function(t,e){return e.target.size},n.prototype.getBackdropIndex=function(){var t=this.runtime.getTargetForStage();return t.currentCostume+1},n.prototype.getBackdropName=function(){var t=this.runtime.getTargetForStage();return t.sprite.costumes[t.currentCostume].name},n.prototype.getCostumeIndex=function(t,e){return e.target.currentCostume+1},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(17),s=r(9);n.prototype.getPrimitives=function(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_glidesecstoxy:this.glide,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection}},n.prototype.moveSteps=function(t,e){var r=i.toNumber(t.STEPS),n=o.degToRad(e.target.direction),s=r*Math.cos(n),a=r*Math.sin(n);e.target.setXY(e.target.x+s,e.target.y+a)},n.prototype.goToXY=function(t,e){var r=i.toNumber(t.X),n=i.toNumber(t.Y);e.target.setXY(r,n)},n.prototype.turnRight=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction+r)},n.prototype.turnLeft=function(t,e){var r=i.toNumber(t.DEGREES);e.target.setDirection(e.target.direction-r)},n.prototype.pointInDirection=function(t,e){var r=i.toNumber(t.DIRECTION);e.target.setDirection(r)},n.prototype.glide=function(t,e){if(e.stackFrame.timer){var r=e.stackFrame.timer.timeElapsed();if(r<1e3*e.stackFrame.duration){var n=r/(1e3*e.stackFrame.duration),o=n*(e.stackFrame.endX-e.stackFrame.startX),a=n*(e.stackFrame.endY-e.stackFrame.startY);e.target.setXY(e.stackFrame.startX+o,e.stackFrame.startY+a),e.yieldFrame()}else e.target.setXY(e.stackFrame.endX,e.stackFrame.endY)}else{if(e.stackFrame.timer=new s,e.stackFrame.timer.start(),e.stackFrame.duration=i.toNumber(t.SECS),e.stackFrame.startX=e.target.x,e.stackFrame.startY=e.target.y,e.stackFrame.endX=i.toNumber(t.X),e.stackFrame.endY=i.toNumber(t.Y),e.stackFrame.duration<=0)return void e.target.setXY(e.stackFrame.endX,e.stackFrame.endY);e.yieldFrame()}},n.prototype.changeX=function(t,e){var r=i.toNumber(t.DX);e.target.setXY(e.target.x+r,e.target.y)},n.prototype.setX=function(t,e){var r=i.toNumber(t.X);e.target.setXY(r,e.target.y)},n.prototype.changeY=function(t,e){var r=i.toNumber(t.DY);e.target.setXY(e.target.x,e.target.y+r)},n.prototype.setY=function(t,e){var r=i.toNumber(t.Y);e.target.setXY(e.target.x,r)},n.prototype.getX=function(t,e){return e.target.x},n.prototype.getY=function(t,e){return e.target.y},n.prototype.getDirection=function(t,e){return e.target.direction},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}},n.prototype.add=function(t){return i.toNumber(t.NUM1)+i.toNumber(t.NUM2)},n.prototype.subtract=function(t){return i.toNumber(t.NUM1)-i.toNumber(t.NUM2)},n.prototype.multiply=function(t){return i.toNumber(t.NUM1)*i.toNumber(t.NUM2)},n.prototype.divide=function(t){return i.toNumber(t.NUM1)/i.toNumber(t.NUM2)},n.prototype.lt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)<0},n.prototype.equals=function(t){return 0==i.compare(t.OPERAND1,t.OPERAND2)},n.prototype.gt=function(t){return i.compare(t.OPERAND1,t.OPERAND2)>0},n.prototype.and=function(t){return i.toBoolean(t.OPERAND1)&&i.toBoolean(t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1)||i.toBoolean(t.OPERAND2)},n.prototype.not=function(t){return!i.toBoolean(t.OPERAND)},n.prototype.random=function(t){var e=i.toNumber(t.FROM),r=i.toNumber(t.TO),n=e<=r?e:r,o=e<=r?r:e;return n==o?n:i.isInt(t.FROM)&&i.isInt(t.TO)?n+parseInt(Math.random()*(o+1-n)):Math.random()*(o-n)+n},n.prototype.join=function(t){return i.toString(t.STRING1)+i.toString(t.STRING2)},n.prototype.letterOf=function(t){var e=i.toNumber(t.LETTER)-1,r=i.toString(t.STRING);return e<0||e>=r.length?"":r.charAt(e)},n.prototype.length=function(t){return i.toString(t.STRING).length},n.prototype.mod=function(t){var e=i.toNumber(t.NUM1),r=i.toNumber(t.NUM2),n=e%r;return n/r<0&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathop=function(t){var e=i.toString(t.OPERATOR).toLowerCase(),r=i.toNumber(t.NUM);switch(e){case"abs":return Math.abs(r);case"floor":return Math.floor(r);case"ceiling":return Math.ceil(r);case"sqrt":return Math.sqrt(r);case"sin":return Math.sin(Math.PI*r/180);case"cos":return Math.cos(Math.PI*r/180);case"tan":return Math.tan(Math.PI*r/180);case"asin":return 180*Math.asin(r)/Math.PI;case"acos":return 180*Math.acos(r)/Math.PI;case"atan":return 180*Math.atan(r)/Math.PI;case"ln":return Math.log(r);case"log":return Math.log(r)/Math.LN10;case"e ^":return Math.exp(r);case"10 ^":return Math.pow(10,r)}return 0},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(14);n.prototype.getPrimitives=function(){return{sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current}},n.prototype.touchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR);return e.target.isTouchingColor(r)},n.prototype.colorTouchingColor=function(t,e){var r=i.toRgbColorList(t.COLOR),n=i.toRgbColorList(t.COLOR2);return e.target.colorIsTouchingColor(n,r)},n.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},n.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},n.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},n.prototype.getMouseY=function(t,e){return e.ioQuery("mouse","getY")},n.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},n.prototype.current=function(t){var e=i.toString(t.CURRENTMENU).toLowerCase(),r=new Date;switch(e){case"year":return r.getFullYear();case"month":return r.getMonth()+1;case"date":return r.getDate();case"dayofweek":return r.getDay()+1;case"hour":return r.getHours();case"minute":return r.getMinutes();case"second":return r.getSeconds()}return 0},n.prototype.getKeyPressed=function(t,e){return e.ioQuery("keyboard","getKeyIsDown",t.KEY_OPTION)},t.exports=n},function(t,e,r){function n(t,e){i(JSON.parse(t),e,!0)}function i(t,e,r){if(t.hasOwnProperty("objName")){var n=new c,s=new p(n,e);if(t.hasOwnProperty("objName")&&(s.name=t.objName),t.hasOwnProperty("costumes"))for(var a=0;a1&&(i+=e),i in r.inputs?r.inputs[i].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.getFields=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].fields},n.prototype.getInputs=function(t){if("undefined"==typeof this._blocks[t])return null;var e={};for(var r in this._blocks[t].inputs)r.substring(0,n.BRANCH_INPUT_PREFIX.length)!=n.BRANCH_INPUT_PREFIX&&(e[r]=this._blocks[t].inputs[r]);return e},n.prototype.getTopLevelScript=function(t){if("undefined"==typeof this._blocks[t])return null;for(var e=this._blocks[t];null!==e.parent;)e=this._blocks[e.parent];return e.id},n.prototype.blocklyListen=function(t,e,r){if("object"==typeof t&&"string"==typeof t.blockId){if("stackclick"===t.element)return void(r&&r.toggleScript(t.blockId));switch(t.type){case"create":for(var n=i(t),o=0;o"},n.prototype.blockToXML=function(t){var e=this._blocks[t],r=e.shadow?"shadow":"block",n=e.topLevel?' x="'+e.x+'" y="'+e.y+'"':"",i="";i+="<"+r+' id="'+e.id+'" type="'+e.opcode+'"'+n+">";for(var s in e.inputs){var a=e.inputs[s];(a.block||a.shadow)&&(i+='',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+=''+p+""}return e.next&&(i+=""+this.blockToXML(e.next)+""),i+=""},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteScript=function(t){var e=this._scripts.indexOf(t);e>-1&&this._scripts.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r0&&a.children[0].data?a.children[0].data:"",o.fields[f]={name:f,value:d};break;case"value":case"statement":i(u,e,!1,o.id),c&&u!=c&&i(c,e,!1,o.id);var g=a.attribs.name;o.inputs[g]={name:g,block:u.attribs.id,shadow:c?c.attribs.id:null};break;case"next":if(!u||!u.attribs)continue;i(u,e,!1,o.id),o.next=u.attribs.id}}}var o=r(37);t.exports=function(t){if("object"==typeof t&&"object"==typeof t.xml)return n(o.parseDOM(t.xml.outerHTML))}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(38),o=r(45);t.exports={Parser:i,Tokenizer:r(39),ElementType:r(46),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(49))},get Stream(){return n("Stream",r(50))},get WritableStream(){return n("WritableStream",r(51))},get ProxyHandler(){return n("ProxyHandler",r(74))},get DomUtils(){return n("DomUtils",r(75))},get CollectingHandler(){return n("CollectingHandler",r(87))},DefaultHandler:o,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new o(e);return new i(r,e).end(t),r.dom},parseFeed:function(e,r){var n=new t.exports.FeedHandler(r);return new i(n,r).end(e),n.dom},createDomStream:function(t,e,r){var n=new o(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(39),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},s={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;r(3).inherits(n,r(2).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in s)for(var e;(e=this._stack[this._stack.length-1])in s[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t); +},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function o(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function s(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var u=r(40),c=r(42),p=r(43),h=r(44),l=0,f=l++,d=l++,g=l++,m=l++,_=l++,y=l++,b=l++,v=l++,w=l++,S=l++,k=l++,T=l++,E=l++,N=l++,x=l++,O=l++,A=l++,C=l++,M=l++,L=l++,R=l++,D=l++,I=l++,P=l++,B=l++,U=l++,q=l++,F=l++,j=l++,G=l++,H=l++,Y=l++,V=l++,z=l++,X=l++,W=l++,K=l++,J=l++,Q=l++,Z=l++,$=l++,tt=l++,et=l++,rt=l++,nt=l++,it=l++,ot=l++,st=l++,at=l++,ut=l++,ct=l++,pt=l++,ht=l++,lt=l++,ft=l++,dt=0,gt=dt++,mt=dt++,_t=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=_:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=x,this._sectionStart=this._index+1):"?"===t?(this._state=A,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:H,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=f:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=f,this._index--):(this._state=y,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===t?this._state=m:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=S,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=k:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=T,this._sectionStart=this._index+1):"'"===t?(this._state=E,this._sectionStart=this._index+1):n(t)||(this._state=N,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?D:"-"===t?C:O},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=M,this._sectionStart=this._index+1):this._state=O},a.prototype._stateInComment=function(t){"-"===t&&(this._state=L)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=R:this._state=M},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==t&&(this._state=M)},a.prototype._stateBeforeCdata1=o("C",I,O),a.prototype._stateBeforeCdata2=o("D",P,O),a.prototype._stateBeforeCdata3=o("A",B,O),a.prototype._stateBeforeCdata4=o("T",U,O),a.prototype._stateBeforeCdata5=o("A",q,O),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=O,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=j)},a.prototype._stateAfterCdata1=i("]",G),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=V:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==mt||"c"!==t&&"C"!==t?this._special!==_t||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=J},a.prototype._stateBeforeScript1=s("R",z),a.prototype._stateBeforeScript2=s("I",X),a.prototype._stateBeforeScript3=s("P",W),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,f),a.prototype._stateAfterScript2=o("I",Z,f),a.prototype._stateAfterScript3=o("P",$,f),a.prototype._stateAfterScript4=o("T",tt,f),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-6,this._index--):this._state=f},a.prototype._stateBeforeStyle1=s("Y",rt),a.prototype._stateBeforeStyle2=s("L",nt),a.prototype._stateBeforeStyle3=s("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ut,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",pt,ht),a.prototype._stateBeforeNumericEntity=o("X",ft,lt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(p.hasOwnProperty(r))return this._emitPartial(p[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._index=0,this._bufferOffset+=this._index):this._sectionStart===this._index?(this._buffer="",this._index=0,this._bufferOffset+=this._index):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index=55296&&t<=57343||t>1114111)return"�";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(41);t.exports=n},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮", +profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(t,e){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(46),o=/\s+/g,s=r(47),a=r(48),u={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:s),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:(r&&(t=t.replace(o," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},t.exports=n},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){var n=r(47),i=t.exports=Object.create(n),o={tagName:"name"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return p.getElementsByTagName(t,e,!0)}function o(t,e){return p.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return p.getText(p.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var u=r(37),c=u.DomHandler,p=u.DomUtils;r(3).inherits(n,c),n.prototype.init=c;var h=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(h,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=s("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=s("summary",t)||s("content",t))&&(r.description=e),(e=s("updated",t))&&(r.pubDate=new Date(e)),r})):(e=o("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=s("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=s("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(51);r(3).inherits(n,o),n.prototype.readable=!0;var s=r(37).EVENTS;Object.keys(s).forEach(function(t){if(0===s[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===s[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==s[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e);o.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end()})}t.exports=n;var i=r(38),o=r(52).Writable||r(73).Writable;r(3).inherits(n,o),o.prototype._write=function(t,e,r){this._parser.write(t),r()}},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(53);o(n,i),n.Readable=r(54),n.Writable=r(69),n.Duplex=r(70),n.Transform=r(71),n.PassThrough=r(72),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){p||(p=!0,t.end())}function s(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var p=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(55),e.Stream=r(52),e.Readable=e,e.Writable=r(65),e.Duplex=r(64),e.Transform=r(67),e.PassThrough=r(68),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(52))}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e){var n=r(64);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=r(66).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(t){r(64);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void N.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(x.isNullOrUndefined(r))e.reading=!1,e.ended||p(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length=C)t=C;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||x.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return x.isBuffer(e)||x.isString(e)||x.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),y(t)}function f(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t0?b(t,e):null,x.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&v(this),x.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),p(),t.removeListener("error",a),0===E.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),p()}function c(){A("onfinish"),t.removeListener("close",u),p()}function p(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var m=g(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?k(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",c),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i From aa5e8d264888bcdd8ed6d090b5d0b05e94ded8ca Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 21 Sep 2016 16:31:07 -0400 Subject: [PATCH 12/25] Clear graphic effects on green flag (#199) --- src/engine/runtime.js | 4 ++++ src/engine/target.js | 6 ++++++ src/sprites/clone.js | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 041ee625c..803069c56 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -382,6 +382,10 @@ Runtime.prototype.greenFlag = function () { this.stopAll(); this.ioDevices.clock.resetProjectTimer(); this.clearEdgeActivatedValues(); + // Inform all targets of the green flag. + for (var i = 0; i < this.targets.length; i++) { + this.targets[i].onGreenFlag(); + } this.startHats('event_whenflagclicked'); }; diff --git a/src/engine/target.js b/src/engine/target.js index 63f90b0d9..ee1cc9089 100644 --- a/src/engine/target.js +++ b/src/engine/target.js @@ -27,6 +27,12 @@ function Target (blocks) { this.blocks = blocks; } +/** + * Called when the project receives a "green flag." + * @abstract + */ +Target.prototype.onGreenFlag = function () {}; + /** * Return a human-readable name for this target. * Target implementations should override this. diff --git a/src/sprites/clone.js b/src/sprites/clone.js index 9e4364806..1098fd16b 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -332,6 +332,14 @@ Clone.prototype.makeClone = function () { return newClone; }; +/** + * Called when the project receives a "green flag." + * For a clone, this clears graphic effects. + */ +Clone.prototype.onGreenFlag = function () { + this.clearEffects(); +}; + /** * Dispose of this clone, destroying any run-time properties. */ From a687184c3c5298188d2f4f4a226502bb5c40a4e4 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 21 Sep 2016 16:31:23 -0400 Subject: [PATCH 13/25] Fix and improve playground threads display (#198) --- playground/playground.js | 3 +-- src/index.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/playground/playground.js b/playground/playground.js index 4a7e23bf0..ee28c55a9 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -87,8 +87,7 @@ window.onload = function() { // Thread representation tab. var threadexplorer = document.getElementById('threadexplorer'); var cachedThreadJSON = ''; - var updateThreadExplorer = function (threads) { - var newJSON = JSON.stringify(threads, null, 2); + var updateThreadExplorer = function (newJSON) { if (newJSON != cachedThreadJSON) { cachedThreadJSON = newJSON; threadexplorer.innerHTML = cachedThreadJSON; diff --git a/src/index.js b/src/index.js index bf4a159c2..321a0f889 100644 --- a/src/index.js +++ b/src/index.js @@ -76,9 +76,19 @@ VirtualMachine.prototype.stopAll = function () { * Get data for playground. Data comes back in an emitted event. */ VirtualMachine.prototype.getPlaygroundData = function () { + var instance = this; + // Only send back thread data for the current editingTarget. + var threadData = this.runtime.threads.filter(function(thread) { + return thread.target == instance.editingTarget; + }); + // Remove the target key, since it's a circular reference. + var filteredThreadData = JSON.stringify(threadData, function(key, value) { + if (key == 'target') return undefined; + return value; + }, 2); this.emit('playgroundData', { blocks: this.editingTarget.blocks, - threads: this.runtime.threads + threads: filteredThreadData }); }; From a118d500565f72aa86f256a119d95d46b7546c4a Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 21 Sep 2016 16:38:33 -0400 Subject: [PATCH 14/25] Variables and lists (#187) * Import lists and variables from SB2 * Switch to Variable and List objects * Add Clone.lookupOrCreateVariable, Clone.getVariable, Clone.setVariable * Add (get, set, change) variable blocks. * Copy variables and lists on clone instantiation * Move variable options closer to blocks * Add list primitives * Move variable and lists storage to `Target` instead of `Clone` * Move _computeIndex to a Cast function * Rename `getList` -> `getListAsString` * Renames renames * Remove extra check in Cast.isNaN --- src/blocks/scratch3_data.js | 136 ++++++++++++++++++++++++++++++++++++ src/engine/list.js | 16 +++++ src/engine/runtime.js | 3 +- src/engine/target.js | 62 ++++++++++++++++ src/engine/variable.js | 18 +++++ src/import/sb2import.js | 27 ++++++- src/sprites/clone.js | 2 + src/util/cast.js | 41 +++++++++++ 8 files changed, 302 insertions(+), 3 deletions(-) create mode 100644 src/blocks/scratch3_data.js create mode 100644 src/engine/list.js create mode 100644 src/engine/variable.js diff --git a/src/blocks/scratch3_data.js b/src/blocks/scratch3_data.js new file mode 100644 index 000000000..fcac71744 --- /dev/null +++ b/src/blocks/scratch3_data.js @@ -0,0 +1,136 @@ +var Cast = require('../util/cast'); + +function Scratch3DataBlocks(runtime) { + /** + * The runtime instantiating this block package. + * @type {Runtime} + */ + this.runtime = runtime; +} + +/** + * Retrieve the block primitives implemented by this package. + * @return {Object.} Mapping of opcode to Function. + */ +Scratch3DataBlocks.prototype.getPrimitives = function () { + return { + 'data_variable': this.getVariable, + 'data_setvariableto': this.setVariableTo, + 'data_changevariableby': this.changeVariableBy, + 'data_list': this.getListContents, + 'data_addtolist': this.addToList, + 'data_deleteoflist': this.deleteOfList, + 'data_insertatlist': this.insertAtList, + 'data_replaceitemoflist': this.replaceItemOfList, + 'data_itemoflist': this.getItemOfList, + 'data_lengthoflist': this.lengthOfList, + 'data_listcontainsitem': this.listContainsItem + }; +}; + +Scratch3DataBlocks.prototype.getVariable = function (args, util) { + var variable = util.target.lookupOrCreateVariable(args.VARIABLE); + return variable.value; +}; + +Scratch3DataBlocks.prototype.setVariableTo = function (args, util) { + var variable = util.target.lookupOrCreateVariable(args.VARIABLE); + variable.value = args.VALUE; +}; + +Scratch3DataBlocks.prototype.changeVariableBy = function (args, util) { + var variable = util.target.lookupOrCreateVariable(args.VARIABLE); + var castedValue = Cast.toNumber(variable.value); + var dValue = Cast.toNumber(args.VALUE); + variable.value = castedValue + dValue; +}; + +Scratch3DataBlocks.prototype.getListContents = function (args, util) { + var list = util.target.lookupOrCreateList(args.LIST); + // Determine if the list is all single letters. + // If it is, report contents joined together with no separator. + // If it's not, report contents joined together with a space. + var allSingleLetters = true; + for (var i = 0; i < list.contents.length; i++) { + var listItem = list.contents[i]; + if (!((typeof listItem === 'string') && + (listItem.length == 1))) { + allSingleLetters = false; + break; + } + } + if (allSingleLetters) { + return list.contents.join(''); + } else { + return list.contents.join(' '); + } +}; + +Scratch3DataBlocks.prototype.addToList = function (args, util) { + var list = util.target.lookupOrCreateList(args.LIST); + list.contents.push(args.ITEM); +}; + +Scratch3DataBlocks.prototype.deleteOfList = function (args, util) { + var list = util.target.lookupOrCreateList(args.LIST); + var index = Cast.toListIndex(args.INDEX, list.contents.length, true); + if (index === Cast.LIST_INVALID) { + return; + } else if (index === Cast.LIST_ALL) { + list.contents = []; + return; + } + list.contents.splice(index - 1, 1); +}; + +Scratch3DataBlocks.prototype.insertAtList = function (args, util) { + var item = args.ITEM; + var list = util.target.lookupOrCreateList(args.LIST); + var index = Cast.toListIndex(args.INDEX, list.contents.length + 1); + if (index === Cast.LIST_INVALID) { + return; + } + list.contents.splice(index - 1, 0, item); +}; + +Scratch3DataBlocks.prototype.replaceItemOfList = function (args, util) { + var item = args.ITEM; + var list = util.target.lookupOrCreateList(args.LIST); + var index = Cast.toListIndex(args.INDEX, list.contents.length); + if (index === Cast.LIST_INVALID) { + return; + } + list.contents.splice(index - 1, 1, item); +}; + +Scratch3DataBlocks.prototype.getItemOfList = function (args, util) { + var list = util.target.lookupOrCreateList(args.LIST); + var index = Cast.toListIndex(args.INDEX, list.contents.length); + if (index === Cast.LIST_INVALID) { + return ''; + } + return list.contents[index - 1]; +}; + +Scratch3DataBlocks.prototype.lengthOfList = function (args, util) { + var list = util.target.lookupOrCreateList(args.LIST); + return list.contents.length; +}; + +Scratch3DataBlocks.prototype.listContainsItem = function (args, util) { + var item = args.ITEM; + var list = util.target.lookupOrCreateList(args.LIST); + if (list.contents.indexOf(item) >= 0) { + return true; + } + // Try using Scratch comparison operator on each item. + // (Scratch considers the string '123' equal to the number 123). + for (var i = 0; i < list.contents.length; i++) { + if (Cast.compare(list.contents[i], item) == 0) { + return true; + } + } + return false; +}; + +module.exports = Scratch3DataBlocks; diff --git a/src/engine/list.js b/src/engine/list.js new file mode 100644 index 000000000..8ef082cde --- /dev/null +++ b/src/engine/list.js @@ -0,0 +1,16 @@ +/** + * @fileoverview + * Object representing a Scratch list. + */ + + /** + * @param {!string} name Name of the list. + * @param {Array} contents Contents of the list, as an array. + * @constructor + */ +function List (name, contents) { + this.name = name; + this.contents = contents; +} + +module.exports = List; diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 803069c56..75067be3d 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -14,7 +14,8 @@ var defaultBlockPackages = { 'scratch3_looks': require('../blocks/scratch3_looks'), 'scratch3_motion': require('../blocks/scratch3_motion'), 'scratch3_operators': require('../blocks/scratch3_operators'), - 'scratch3_sensing': require('../blocks/scratch3_sensing') + 'scratch3_sensing': require('../blocks/scratch3_sensing'), + 'scratch3_data': require('../blocks/scratch3_data') }; /** diff --git a/src/engine/target.js b/src/engine/target.js index ee1cc9089..d5a59b47a 100644 --- a/src/engine/target.js +++ b/src/engine/target.js @@ -1,4 +1,6 @@ var Blocks = require('./blocks'); +var Variable = require('../engine/variable'); +var List = require('../engine/list'); var uid = require('../util/uid'); /** @@ -25,6 +27,18 @@ function Target (blocks) { * @type {!Blocks} */ this.blocks = blocks; + /** + * Dictionary of variables and their values for this target. + * Key is the variable name. + * @type {Object.} + */ + this.variables = {}; + /** + * Dictionary of lists and their contents for this target. + * Key is the list name. + * @type {Object.} + */ + this.lists = {}; } /** @@ -43,6 +57,54 @@ Target.prototype.getName = function () { return this.id; }; +/** + * Look up a variable object, and create it if one doesn't exist. + * Search begins for local variables; then look for globals. + * @param {!string} name Name of the variable. + * @return {!Variable} Variable object. + */ +Target.prototype.lookupOrCreateVariable = function (name) { + // If we have a local copy, return it. + if (this.variables.hasOwnProperty(name)) { + return this.variables[name]; + } + // If the stage has a global copy, return it. + if (this.runtime && !this.isStage) { + var stage = this.runtime.getTargetForStage(); + if (stage.variables.hasOwnProperty(name)) { + return stage.variables[name]; + } + } + // No variable with this name exists - create it locally. + var newVariable = new Variable(name, 0, false); + this.variables[name] = newVariable; + return newVariable; +}; + +/** +* Look up a list object for this target, and create it if one doesn't exist. +* Search begins for local lists; then look for globals. +* @param {!string} name Name of the list. +* @return {!List} List object. + */ +Target.prototype.lookupOrCreateList = function (name) { + // If we have a local copy, return it. + if (this.lists.hasOwnProperty(name)) { + return this.lists[name]; + } + // If the stage has a global copy, return it. + if (this.runtime && !this.isStage) { + var stage = this.runtime.getTargetForStage(); + if (stage.lists.hasOwnProperty(name)) { + return stage.lists[name]; + } + } + // No list with this name exists - create it locally. + var newList = new List(name, []); + this.lists[name] = newList; + return newList; +}; + /** * Call to destroy a target. * @abstract diff --git a/src/engine/variable.js b/src/engine/variable.js new file mode 100644 index 000000000..4e5e5e6e3 --- /dev/null +++ b/src/engine/variable.js @@ -0,0 +1,18 @@ +/** + * @fileoverview + * Object representing a Scratch variable. + */ + +/** + * @param {!string} name Name of the variable. + * @param {(string|Number)} value Value of the variable. + * @param {boolean} isCloud Whether the variable is stored in the cloud. + * @constructor + */ +function Variable (name, value, isCloud) { + this.name = name; + this.value = value; + this.isCloud = isCloud; +} + +module.exports = Variable; diff --git a/src/import/sb2import.js b/src/import/sb2import.js index cf97efa1d..0962074e3 100644 --- a/src/import/sb2import.js +++ b/src/import/sb2import.js @@ -10,6 +10,8 @@ var Sprite = require('../sprites/sprite'); var Color = require('../util/color.js'); var uid = require('../util/uid'); var specMap = require('./sb2specmap'); +var Variable = require('../engine/variable'); +var List = require('../engine/list'); /** * Top-level handler. Parse provided JSON, @@ -68,6 +70,27 @@ function parseScratchObject (object, runtime, topLevel) { var target = sprite.createClone(); // Add it to the runtime's list of targets. runtime.targets.push(target); + // Load target properties from JSON. + if (object.hasOwnProperty('variables')) { + for (var j = 0; j < object.variables.length; j++) { + var variable = object.variables[j]; + target.variables[variable.name] = new Variable( + variable.name, + variable.value, + variable.isPersistent + ); + } + } + if (object.hasOwnProperty('lists')) { + for (var k = 0; k < object.lists.length; k++) { + var list = object.lists[k]; + // @todo: monitor properties. + target.lists[list.listName] = new List( + list.listName, + list.contents + ); + } + } if (object.hasOwnProperty('scratchX')) { target.x = object.scratchX; } @@ -91,8 +114,8 @@ function parseScratchObject (object, runtime, topLevel) { target.updateAllDrawableProperties(); // The stage will have child objects; recursively process them. if (object.children) { - for (var j = 0; j < object.children.length; j++) { - parseScratchObject(object.children[j], runtime, false); + for (var m = 0; m < object.children.length; m++) { + parseScratchObject(object.children[m], runtime, false); } } } diff --git a/src/sprites/clone.js b/src/sprites/clone.js index 1098fd16b..16c65a1de 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -327,6 +327,8 @@ Clone.prototype.makeClone = function () { newClone.size = this.size; newClone.currentCostume = this.currentCostume; newClone.effects = JSON.parse(JSON.stringify(this.effects)); + newClone.variables = JSON.parse(JSON.stringify(this.variables)); + newClone.lists = JSON.parse(JSON.stringify(this.lists)); newClone.initDrawable(); newClone.updateAllDrawableProperties(); return newClone; diff --git a/src/util/cast.js b/src/util/cast.js index ff3cf042d..c6bb151ae 100644 --- a/src/util/cast.js +++ b/src/util/cast.js @@ -125,4 +125,45 @@ Cast.isInt = function (val) { return false; }; +Cast.LIST_INVALID = 'INVALID'; +Cast.LIST_ALL = 'ALL'; +/** + * Compute a 1-based index into a list, based on a Scratch argument. + * Two special cases may be returned: + * LIST_ALL: if the block is referring to all of the items in the list. + * LIST_INVALID: if the index was invalid in any way. + * @param {*} index Scratch arg, including 1-based numbers or special cases. + * @param {number} length Length of the list. + * @param {boolean} useRound If set, Math.round (not Math.floor for 2.0 compat). + * @return {(number|string)} 1-based index for list, LIST_ALL, or LIST_INVALID. + */ +Cast.toListIndex = function ( + index, length, useRound) { + if (typeof index !== 'number') { + if (index == 'all') { + return Cast.LIST_ALL; + } + if (index == 'last') { + if (length > 0) { + return length; + } + return Cast.LIST_INVALID; + } else if (index == 'random' || index == 'any') { + if (length > 0) { + return 1 + Math.floor(Math.random() * length); + } + return Cast.LIST_INVALID; + } + } + if (useRound) { + index = Math.round(Cast.toNumber(index)); + } else { + index = Math.floor(Cast.toNumber(index)); + } + if (index < 1 || index > length) { + return Cast.LIST_INVALID; + } + return index; +}; + module.exports = Cast; From 2d736f2b871fdcec1c6cd9c063be3d72956db933 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 22 Sep 2016 17:00:38 -0400 Subject: [PATCH 15/25] "Wait until" implementation (#210) --- src/blocks/scratch3_control.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js index 5f3370895..eab6c1a0f 100644 --- a/src/blocks/scratch3_control.js +++ b/src/blocks/scratch3_control.js @@ -19,6 +19,7 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() { 'control_repeat_until': this.repeatUntil, 'control_forever': this.forever, 'control_wait': this.wait, + 'control_wait_until': this.waitUntil, 'control_if': this.if, 'control_if_else': this.ifElse, 'control_stop': this.stop, @@ -76,6 +77,14 @@ Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) { } }; +Scratch3ControlBlocks.prototype.waitUntil = function(args, util) { + var condition = Cast.toBoolean(args.CONDITION); + // Only execute once per frame. + if (!condition) { + util.yieldFrame(); + } +}; + Scratch3ControlBlocks.prototype.forever = function(args, util) { // Only execute once per frame. // When the branch finishes, `forever` will be executed again and From a99f9ad5ff9ea058b090579833e2746421b6e9a0 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Sat, 24 Sep 2016 18:11:01 -0400 Subject: [PATCH 16/25] Provide playground dependencies with webpack This confines all the files the playground needs to the playground directory. --- package.json | 18 ++++--- playground/index.html | 18 ++----- playground/playground.js | 2 +- webpack.config.js | 111 +++++++++++++++++++++++++++++++-------- 4 files changed, 103 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index 0511ebe0e..f4edc1d90 100644 --- a/package.json +++ b/package.json @@ -15,20 +15,22 @@ "start": "webpack-dev-server --host 0.0.0.0 --content-base .", "test": "make test" }, - "dependencies": { + "dependencies": {}, + "devDependencies": { + "copy-webpack-plugin": "3.0.1", + "eslint": "2.7.0", "expose-loader": "0.7.1", + "highlightjs": "8.7.0", "htmlparser2": "3.9.0", "json-loader": "0.5.4", + "lodash.defaultsdeep": "4.6.0", "promise": "7.1.1", - "webpack": "1.13.0" - }, - "devDependencies": { - "eslint": "2.7.0", - "highlightjs": "8.7.0", - "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop", - "scratch-render": "git+https://git@github.com/LLK/scratch-render.git#develop", + "scratch-blocks": "0.1.0-80849", + "scratch-render": "0.1.0-9f26a", + "script-loader": "0.7.0", "stats.js": "0.16.0", "tap": "5.7.1", + "webpack": "1.13.0", "webpack-dev-server": "1.14.1" } } diff --git a/playground/index.html b/playground/index.html index fa007fa27..bbfc80324 100644 --- a/playground/index.html +++ b/playground/index.html @@ -5,7 +5,7 @@ Scratch VM Playground - +

@@ -763,20 +763,10 @@ - - - - - - - - - - - - + + - +