From 22208e22bd3a82377aa289a720df3adb75d2a8c6 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 17 May 2016 05:49:54 -0700
Subject: [PATCH 001/302] Update README.md

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 3d6fd7fa0..679f9b5e1 100644
--- a/README.md
+++ b/README.md
@@ -90,5 +90,5 @@ make test
 make coverage
 ```
 
-## Donation
-We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, community, and resource development efforts. Donations of any size are appreciated. Thank you!
+## Donate
+We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!

From 6df9775cc97e8da0204bc8902c39fe4007191cb4 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 17 May 2016 06:43:24 -0700
Subject: [PATCH 002/302] Update travis badge

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 679f9b5e1..81566bf16 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 ## scratch-vm
 #### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
 
-[![Build Status](https://travis-ci.com/LLK/scratch-vm.svg?token=xzzHj4ct3SyBTpeqxnx1&branch=develop)](https://travis-ci.com/LLK/scratch-vm)
+[![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=master)](https://travis-ci.org/LLK/scratch-vm)
 
 ## Installation
 ```bash

From b8463706b2cbcd72b52ebe49fd66a754b893de29 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 17 May 2016 06:44:54 -0700
Subject: [PATCH 003/302] Add dependency badges

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index 81566bf16..61fb27a65 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
 #### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
 
 [![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=master)](https://travis-ci.org/LLK/scratch-vm)
+[![Dependency Status](https://david-dm.org/LLK/scratch-vm.svg)](https://david-dm.org/LLK/scratch-vm)
+[![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 
 ## Installation
 ```bash

From 2d834de76603756038b46d693c1840f7fd13253d Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 17 May 2016 18:09:15 -0700
Subject: [PATCH 004/302] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 61fb27a65..0d43b2616 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 ## scratch-vm
 #### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
 
-[![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=master)](https://travis-ci.org/LLK/scratch-vm)
+[![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=develop)](https://travis-ci.org/LLK/scratch-vm)
 [![Dependency Status](https://david-dm.org/LLK/scratch-vm.svg)](https://david-dm.org/LLK/scratch-vm)
 [![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 

From cfed4e1bba7a7eed441ce691d5306f721a0ac72b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:26:06 -0400
Subject: [PATCH 005/302] Add "stack click" event handler to VM

See: https://github.com/LLK/scratch-blocks/pull/360
---
 src/index.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/index.js b/src/index.js
index d6e05e970..d128aab90 100644
--- a/src/index.js
+++ b/src/index.js
@@ -55,6 +55,9 @@ function VirtualMachine () {
                 id: e.blockId
             });
             break;
+        case 'stackclick':
+            instance.runtime.toggleStack(e.blockId);
+            break;
         }
     };
 
@@ -76,6 +79,9 @@ function VirtualMachine () {
                 id: e.blockId
             });
             break;
+        case 'stackclick':
+            instance.runtime.toggleStack(e.blockId);
+            break;
         }
     };
 }

From 6a34c584dec912506b4e144227724dc541794c72 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:27:11 -0400
Subject: [PATCH 006/302] Update build for "stack click"

---
 vm.js     | 575 +++++++++++++++++++++++++-----------------------------
 vm.min.js |  11 +-
 2 files changed, 268 insertions(+), 318 deletions(-)

diff --git a/vm.js b/vm.js
index fb2523c87..56783615a 100644
--- a/vm.js
+++ b/vm.js
@@ -101,6 +101,9 @@
 	                id: e.blockId
 	            });
 	            break;
+	        case 'stackclick':
+	            instance.runtime.toggleStack(e.blockId);
+	            break;
 	        }
 	    };
 
@@ -122,6 +125,9 @@
 	                id: e.blockId
 	            });
 	            break;
+	        case 'stackclick':
+	            instance.runtime.toggleStack(e.blockId);
+	            break;
 	        }
 	    };
 	}
@@ -1048,6 +1054,9 @@
 	var queueIndex = -1;
 
 	function cleanUpNextTick() {
+	    if (!draining || !currentQueue) {
+	        return;
+	    }
 	    draining = false;
 	    if (currentQueue.length) {
 	        queue = currentQueue.concat(queue);
@@ -2273,7 +2282,7 @@
 /***/ function(module, exports, __webpack_require__) {
 
 	var html = __webpack_require__(14);
-	var memoize = __webpack_require__(65);
+	var memoize = __webpack_require__(63);
 	var parseDOM = memoize(html.parseDOM, {
 	    length: 1,
 	    resolvers: [String],
@@ -2389,13 +2398,13 @@
 			return defineProp("WritableStream", __webpack_require__(28));
 		},
 		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(51));
+			return defineProp("ProxyHandler", __webpack_require__(49));
 		},
 		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(52));
+			return defineProp("DomUtils", __webpack_require__(50));
 		},
 		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(64));
+			return defineProp("CollectingHandler", __webpack_require__(62));
 		},
 		// For legacy support
 		DefaultHandler: DomHandler,
@@ -6462,7 +6471,7 @@
 	module.exports = Stream;
 
 	var Parser = __webpack_require__(15),
-	    WritableStream = __webpack_require__(29).Writable || __webpack_require__(50).Writable;
+	    WritableStream = __webpack_require__(29).Writable || __webpack_require__(48).Writable;
 
 	function Stream(cbs, options){
 		var parser = this._parser = new Parser(cbs, options);
@@ -6509,14 +6518,14 @@
 	module.exports = Stream;
 
 	var EE = __webpack_require__(1).EventEmitter;
-	var inherits = __webpack_require__(30);
+	var inherits = __webpack_require__(5);
 
 	inherits(Stream, EE);
-	Stream.Readable = __webpack_require__(31);
-	Stream.Writable = __webpack_require__(46);
-	Stream.Duplex = __webpack_require__(47);
-	Stream.Transform = __webpack_require__(48);
-	Stream.PassThrough = __webpack_require__(49);
+	Stream.Readable = __webpack_require__(30);
+	Stream.Writable = __webpack_require__(44);
+	Stream.Duplex = __webpack_require__(45);
+	Stream.Transform = __webpack_require__(46);
+	Stream.PassThrough = __webpack_require__(47);
 
 	// Backwards-compat with node 0.4.x
 	Stream.Stream = Stream;
@@ -6616,44 +6625,15 @@
 
 /***/ },
 /* 30 */
-/***/ 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
-	  }
-	}
-
-
-/***/ },
-/* 31 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(32);
+	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(31);
 	exports.Stream = __webpack_require__(29);
 	exports.Readable = exports;
-	exports.Writable = __webpack_require__(42);
-	exports.Duplex = __webpack_require__(41);
-	exports.Transform = __webpack_require__(44);
-	exports.PassThrough = __webpack_require__(45);
+	exports.Writable = __webpack_require__(40);
+	exports.Duplex = __webpack_require__(39);
+	exports.Transform = __webpack_require__(42);
+	exports.PassThrough = __webpack_require__(43);
 	if (!process.browser && process.env.READABLE_STREAM === 'disable') {
 	  module.exports = __webpack_require__(29);
 	}
@@ -6661,7 +6641,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 32 */
+/* 31 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -6688,12 +6668,12 @@
 	module.exports = Readable;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(33);
+	var isArray = __webpack_require__(32);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(34).Buffer;
+	var Buffer = __webpack_require__(33).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
@@ -6709,15 +6689,15 @@
 	var Stream = __webpack_require__(29);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
-	util.inherits = __webpack_require__(39);
+	var util = __webpack_require__(37);
+	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
 	var StringDecoder;
 
 
 	/*<replacement>*/
-	var debug = __webpack_require__(40);
+	var debug = __webpack_require__(38);
 	if (debug && debug.debuglog) {
 	  debug = debug.debuglog('stream');
 	} else {
@@ -6729,7 +6709,7 @@
 	util.inherits(Readable, Stream);
 
 	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(41);
+	  var Duplex = __webpack_require__(39);
 
 	  options = options || {};
 
@@ -6790,14 +6770,14 @@
 	  this.encoding = null;
 	  if (options.encoding) {
 	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(43).StringDecoder;
+	      StringDecoder = __webpack_require__(41).StringDecoder;
 	    this.decoder = new StringDecoder(options.encoding);
 	    this.encoding = options.encoding;
 	  }
 	}
 
 	function Readable(options) {
-	  var Duplex = __webpack_require__(41);
+	  var Duplex = __webpack_require__(39);
 
 	  if (!(this instanceof Readable))
 	    return new Readable(options);
@@ -6900,7 +6880,7 @@
 	// backwards compatibility.
 	Readable.prototype.setEncoding = function(enc) {
 	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(43).StringDecoder;
+	    StringDecoder = __webpack_require__(41).StringDecoder;
 	  this._readableState.decoder = new StringDecoder(enc);
 	  this._readableState.encoding = enc;
 	  return this;
@@ -7619,7 +7599,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 33 */
+/* 32 */
 /***/ function(module, exports) {
 
 	module.exports = Array.isArray || function (arr) {
@@ -7628,7 +7608,7 @@
 
 
 /***/ },
-/* 34 */
+/* 33 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
@@ -7641,9 +7621,9 @@
 
 	'use strict'
 
-	var base64 = __webpack_require__(35)
-	var ieee754 = __webpack_require__(36)
-	var isArray = __webpack_require__(37)
+	var base64 = __webpack_require__(34)
+	var ieee754 = __webpack_require__(35)
+	var isArray = __webpack_require__(36)
 
 	exports.Buffer = Buffer
 	exports.SlowBuffer = SlowBuffer
@@ -9180,10 +9160,10 @@
 	  return i
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer, (function() { return this; }())))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33).Buffer, (function() { return this; }())))
 
 /***/ },
-/* 35 */
+/* 34 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -9313,7 +9293,7 @@
 
 
 /***/ },
-/* 36 */
+/* 35 */
 /***/ function(module, exports) {
 
 	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -9403,7 +9383,7 @@
 
 
 /***/ },
-/* 37 */
+/* 36 */
 /***/ function(module, exports) {
 
 	var toString = {}.toString;
@@ -9414,7 +9394,7 @@
 
 
 /***/ },
-/* 38 */
+/* 37 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9525,45 +9505,16 @@
 	  return Object.prototype.toString.call(o);
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33).Buffer))
 
 /***/ },
-/* 39 */
-/***/ 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
-	  }
-	}
-
-
-/***/ },
-/* 40 */
+/* 38 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 41 */
+/* 39 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9604,12 +9555,12 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
-	util.inherits = __webpack_require__(39);
+	var util = __webpack_require__(37);
+	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Readable = __webpack_require__(32);
-	var Writable = __webpack_require__(42);
+	var Readable = __webpack_require__(31);
+	var Writable = __webpack_require__(40);
 
 	util.inherits(Duplex, Readable);
 
@@ -9659,7 +9610,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 42 */
+/* 40 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9690,15 +9641,15 @@
 	module.exports = Writable;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(34).Buffer;
+	var Buffer = __webpack_require__(33).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
-	util.inherits = __webpack_require__(39);
+	var util = __webpack_require__(37);
+	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
 	var Stream = __webpack_require__(29);
@@ -9712,7 +9663,7 @@
 	}
 
 	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(41);
+	  var Duplex = __webpack_require__(39);
 
 	  options = options || {};
 
@@ -9800,7 +9751,7 @@
 	}
 
 	function Writable(options) {
-	  var Duplex = __webpack_require__(41);
+	  var Duplex = __webpack_require__(39);
 
 	  // Writable ctor is applied to Duplexes, though they're not
 	  // instanceof Writable, they're instanceof Readable.
@@ -10143,7 +10094,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 43 */
+/* 41 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10167,7 +10118,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__(34).Buffer;
+	var Buffer = __webpack_require__(33).Buffer;
 
 	var isBufferEncoding = Buffer.isEncoding
 	  || function(encoding) {
@@ -10370,7 +10321,7 @@
 
 
 /***/ },
-/* 44 */
+/* 42 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10439,11 +10390,11 @@
 
 	module.exports = Transform;
 
-	var Duplex = __webpack_require__(41);
+	var Duplex = __webpack_require__(39);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
-	util.inherits = __webpack_require__(39);
+	var util = __webpack_require__(37);
+	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
 	util.inherits(Transform, Duplex);
@@ -10585,7 +10536,7 @@
 
 
 /***/ },
-/* 45 */
+/* 43 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10615,11 +10566,11 @@
 
 	module.exports = PassThrough;
 
-	var Transform = __webpack_require__(44);
+	var Transform = __webpack_require__(42);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
-	util.inherits = __webpack_require__(39);
+	var util = __webpack_require__(37);
+	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
 	util.inherits(PassThrough, Transform);
@@ -10636,6 +10587,20 @@
 	};
 
 
+/***/ },
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+	module.exports = __webpack_require__(40)
+
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+	module.exports = __webpack_require__(39)
+
+
 /***/ },
 /* 46 */
 /***/ function(module, exports, __webpack_require__) {
@@ -10647,31 +10612,17 @@
 /* 47 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(41)
+	module.exports = __webpack_require__(43)
 
 
 /***/ },
 /* 48 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(44)
-
-
-/***/ },
-/* 49 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(45)
-
-
-/***/ },
-/* 50 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 51 */
+/* 49 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = ProxyHandler;
@@ -10703,18 +10654,18 @@
 	});
 
 /***/ },
-/* 52 */
+/* 50 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var DomUtils = module.exports;
 
 	[
-		__webpack_require__(53),
+		__webpack_require__(51),
+		__webpack_require__(57),
+		__webpack_require__(58),
 		__webpack_require__(59),
 		__webpack_require__(60),
-		__webpack_require__(61),
-		__webpack_require__(62),
-		__webpack_require__(63)
+		__webpack_require__(61)
 	].forEach(function(ext){
 		Object.keys(ext).forEach(function(key){
 			DomUtils[key] = ext[key].bind(DomUtils);
@@ -10723,11 +10674,11 @@
 
 
 /***/ },
-/* 53 */
+/* 51 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var ElementType = __webpack_require__(23),
-	    getOuterHTML = __webpack_require__(54),
+	    getOuterHTML = __webpack_require__(52),
 	    isTag = ElementType.isTag;
 
 	module.exports = {
@@ -10751,14 +10702,14 @@
 
 
 /***/ },
-/* 54 */
+/* 52 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/*
 	  Module dependencies
 	*/
-	var ElementType = __webpack_require__(55);
-	var entities = __webpack_require__(56);
+	var ElementType = __webpack_require__(53);
+	var entities = __webpack_require__(54);
 
 	/*
 	  Boolean Attributes
@@ -10935,7 +10886,7 @@
 
 
 /***/ },
-/* 55 */
+/* 53 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -10954,11 +10905,11 @@
 	};
 
 /***/ },
-/* 56 */
+/* 54 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var encode = __webpack_require__(57),
-	    decode = __webpack_require__(58);
+	var encode = __webpack_require__(55),
+	    decode = __webpack_require__(56);
 
 	exports.decode = function(data, level){
 		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
@@ -10993,7 +10944,7 @@
 
 
 /***/ },
-/* 57 */
+/* 55 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var inverseXML = getInverseObj(__webpack_require__(21)),
@@ -11072,7 +11023,7 @@
 
 
 /***/ },
-/* 58 */
+/* 56 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var entityMap = __webpack_require__(19),
@@ -11149,7 +11100,7 @@
 	};
 
 /***/ },
-/* 59 */
+/* 57 */
 /***/ function(module, exports) {
 
 	var getChildren = exports.getChildren = function(elem){
@@ -11179,7 +11130,7 @@
 
 
 /***/ },
-/* 60 */
+/* 58 */
 /***/ function(module, exports) {
 
 	exports.removeElement = function(elem){
@@ -11262,7 +11213,7 @@
 
 
 /***/ },
-/* 61 */
+/* 59 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var isTag = __webpack_require__(23).isTag;
@@ -11362,7 +11313,7 @@
 
 
 /***/ },
-/* 62 */
+/* 60 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var ElementType = __webpack_require__(23);
@@ -11455,7 +11406,7 @@
 
 
 /***/ },
-/* 63 */
+/* 61 */
 /***/ function(module, exports) {
 
 	// removeSubsets
@@ -11602,7 +11553,7 @@
 
 
 /***/ },
-/* 64 */
+/* 62 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = CollectingHandler;
@@ -11663,14 +11614,14 @@
 
 
 /***/ },
-/* 65 */
+/* 63 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var normalizeOpts = __webpack_require__(66)
-	  , resolveLength = __webpack_require__(67)
-	  , plain         = __webpack_require__(73);
+	var normalizeOpts = __webpack_require__(64)
+	  , resolveLength = __webpack_require__(65)
+	  , plain         = __webpack_require__(71);
 
 	module.exports = function (fn/*, options*/) {
 		var options = normalizeOpts(arguments[1]), length;
@@ -11680,31 +11631,31 @@
 			if (length !== 0) {
 				if (options.primitive) {
 					if (length === false) {
-						options.normalizer = __webpack_require__(110);
+						options.normalizer = __webpack_require__(108);
 					} else if (length > 1) {
-						options.normalizer = __webpack_require__(111)(length);
+						options.normalizer = __webpack_require__(109)(length);
 					}
 				} else {
-					if (length === false) options.normalizer = __webpack_require__(112)();
-					else if (length === 1) options.normalizer = __webpack_require__(114)();
-					else options.normalizer = __webpack_require__(115)(length);
+					if (length === false) options.normalizer = __webpack_require__(110)();
+					else if (length === 1) options.normalizer = __webpack_require__(112)();
+					else options.normalizer = __webpack_require__(113)(length);
 				}
 			}
 		}
 
 		// Assure extensions
-		if (options.async) __webpack_require__(116);
-		if (options.dispose) __webpack_require__(119);
-		if (options.maxAge) __webpack_require__(120);
-		if (options.max) __webpack_require__(123);
-		if (options.refCounter) __webpack_require__(125);
+		if (options.async) __webpack_require__(114);
+		if (options.dispose) __webpack_require__(117);
+		if (options.maxAge) __webpack_require__(118);
+		if (options.max) __webpack_require__(121);
+		if (options.refCounter) __webpack_require__(123);
 
 		return plain(fn, options);
 	};
 
 
 /***/ },
-/* 66 */
+/* 64 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11727,12 +11678,12 @@
 
 
 /***/ },
-/* 67 */
+/* 65 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(68);
+	var toPosInt = __webpack_require__(66);
 
 	module.exports = function (optsLength, fnLength, isAsync) {
 		var length;
@@ -11748,12 +11699,12 @@
 
 
 /***/ },
-/* 68 */
+/* 66 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toInteger = __webpack_require__(69)
+	var toInteger = __webpack_require__(67)
 
 	  , max = Math.max;
 
@@ -11761,12 +11712,12 @@
 
 
 /***/ },
-/* 69 */
+/* 67 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var sign = __webpack_require__(70)
+	var sign = __webpack_require__(68)
 
 	  , abs = Math.abs, floor = Math.floor;
 
@@ -11779,18 +11730,18 @@
 
 
 /***/ },
-/* 70 */
+/* 68 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(71)()
+	module.exports = __webpack_require__(69)()
 		? Math.sign
-		: __webpack_require__(72);
+		: __webpack_require__(70);
 
 
 /***/ },
-/* 71 */
+/* 69 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11803,7 +11754,7 @@
 
 
 /***/ },
-/* 72 */
+/* 70 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11816,16 +11767,16 @@
 
 
 /***/ },
-/* 73 */
+/* 71 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable      = __webpack_require__(74)
-	  , forEach       = __webpack_require__(75)
-	  , extensions    = __webpack_require__(78)
-	  , configure     = __webpack_require__(79)
-	  , resolveLength = __webpack_require__(67)
+	var callable      = __webpack_require__(72)
+	  , forEach       = __webpack_require__(73)
+	  , extensions    = __webpack_require__(76)
+	  , configure     = __webpack_require__(77)
+	  , resolveLength = __webpack_require__(65)
 
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -11857,7 +11808,7 @@
 
 
 /***/ },
-/* 74 */
+/* 72 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11869,16 +11820,16 @@
 
 
 /***/ },
-/* 75 */
+/* 73 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(76)('forEach');
+	module.exports = __webpack_require__(74)('forEach');
 
 
 /***/ },
-/* 76 */
+/* 74 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Internal method, used by iteration functions.
@@ -11887,8 +11838,8 @@
 
 	'use strict';
 
-	var callable = __webpack_require__(74)
-	  , value    = __webpack_require__(77)
+	var callable = __webpack_require__(72)
+	  , value    = __webpack_require__(75)
 
 	  , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
 	  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
@@ -11913,7 +11864,7 @@
 
 
 /***/ },
-/* 77 */
+/* 75 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11925,24 +11876,24 @@
 
 
 /***/ },
-/* 78 */
+/* 76 */
 /***/ function(module, exports) {
 
 	'use strict';
 
 
 /***/ },
-/* 79 */
+/* 77 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var customError      = __webpack_require__(80)
-	  , defineLength     = __webpack_require__(87)
-	  , d                = __webpack_require__(89)
-	  , ee               = __webpack_require__(94).methods
-	  , resolveResolve   = __webpack_require__(95)
-	  , resolveNormalize = __webpack_require__(109)
+	var customError      = __webpack_require__(78)
+	  , defineLength     = __webpack_require__(85)
+	  , d                = __webpack_require__(87)
+	  , ee               = __webpack_require__(92).methods
+	  , resolveResolve   = __webpack_require__(93)
+	  , resolveNormalize = __webpack_require__(107)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty
@@ -12082,12 +12033,12 @@
 
 
 /***/ },
-/* 80 */
+/* 78 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign = __webpack_require__(81)
+	var assign = __webpack_require__(79)
 
 	  , captureStackTrace = Error.captureStackTrace;
 
@@ -12108,18 +12059,18 @@
 
 
 /***/ },
-/* 81 */
+/* 79 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(82)()
+	module.exports = __webpack_require__(80)()
 		? Object.assign
-		: __webpack_require__(83);
+		: __webpack_require__(81);
 
 
 /***/ },
-/* 82 */
+/* 80 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12134,13 +12085,13 @@
 
 
 /***/ },
-/* 83 */
+/* 81 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var keys  = __webpack_require__(84)
-	  , value = __webpack_require__(77)
+	var keys  = __webpack_require__(82)
+	  , value = __webpack_require__(75)
 
 	  , max = Math.max;
 
@@ -12162,18 +12113,18 @@
 
 
 /***/ },
-/* 84 */
+/* 82 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(85)()
+	module.exports = __webpack_require__(83)()
 		? Object.keys
-		: __webpack_require__(86);
+		: __webpack_require__(84);
 
 
 /***/ },
-/* 85 */
+/* 83 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12187,7 +12138,7 @@
 
 
 /***/ },
-/* 86 */
+/* 84 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12200,12 +12151,12 @@
 
 
 /***/ },
-/* 87 */
+/* 85 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(68)
+	var toPosInt = __webpack_require__(66)
 
 	  , test = function (a, b) {}, desc, defineProperty
 	  , generate, mixin;
@@ -12226,7 +12177,7 @@
 			return defineProperty(fn, 'length', desc);
 		};
 	} else {
-		mixin = __webpack_require__(88);
+		mixin = __webpack_require__(86);
 		generate = (function () {
 			var cache = [];
 			return function (l) {
@@ -12250,12 +12201,12 @@
 
 
 /***/ },
-/* 88 */
+/* 86 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var value = __webpack_require__(77)
+	var value = __webpack_require__(75)
 
 	  , defineProperty = Object.defineProperty
 	  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
@@ -12275,15 +12226,15 @@
 
 
 /***/ },
-/* 89 */
+/* 87 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign        = __webpack_require__(81)
-	  , normalizeOpts = __webpack_require__(66)
-	  , isCallable    = __webpack_require__(90)
-	  , contains      = __webpack_require__(91)
+	var assign        = __webpack_require__(79)
+	  , normalizeOpts = __webpack_require__(64)
+	  , isCallable    = __webpack_require__(88)
+	  , contains      = __webpack_require__(89)
 
 	  , d;
 
@@ -12344,7 +12295,7 @@
 
 
 /***/ },
-/* 90 */
+/* 88 */
 /***/ function(module, exports) {
 
 	// Deprecated
@@ -12355,18 +12306,18 @@
 
 
 /***/ },
-/* 91 */
+/* 89 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(92)()
+	module.exports = __webpack_require__(90)()
 		? String.prototype.contains
-		: __webpack_require__(93);
+		: __webpack_require__(91);
 
 
 /***/ },
-/* 92 */
+/* 90 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12380,7 +12331,7 @@
 
 
 /***/ },
-/* 93 */
+/* 91 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12393,13 +12344,13 @@
 
 
 /***/ },
-/* 94 */
+/* 92 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var d        = __webpack_require__(89)
-	  , callable = __webpack_require__(74)
+	var d        = __webpack_require__(87)
+	  , callable = __webpack_require__(72)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, defineProperty = Object.defineProperty
@@ -12531,13 +12482,13 @@
 
 
 /***/ },
-/* 95 */
+/* 93 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toArray  = __webpack_require__(96)
-	  , callable = __webpack_require__(74)
+	var toArray  = __webpack_require__(94)
+	  , callable = __webpack_require__(72)
 
 	  , slice = Array.prototype.slice
 	  , resolveArgs;
@@ -12558,12 +12509,12 @@
 
 
 /***/ },
-/* 96 */
+/* 94 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var from = __webpack_require__(97)
+	var from = __webpack_require__(95)
 
 	  , isArray = Array.isArray;
 
@@ -12573,18 +12524,18 @@
 
 
 /***/ },
-/* 97 */
+/* 95 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(98)()
+	module.exports = __webpack_require__(96)()
 		? Array.from
-		: __webpack_require__(99);
+		: __webpack_require__(97);
 
 
 /***/ },
-/* 98 */
+/* 96 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12599,18 +12550,18 @@
 
 
 /***/ },
-/* 99 */
+/* 97 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var iteratorSymbol = __webpack_require__(100).iterator
-	  , isArguments    = __webpack_require__(105)
-	  , isFunction     = __webpack_require__(106)
-	  , toPosInt       = __webpack_require__(68)
-	  , callable       = __webpack_require__(74)
-	  , validValue     = __webpack_require__(77)
-	  , isString       = __webpack_require__(108)
+	var iteratorSymbol = __webpack_require__(98).iterator
+	  , isArguments    = __webpack_require__(103)
+	  , isFunction     = __webpack_require__(104)
+	  , toPosInt       = __webpack_require__(66)
+	  , callable       = __webpack_require__(72)
+	  , validValue     = __webpack_require__(75)
+	  , isString       = __webpack_require__(106)
 
 	  , isArray = Array.isArray, call = Function.prototype.call
 	  , desc = { configurable: true, enumerable: true, writable: true, value: null }
@@ -12711,16 +12662,16 @@
 
 
 /***/ },
-/* 100 */
+/* 98 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(101)() ? Symbol : __webpack_require__(102);
+	module.exports = __webpack_require__(99)() ? Symbol : __webpack_require__(100);
 
 
 /***/ },
-/* 101 */
+/* 99 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12744,15 +12695,15 @@
 
 
 /***/ },
-/* 102 */
+/* 100 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
 
 	'use strict';
 
-	var d              = __webpack_require__(89)
-	  , validateSymbol = __webpack_require__(103)
+	var d              = __webpack_require__(87)
+	  , validateSymbol = __webpack_require__(101)
 
 	  , create = Object.create, defineProperties = Object.defineProperties
 	  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
@@ -12857,12 +12808,12 @@
 
 
 /***/ },
-/* 103 */
+/* 101 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var isSymbol = __webpack_require__(104);
+	var isSymbol = __webpack_require__(102);
 
 	module.exports = function (value) {
 		if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
@@ -12871,7 +12822,7 @@
 
 
 /***/ },
-/* 104 */
+/* 102 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12882,7 +12833,7 @@
 
 
 /***/ },
-/* 105 */
+/* 103 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12895,14 +12846,14 @@
 
 
 /***/ },
-/* 106 */
+/* 104 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
 	var toString = Object.prototype.toString
 
-	  , id = toString.call(__webpack_require__(107));
+	  , id = toString.call(__webpack_require__(105));
 
 	module.exports = function (f) {
 		return (typeof f === "function") && (toString.call(f) === id);
@@ -12910,7 +12861,7 @@
 
 
 /***/ },
-/* 107 */
+/* 105 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12919,7 +12870,7 @@
 
 
 /***/ },
-/* 108 */
+/* 106 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12935,12 +12886,12 @@
 
 
 /***/ },
-/* 109 */
+/* 107 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable = __webpack_require__(74);
+	var callable = __webpack_require__(72);
 
 	module.exports = function (userNormalizer) {
 		var normalizer;
@@ -12958,7 +12909,7 @@
 
 
 /***/ },
-/* 110 */
+/* 108 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12973,7 +12924,7 @@
 
 
 /***/ },
-/* 111 */
+/* 109 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12991,12 +12942,12 @@
 
 
 /***/ },
-/* 112 */
+/* 110 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(113)
+	var indexOf = __webpack_require__(111)
 	  , create = Object.create;
 
 	module.exports = function () {
@@ -13085,13 +13036,13 @@
 
 
 /***/ },
-/* 113 */
+/* 111 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(68)
-	  , value    = __webpack_require__(77)
+	var toPosInt = __webpack_require__(66)
+	  , value    = __webpack_require__(75)
 
 	  , indexOf = Array.prototype.indexOf
 	  , hasOwnProperty = Object.prototype.hasOwnProperty
@@ -13120,12 +13071,12 @@
 
 
 /***/ },
-/* 114 */
+/* 112 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(113);
+	var indexOf = __webpack_require__(111);
 
 	module.exports = function () {
 		var lastId = 0, argsMap = [], cache = [];
@@ -13155,12 +13106,12 @@
 
 
 /***/ },
-/* 115 */
+/* 113 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(113)
+	var indexOf = __webpack_require__(111)
 	  , create = Object.create;
 
 	module.exports = function (length) {
@@ -13232,23 +13183,23 @@
 
 
 /***/ },
-/* 116 */
+/* 114 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Support for asynchronous functions
 
 	'use strict';
 
-	var aFrom        = __webpack_require__(97)
-	  , mixin        = __webpack_require__(88)
-	  , defineLength = __webpack_require__(87)
-	  , nextTick     = __webpack_require__(117)
+	var aFrom        = __webpack_require__(95)
+	  , mixin        = __webpack_require__(86)
+	  , defineLength = __webpack_require__(85)
+	  , nextTick     = __webpack_require__(115)
 
 	  , slice = Array.prototype.slice
 	  , apply = Function.prototype.apply, create = Object.create
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
-	__webpack_require__(78).async = function (tbi, conf) {
+	__webpack_require__(76).async = function (tbi, conf) {
 		var waiting = create(null), cache = create(null)
 		  , base = conf.memoized, original = conf.original
 		  , currentCallback, currentContext, currentArgs;
@@ -13384,7 +13335,7 @@
 
 
 /***/ },
-/* 117 */
+/* 115 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process, setImmediate) {'use strict';
@@ -13452,10 +13403,10 @@
 		return null;
 	}());
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(118).setImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(116).setImmediate))
 
 /***/ },
-/* 118 */
+/* 116 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(3).nextTick;
@@ -13534,19 +13485,19 @@
 	exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
 	  delete immediateIds[id];
 	};
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(118).setImmediate, __webpack_require__(118).clearImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(116).setImmediate, __webpack_require__(116).clearImmediate))
 
 /***/ },
-/* 119 */
+/* 117 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Call dispose callback on each cache purge
 
 	'use strict';
 
-	var callable   = __webpack_require__(74)
-	  , forEach    = __webpack_require__(75)
-	  , extensions = __webpack_require__(78)
+	var callable   = __webpack_require__(72)
+	  , forEach    = __webpack_require__(73)
+	  , extensions = __webpack_require__(76)
 
 	  , slice = Array.prototype.slice, apply = Function.prototype.apply;
 
@@ -13570,18 +13521,18 @@
 
 
 /***/ },
-/* 120 */
+/* 118 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Timeout cached values
 
 	'use strict';
 
-	var aFrom      = __webpack_require__(97)
-	  , noop       = __webpack_require__(107)
-	  , forEach    = __webpack_require__(75)
-	  , timeout    = __webpack_require__(121)
-	  , extensions = __webpack_require__(78)
+	var aFrom      = __webpack_require__(95)
+	  , noop       = __webpack_require__(105)
+	  , forEach    = __webpack_require__(73)
+	  , timeout    = __webpack_require__(119)
+	  , extensions = __webpack_require__(76)
 
 	  , max = Math.max, min = Math.min, create = Object.create;
 
@@ -13646,13 +13597,13 @@
 
 
 /***/ },
-/* 121 */
+/* 119 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt   = __webpack_require__(68)
-	  , maxTimeout = __webpack_require__(122);
+	var toPosInt   = __webpack_require__(66)
+	  , maxTimeout = __webpack_require__(120);
 
 	module.exports = function (value) {
 		value = toPosInt(value);
@@ -13662,7 +13613,7 @@
 
 
 /***/ },
-/* 122 */
+/* 120 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -13671,16 +13622,16 @@
 
 
 /***/ },
-/* 123 */
+/* 121 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Limit cache size, LRU (least recently used) algorithm.
 
 	'use strict';
 
-	var toPosInteger = __webpack_require__(68)
-	  , lruQueue     = __webpack_require__(124)
-	  , extensions   = __webpack_require__(78);
+	var toPosInteger = __webpack_require__(66)
+	  , lruQueue     = __webpack_require__(122)
+	  , extensions   = __webpack_require__(76);
 
 	extensions.max = function (max, conf, options) {
 		var postfix, queue, hit;
@@ -13703,12 +13654,12 @@
 
 
 /***/ },
-/* 124 */
+/* 122 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(68)
+	var toPosInt = __webpack_require__(66)
 
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -13757,15 +13708,15 @@
 
 
 /***/ },
-/* 125 */
+/* 123 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Reference counter, useful for garbage collector like functionality
 
 	'use strict';
 
-	var d          = __webpack_require__(89)
-	  , extensions = __webpack_require__(78)
+	var d          = __webpack_require__(87)
+	  , extensions = __webpack_require__(76)
 
 	  , create = Object.create, defineProperties = Object.defineProperties;
 
diff --git a/vm.min.js b/vm.min.js
index d11a6ccad..ddf694ce7 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,11 +1,10 @@
-!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.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId)switch(e.type){case"create":t.runtime.createBlock(a(e),!1);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.runtime.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldField:e.oldInputName,newParent:e.newParentId,newField:e.newInputName});break;case"delete":t.runtime.deleteBlock({id:e.blockId})}},t.flyoutBlockListener=function(e){switch(e.type){case"create":t.runtime.createBlock(a(e),!0);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.runtime.deleteBlock({id:e.blockId})}}}var i=r(1),o=r(2),s=r(6),a=r(13);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)I(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),I(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u=!1,s.length?c=s.concat(c):l=-1,c.length&&n()}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.blocks={},this.stacks=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(7),s=r(9),a=r(2),c={scratch3:r(11),wedo2:r(12)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype.createBlock=function(t,e){this.blocks[t.id]=t;for(var r in t.fields){var n=t.fields[r].blocks;for(var i in n){var o=n[i];this.blocks[o.id]=o}}e||this.stacks.push(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this.blocks[t.id]&&"undefined"!=typeof this.blocks[t.id].fields[t.name]&&(this.blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){var e=this;void 0===t.newParent&&void 0!==t.oldParent?(e.stacks.push(t.id),void 0===t.oldField?e.blocks[t.oldParent].next=null:delete e.blocks[t.oldParent].fields[t.oldField]):void 0!==t.newParent&&(e._deleteStack(t.id),void 0===t.newField?e.blocks[t.newParent].next=t.id:e.blocks[t.newParent].fields[t.newField]={name:t.newField,value:t.id,blocks:{}})},n.prototype.deleteBlock=function(t){var e=this.blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.fields)if("SUBSTACK"===r)this.deleteBlock({id:e.fields[r].value});else for(var n in e.fields[r].blocks)this.deleteBlock({id:n});this._deleteStack(t.id),delete this.blocks[t.id]},n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.stacks.length;e++){var r=this.stacks[e];"event_whenflagclicked"===this.blocks[r].opcode&&this._pushThread(this.stacks[e])}},n.prototype.startDistanceSensors=function(){for(var t=0;t<this.stacks.length;t++){var e=this.stacks[t];if("wedo_whendistanceclose"===this.blocks[e].opcode){for(var r=!1,n=0;n<this.threads.length;n++)this.threads[n].topBlock===e&&(r=!0);r||this._pushThread(this.stacks[t])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},n.prototype._deleteStack=function(t){var e=this.stacks.indexOf(t);e>-1&&this.stacks.splice(e,1)},n.prototype._getNextBlock=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].next},n.prototype._getSubstack=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].fields.SUBSTACK},n.prototype._getOpcode=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].opcode},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks[r])return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime._getNextBlock(r);var n=this.runtime._getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime._getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=0;e<c.runtime.stacks.length;e++){var r=c.runtime.stacks[e],n=c.runtime.blocks[r],i=t(n);if(i){for(var o=!1,s=0;s<c.runtime.threads.length;s++)if(c.runtime.threads[s].topBlock==r){o=!0;break}o||c.runtime._pushThread(r)}}},h=!1,f=function(){var e=c.runtime._getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks[r].fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(8);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(10);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){var e={},r=t[0],n=r.attribs.name;e[n]={name:n,value:null,blocks:{}};var i=r.children[0],o=i.attribs.id,s=i.attribs.type;e[n].blocks[o]={id:o,opcode:s,next:null,fields:{}};var a=i.children[0],c=a.attribs.name,u=a.children[0].data;return e[n].blocks[o].fields[c]={name:c,value:u,blocks:null},e}var i=r(14),o=r(65),s=o(i.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){if("object"==typeof t&&"string"==typeof t.blockId&&"object"==typeof t.xml){var e={id:t.blockId,opcode:null,next:null,fields:{}};return"object"==typeof t.xml.attributes&&(e.opcode=t.xml.attributes.type.value),"string"!=typeof t.xml.innerHTML?e:""===t.xml.innerHTML?e:(e.fields=n(s(t.xml.innerHTML)),e)}}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(15),o=r(22);t.exports={Parser:i,Tokenizer:r(16),ElementType:r(23),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(26))},get Stream(){return n("Stream",r(27))},get WritableStream(){return n("WritableStream",r(28))},get ProxyHandler(){return n("ProxyHandler",r(51))},get DomUtils(){return n("DomUtils",r(52))},get CollectingHandler(){return n("CollectingHandler",r(64))},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(16),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(17),u=r(19),l=r(20),h=r(21),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,C=f++,I=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,P=f++,U=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?C:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=I,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=I},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=I)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===I?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===I||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(18);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(23),o=/\s+/g,s=r(24),a=r(25),c={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(24),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(14),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(28);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(14).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(15),o=r(29).Writable||r(50).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(30);o(n,i),n.Readable=r(31),n.Writable=r(46),n.Duplex=r(47),n.Transform=r(48),n.PassThrough=r(49),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),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(32),e.Stream=r(29),e.Readable=e,e.Writable=r(42),e.Duplex=r(41),e.Transform=r(44),e.PassThrough=r(45),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(29))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(41);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&&(L||(L=r(43).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(41);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=C)t=C;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(33),E=r(34).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(29),A=r(38);A.inherits=r(39);var L,O=r(40);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(43).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId)switch(e.type){case"create":t.runtime.createBlock(a(e),!1);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.runtime.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldField:e.oldInputName,newParent:e.newParentId,newField:e.newInputName});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}},t.flyoutBlockListener=function(e){switch(e.type){case"create":t.runtime.createBlock(a(e),!0);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(13);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.blocks={},this.stacks=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(7),s=r(9),a=r(2),c={scratch3:r(11),wedo2:r(12)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype.createBlock=function(t,e){this.blocks[t.id]=t;for(var r in t.fields){var n=t.fields[r].blocks;for(var i in n){var o=n[i];this.blocks[o.id]=o}}e||this.stacks.push(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this.blocks[t.id]&&"undefined"!=typeof this.blocks[t.id].fields[t.name]&&(this.blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){var e=this;void 0===t.newParent&&void 0!==t.oldParent?(e.stacks.push(t.id),void 0===t.oldField?e.blocks[t.oldParent].next=null:delete e.blocks[t.oldParent].fields[t.oldField]):void 0!==t.newParent&&(e._deleteStack(t.id),void 0===t.newField?e.blocks[t.newParent].next=t.id:e.blocks[t.newParent].fields[t.newField]={name:t.newField,value:t.id,blocks:{}})},n.prototype.deleteBlock=function(t){var e=this.blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.fields)if("SUBSTACK"===r)this.deleteBlock({id:e.fields[r].value});else for(var n in e.fields[r].blocks)this.deleteBlock({id:n});this._deleteStack(t.id),delete this.blocks[t.id]},n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.stacks.length;e++){var r=this.stacks[e];"event_whenflagclicked"===this.blocks[r].opcode&&this._pushThread(this.stacks[e])}},n.prototype.startDistanceSensors=function(){for(var t=0;t<this.stacks.length;t++){var e=this.stacks[t];if("wedo_whendistanceclose"===this.blocks[e].opcode){for(var r=!1,n=0;n<this.threads.length;n++)this.threads[n].topBlock===e&&(r=!0);r||this._pushThread(this.stacks[t])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},n.prototype._deleteStack=function(t){var e=this.stacks.indexOf(t);e>-1&&this.stacks.splice(e,1)},n.prototype._getNextBlock=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].next},n.prototype._getSubstack=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].fields.SUBSTACK},n.prototype._getOpcode=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].opcode},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks[r])return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime._getNextBlock(r);var n=this.runtime._getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime._getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=0;e<c.runtime.stacks.length;e++){var r=c.runtime.stacks[e],n=c.runtime.blocks[r],i=t(n);if(i){for(var o=!1,s=0;s<c.runtime.threads.length;s++)if(c.runtime.threads[s].topBlock==r){o=!0;break}o||c.runtime._pushThread(r)}}},h=!1,f=function(){var e=c.runtime._getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks[r].fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(8);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(10);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){var e={},r=t[0],n=r.attribs.name;e[n]={name:n,value:null,blocks:{}};var i=r.children[0],o=i.attribs.id,s=i.attribs.type;e[n].blocks[o]={id:o,opcode:s,next:null,fields:{}};var a=i.children[0],c=a.attribs.name,u=a.children[0].data;return e[n].blocks[o].fields[c]={name:c,value:u,blocks:null},e}var i=r(14),o=r(63),s=o(i.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){if("object"==typeof t&&"string"==typeof t.blockId&&"object"==typeof t.xml){var e={id:t.blockId,opcode:null,next:null,fields:{}};return"object"==typeof t.xml.attributes&&(e.opcode=t.xml.attributes.type.value),"string"!=typeof t.xml.innerHTML?e:""===t.xml.innerHTML?e:(e.fields=n(s(t.xml.innerHTML)),e)}}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(15),o=r(22);t.exports={Parser:i,Tokenizer:r(16),ElementType:r(23),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(26))},get Stream(){return n("Stream",r(27))},get WritableStream(){return n("WritableStream",r(28))},get ProxyHandler(){return n("ProxyHandler",r(49))},get DomUtils(){return n("DomUtils",r(50))},get CollectingHandler(){return n("CollectingHandler",r(62))},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(16),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(17),u=r(19),l=r(20),h=r(21),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,P=f++,U=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,
+this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(18);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(23),o=/\s+/g,s=r(24),a=r(25),c={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(24),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(14),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(28);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(14).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(15),o=r(29).Writable||r(48).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(30),n.Writable=r(44),n.Duplex=r(45),n.Transform=r(46),n.PassThrough=r(47),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(31),e.Stream=r(29),e.Readable=e,e.Writable=r(40),e.Duplex=r(39),e.Transform=r(42),e.PassThrough=r(43),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(29))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(39);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&&(L||(L=r(41).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(39);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(32),E=r(33).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(29),A=r(37);A.inherits=r(5);var L,O=r(38);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(41).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(35),J=r(36),X=r(37);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(34).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(34).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?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(38);a.inherits=r(39);var c=r(32),u=r(42);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(41);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(41);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(34).Buffer;o.WritableState=i;var S=r(38);S.inherits=r(39);var x=r(29);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(34).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(41),c=r(38);c.inherits=r(39),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(44),o=r(38);o.inherits=r(39),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(42)},function(t,e,r){t.exports=r(41)},function(t,e,r){t.exports=r(44)},function(t,e,r){t.exports=r(45)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(53),r(59),r(60),r(61),r(62),r(63)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n);
-})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(23),s=r(54),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(55),l=r(56),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(57),i=r(58);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(21)),l=i(u);e.XML=a(u,l);var h=n(r(19)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(19),a=r(20),c=r(21),u=r(17),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(23).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(23),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(66),i=r(67),o=r(73);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(110):e>1&&(s.normalizer=r(111)(e)):e===!1?s.normalizer=r(112)():1===e?s.normalizer=r(114)():s.normalizer=r(115)(e))),s.async&&r(116),s.dispose&&r(119),s.maxAge&&r(120),s.max&&r(123),s.refCounter&&r(125),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(68);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(69),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(70),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(71)()?Math.sign:r(72)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(74),i=r(75),o=r(78),s=r(79),a=r(67),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(76)("forEach")},function(t,e,r){"use strict";var n=r(74),i=r(77),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(80),i=r(87),o=r(89),s=r(94).methods,a=r(95),c=r(109),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(81),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(82)()?Object.assign:r(83)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(84),i=r(77),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(85)()?Object.keys:r(86)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(68),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(88),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(77),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(81),o=r(66),s=r(90),a=r(91);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(92)()?String.prototype.contains:r(93)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(89),h=r(74),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(96),o=r(74),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(97),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(98)()?Array.from:r(99)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(100).iterator,i=r(105),o=r(106),s=r(68),a=r(74),c=r(77),u=r(108),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(101)()?Symbol:r(102)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(89),a=r(103),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(104);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(107));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(74);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(113),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(68),i=r(77),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(113);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(113),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(97),i=r(88),o=r(87),s=r(117),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(78).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(118).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(118).setImmediate,r(118).clearImmediate)},function(t,e,r){"use strict";var n=r(74),i=r(75),o=r(78),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(97),i=r(107),o=r(75),s=r(121),a=r(78),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(68),i=r(122);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(68),i=r(124),o=r(78);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(68),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(89),i=r(78),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){
-var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}}]);
\ No newline at end of file
+"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return I(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(34),J=r(35),X=r(36);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(33).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(33).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(37);a.inherits=r(5);var c=r(31),u=r(40);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(39);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(39);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(33).Buffer;o.WritableState=i;var S=r(37);S.inherits=r(5);var x=r(29);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(33).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(39),c=r(37);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(42),o=r(37);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(39)},function(t,e,r){t.exports=r(42)},function(t,e,r){t.exports=r(43)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(51),r(57),r(58),r(59),r(60),r(61)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(23),s=r(52),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(53),l=r(54),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(55),i=r(56);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(21)),l=i(u);e.XML=a(u,l);var h=n(r(19)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(19),a=r(20),c=r(21),u=r(17),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(23).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(23),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(64),i=r(65),o=r(71);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(108):e>1&&(s.normalizer=r(109)(e)):e===!1?s.normalizer=r(110)():1===e?s.normalizer=r(112)():s.normalizer=r(113)(e))),s.async&&r(114),s.dispose&&r(117),s.maxAge&&r(118),s.max&&r(121),s.refCounter&&r(123),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(66);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(67),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(68),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(69)()?Math.sign:r(70)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(72),i=r(73),o=r(76),s=r(77),a=r(65),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(74)("forEach")},function(t,e,r){"use strict";var n=r(72),i=r(75),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(78),i=r(85),o=r(87),s=r(92).methods,a=r(93),c=r(107),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(79),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(80)()?Object.assign:r(81)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(82),i=r(75),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(83)()?Object.keys:r(84)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(66),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(86),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(75),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(79),o=r(64),s=r(88),a=r(89);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(90)()?String.prototype.contains:r(91)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(87),h=r(72),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(94),o=r(72),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(95),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(96)()?Array.from:r(97)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(98).iterator,i=r(103),o=r(104),s=r(66),a=r(72),c=r(75),u=r(106),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(99)()?Symbol:r(100)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(87),a=r(101),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(102);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(105));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(72);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(111),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(66),i=r(75),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(111);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(111),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(95),i=r(86),o=r(85),s=r(115),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(76).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(116).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(116).setImmediate,r(116).clearImmediate)},function(t,e,r){"use strict";var n=r(72),i=r(73),o=r(76),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(95),i=r(105),o=r(73),s=r(119),a=r(76),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(66),i=r(120);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(66),i=r(122),o=r(76);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(66),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(87),i=r(76),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}}]);
\ No newline at end of file

From 1c253df3a26ce2a264211619225093b0c9437289 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:04:56 -0400
Subject: [PATCH 007/302] Add a basic demo playground with scratch-blocks

---
 package.json              |  1 +
 playground/index.html     | 81 +++++++++++++++++++++++++++++++++++++++
 playground/playground.css | 10 +++++
 playground/playground.js  | 19 +++++++++
 4 files changed, 111 insertions(+)
 create mode 100644 playground/index.html
 create mode 100644 playground/playground.css
 create mode 100644 playground/playground.js

diff --git a/package.json b/package.json
index 1fcd00ef3..d7a8b859d 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
   "devDependencies": {
     "eslint": "2.7.0",
     "json-loader": "0.5.4",
+    "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "tap": "5.7.1",
     "webpack": "1.13.0"
   }
diff --git a/playground/index.html b/playground/index.html
new file mode 100644
index 000000000..495ed36b2
--- /dev/null
+++ b/playground/index.html
@@ -0,0 +1,81 @@
+<!doctype html>
+
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>Scratch VM Playground</title>
+    <link rel="stylesheet" href="playground.css">
+</head>
+<body>
+    <div id="blocks"></div>
+    <xml id="toolbox" style="display: none">
+      <category name="Events">
+        <block type="event_whenflagclicked"></block>
+        <block type="event_whenbroadcastreceived"></block>
+        <block type="event_broadcast"></block>
+      </category>
+      <category name="Control">
+        <block type="control_forever"></block>
+        <block type="control_repeat">
+          <value name="TIMES">
+            <shadow type="math_number">
+              <field name="NUM">4</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="control_if"></block>
+        <block type="control_if_else"></block>
+        <block type="control_stop"></block>
+        <block type="control_wait">
+          <value name="DURATION">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+      </category>
+      <category name="Wedo">
+          <block type="wedo_setcolor"></block>
+          <block type="wedo_motorspeed"></block>
+          <block type="wedo_whentilt"></block>
+          <block type="wedo_whendistanceclose"></block>
+      </category>
+      <category name="Operators">
+          <block type="math_add">
+            <value name="NUM1">
+              <shadow type="math_number">
+                <field name="NUM">0</field>
+              </shadow>
+            </value>
+            <value name="NUM2">
+              <shadow type="math_number">
+                <field name="NUM">0</field>
+              </shadow>
+            </value>
+          </block>
+          <block type="logic_equals">
+            <value name="VALUE1">
+              <shadow type="text">
+                <field name="TEXT">0</field>
+              </shadow>
+            </value>
+            <value name="VALUE2">
+              <shadow type="text">
+                <field name="TEXT">0</field>
+              </shadow>
+            </value>
+          </block>
+      </category>
+    </xml>
+
+    <!-- Scratch Blocks -->
+    <!-- For easier development between the two, use `npm link` -->
+    <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
+    <script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
+    <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
+    <!-- Compiled VM -->
+    <script src="../vm.js"></script>
+    <!-- Playground -->
+    <script src="./playground.js"></script>
+</body>
+</html>
diff --git a/playground/playground.css b/playground/playground.css
new file mode 100644
index 000000000..a6292cd4a
--- /dev/null
+++ b/playground/playground.css
@@ -0,0 +1,10 @@
+body {
+    background: rgb(36,36,36);
+}
+#blocks {
+    position: absolute;
+    left: 40%;
+    right: 0;
+    top: 0;
+    bottom: 0;
+}
diff --git a/playground/playground.js b/playground/playground.js
new file mode 100644
index 000000000..da7dbfe44
--- /dev/null
+++ b/playground/playground.js
@@ -0,0 +1,19 @@
+window.onload = function() {
+    // Lots of global variables to make debugging easier
+    var vm = new window.VirtualMachine();
+    window.vm = vm;
+
+    var toolbox = document.getElementById('toolbox');
+    var workspace = window.Blockly.inject('blocks', {
+        toolbox: toolbox,
+        media: '../node_modules/scratch-blocks/media/'
+    });
+    window.workspace = workspace;
+
+    // @todo: Also bind to flyout events, block running feedback.
+    // Block events.
+    workspace.addChangeListener(vm.blockListener);
+
+    // Run threads
+    vm.runtime.start();
+};

From 8374d116bf2395b8d5194847efcd448124463382 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:18:08 -0400
Subject: [PATCH 008/302] Add a block representation explorer to playground

---
 playground/index.html     |  7 +++++++
 playground/playground.css | 18 ++++++++++++++++++
 playground/playground.js  |  6 ++++++
 3 files changed, 31 insertions(+)

diff --git a/playground/index.html b/playground/index.html
index 495ed36b2..5401ad086 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -7,7 +7,14 @@
     <link rel="stylesheet" href="playground.css">
 </head>
 <body>
+    <div id="vm-devtools">
+        <div id="tab-blockexplorer">
+            <h2>VM Block Representation</h2>
+            <textarea id="blockexplorer"></textarea>
+        </div>
+    </div>
     <div id="blocks"></div>
+
     <xml id="toolbox" style="display: none">
       <category name="Events">
         <block type="event_whenflagclicked"></block>
diff --git a/playground/playground.css b/playground/playground.css
index a6292cd4a..5b89b6f3f 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -8,3 +8,21 @@ body {
     top: 0;
     bottom: 0;
 }
+#vm-devtools {
+    color: rgb(217,217,217);
+    position: absolute;
+    left: 1%;
+    right: 60%;
+    top: 0;
+    bottom: 0;
+    width: 35%;
+}
+#blockexplorer {
+    position: absolute;
+    width: 100%;
+    height: 90%;
+    border: 1px solid #fff;
+    background: rgb(36,36,36);
+    color: rgb(217,217,217);
+    font-family: monospace;
+}
diff --git a/playground/playground.js b/playground/playground.js
index da7dbfe44..d4caf06c9 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -14,6 +14,12 @@ window.onload = function() {
     // Block events.
     workspace.addChangeListener(vm.blockListener);
 
+    var explorer = document.getElementById('blockexplorer');
+    workspace.addChangeListener(function() {
+        // On a change, update the block explorer.
+        explorer.innerHTML = JSON.stringify(vm.runtime.blocks, null, 2);
+    });
+
     // Run threads
     vm.runtime.start();
 };

From 4df584bc203cc00ce06e920c8b94484019f99c8f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:37:42 -0400
Subject: [PATCH 009/302] Turn off spell check in playground block explorer;
 increase font size.

---
 playground/index.html     | 2 +-
 playground/playground.css | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/playground/index.html b/playground/index.html
index 5401ad086..657b6ba3a 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -10,7 +10,7 @@
     <div id="vm-devtools">
         <div id="tab-blockexplorer">
             <h2>VM Block Representation</h2>
-            <textarea id="blockexplorer"></textarea>
+            <textarea id="blockexplorer" spellcheck="false"></textarea>
         </div>
     </div>
     <div id="blocks"></div>
diff --git a/playground/playground.css b/playground/playground.css
index 5b89b6f3f..294746ce6 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -25,4 +25,5 @@ body {
     background: rgb(36,36,36);
     color: rgb(217,217,217);
     font-family: monospace;
+    font-size: 10pt;
 }

From 6593c399c1639a020fbf06818635c10a95214b15 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 10:47:47 -0400
Subject: [PATCH 010/302] Update to use syntax highlighting in block explorer

---
 package.json              | 1 +
 playground/index.html     | 5 ++++-
 playground/playground.css | 3 ++-
 playground/playground.js  | 1 +
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index d7a8b859d..8fc379822 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
   },
   "devDependencies": {
     "eslint": "2.7.0",
+    "highlightjs": "^8.7.0",
     "json-loader": "0.5.4",
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "tap": "5.7.1",
diff --git a/playground/index.html b/playground/index.html
index 657b6ba3a..cbb7c2ac5 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -5,12 +5,13 @@
     <meta charset="utf-8">
     <title>Scratch VM Playground</title>
     <link rel="stylesheet" href="playground.css">
+    <link rel="stylesheet" href="../node_modules/highlightjs/styles/zenburn.css">
 </head>
 <body>
     <div id="vm-devtools">
         <div id="tab-blockexplorer">
             <h2>VM Block Representation</h2>
-            <textarea id="blockexplorer" spellcheck="false"></textarea>
+            <pre id="blockexplorer"></pre>
         </div>
     </div>
     <div id="blocks"></div>
@@ -75,6 +76,8 @@
       </category>
     </xml>
 
+    <!-- Syntax highlighter -->
+    <script src="../node_modules/highlightjs/highlight.pack.min.js"></script>
     <!-- Scratch Blocks -->
     <!-- For easier development between the two, use `npm link` -->
     <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
diff --git a/playground/playground.css b/playground/playground.css
index 294746ce6..f1a54242e 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -20,7 +20,8 @@ body {
 #blockexplorer {
     position: absolute;
     width: 100%;
-    height: 90%;
+    height: 80%;
+    overflow: scroll;
     border: 1px solid #fff;
     background: rgb(36,36,36);
     color: rgb(217,217,217);
diff --git a/playground/playground.js b/playground/playground.js
index d4caf06c9..1b8b99523 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -18,6 +18,7 @@ window.onload = function() {
     workspace.addChangeListener(function() {
         // On a change, update the block explorer.
         explorer.innerHTML = JSON.stringify(vm.runtime.blocks, null, 2);
+        window.hljs.highlightBlock(explorer);
     });
 
     // Run threads

From e92832772f5b017ccc12a7369d4bfd5830108e9a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 13:12:32 -0400
Subject: [PATCH 011/302] Absolute version number for highlightjs dependency

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 8fc379822..fdcb4bc84 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
   },
   "devDependencies": {
     "eslint": "2.7.0",
-    "highlightjs": "^8.7.0",
+    "highlightjs": "8.7.0",
     "json-loader": "0.5.4",
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "tap": "5.7.1",

From 9ce3783940786073a8905945375cf6d05275745f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 13:48:54 -0400
Subject: [PATCH 012/302] Fix handling of stack click

Previously was improperly reading `e.type`.
---
 src/index.js | 11 +++++++----
 vm.js        | 11 +++++++----
 vm.min.js    |  6 +++---
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/index.js b/src/index.js
index d128aab90..ba759f0bd 100644
--- a/src/index.js
+++ b/src/index.js
@@ -28,7 +28,13 @@ function VirtualMachine () {
         if (typeof e !== 'object') return;
         if (typeof e.blockId !== 'string') return;
 
-        // Blocks
+        // UI event: clicked stacks toggle in the runtime.
+        if (e.element === 'stackclick') {
+            instance.runtime.toggleStack(e.blockId);
+            return;
+        }
+
+        // Block create/update/destroy
         switch (e.type) {
         case 'create':
             instance.runtime.createBlock(adapter(e), false);
@@ -55,9 +61,6 @@ function VirtualMachine () {
                 id: e.blockId
             });
             break;
-        case 'stackclick':
-            instance.runtime.toggleStack(e.blockId);
-            break;
         }
     };
 
diff --git a/vm.js b/vm.js
index 56783615a..8ee84c288 100644
--- a/vm.js
+++ b/vm.js
@@ -74,7 +74,13 @@
 	        if (typeof e !== 'object') return;
 	        if (typeof e.blockId !== 'string') return;
 
-	        // Blocks
+	        // UI event: clicked stacks toggle in the runtime.
+	        if (e.element === 'stackclick') {
+	            instance.runtime.toggleStack(e.blockId);
+	            return;
+	        }
+
+	        // Block create/update/destroy
 	        switch (e.type) {
 	        case 'create':
 	            instance.runtime.createBlock(adapter(e), false);
@@ -101,9 +107,6 @@
 	                id: e.blockId
 	            });
 	            break;
-	        case 'stackclick':
-	            instance.runtime.toggleStack(e.blockId);
-	            break;
 	        }
 	    };
 
diff --git a/vm.min.js b/vm.min.js
index ddf694ce7..76b9e3767 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,6 +1,6 @@
-!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.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId)switch(e.type){case"create":t.runtime.createBlock(a(e),!1);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.runtime.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldField:e.oldInputName,newParent:e.newParentId,newField:e.newInputName});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}},t.flyoutBlockListener=function(e){switch(e.type){case"create":t.runtime.createBlock(a(e),!0);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(13);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.blocks={},this.stacks=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(7),s=r(9),a=r(2),c={scratch3:r(11),wedo2:r(12)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype.createBlock=function(t,e){this.blocks[t.id]=t;for(var r in t.fields){var n=t.fields[r].blocks;for(var i in n){var o=n[i];this.blocks[o.id]=o}}e||this.stacks.push(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this.blocks[t.id]&&"undefined"!=typeof this.blocks[t.id].fields[t.name]&&(this.blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){var e=this;void 0===t.newParent&&void 0!==t.oldParent?(e.stacks.push(t.id),void 0===t.oldField?e.blocks[t.oldParent].next=null:delete e.blocks[t.oldParent].fields[t.oldField]):void 0!==t.newParent&&(e._deleteStack(t.id),void 0===t.newField?e.blocks[t.newParent].next=t.id:e.blocks[t.newParent].fields[t.newField]={name:t.newField,value:t.id,blocks:{}})},n.prototype.deleteBlock=function(t){var e=this.blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.fields)if("SUBSTACK"===r)this.deleteBlock({id:e.fields[r].value});else for(var n in e.fields[r].blocks)this.deleteBlock({id:n});this._deleteStack(t.id),delete this.blocks[t.id]},n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.stacks.length;e++){var r=this.stacks[e];"event_whenflagclicked"===this.blocks[r].opcode&&this._pushThread(this.stacks[e])}},n.prototype.startDistanceSensors=function(){for(var t=0;t<this.stacks.length;t++){var e=this.stacks[t];if("wedo_whendistanceclose"===this.blocks[e].opcode){for(var r=!1,n=0;n<this.threads.length;n++)this.threads[n].topBlock===e&&(r=!0);r||this._pushThread(this.stacks[t])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},n.prototype._deleteStack=function(t){var e=this.stacks.indexOf(t);e>-1&&this.stacks.splice(e,1)},n.prototype._getNextBlock=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].next},n.prototype._getSubstack=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].fields.SUBSTACK},n.prototype._getOpcode=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].opcode},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks[r])return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime._getNextBlock(r);var n=this.runtime._getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime._getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=0;e<c.runtime.stacks.length;e++){var r=c.runtime.stacks[e],n=c.runtime.blocks[r],i=t(n);if(i){for(var o=!1,s=0;s<c.runtime.threads.length;s++)if(c.runtime.threads[s].topBlock==r){o=!0;break}o||c.runtime._pushThread(r)}}},h=!1,f=function(){var e=c.runtime._getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks[r].fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(8);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(10);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){var e={},r=t[0],n=r.attribs.name;e[n]={name:n,value:null,blocks:{}};var i=r.children[0],o=i.attribs.id,s=i.attribs.type;e[n].blocks[o]={id:o,opcode:s,next:null,fields:{}};var a=i.children[0],c=a.attribs.name,u=a.children[0].data;return e[n].blocks[o].fields[c]={name:c,value:u,blocks:null},e}var i=r(14),o=r(63),s=o(i.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){if("object"==typeof t&&"string"==typeof t.blockId&&"object"==typeof t.xml){var e={id:t.blockId,opcode:null,next:null,fields:{}};return"object"==typeof t.xml.attributes&&(e.opcode=t.xml.attributes.type.value),"string"!=typeof t.xml.innerHTML?e:""===t.xml.innerHTML?e:(e.fields=n(s(t.xml.innerHTML)),e)}}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(15),o=r(22);t.exports={Parser:i,Tokenizer:r(16),ElementType:r(23),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(26))},get Stream(){return n("Stream",r(27))},get WritableStream(){return n("WritableStream",r(28))},get ProxyHandler(){return n("ProxyHandler",r(49))},get DomUtils(){return n("DomUtils",r(50))},get CollectingHandler(){return n("CollectingHandler",r(62))},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(16),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(17),u=r(19),l=r(20),h=r(21),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,P=f++,U=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,
-this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(18);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(23),o=/\s+/g,s=r(24),a=r(25),c={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(24),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(14),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(28);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(14).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(15),o=r(29).Writable||r(48).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(30),n.Writable=r(44),n.Duplex=r(45),n.Transform=r(46),n.PassThrough=r(47),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(31),e.Stream=r(29),e.Readable=e,e.Writable=r(40),e.Duplex=r(39),e.Transform=r(42),e.PassThrough=r(43),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(29))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(39);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&&(L||(L=r(41).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(39);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(32),E=r(33).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(29),A=r(37);A.inherits=r(5);var L,O=r(38);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(41).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId){if("stackclick"===e.element)return void t.runtime.toggleStack(e.blockId);switch(e.type){case"create":t.runtime.createBlock(a(e),!1);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.runtime.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldField:e.oldInputName,newParent:e.newParentId,newField:e.newInputName});break;case"delete":t.runtime.deleteBlock({id:e.blockId})}}},t.flyoutBlockListener=function(e){switch(e.type){case"create":t.runtime.createBlock(a(e),!0);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(13);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.blocks={},this.stacks=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(7),s=r(9),a=r(2),c={scratch3:r(11),wedo2:r(12)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype.createBlock=function(t,e){this.blocks[t.id]=t;for(var r in t.fields){var n=t.fields[r].blocks;for(var i in n){var o=n[i];this.blocks[o.id]=o}}e||this.stacks.push(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this.blocks[t.id]&&"undefined"!=typeof this.blocks[t.id].fields[t.name]&&(this.blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){var e=this;void 0===t.newParent&&void 0!==t.oldParent?(e.stacks.push(t.id),void 0===t.oldField?e.blocks[t.oldParent].next=null:delete e.blocks[t.oldParent].fields[t.oldField]):void 0!==t.newParent&&(e._deleteStack(t.id),void 0===t.newField?e.blocks[t.newParent].next=t.id:e.blocks[t.newParent].fields[t.newField]={name:t.newField,value:t.id,blocks:{}})},n.prototype.deleteBlock=function(t){var e=this.blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.fields)if("SUBSTACK"===r)this.deleteBlock({id:e.fields[r].value});else for(var n in e.fields[r].blocks)this.deleteBlock({id:n});this._deleteStack(t.id),delete this.blocks[t.id]},n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.stacks.length;e++){var r=this.stacks[e];"event_whenflagclicked"===this.blocks[r].opcode&&this._pushThread(this.stacks[e])}},n.prototype.startDistanceSensors=function(){for(var t=0;t<this.stacks.length;t++){var e=this.stacks[t];if("wedo_whendistanceclose"===this.blocks[e].opcode){for(var r=!1,n=0;n<this.threads.length;n++)this.threads[n].topBlock===e&&(r=!0);r||this._pushThread(this.stacks[t])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},n.prototype._deleteStack=function(t){var e=this.stacks.indexOf(t);e>-1&&this.stacks.splice(e,1)},n.prototype._getNextBlock=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].next},n.prototype._getSubstack=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].fields.SUBSTACK},n.prototype._getOpcode=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].opcode},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks[r])return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime._getNextBlock(r);var n=this.runtime._getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime._getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=0;e<c.runtime.stacks.length;e++){var r=c.runtime.stacks[e],n=c.runtime.blocks[r],i=t(n);if(i){for(var o=!1,s=0;s<c.runtime.threads.length;s++)if(c.runtime.threads[s].topBlock==r){o=!0;break}o||c.runtime._pushThread(r)}}},h=!1,f=function(){var e=c.runtime._getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks[r].fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(8);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(10);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){var e={},r=t[0],n=r.attribs.name;e[n]={name:n,value:null,blocks:{}};var i=r.children[0],o=i.attribs.id,s=i.attribs.type;e[n].blocks[o]={id:o,opcode:s,next:null,fields:{}};var a=i.children[0],c=a.attribs.name,u=a.children[0].data;return e[n].blocks[o].fields[c]={name:c,value:u,blocks:null},e}var i=r(14),o=r(63),s=o(i.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){if("object"==typeof t&&"string"==typeof t.blockId&&"object"==typeof t.xml){var e={id:t.blockId,opcode:null,next:null,fields:{}};return"object"==typeof t.xml.attributes&&(e.opcode=t.xml.attributes.type.value),"string"!=typeof t.xml.innerHTML?e:""===t.xml.innerHTML?e:(e.fields=n(s(t.xml.innerHTML)),e)}}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(15),o=r(22);t.exports={Parser:i,Tokenizer:r(16),ElementType:r(23),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(26))},get Stream(){return n("Stream",r(27))},get WritableStream(){return n("WritableStream",r(28))},get ProxyHandler(){return n("ProxyHandler",r(49))},get DomUtils(){return n("DomUtils",r(50))},get CollectingHandler(){return n("CollectingHandler",r(62))},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(16),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(17),u=r(19),l=r(20),h=r(21),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,P=f++,U=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,
+this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(18);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(23),o=/\s+/g,s=r(24),a=r(25),c={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(24),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(14),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(28);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(14).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(15),o=r(29).Writable||r(48).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(30),n.Writable=r(44),n.Duplex=r(45),n.Transform=r(46),n.PassThrough=r(47),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(31),e.Stream=r(29),e.Readable=e,e.Writable=r(40),e.Duplex=r(39),e.Transform=r(42),e.PassThrough=r(43),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(29))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(39);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&&(L||(L=r(41).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(39);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(32),E=r(33).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(29),A=r(37);A.inherits=r(5);var L,O=r(38);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(41).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>

From 690745aaf0bdd9fd5d50831add4dbacc8eb7a485 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 13:54:33 -0400
Subject: [PATCH 013/302] Add stack highlighting to playground blocks.

---
 playground/playground.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/playground/playground.js b/playground/playground.js
index 1b8b99523..6d6f53aea 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -10,7 +10,7 @@ window.onload = function() {
     });
     window.workspace = workspace;
 
-    // @todo: Also bind to flyout events, block running feedback.
+    // @todo: Also bind to flyout events.
     // Block events.
     workspace.addChangeListener(vm.blockListener);
 
@@ -21,6 +21,14 @@ window.onload = function() {
         window.hljs.highlightBlock(explorer);
     });
 
+    // Feedback for stacks running.
+    vm.runtime.on('STACK_GLOW_ON', function(blockId) {
+        workspace.glowStack(blockId, true);
+    });
+    vm.runtime.on('STACK_GLOW_OFF', function(blockId) {
+        workspace.glowStack(blockId, false);
+    });
+
     // Run threads
     vm.runtime.start();
 };

From ed35ccfa866b6dde538dccd7486543028aa24cd7 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 14:00:46 -0400
Subject: [PATCH 014/302] Add dark-mode colors to VM playground

---
 playground/playground.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/playground/playground.js b/playground/playground.js
index 1b8b99523..89c5a7df7 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -6,7 +6,17 @@ window.onload = function() {
     var toolbox = document.getElementById('toolbox');
     var workspace = window.Blockly.inject('blocks', {
         toolbox: toolbox,
-        media: '../node_modules/scratch-blocks/media/'
+        media: '../node_modules/scratch-blocks/media/',
+        colours: {
+            workspace: '#334771',
+            flyout: '#283856',
+            scrollbar: '#24324D',
+            scrollbarHover: '#0C111A',
+            insertionMarker: '#FFFFFF',
+            insertionMarkerOpacity: 0.3,
+            fieldShadow: 'rgba(255, 255, 255, 0.3)',
+            dragShadowOpacity: 0.6
+        }
     });
     window.workspace = workspace;
 

From bbc66a95a7b52b8bbda1a4cf9356ed35a5d3dc57 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 1 Jun 2016 14:17:18 -0400
Subject: [PATCH 015/302] Add green flag and stop button to playground

---
 playground/index.html     | 5 ++++-
 playground/playground.css | 2 +-
 playground/playground.js  | 8 ++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index cbb7c2ac5..87cef30b3 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -9,8 +9,11 @@
 </head>
 <body>
     <div id="vm-devtools">
+        <h2>Scratch VM Playground</h2>
+        <button id="greenflag">Green flag</button>
+        <button id="stopall">Stop</button>
         <div id="tab-blockexplorer">
-            <h2>VM Block Representation</h2>
+            <h3>VM Block Representation</h3>
             <pre id="blockexplorer"></pre>
         </div>
     </div>
diff --git a/playground/playground.css b/playground/playground.css
index f1a54242e..b20b2bd91 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -20,7 +20,7 @@ body {
 #blockexplorer {
     position: absolute;
     width: 100%;
-    height: 80%;
+    height: 75%;
     overflow: scroll;
     border: 1px solid #fff;
     background: rgb(36,36,36);
diff --git a/playground/playground.js b/playground/playground.js
index 1b8b99523..623e5c387 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -23,4 +23,12 @@ window.onload = function() {
 
     // Run threads
     vm.runtime.start();
+
+    // Handlers for green flag and stop all.
+    document.getElementById('greenflag').addEventListener('click', function() {
+        vm.runtime.greenFlag();
+    });
+    document.getElementById('stopall').addEventListener('click', function() {
+        vm.runtime.stopAll();
+    });
 };

From b28c50e6a5e8b644ccb8ff6321b6f6cf178f8c76 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:09:27 -0400
Subject: [PATCH 016/302] Rewrite of adapter to support trees of blocks, inputs

---
 src/engine/adapter.js | 170 ++++++++++++++++++++++++++----------------
 src/index.js          |  12 ++-
 2 files changed, 116 insertions(+), 66 deletions(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 222273c5c..93bc901b3 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -9,10 +9,8 @@ var parseDOM = memoize(html.parseDOM, {
 /**
  * Adapter between block creation events and block representation which can be
  * used by the Scratch runtime.
- *
- * @param {Object} `Blockly.events.create`
- *
- * @return {Object}
+ * @param {Object} e `Blockly.events.create`
+ * @return {Array.<Object>} List of blocks from this CREATE event.
  */
 module.exports = function (e) {
     // Validate input
@@ -20,68 +18,112 @@ module.exports = function (e) {
     if (typeof e.blockId !== 'string') return;
     if (typeof e.xml !== 'object') return;
 
-    // Storage object
-    var obj = {
-        id: e.blockId,
-        opcode: null,
-        next: null,
-        fields: {}
-    };
-
-    // Set opcode
-    if (typeof e.xml.attributes === 'object') {
-        obj.opcode = e.xml.attributes.type.value;
-    }
-
-    // Extract fields from event's `innerHTML`
-    if (typeof e.xml.innerHTML !== 'string') return obj;
-    if (e.xml.innerHTML === '') return obj;
-    obj.fields = extract(parseDOM(e.xml.innerHTML));
-
-    return obj;
+    return domToBlocks(parseDOM(e.xml.outerHTML));
 };
 
 /**
- * Extracts fields from a block's innerHTML.
- * @todo Extend this to support vertical grammar / nested blocks.
- *
- * @param {Object} DOM representation of block's innerHTML
- *
- * @return {Object}
+ * Convert outer blocks DOM from a Blockly CREATE event
+ * to a usable form for the Scratch runtime.
+ * This structure is based on Blockly xml.js:`domToWorkspace` and `domToBlock`.
+ * @param {Element} blocksDOM DOM tree for this event.
+ * @return {Array.<Object>} Usable list of blocks from this CREATE event.
  */
-function extract (dom) {
-    // Storage object
-    var fields = {};
-
-    // Field
-    var field = dom[0];
-    var fieldName = field.attribs.name;
-    fields[fieldName] = {
-        name: fieldName,
-        value: null,
-        blocks: {}
-    };
-
-    // Shadow block
-    var shadow = field.children[0];
-    var shadowId = shadow.attribs.id;
-    var shadowOpcode = shadow.attribs.type;
-    fields[fieldName].blocks[shadowId] = {
-        id: shadowId,
-        opcode: shadowOpcode,
-        next: null,
-        fields: {}
-    };
-
-    // Primitive
-    var primitive = shadow.children[0];
-    var primitiveName = primitive.attribs.name;
-    var primitiveValue = primitive.children[0].data;
-    fields[fieldName].blocks[shadowId].fields[primitiveName] = {
-        name: primitiveName,
-        value: primitiveValue,
-        blocks: null
-    };
-
-    return fields;
+function domToBlocks (blocksDOM) {
+    // At this level, there could be multiple blocks adjacent in the DOM tree.
+    var blocks = {};
+    for (var i = 0; i < blocksDOM.length; i++) {
+        var block = blocksDOM[i];
+        var tagName = block.name.toLowerCase();
+        if (tagName === 'block') {
+            domToBlock(block, blocks, 0);
+        }
+    }
+    // Flatten blocks object into a list.
+    var blocksList = [];
+    for (var b in blocks) {
+        blocksList.push(blocks[b]);
+    }
+    return blocksList;
+}
+
+/**
+ * Convert and an individual block DOM to the representation tree.
+ * Based on Blockly's `domToBlockHeadless_`.
+ * @param {Element} blockDOM DOM tree for an individual block.
+ * @param {Number} treeDepth How far down the tree we have recursed.
+ * @param {Object} blocks Collection of blocks to add to.
+ */
+function domToBlock (blockDOM, blocks, treeDepth) {
+    // Block skeleton.
+    var block = {
+        id: null, // Block ID
+        opcode: null, // Execution opcode, e.g., "event_whengreenflag".
+        inputs: {}, // Inputs to this block and the blocks they point to.
+        fields: {}, // Fields on this block and their values.
+        next: null, // Next block in the stack, if one exists.
+        topLevel: treeDepth == 0 // If this block starts a stack.
+    };
+
+    // Basic properties of the block from XML.
+    block.id = blockDOM.attribs.id;
+    block.opcode = blockDOM.attribs.type;
+
+    // Add the block to the representation tree.
+    blocks[block.id] = block;
+
+    // Process XML children and find enclosed blocks, fields, etc.
+    for (var i = 0; i < blockDOM.children.length; i++) {
+        var xmlChild = blockDOM.children[i];
+        // Enclosed blocks and shadows
+        var childBlockNode = null;
+        var childShadowNode = null;
+        for (var j = 0; j < xmlChild.children.length; j++) {
+            var grandChildNode = xmlChild.children[j];
+            if (!grandChildNode.name) {
+                // Non-XML tag node.
+                continue;
+            }
+            var grandChildNodeName = grandChildNode.name.toLowerCase();
+            if (grandChildNodeName == 'block') {
+                childBlockNode = grandChildNode;
+            } else if (grandChildNodeName == 'shadow') {
+                childShadowNode = grandChildNode;
+            }
+        }
+
+        // Use shadow block only if there's no real block node.
+        if (!childBlockNode && childShadowNode) {
+            childBlockNode = childShadowNode;
+        }
+
+        // Not all Blockly-type blocks are handled here,
+        // as we won't be using all of them for Scratch.
+        switch (xmlChild.name.toLowerCase()) {
+        case 'field':
+            // Add the field to this block.
+            var fieldName = xmlChild.attribs.name;
+            block.fields[fieldName] = {
+                name: fieldName,
+                value: xmlChild.children[0].data
+            };
+            break;
+        case 'value':
+        case 'statement':
+            // Recursively generate block structure for input block.
+            domToBlock(childBlockNode, blocks, treeDepth + 1);
+            // Link this block's input to the child block.
+            var inputName = xmlChild.attribs.name;
+            block.inputs[inputName] = {
+                name: inputName,
+                block: childBlockNode.attribs.id
+            };
+            break;
+        case 'next':
+            // Recursively generate block structure for next block.
+            domToBlock(childBlockNode, blocks, treeDepth + 1);
+            // Link next block to this block.
+            block.next = childBlockNode.attribs.id;
+            break;
+        }
+    }
 }
diff --git a/src/index.js b/src/index.js
index d128aab90..5c433f899 100644
--- a/src/index.js
+++ b/src/index.js
@@ -31,7 +31,11 @@ function VirtualMachine () {
         // Blocks
         switch (e.type) {
         case 'create':
-            instance.runtime.createBlock(adapter(e), false);
+            var newBlocks = adapter(e);
+            // A create event can create many blocks. Add them all.
+            for (var i = 0; i < newBlocks.length; i++) {
+                instance.runtime.createBlock(newBlocks[i], false);
+            }
             break;
         case 'change':
             instance.runtime.changeBlock({
@@ -64,7 +68,11 @@ function VirtualMachine () {
     instance.flyoutBlockListener = function (e) {
         switch (e.type) {
         case 'create':
-            instance.runtime.createBlock(adapter(e), true);
+            var newBlocks = adapter(e);
+            // A create event can create many blocks. Add them all.
+            for (var i = 0; i < newBlocks.length; i++) {
+                instance.runtime.createBlock(newBlocks[i], true);
+            }
             break;
         case 'change':
             instance.runtime.changeBlock({

From 0dfc72893cee71fd0a404138102fc184bab238ba Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:12:43 -0400
Subject: [PATCH 017/302] Update Runtime createBlock for new structure;
 _addStack helper.

---
 src/engine/runtime.js | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 0507b96b5..28e76fba8 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -91,21 +91,11 @@ Runtime.prototype.createBlock = function (block, opt_isFlyoutBlock) {
     // Create new block
     this.blocks[block.id] = block;
 
-    // Walk each field and add any shadow blocks
-    // @todo Expand this to cover vertical / nested blocks
-    for (var i in block.fields) {
-        var shadows = block.fields[i].blocks;
-        for (var y in shadows) {
-            var shadow = shadows[y];
-            this.blocks[shadow.id] = shadow;
-        }
-    }
-
     // Push block id to stacks array. New blocks are always a stack even if only
     // momentary. If the new block is added to an existing stack this stack will
     // be removed by the `moveBlock` method below.
     if (!opt_isFlyoutBlock) {
-        this.stacks.push(block.id);
+        this._addStack(block.id);
     }
 };
 
@@ -132,8 +122,7 @@ Runtime.prototype.moveBlock = function (e) {
 
     // Block was removed from parent
     if (e.newParent === undefined && e.oldParent !== undefined) {
-        // Add stack
-        _this.stacks.push(e.id);
+        _this.addStack(e.id);
 
         // Update old parent
         if (e.oldField === undefined) {
@@ -360,13 +349,29 @@ Runtime.prototype.start = function () {
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
+/**
+ * Helper to add a stack to `this.stacks`
+ * @param {?string} id ID of block that starts the stack
+ */
+Runtime.prototype._addStack = function (id) {
+    var i = this.stacks.indexOf(id);
+    if (i > -1) return; // Already in stacks.
+    this.stacks.push(id);
+    // Update `topLevel` property on the top block.
+    this.blocks[id].topLevel = true;
+};
+
 /**
  * Helper to remove a stack from `this.stacks`
  * @param {?string} id ID of block that starts the stack
  */
 Runtime.prototype._deleteStack = function (id) {
     var i = this.stacks.indexOf(id);
-    if (i > -1) this.stacks.splice(i, 1);
+    if (i > -1) {
+        this.stacks.splice(i, 1);
+        // Update `topLevel` property on the top block.
+        this.blocks[id].topLevel = false;
+    }
 };
 
 /**

From 9fef9d7edd11383fc14ac3b8ada863e75812b219 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:44:51 -0400
Subject: [PATCH 018/302] Fix up adapter's domToBlock

---
 src/engine/adapter.js | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 93bc901b3..586d8d5d7 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -35,7 +35,7 @@ function domToBlocks (blocksDOM) {
         var block = blocksDOM[i];
         var tagName = block.name.toLowerCase();
         if (tagName === 'block') {
-            domToBlock(block, blocks, 0);
+            domToBlock(block, blocks, true);
         }
     }
     // Flatten blocks object into a list.
@@ -50,24 +50,20 @@ function domToBlocks (blocksDOM) {
  * Convert and an individual block DOM to the representation tree.
  * Based on Blockly's `domToBlockHeadless_`.
  * @param {Element} blockDOM DOM tree for an individual block.
- * @param {Number} treeDepth How far down the tree we have recursed.
+ * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
  * @param {Object} blocks Collection of blocks to add to.
  */
-function domToBlock (blockDOM, blocks, treeDepth) {
+function domToBlock (blockDOM, blocks, isTopBlock) {
     // Block skeleton.
     var block = {
-        id: null, // Block ID
-        opcode: null, // Execution opcode, e.g., "event_whengreenflag".
+        id: blockDOM.attribs.id, // Block ID
+        opcode: blockDOM.attribs.type, // For execution, "event_whengreenflag".
         inputs: {}, // Inputs to this block and the blocks they point to.
         fields: {}, // Fields on this block and their values.
         next: null, // Next block in the stack, if one exists.
-        topLevel: treeDepth == 0 // If this block starts a stack.
+        topLevel: isTopBlock // If this block starts a stack.
     };
 
-    // Basic properties of the block from XML.
-    block.id = blockDOM.attribs.id;
-    block.opcode = blockDOM.attribs.type;
-
     // Add the block to the representation tree.
     blocks[block.id] = block;
 
@@ -110,7 +106,7 @@ function domToBlock (blockDOM, blocks, treeDepth) {
         case 'value':
         case 'statement':
             // Recursively generate block structure for input block.
-            domToBlock(childBlockNode, blocks, treeDepth + 1);
+            domToBlock(childBlockNode, blocks, false);
             // Link this block's input to the child block.
             var inputName = xmlChild.attribs.name;
             block.inputs[inputName] = {
@@ -120,7 +116,7 @@ function domToBlock (blockDOM, blocks, treeDepth) {
             break;
         case 'next':
             // Recursively generate block structure for next block.
-            domToBlock(childBlockNode, blocks, treeDepth + 1);
+            domToBlock(childBlockNode, blocks, false);
             // Link next block to this block.
             block.next = childBlockNode.attribs.id;
             break;

From e5b677c7f6197d2ea4c640d7ce2ff5eab16722bd Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:53:14 -0400
Subject: [PATCH 019/302] Fix naming of MOVE event in index.js

---
 src/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/index.js b/src/index.js
index 5c433f899..f8e7e1ca4 100644
--- a/src/index.js
+++ b/src/index.js
@@ -49,9 +49,9 @@ function VirtualMachine () {
             instance.runtime.moveBlock({
                 id: e.blockId,
                 oldParent: e.oldParentId,
-                oldField: e.oldInputName,
+                oldInput: e.oldInputName,
                 newParent: e.newParentId,
-                newField: e.newInputName
+                newInput: e.newInputName
             });
             break;
         case 'delete':

From 285c2792ef0e9a2fe19c45cd4c5cad50a88d92ae Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:53:42 -0400
Subject: [PATCH 020/302] Only add to stacks if topLevel is true in CREATE

---
 src/engine/runtime.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 28e76fba8..1c7c370f0 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -91,10 +91,11 @@ Runtime.prototype.createBlock = function (block, opt_isFlyoutBlock) {
     // Create new block
     this.blocks[block.id] = block;
 
-    // Push block id to stacks array. New blocks are always a stack even if only
-    // momentary. If the new block is added to an existing stack this stack will
-    // be removed by the `moveBlock` method below.
-    if (!opt_isFlyoutBlock) {
+    // Push block id to stacks array.
+    // Blocks are added as a top-level stack if they are marked as a topBlock
+    // (if they were top-level XML in the event) and if they are not
+    // flyout blocks.
+    if (!opt_isFlyoutBlock && block.topBlock) {
         this._addStack(block.id);
     }
 };

From 18e4228399f44f4f1c6de1c68a9ac266a9d38f9d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:53:59 -0400
Subject: [PATCH 021/302] Update runtime's handling of delete for new blocks
 structure

---
 src/engine/runtime.js | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 1c7c370f0..55a13d33a 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -168,14 +168,11 @@ Runtime.prototype.deleteBlock = function (e) {
         this.deleteBlock({id: block.next});
     }
 
-    // Delete substacks and fields
-    for (var field in block.fields) {
-        if (field === 'SUBSTACK') {
-            this.deleteBlock({id: block.fields[field].value});
-        } else {
-            for (var shadow in block.fields[field].blocks) {
-                this.deleteBlock({id: shadow});
-            }
+    // Delete inputs (including substacks)
+    for (var input in block.inputs) {
+        // If it's null, the block in this input moved away.
+        if (block.inputs[input].block !== null) {
+            this.deleteBlock({id: block.inputs[input].block});
         }
     }
 

From 214daa8087d50e1d604fb8357c4eb8fe9e275423 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:54:32 -0400
Subject: [PATCH 022/302] Always unset `topLevel` in deleteStack_

Blocks may have topLevel set even if they are not present in this.stacks
---
 src/engine/runtime.js | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 55a13d33a..356adcba8 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -365,11 +365,9 @@ Runtime.prototype._addStack = function (id) {
  */
 Runtime.prototype._deleteStack = function (id) {
     var i = this.stacks.indexOf(id);
-    if (i > -1) {
-        this.stacks.splice(i, 1);
-        // Update `topLevel` property on the top block.
-        this.blocks[id].topLevel = false;
-    }
+    if (i > -1) this.stacks.splice(i, 1);
+    // Update `topLevel` property on the top block.
+    if (this.blocks[id]) this.blocks[id].topLevel = false;
 };
 
 /**

From aa152fd604bfbafb3308daafeebc98e0d0d6402a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:54:45 -0400
Subject: [PATCH 023/302] Rewrite of moveBlock to better reflect Blockly

---
 src/engine/runtime.js | 49 ++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 356adcba8..17013576c 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -121,34 +121,35 @@ Runtime.prototype.changeBlock = function (args) {
 Runtime.prototype.moveBlock = function (e) {
     var _this = this;
 
-    // Block was removed from parent
-    if (e.newParent === undefined && e.oldParent !== undefined) {
-        _this.addStack(e.id);
-
-        // Update old parent
-        if (e.oldField === undefined) {
-            _this.blocks[e.oldParent].next = null;
-        } else {
-            delete _this.blocks[e.oldParent].fields[e.oldField];
+    // Remove from any old parent.
+    if (e.oldParent !== undefined) {
+        var oldParent = _this.blocks[e.oldParent];
+        if (e.oldInput !== undefined &&
+            oldParent.inputs[e.oldInput].block === e.id) {
+            // This block was connected to the old parent's input.
+            oldParent.inputs[e.oldInput].block = null;
+        } else if (oldParent.next === e.id) {
+            // This block was connected to the old parent's next connection.
+            oldParent.next = null;
         }
-    } else if (e.newParent !== undefined) {
-        // Block was moved to a new parent
-        // Either happens because it was previously parentless
-        // (e.oldParent === undefined)
-        // or because a block was moved in front of it.
+    }
 
-        // Remove stack
+    // Has the block become a top-level block?
+    if (e.newParent === undefined) {
+        _this._addStack(e.id);
+    } else {
+        // Remove stack, if one exists.
         _this._deleteStack(e.id);
-
-        // Update new parent
-        if (e.newField === undefined) {
-            _this.blocks[e.newParent].next = e.id;
-        } else {
-            _this.blocks[e.newParent].fields[e.newField] = {
-                name: e.newField,
-                value: e.id,
-                blocks: {}
+        // Otherwise, try to connect it in its new place.
+        if (e.newInput !== undefined) {
+            // Moved to the new parent's input.
+            _this.blocks[e.newParent].inputs[e.newInput] = {
+                name: e.newInput,
+                block: e.id
             };
+        } else {
+            // Moved to the new parent's next connection.
+            _this.blocks[e.newParent].next = e.id;
         }
     }
 };

From 25c3a38c16cf5f228ca450e1dae11e87baa64b62 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 14:57:58 -0400
Subject: [PATCH 024/302] Allow top-level creation of shadow blocks in adapter

---
 src/engine/adapter.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 586d8d5d7..2a7e9d2fc 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -34,7 +34,7 @@ function domToBlocks (blocksDOM) {
     for (var i = 0; i < blocksDOM.length; i++) {
         var block = blocksDOM[i];
         var tagName = block.name.toLowerCase();
-        if (tagName === 'block') {
+        if (tagName == 'block' || tagName == 'shadow') {
             domToBlock(block, blocks, true);
         }
     }

From 9be33089a8b2f8396403c04c8c786b82c07bd119 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:29:34 -0400
Subject: [PATCH 025/302] Refactor block management into a separate module.

---
 src/engine/blocks.js    | 199 ++++++++++++++++++++++++++++++++++++++++
 src/engine/runtime.js   | 190 +++-----------------------------------
 src/engine/sequencer.js |  19 ++--
 src/index.js            |  12 ++-
 4 files changed, 231 insertions(+), 189 deletions(-)
 create mode 100644 src/engine/blocks.js

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
new file mode 100644
index 000000000..26351c1b1
--- /dev/null
+++ b/src/engine/blocks.js
@@ -0,0 +1,199 @@
+/**
+* @fileoverview
+ * Store and mutate the VM block representation,
+ * and handle updates from Scratch Blocks events.
+ */
+
+ function Blocks () {
+     /**
+      * All blocks in the workspace.
+      * Keys are block IDs, values are metadata about the block.
+      * @type {Object.<string, Object>}
+      */
+     this._blocks = {};
+
+     /**
+      * All stacks in the workspace.
+      * A list of block IDs that represent stacks (first block in stack).
+      * @type {Array.<String>}
+      */
+     this._stacks = [];
+ }
+
+/**
+ * Provide an object with metadata for the requested block ID.
+ * @param {!string} blockId ID of block we have stored.
+ * @return {?Object} Metadata about the block, if it exists.
+ */
+ Blocks.prototype.getBlock = function (blockId) {
+     return this._blocks[blockId];
+ };
+
+/**
+ * Get all known top-level blocks that start stacks.
+ * @return {Array.<string>} List of block IDs.
+ */
+ Blocks.prototype.getStacks = function () {
+     return this._stacks;
+ };
+
+ /**
+  * Get the next block for a particular block
+  * @param {?string} id ID of block to get the next block for
+  * @return {?string} ID of next block in the sequence
+  */
+ Blocks.prototype.getNextBlock = function (id) {
+     if (typeof this._blocks[id] === 'undefined') return null;
+     return this._blocks[id].next;
+ };
+
+ /**
+  * Get the substack for a particular C-shaped block
+  * @param {?string} id ID for block to get the substack for
+  * @return {?string} ID of block in the substack
+  */
+ Blocks.prototype.getSubstack = function (id) {
+     var block = this._blocks[id];
+     if (typeof block === 'undefined') return null;
+     // Empty C-block?
+     if (!('SUBSTACK' in block.inputs)) return null;
+     return block.inputs['SUBSTACK'].block;
+ };
+
+ /**
+  * Get the opcode for a particular block
+  * @param {?string} id ID of block to query
+  * @return {?string} the opcode corresponding to that block
+  */
+ Blocks.prototype.getOpcode = function (id) {
+     if (typeof this._blocks[id] === 'undefined') return null;
+     return this._blocks[id].opcode;
+ };
+
+ // ---------------------------------------------------------------------
+
+ /**
+  * Block management: create blocks and stacks from a `create` event
+  * @param {!Object} block Blockly create event to be processed
+  */
+ Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
+     // Create new block
+     this._blocks[block.id] = block;
+
+     // Push block id to stacks array.
+     // Blocks are added as a top-level stack if they are marked as a topBlock
+     // (if they were top-level XML in the event) and if they are not
+     // flyout blocks.
+     if (!opt_isFlyoutBlock && block.topBlock) {
+         this._addStack(block.id);
+     }
+ };
+
+ /**
+  * Block management: change block field values
+  * @param {!Object} args Blockly change event to be processed
+  */
+ Blocks.prototype.changeBlock = function (args) {
+     // Validate
+     if (args.element !== 'field') return;
+     if (typeof this._blocks[args.id] === 'undefined') return;
+     if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
+
+     // Update block value
+     this._blocks[args.id].fields[args.name].value = args.value;
+ };
+
+ /**
+  * Block management: move blocks from parent to parent
+  * @param {!Object} e Blockly move event to be processed
+  */
+ Blocks.prototype.moveBlock = function (e) {
+     // Remove from any old parent.
+     if (e.oldParent !== undefined) {
+         var oldParent = this._blocks[e.oldParent];
+         if (e.oldInput !== undefined &&
+             oldParent.inputs[e.oldInput].block === e.id) {
+             // This block was connected to the old parent's input.
+             oldParent.inputs[e.oldInput].block = null;
+         } else if (oldParent.next === e.id) {
+             // This block was connected to the old parent's next connection.
+             oldParent.next = null;
+         }
+     }
+
+     // Has the block become a top-level block?
+     if (e.newParent === undefined) {
+         this._addStack(e.id);
+     } else {
+         // Remove stack, if one exists.
+         this._deleteStack(e.id);
+         // Otherwise, try to connect it in its new place.
+         if (e.newInput !== undefined) {
+             // Moved to the new parent's input.
+             this._blocks[e.newParent].inputs[e.newInput] = {
+                 name: e.newInput,
+                 block: e.id
+             };
+         } else {
+             // Moved to the new parent's next connection.
+             this._blocks[e.newParent].next = e.id;
+         }
+     }
+ };
+
+ /**
+  * Block management: delete blocks and their associated stacks
+  * @param {!Object} e Blockly delete event to be processed
+  */
+ Blocks.prototype.deleteBlock = function (e) {
+     // @todo In runtime, stop threads running on this stack
+
+     // Get block
+     var block = this._blocks[e.id];
+
+     // Delete children
+     if (block.next !== null) {
+         this.deleteBlock({id: block.next});
+     }
+
+     // Delete inputs (including substacks)
+     for (var input in block.inputs) {
+         // If it's null, the block in this input moved away.
+         if (block.inputs[input].block !== null) {
+             this.deleteBlock({id: block.inputs[input].block});
+         }
+     }
+
+     // Delete stack
+     this._deleteStack(e.id);
+
+     // Delete block
+     delete this._blocks[e.id];
+ };
+
+ // ---------------------------------------------------------------------
+
+ /**
+  * Helper to add a stack to `this._stacks`
+  * @param {?string} id ID of block that starts the stack
+  */
+ Blocks.prototype._addStack = function (id) {
+     var i = this._stacks.indexOf(id);
+     if (i > -1) return; // Already in stacks.
+     this._stacks.push(id);
+     // Update `topLevel` property on the top block.
+     this._blocks[id].topLevel = true;
+ };
+
+ /**
+  * Helper to remove a stack from `this._stacks`
+  * @param {?string} id ID of block that starts the stack
+  */
+ Blocks.prototype._deleteStack = function (id) {
+     var i = this._stacks.indexOf(id);
+     if (i > -1) this._stacks.splice(i, 1);
+     // Update `topLevel` property on the top block.
+     if (this._blocks[id]) this._blocks[id].topLevel = false;
+ };
+
+ module.exports = Blocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 17013576c..9531eadc7 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -10,25 +10,18 @@ var defaultBlockPackages = {
 
 /**
  * Manages blocks, stacks, and the sequencer.
+ * @param blocks Blocks instance for this runtime.
  */
-function Runtime () {
+function Runtime (blocks) {
     // Bind event emitter
     EventEmitter.call(this);
 
     // State for the runtime
-    /**
-     * All blocks in the workspace.
-     * Keys are block IDs, values are metadata about the block.
-     * @type {Object.<string, Object>}
-     */
-    this.blocks = {};
 
     /**
-     * All stacks in the workspace.
-     * A list of block IDs that represent stacks (first block in stack).
-     * @type {Array.<String>}
+     * Block management and storage
      */
-    this.stacks = [];
+    this.blocks = blocks;
 
     /**
      * A list of threads that are currently running in the VM.
@@ -83,106 +76,6 @@ util.inherits(Runtime, EventEmitter);
  */
 Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
 
-/**
- * Block management: create blocks and stacks from a `create` event
- * @param {!Object} block Blockly create event to be processed
- */
-Runtime.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-    // Create new block
-    this.blocks[block.id] = block;
-
-    // Push block id to stacks array.
-    // Blocks are added as a top-level stack if they are marked as a topBlock
-    // (if they were top-level XML in the event) and if they are not
-    // flyout blocks.
-    if (!opt_isFlyoutBlock && block.topBlock) {
-        this._addStack(block.id);
-    }
-};
-
-/**
- * Block management: change block field values
- * @param {!Object} args Blockly change event to be processed
- */
-Runtime.prototype.changeBlock = function (args) {
-    // Validate
-    if (args.element !== 'field') return;
-    if (typeof this.blocks[args.id] === 'undefined') return;
-    if (typeof this.blocks[args.id].fields[args.name] === 'undefined') return;
-
-    // Update block value
-    this.blocks[args.id].fields[args.name].value = args.value;
-};
-
-/**
- * Block management: move blocks from parent to parent
- * @param {!Object} e Blockly move event to be processed
- */
-Runtime.prototype.moveBlock = function (e) {
-    var _this = this;
-
-    // Remove from any old parent.
-    if (e.oldParent !== undefined) {
-        var oldParent = _this.blocks[e.oldParent];
-        if (e.oldInput !== undefined &&
-            oldParent.inputs[e.oldInput].block === e.id) {
-            // This block was connected to the old parent's input.
-            oldParent.inputs[e.oldInput].block = null;
-        } else if (oldParent.next === e.id) {
-            // This block was connected to the old parent's next connection.
-            oldParent.next = null;
-        }
-    }
-
-    // Has the block become a top-level block?
-    if (e.newParent === undefined) {
-        _this._addStack(e.id);
-    } else {
-        // Remove stack, if one exists.
-        _this._deleteStack(e.id);
-        // Otherwise, try to connect it in its new place.
-        if (e.newInput !== undefined) {
-            // Moved to the new parent's input.
-            _this.blocks[e.newParent].inputs[e.newInput] = {
-                name: e.newInput,
-                block: e.id
-            };
-        } else {
-            // Moved to the new parent's next connection.
-            _this.blocks[e.newParent].next = e.id;
-        }
-    }
-};
-
-/**
- * Block management: delete blocks and their associated stacks
- * @param {!Object} e Blockly delete event to be processed
- */
-Runtime.prototype.deleteBlock = function (e) {
-    // @todo Stop threads running on this stack
-
-    // Get block
-    var block = this.blocks[e.id];
-
-    // Delete children
-    if (block.next !== null) {
-        this.deleteBlock({id: block.next});
-    }
-
-    // Delete inputs (including substacks)
-    for (var input in block.inputs) {
-        // If it's null, the block in this input moved away.
-        if (block.inputs[input].block !== null) {
-            this.deleteBlock({id: block.inputs[input].block});
-        }
-    }
-
-    // Delete stack
-    this._deleteStack(e.id);
-
-    // Delete block
-    delete this.blocks[e.id];
-};
 
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
@@ -268,10 +161,11 @@ Runtime.prototype.greenFlag = function () {
         this._removeThread(this.threads[i]);
     }
     // Add all top stacks with green flag
-    for (var j = 0; j < this.stacks.length; j++) {
-        var topBlock = this.stacks[j];
-        if (this.blocks[topBlock].opcode === 'event_whenflagclicked') {
-            this._pushThread(this.stacks[j]);
+    var stacks = this.blocks.getStacks();
+    for (var j = 0; j < stacks.length; j++) {
+        var topBlock = stacks[j];
+        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
+            this._pushThread(stacks[j]);
         }
     }
 };
@@ -281,9 +175,11 @@ Runtime.prototype.greenFlag = function () {
  */
 Runtime.prototype.startDistanceSensors = function () {
     // Add all top stacks with distance sensor
-    for (var j = 0; j < this.stacks.length; j++) {
-        var topBlock = this.stacks[j];
-        if (this.blocks[topBlock].opcode === 'wedo_whendistanceclose') {
+    var stacks = this.blocks.getStacks();
+    for (var j = 0; j < stacks.length; j++) {
+        var topBlock = stacks[j];
+        if (this.blocks.getBlock(topBlock).opcode ===
+            'wedo_whendistanceclose') {
             var alreadyRunning = false;
             for (var k = 0; k < this.threads.length; k++) {
                 if (this.threads[k].topBlock === topBlock) {
@@ -291,7 +187,7 @@ Runtime.prototype.startDistanceSensors = function () {
                 }
             }
             if (!alreadyRunning) {
-                this._pushThread(this.stacks[j]);
+                this._pushThread(stacks[j]);
             }
         }
     }
@@ -345,60 +241,4 @@ Runtime.prototype.start = function () {
     }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 };
 
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-/**
- * Helper to add a stack to `this.stacks`
- * @param {?string} id ID of block that starts the stack
- */
-Runtime.prototype._addStack = function (id) {
-    var i = this.stacks.indexOf(id);
-    if (i > -1) return; // Already in stacks.
-    this.stacks.push(id);
-    // Update `topLevel` property on the top block.
-    this.blocks[id].topLevel = true;
-};
-
-/**
- * Helper to remove a stack from `this.stacks`
- * @param {?string} id ID of block that starts the stack
- */
-Runtime.prototype._deleteStack = function (id) {
-    var i = this.stacks.indexOf(id);
-    if (i > -1) this.stacks.splice(i, 1);
-    // Update `topLevel` property on the top block.
-    if (this.blocks[id]) this.blocks[id].topLevel = false;
-};
-
-/**
- * Helper to get the next block for a particular block
- * @param {?string} id ID of block to get the next block for
- * @return {?string} ID of next block in the sequence
- */
-Runtime.prototype._getNextBlock = function (id) {
-    if (typeof this.blocks[id] === 'undefined') return null;
-    return this.blocks[id].next;
-};
-
-/**
- * Helper to get the substack for a particular C-shaped block
- * @param {?string} id ID for block to get the substack for
- * @return {?string} ID of block in the substack
- */
-Runtime.prototype._getSubstack = function (id) {
-    if (typeof this.blocks[id] === 'undefined') return null;
-    return this.blocks[id].fields['SUBSTACK'];
-};
-
-/**
- * Helper to get the opcode for a particular block
- * @param {?string} id ID of block to query
- * @return {?string} the opcode corresponding to that block
- */
-Runtime.prototype._getOpcode = function (id) {
-    if (typeof this.blocks[id] === 'undefined') return null;
-    return this.blocks[id].opcode;
-};
-
 module.exports = Runtime;
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index f495264c8..95a28f7bf 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -97,13 +97,13 @@ Sequencer.prototype.stepThread = function (thread) {
     // If the primitive would like to do control flow,
     // it can overwrite nextBlock.
     var currentBlock = thread.nextBlock;
-    if (!currentBlock || !this.runtime.blocks[currentBlock]) {
+    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
         thread.status = Thread.STATUS_DONE;
         return;
     }
-    thread.nextBlock = this.runtime._getNextBlock(currentBlock);
+    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
 
-    var opcode = this.runtime._getOpcode(currentBlock);
+    var opcode = this.runtime.blocks.getOpcode(currentBlock);
 
     // Push the current block to the stack
     thread.stack.push(currentBlock);
@@ -130,7 +130,7 @@ Sequencer.prototype.stepThread = function (thread) {
     var threadDoneCallback = function () {
         thread.status = Thread.STATUS_DONE;
         // Refresh nextBlock in case it has changed during a yield.
-        thread.nextBlock = instance.runtime._getNextBlock(currentBlock);
+        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
         // Pop the stack and stack frame
         thread.stack.pop();
         thread.stackFrames.pop();
@@ -141,9 +141,10 @@ Sequencer.prototype.stepThread = function (thread) {
      * @todo very hacked...
      */
     var startHats = function(callback) {
-        for (var i = 0; i < instance.runtime.stacks.length; i++) {
-            var stack = instance.runtime.stacks[i];
-            var stackBlock = instance.runtime.blocks[stack];
+        var stacks = instance.runtime.blocks.getStacks();
+        for (var i = 0; i < stacks.length; i++) {
+            var stack = stacks[i];
+            var stackBlock = instance.runtime.blocks.getBlock(stack);
             var result = callback(stackBlock);
             if (result) {
                 // Check if the stack is already running
@@ -174,7 +175,7 @@ Sequencer.prototype.stepThread = function (thread) {
      */
     var threadStartSubstack = function () {
         // Set nextBlock to the start of the substack
-        var substack = instance.runtime._getSubstack(currentBlock);
+        var substack = instance.runtime.blocks.getSubstack(currentBlock);
         if (substack && substack.value) {
             thread.nextBlock = substack.value;
         } else {
@@ -185,7 +186,7 @@ Sequencer.prototype.stepThread = function (thread) {
 
     // @todo extreme hack to get the single argument value for prototype
     var argValues = [];
-    var blockInputs = this.runtime.blocks[currentBlock].fields;
+    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
     for (var bi in blockInputs) {
         var outer = blockInputs[bi];
         for (var b in outer.blocks) {
diff --git a/src/index.js b/src/index.js
index f8e7e1ca4..ce147657c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,6 +1,7 @@
 var EventEmitter = require('events');
 var util = require('util');
 
+var Blocks = require('./engine/Blocks');
 var Runtime = require('./engine/runtime');
 var adapter = require('./engine/adapter');
 
@@ -15,7 +16,8 @@ function VirtualMachine () {
     // Bind event emitter and runtime to VM instance
     // @todo Post message (Web Worker) polyfill
     EventEmitter.call(instance);
-    instance.runtime = new Runtime();
+    instance.blocks = new Blocks();
+    instance.runtime = new Runtime(instance.blocks);
 
     /**
      * Event listener for blocks. Handles validation and serves as a generic
@@ -34,11 +36,11 @@ function VirtualMachine () {
             var newBlocks = adapter(e);
             // A create event can create many blocks. Add them all.
             for (var i = 0; i < newBlocks.length; i++) {
-                instance.runtime.createBlock(newBlocks[i], false);
+                instance.blocks.createBlock(newBlocks[i], false);
             }
             break;
         case 'change':
-            instance.runtime.changeBlock({
+            instance.blocks.changeBlock({
                 id: e.blockId,
                 element: e.element,
                 name: e.name,
@@ -46,7 +48,7 @@ function VirtualMachine () {
             });
             break;
         case 'move':
-            instance.runtime.moveBlock({
+            instance.blocks.moveBlock({
                 id: e.blockId,
                 oldParent: e.oldParentId,
                 oldInput: e.oldInputName,
@@ -55,7 +57,7 @@ function VirtualMachine () {
             });
             break;
         case 'delete':
-            instance.runtime.deleteBlock({
+            instance.blocks.deleteBlock({
                 id: e.blockId
             });
             break;

From dbb31462addae59796fe68d8a68dff1bfab10d37 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:31:14 -0400
Subject: [PATCH 026/302] Extend getSubstack to support multiple substacks

---
 src/engine/blocks.js | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 26351c1b1..f7f6ddf9c 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -50,14 +50,21 @@
  /**
   * Get the substack for a particular C-shaped block
   * @param {?string} id ID for block to get the substack for
+  * @param {?number} substackNum Which substack to select (e.g. for if-else)
   * @return {?string} ID of block in the substack
   */
- Blocks.prototype.getSubstack = function (id) {
+ Blocks.prototype.getSubstack = function (id, substackNum) {
      var block = this._blocks[id];
      if (typeof block === 'undefined') return null;
+
+     var inputName = 'SUBSTACK';
+     if (substackNum > 0) {
+         inputName += substackNum;
+     }
+
      // Empty C-block?
-     if (!('SUBSTACK' in block.inputs)) return null;
-     return block.inputs['SUBSTACK'].block;
+     if (!(inputName in block.inputs)) return null;
+     return block.inputs[inputName].block;
  };
 
  /**

From 0efe7e2b277e7b4309fd53ad878fbec0c7ffdf17 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:44:13 -0400
Subject: [PATCH 027/302] Fix block events for flyout blocks

---
 src/index.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/index.js b/src/index.js
index ce147657c..a18d17da2 100644
--- a/src/index.js
+++ b/src/index.js
@@ -73,11 +73,11 @@ function VirtualMachine () {
             var newBlocks = adapter(e);
             // A create event can create many blocks. Add them all.
             for (var i = 0; i < newBlocks.length; i++) {
-                instance.runtime.createBlock(newBlocks[i], true);
+                instance.blocks.createBlock(newBlocks[i], true);
             }
             break;
         case 'change':
-            instance.runtime.changeBlock({
+            instance.blocks.changeBlock({
                 id: e.blockId,
                 element: e.element,
                 name: e.name,
@@ -85,7 +85,7 @@ function VirtualMachine () {
             });
             break;
         case 'delete':
-            instance.runtime.deleteBlock({
+            instance.blocks.deleteBlock({
                 id: e.blockId
             });
             break;

From f63e26189278782b8ffe48fa79f90fb1d318b83d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:58:40 -0400
Subject: [PATCH 028/302] Remove breaking check for blockId

---
 src/engine/adapter.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 2a7e9d2fc..7f891da34 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -15,7 +15,6 @@ var parseDOM = memoize(html.parseDOM, {
 module.exports = function (e) {
     // Validate input
     if (typeof e !== 'object') return;
-    if (typeof e.blockId !== 'string') return;
     if (typeof e.xml !== 'object') return;
 
     return domToBlocks(parseDOM(e.xml.outerHTML));

From fd95d3045d19778c1613b47d21bdffec2cd97c1e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:58:54 -0400
Subject: [PATCH 029/302] Fix property check of `topLevel` in `createBlock`

---
 src/engine/blocks.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index f7f6ddf9c..ad4c8d1c7 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -88,10 +88,10 @@
      this._blocks[block.id] = block;
 
      // Push block id to stacks array.
-     // Blocks are added as a top-level stack if they are marked as a topBlock
+     // Blocks are added as a top-level stack if they are marked as a top-block
      // (if they were top-level XML in the event) and if they are not
      // flyout blocks.
-     if (!opt_isFlyoutBlock && block.topBlock) {
+     if (!opt_isFlyoutBlock && block.topLevel) {
          this._addStack(block.id);
      }
  };

From feea7a056634a80473903b1ce5a46358615a406e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:59:07 -0400
Subject: [PATCH 030/302] Update CREATE event fixture to have outerHTML

---
 test/fixtures/events.json | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index fca8693ff..064c76c69 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -1,16 +1,11 @@
 {
     "create": {
-        "blockId": "z!+#Nqr,_(V=xz0y7a@d",
         "workspaceId": "7Luws3lyb*Z98~Kk+IG|",
         "group": ";OswyM#@%`%,xOrhOXC=",
         "recordUndo": true,
+        "name": "block",
         "xml": {
-            "attributes": {
-                "type": {
-                    "value": "wedo_motorclockwise"
-                }
-            },
-            "innerHTML": "<value name=\"DURATION\"><shadow type=\"math_number\" id=\"!6Ahqg4f}Ljl}X5Hws?Z\"><field name=\"NUM\">10</field></shadow></value>"
+            "outerHTML": "<block type=\"wedo_motorclockwise\" id=\"z!+#Nqr,_(V=xz0y7a@d\"><value name=\"DURATION\"><shadow type=\"math_number\" id=\"!6Ahqg4f}Ljl}X5Hws?Z\"><field name=\"NUM\">10</field></shadow></value></block>"
         },
         "ids": [
             "z!+#Nqr,_(V=xz0y7a@d",

From 773240910219034b0c73351d8f939316b4d61dcd Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 15:59:21 -0400
Subject: [PATCH 031/302] Update unit tests for new adapter, blocks module

---
 test/unit/adapter.js | 26 +++++++++---
 test/unit/blocks.js  | 97 ++++++++++++++++++++++++++++++++++++++++++++
 test/unit/runtime.js | 77 -----------------------------------
 3 files changed, 118 insertions(+), 82 deletions(-)
 create mode 100644 test/unit/blocks.js

diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 547e0b9b0..31e904845 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -10,11 +10,27 @@ test('spec', function (t) {
 test('create event', function (t) {
     var result = adapter(events.create);
 
-    t.type(result, 'object');
-    t.type(result.id, 'string');
-    t.type(result.opcode, 'string');
-    t.type(result.fields, 'object');
-    t.type(result.fields['DURATION'], 'object');
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 2);
+
+    // Outer block
+    t.type(result[0].id, 'string');
+    t.type(result[0].opcode, 'string');
+    t.type(result[0].fields, 'object');
+    t.type(result[0].inputs, 'object');
+    t.type(result[0].inputs['DURATION'], 'object');
+    t.type(result[0].topLevel, 'boolean');
+    t.equal(result[0].topLevel, true);
+
+    // Enclosed shadow block
+    t.type(result[1].id, 'string');
+    t.type(result[1].opcode, 'string');
+    t.type(result[1].fields, 'object');
+    t.type(result[1].inputs, 'object');
+    t.type(result[1].fields['NUM'], 'object');
+    t.type(result[1].fields['NUM'].value, '10');
+    t.type(result[1].topLevel, 'boolean');
+    t.equal(result[1].topLevel, false);
 
     t.end();
 });
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
new file mode 100644
index 000000000..0e1bcabcc
--- /dev/null
+++ b/test/unit/blocks.js
@@ -0,0 +1,97 @@
+var test = require('tap').test;
+var Blocks = require('../../src/engine/Blocks');
+
+test('spec', function (t) {
+    var b = new Blocks();
+
+    t.type(Blocks, 'function');
+    t.type(b, 'object');
+    t.ok(b instanceof Blocks);
+
+    t.type(b._blocks, 'object');
+    t.type(b._stacks, 'object');
+    t.ok(Array.isArray(b._stacks));
+
+    t.type(b.createBlock, 'function');
+    t.type(b.moveBlock, 'function');
+    t.type(b.changeBlock, 'function');
+    t.type(b.deleteBlock, 'function');
+
+    t.end();
+});
+
+test('create', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+
+    t.type(b._blocks['foo'], 'object');
+    t.equal(b._blocks['foo'].opcode, 'TEST_BLOCK');
+    t.notEqual(b._stacks.indexOf('foo'), -1);
+    t.end();
+});
+
+test('move', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'bar',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+
+    // Attach 'bar' to the end of 'foo'
+    b.moveBlock({
+        id: 'bar',
+        newParent: 'foo'
+    });
+    t.equal(b._stacks.length, 1);
+    t.equal(Object.keys(b._blocks).length, 2);
+    t.equal(b._blocks['foo'].next, 'bar');
+
+    // Detach 'bar' from 'foo'
+    b.moveBlock({
+        id: 'bar',
+        oldParent: 'foo'
+    });
+    t.equal(b._stacks.length, 2);
+    t.equal(Object.keys(b._blocks).length, 2);
+    t.equal(b._blocks['foo'].next, null);
+
+    t.end();
+});
+
+test('delete', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.deleteBlock({
+        id: 'foo'
+    });
+
+    t.type(b._blocks['foo'], 'undefined');
+    t.equal(b._stacks.indexOf('foo'), -1);
+    t.end();
+});
diff --git a/test/unit/runtime.js b/test/unit/runtime.js
index 0e41ed5be..40757c054 100644
--- a/test/unit/runtime.js
+++ b/test/unit/runtime.js
@@ -8,82 +8,5 @@ test('spec', function (t) {
     t.type(r, 'object');
     t.ok(r instanceof Runtime);
 
-    t.type(r.blocks, 'object');
-    t.type(r.stacks, 'object');
-    t.ok(Array.isArray(r.stacks));
-
-    t.type(r.createBlock, 'function');
-    t.type(r.moveBlock, 'function');
-    t.type(r.changeBlock, 'function');
-    t.type(r.deleteBlock, 'function');
-
-    t.end();
-});
-
-test('create', function (t) {
-    var r = new Runtime();
-    r.createBlock({
-        id: 'foo',
-        opcode: 'TEST_BLOCK',
-        next: null,
-        fields: {}
-    });
-
-    t.type(r.blocks['foo'], 'object');
-    t.equal(r.blocks['foo'].opcode, 'TEST_BLOCK');
-    t.notEqual(r.stacks.indexOf('foo'), -1);
-    t.end();
-});
-
-test('move', function (t) {
-    var r = new Runtime();
-    r.createBlock({
-        id: 'foo',
-        opcode: 'TEST_BLOCK',
-        next: null,
-        fields: {}
-    });
-    r.createBlock({
-        id: 'bar',
-        opcode: 'TEST_BLOCK',
-        next: null,
-        fields: {}
-    });
-
-    // Attach 'bar' to the end of 'foo'
-    r.moveBlock({
-        id: 'bar',
-        newParent: 'foo'
-    });
-    t.equal(r.stacks.length, 1);
-    t.equal(Object.keys(r.blocks).length, 2);
-    t.equal(r.blocks['foo'].next, 'bar');
-
-    // Detach 'bar' from 'foo'
-    r.moveBlock({
-        id: 'bar',
-        oldParent: 'foo'
-    });
-    t.equal(r.stacks.length, 2);
-    t.equal(Object.keys(r.blocks).length, 2);
-    t.equal(r.blocks['foo'].next, null);
-
-    t.end();
-});
-
-test('delete', function (t) {
-    var r = new Runtime();
-    r.createBlock({
-        id: 'foo',
-        opcode: 'TEST_BLOCK',
-        next: null,
-        fields: {}
-    });
-    r.deleteBlock({
-        id: 'foo'
-    });
-
-    t.type(r.blocks['foo'], 'undefined');
-    t.equal(r.stacks.indexOf('foo'), -1);
     t.end();
 });

From c8e050494c2d220790ae7c9e7bedb6fdb41e9dfe Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 16:03:40 -0400
Subject: [PATCH 032/302] Update "anatomy of a block" README for new structure

---
 README.md | 50 ++++++++++++++++++++++++--------------------------
 1 file changed, 24 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index 0d43b2616..a14c91d8d 100644
--- a/README.md
+++ b/README.md
@@ -52,35 +52,33 @@ The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tr
 #### Anatomy of a Block
 ```json
 {
-    "id": "^1r~63Gdl7;Dh?I*OP3_",
-    "opcode": "wedo_motorclockwise",
-    "next": null,
-    "fields": {
+    "7AJZR#NA;m*b}R]pdq63": {
+      "id": "7AJZR#NA;m*b}R]pdq63",
+      "opcode": "control_wait",
+      "inputs": {
         "DURATION": {
-            "name": "DURATION",
-            "value": null,
-            "blocks": {
-                "1?P=eV(OiDY3vMk!24Ip": {
-                    "id": "1?P=eV(OiDY3vMk!24Ip",
-                    "opcode": "math_number",
-                    "next": null,
-                    "fields": {
-                        "NUM": {
-                            "name": "NUM",
-                            "value": "10",
-                            "blocks": null
-                        }
-                    }
-                }
-            }
-        },
-        "SUBSTACK": {
-            "name": "SUBSTACK",
-            "value": "@1ln(HsUO4!]*2*%BrE|",
-            "blocks": null
+          "name": "DURATION",
+          "block": ",xA8/S!Z6+kR,9dph.rO"
         }
+      },
+      "fields": {},
+      "next": null,
+      "topLevel": true
+    },
+    ",xA8/S!Z6+kR,9dph.rO": {
+      "id": ",xA8/S!Z6+kR,9dph.rO",
+      "opcode": "math_number",
+      "inputs": {},
+      "fields": {
+        "NUM": {
+          "name": "NUM",
+          "value": "1"
+        }
+      },
+      "next": null,
+      "topLevel": false
     }
-}
+  }
 ```
 
 ## Testing

From 53372c5704870de11400761f840e96779bed4c48 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 16:17:12 -0400
Subject: [PATCH 033/302] Fixing case problem with blocks.js tests

---
 test/unit/blocks.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 0e1bcabcc..3c2af2bc6 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -1,5 +1,5 @@
 var test = require('tap').test;
-var Blocks = require('../../src/engine/Blocks');
+var Blocks = require('../../src/engine/blocks');
 
 test('spec', function (t) {
     var b = new Blocks();

From f158af18b13da3b3604c73ae54555278f237268e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 6 Jun 2016 16:19:57 -0400
Subject: [PATCH 034/302] Case problem with blocks.js in index.js

---
 src/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/index.js b/src/index.js
index a18d17da2..3b4bece67 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,7 +1,7 @@
 var EventEmitter = require('events');
 var util = require('util');
 
-var Blocks = require('./engine/Blocks');
+var Blocks = require('./engine/blocks');
 var Runtime = require('./engine/runtime');
 var adapter = require('./engine/adapter');
 

From 4eb63cf33e16fdaff4d85ecb9cebda036d65e3f2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 10:49:12 -0400
Subject: [PATCH 035/302] Test for CREATE event with substack

---
 test/fixtures/events.json | 11 +++++++++++
 test/unit/adapter.js      | 24 ++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index 064c76c69..4b7573504 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -11,5 +11,16 @@
             "z!+#Nqr,_(V=xz0y7a@d",
             "!6Ahqg4f}Ljl}X5Hws?Z"
         ]
+    },
+    "createsubstack": {
+        "name": "block",
+        "xml": {
+            "outerHTML": "<block type=\"control_forever\" id=\"r9`RpL74T6*SXPKv7}Dq\" x=\"61\" y=\"90\"><statement name=\"SUBSTACK\"><block type=\"control_wait\" id=\"{Rwt[LFtD1-JPAi-qf:.\"><value name=\"DURATION\"><shadow type=\"math_number\" id=\"VMDxt_9SYe5{*eNRe5dZ\"><field name=\"NUM\">1</field></shadow></value></block></statement></block>"
+        },
+        "ids": [
+            "r9`RpL74T6*SXPKv7}Dq",
+            "{Rwt[LFtD1-JPAi-qf:.",
+            "VMDxt_9SYe5{*eNRe5dZ"
+        ]
     }
 }
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 31e904845..44ea13928 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -34,3 +34,27 @@ test('create event', function (t) {
 
     t.end();
 });
+
+test('create with substack', function (t) {
+    var result = adapter(events.createsubstack);
+    // Outer block
+    t.type(result[0].id, 'string');
+    t.type(result[0].opcode, 'string');
+    t.type(result[0].fields, 'object');
+    t.type(result[0].inputs, 'object');
+    t.type(result[0].inputs['SUBSTACK'], 'object');
+    t.type(result[0].topLevel, 'boolean');
+    t.equal(result[0].topLevel, true);
+    // In substack
+    var substackBlockId = result[0].inputs['SUBSTACK']['block'];
+    t.type(substackBlockId, 'string');
+    // Find actual substack block
+    var substackBlock = null;
+    for (var i = 0; i < result.length; i++) {
+        if (result[i].id == substackBlockId) {
+            substackBlock = result[i];
+        }
+    }
+    t.type(substackBlock, 'object');
+    t.end();
+});

From 06eaee9108bd966a61f4b750025b0555da6c93bf Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:04:44 -0400
Subject: [PATCH 036/302] Additional adapter tests for new cases

---
 test/fixtures/events.json | 25 +++++++++---
 test/unit/adapter.js      | 83 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+), 6 deletions(-)

diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index 4b7573504..f6f4cb796 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -16,11 +16,24 @@
         "name": "block",
         "xml": {
             "outerHTML": "<block type=\"control_forever\" id=\"r9`RpL74T6*SXPKv7}Dq\" x=\"61\" y=\"90\"><statement name=\"SUBSTACK\"><block type=\"control_wait\" id=\"{Rwt[LFtD1-JPAi-qf:.\"><value name=\"DURATION\"><shadow type=\"math_number\" id=\"VMDxt_9SYe5{*eNRe5dZ\"><field name=\"NUM\">1</field></shadow></value></block></statement></block>"
-        },
-        "ids": [
-            "r9`RpL74T6*SXPKv7}Dq",
-            "{Rwt[LFtD1-JPAi-qf:.",
-            "VMDxt_9SYe5{*eNRe5dZ"
-        ]
+        }
+    },
+    "createtwosubstacks": {
+        "name": "block",
+        "xml": {
+            "outerHTML": "<block type=\"control_if_else\" id=\"8W?lmIY!Tgnh)~0!G#9-\" x=\"87\" y=\"159\"><statement name=\"SUBSTACK\"><block type=\"event_broadcast\" id=\"lgU2GGtwlREuasCB02Vr\"></block></statement><statement name=\"SUBSTACK2\"><block type=\"event_broadcast\" id=\"Gb]N,2P;|J%F?pxSwz(2\"></block></statement></block>"
+        }
+    },
+    "createtoplevelshadow": {
+        "name": "shadow",
+        "xml": {
+            "outerHTML": "<shadow type=\"math_number\" id=\"z9d57=IUI5se;DBbyug)\"><field name=\"NUM\">4</field></shadow>"
+        }
+    },
+    "createwithnext": {
+        "name": "block",
+        "xml": {
+            "outerHTML": "<block type=\"wedo_setcolor\" id=\"*CT)7+UKjQIEtUw.OGT6\" x=\"89\" y=\"48\"><next><block type=\"wedo_motorspeed\" id=\"Er*:^o7yYL#dX+5)R^xq\"></block></next></block>"
+        }
     }
 }
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 44ea13928..72be10d88 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -7,6 +7,14 @@ test('spec', function (t) {
     t.end();
 });
 
+test('invalid inputs', function(t) {
+    var nothing = adapter('not an object');
+    t.type(nothing, 'undefined');
+    nothing = adapter({noxmlproperty:true});
+    t.type(nothing, 'undefined');
+    t.end();
+});
+
 test('create event', function (t) {
     var result = adapter(events.create);
 
@@ -58,3 +66,78 @@ test('create with substack', function (t) {
     t.type(substackBlock, 'object');
     t.end();
 });
+
+test('create with two substacks', function (t) {
+    var result = adapter(events.createtwosubstacks);
+    // Outer block
+    t.type(result[0].id, 'string');
+    t.type(result[0].opcode, 'string');
+    t.type(result[0].fields, 'object');
+    t.type(result[0].inputs, 'object');
+    t.type(result[0].inputs['SUBSTACK'], 'object');
+    t.type(result[0].inputs['SUBSTACK2'], 'object');
+    t.type(result[0].topLevel, 'boolean');
+    t.equal(result[0].topLevel, true);
+    // In substacks
+    var firstSubstackBlockId = result[0].inputs['SUBSTACK']['block'];
+    var secondSubstackBlockId = result[0].inputs['SUBSTACK2']['block'];
+    t.type(firstSubstackBlockId, 'string');
+    t.type(secondSubstackBlockId, 'string');
+    // Find actual substack blocks
+    var firstSubstackBlock = null;
+    var secondSubstackBlock = null;
+    for (var i = 0; i < result.length; i++) {
+        if (result[i].id == firstSubstackBlockId) {
+            firstSubstackBlock = result[i];
+        }
+        if (result[i].id == secondSubstackBlockId) {
+            secondSubstackBlock = result[i];
+        }
+    }
+    t.type(firstSubstackBlock, 'object');
+    t.type(secondSubstackBlock, 'object');
+    t.end();
+});
+
+test('create with top-level shadow', function (t) {
+    var result = adapter(events.createtoplevelshadow);
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 1);
+
+    // Outer block
+    t.type(result[0].id, 'string');
+    t.type(result[0].opcode, 'string');
+    t.type(result[0].fields, 'object');
+    t.type(result[0].inputs, 'object');
+    t.type(result[0].topLevel, 'boolean');
+    t.equal(result[0].topLevel, true);
+    t.end();
+});
+
+test('create with next connection', function (t) {
+    var result = adapter(events.createwithnext);
+
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 2);
+
+    // First block
+    t.type(result[0].id, 'string');
+    t.type(result[0].opcode, 'string');
+    t.type(result[0].fields, 'object');
+    t.type(result[0].inputs, 'object');
+    t.type(result[0].topLevel, 'boolean');
+    t.equal(result[0].topLevel, true);
+    t.type(result[0].next, 'string');
+    t.equal(result[0].next, result[1].id);
+
+    // Second block
+    t.type(result[1].id, 'string');
+    t.type(result[1].opcode, 'string');
+    t.type(result[1].fields, 'object');
+    t.type(result[1].inputs, 'object');
+    t.type(result[1].topLevel, 'boolean');
+    t.equal(result[1].topLevel, false);
+    t.equal(result[1].next, null);
+
+    t.end();
+});

From 855caab8d285607745158b55c8046b17dc3a7ed4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:11:20 -0400
Subject: [PATCH 037/302] Add blocks delete chain test

---
 test/unit/blocks.js | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 3c2af2bc6..b9803d23f 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -95,3 +95,43 @@ test('delete', function (t) {
     t.equal(b._stacks.indexOf('foo'), -1);
     t.end();
 });
+
+test('delete chain', function (t) {
+    // Create a chain of connected blocks and delete the top one.
+    // All of them should be deleted.
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: 'foo2',
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: 'foo3',
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+    b.createBlock({
+        id: 'foo3',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+    b.deleteBlock({
+        id: 'foo'
+    });
+    t.type(b._blocks['foo'], 'undefined');
+    t.type(b._blocks['foo2'], 'undefined');
+    t.type(b._blocks['foo3'], 'undefined');
+    t.equal(b._stacks.indexOf('foo'), -1);
+    t.equal(Object.keys(b._blocks).length, 0);
+    t.equal(b._stacks.length, 0);
+    t.end();
+});

From 84213087829662e726b59eb79afb4e4e9147d2a9 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:18:41 -0400
Subject: [PATCH 038/302] Add delete test for blocks with inputs/statements

---
 test/unit/blocks.js | 63 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index b9803d23f..09690bf9a 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -135,3 +135,66 @@ test('delete chain', function (t) {
     t.equal(b._stacks.length, 0);
     t.end();
 });
+
+test('delete inputs', function (t) {
+    // Create a block with two inputs, one of which has its own input.
+    // Delete the block - all of them should be deleted.
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {
+            input1: {
+                name: 'input1',
+                block: 'foo2'
+            },
+            SUBSTACK: {
+                name: 'SUBSTACK',
+                block: 'foo3'
+            }
+        },
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+    b.createBlock({
+        id: 'foo3',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {
+            subinput: {
+                name: 'subinput',
+                block: 'foo4'
+            }
+        },
+        topLevel: false
+    });
+    b.createBlock({
+        id: 'foo4',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+    b.deleteBlock({
+        id: 'foo'
+    });
+    t.type(b._blocks['foo'], 'undefined');
+    t.type(b._blocks['foo2'], 'undefined');
+    t.type(b._blocks['foo3'], 'undefined');
+    t.type(b._blocks['foo4'], 'undefined');
+    t.equal(b._stacks.indexOf('foo'), -1);
+    t.equal(Object.keys(b._blocks).length, 0);
+    t.equal(b._stacks.length, 0);
+    t.end();
+});

From 3b4a00ce464bd431dd9222c976fd1010735d96c6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:29:51 -0400
Subject: [PATCH 039/302] Add check for null `substackNum`, fix numbering

---
 src/engine/blocks.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index ad4c8d1c7..896e9c8b4 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -56,9 +56,10 @@
  Blocks.prototype.getSubstack = function (id, substackNum) {
      var block = this._blocks[id];
      if (typeof block === 'undefined') return null;
+     if (!substackNum) substackNum = 1;
 
      var inputName = 'SUBSTACK';
-     if (substackNum > 0) {
+     if (substackNum > 1) {
          inputName += substackNum;
      }
 

From 6e087475f6e5674bad9eb4914501d2e0b1486c8c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:34:01 -0400
Subject: [PATCH 040/302] Tests for blocks.js getters

---
 test/unit/blocks.js | 211 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 211 insertions(+)

diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 09690bf9a..ead221b24 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -16,10 +16,221 @@ test('spec', function (t) {
     t.type(b.moveBlock, 'function');
     t.type(b.changeBlock, 'function');
     t.type(b.deleteBlock, 'function');
+    t.type(b.getBlock, 'function');
+    t.type(b.getStacks, 'function');
+    t.type(b.getNextBlock, 'function');
+    t.type(b.getSubstack, 'function');
+    t.type(b.getOpcode, 'function');
+
 
     t.end();
 });
 
+// Getter tests
+test('getBlock', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    var block = b.getBlock('foo');
+    t.type(block, 'object');
+    var notBlock = b.getBlock('?');
+    t.type(notBlock, 'undefined');
+    t.end();
+});
+
+test('getStacks', function (t) {
+    var b = new Blocks();
+    var stacks = b.getStacks();
+    t.type(stacks, 'object');
+    t.equals(stacks.length, 0);
+    // Create two top-level blocks and one not.
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo3',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+
+    stacks = b.getStacks();
+    t.type(stacks, 'object');
+    t.equals(stacks.length, 2);
+    t.ok(stacks.indexOf('foo') > -1);
+    t.ok(stacks.indexOf('foo2') > -1);
+    t.equals(stacks.indexOf('foo3'), -1);
+    t.end();
+
+});
+
+test('getNextBlock', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+
+    var next = b.getNextBlock('foo');
+    t.equals(next, null);
+
+    // Add a block with "foo" as its next.
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: 'foo',
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+
+    next = b.getNextBlock('foo2');
+    t.equals(next, 'foo');
+
+    // Block that doesn't exist.
+    var noBlock = b.getNextBlock('?');
+    t.equals(noBlock, null);
+
+    t.end();
+});
+
+test('getSubstack', function (t) {
+    var b = new Blocks();
+    // Single substack
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {
+            SUBSTACK: {
+                name: 'SUBSTACK',
+                block: 'foo2'
+            }
+        },
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+
+    var substack = b.getSubstack('foo');
+    t.equals(substack, 'foo2');
+
+    var notSubstack = b.getSubstack('?');
+    t.equals(notSubstack, null);
+
+    t.end();
+});
+
+test('getSubstack2', function (t) {
+    var b = new Blocks();
+    // Second substack
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {
+            SUBSTACK: {
+                name: 'SUBSTACK',
+                block: 'foo2'
+            },
+            SUBSTACK2: {
+                name: 'SUBSTACK2',
+                block: 'foo3'
+            }
+        },
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'foo2',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+    b.createBlock({
+        id: 'foo3',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
+
+    var substack1 = b.getSubstack('foo', 1);
+    var substack2 = b.getSubstack('foo', 2);
+    t.equals(substack1, 'foo2');
+    t.equals(substack2, 'foo3');
+
+    t.end();
+});
+
+test('getSubstack with none', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    var noSubstack = b.getSubstack('foo');
+    t.equals(noSubstack, null);
+    t.end();
+});
+
+test('getOpcode', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    var opcode = b.getOpcode('foo');
+    t.equals(opcode, 'TEST_BLOCK');
+    var notOpcode = b.getOpcode('?');
+    t.equals(notOpcode, null);
+    t.end();
+});
+
+// Block events tests
 test('create', function (t) {
     var b = new Blocks();
     b.createBlock({

From e9accca107cecc3273dd47013f2cc3603fc40743 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 11:40:47 -0400
Subject: [PATCH 041/302] Add test for blocks.js `changeBlock`

---
 test/unit/blocks.js | 57 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index ead221b24..518317f59 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -288,6 +288,63 @@ test('move', function (t) {
     t.end();
 });
 
+test('change', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {
+            someField: {
+                name: 'someField',
+                value: 'initial-value'
+            }
+        },
+        inputs: {},
+        topLevel: true
+    });
+
+    // Test that the field is updated
+    t.equal(b._blocks['foo'].fields.someField.value, 'initial-value');
+
+    b.changeBlock({
+        element: 'field',
+        id: 'foo',
+        name: 'someField',
+        value: 'final-value'
+    });
+
+    t.equal(b._blocks['foo'].fields.someField.value, 'final-value');
+
+    // Invalid cases
+    // No `element`
+    b.changeBlock({
+        id: 'foo',
+        name: 'someField',
+        value: 'invalid-value'
+    });
+    t.equal(b._blocks['foo'].fields.someField.value, 'final-value');
+
+    // No block ID
+    b.changeBlock({
+        element: 'field',
+        name: 'someField',
+        value: 'invalid-value'
+    });
+    t.equal(b._blocks['foo'].fields.someField.value, 'final-value');
+
+    // No such field
+    b.changeBlock({
+        element: 'field',
+        id: 'foo',
+        name: 'someWrongField',
+        value: 'final-value'
+    });
+    t.equal(b._blocks['foo'].fields.someField.value, 'final-value');
+
+    t.end();
+});
+
 test('delete', function (t) {
     var b = new Blocks();
     b.createBlock({

From 2339c5e71024626ec6faa148736fa6cf5ae69a70 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 12:01:47 -0400
Subject: [PATCH 042/302] Additional tests for invalid `adapter` inputs

---
 src/engine/adapter.js     |  7 +++++++
 test/fixtures/events.json | 18 ++++++++++++++++++
 test/unit/adapter.js      | 24 ++++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 7f891da34..48613ec5d 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -32,6 +32,9 @@ function domToBlocks (blocksDOM) {
     var blocks = {};
     for (var i = 0; i < blocksDOM.length; i++) {
         var block = blocksDOM[i];
+        if (!block.name || !block.attribs) {
+            continue;
+        }
         var tagName = block.name.toLowerCase();
         if (tagName == 'block' || tagName == 'shadow') {
             domToBlock(block, blocks, true);
@@ -114,6 +117,10 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
             };
             break;
         case 'next':
+            if (!childBlockNode || !childBlockNode.attribs) {
+                // Invalid child block.
+                continue;
+            }
             // Recursively generate block structure for next block.
             domToBlock(childBlockNode, blocks, false);
             // Link next block to this block.
diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index f6f4cb796..6d94fc62a 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -35,5 +35,23 @@
         "xml": {
             "outerHTML": "<block type=\"wedo_setcolor\" id=\"*CT)7+UKjQIEtUw.OGT6\" x=\"89\" y=\"48\"><next><block type=\"wedo_motorspeed\" id=\"Er*:^o7yYL#dX+5)R^xq\"></block></next></block>"
         }
+    },
+    "createinvalid": {
+        "name": "whatever",
+        "xml": {
+            "outerHTML": "<xml></xml>"
+        }
+    },
+    "createinvalidgrandchild": {
+        "name": "block",
+        "xml": {
+            "outerHTML": "<block type=\"control_forever\" id=\"r9`RpL74T6*SXPKv7}Dq\" x=\"61\" y=\"90\"><next><invalidgrandchild>xxx</invalidgrandchild></next></block>"
+        }
+    },
+    "createbadxml": {
+        "name": "whatever",
+        "xml": {
+            "outerHTML": "></xml>"
+        }
     }
 }
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 72be10d88..838815626 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -141,3 +141,27 @@ test('create with next connection', function (t) {
 
     t.end();
 });
+
+test('create with invalid block xml', function (t) {
+    // Entirely invalid block XML
+    var result = adapter(events.createinvalid);
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 0);
+
+    // Invalid grandchild tag
+    var result2 = adapter(events.createinvalidgrandchild);
+    t.ok(Array.isArray(result2));
+    t.equal(result2.length, 1);
+    t.type(result2[0].id, 'string');
+    t.equal(Object.keys(result2[0].inputs).length, 0);
+    t.equal(Object.keys(result2[0].fields).length, 0);
+
+    t.end();
+});
+
+test('create with invalid xml', function (t) {
+    var result = adapter(events.createbadxml);
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 0);
+    t.end();
+});

From 839965b439dae57c076a3b8d0e2f0c93361408ef Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 13:29:07 -0400
Subject: [PATCH 043/302] Recompile June 7

---
 vm.js     | 1240 +++++++++++++++++++++++++++++------------------------
 vm.min.js |   10 +-
 2 files changed, 680 insertions(+), 570 deletions(-)

diff --git a/vm.js b/vm.js
index 8ee84c288..1e9813127 100644
--- a/vm.js
+++ b/vm.js
@@ -47,8 +47,9 @@
 	var EventEmitter = __webpack_require__(1);
 	var util = __webpack_require__(2);
 
-	var Runtime = __webpack_require__(6);
-	var adapter = __webpack_require__(13);
+	var Blocks = __webpack_require__(6);
+	var Runtime = __webpack_require__(7);
+	var adapter = __webpack_require__(14);
 
 	/**
 	 * Handles connections between blocks, stage, and extensions.
@@ -61,7 +62,8 @@
 	    // Bind event emitter and runtime to VM instance
 	    // @todo Post message (Web Worker) polyfill
 	    EventEmitter.call(instance);
-	    instance.runtime = new Runtime();
+	    instance.blocks = new Blocks();
+	    instance.runtime = new Runtime(instance.blocks);
 
 	    /**
 	     * Event listener for blocks. Handles validation and serves as a generic
@@ -83,10 +85,14 @@
 	        // Block create/update/destroy
 	        switch (e.type) {
 	        case 'create':
-	            instance.runtime.createBlock(adapter(e), false);
+	            var newBlocks = adapter(e);
+	            // A create event can create many blocks. Add them all.
+	            for (var i = 0; i < newBlocks.length; i++) {
+	                instance.blocks.createBlock(newBlocks[i], false);
+	            }
 	            break;
 	        case 'change':
-	            instance.runtime.changeBlock({
+	            instance.blocks.changeBlock({
 	                id: e.blockId,
 	                element: e.element,
 	                name: e.name,
@@ -94,16 +100,16 @@
 	            });
 	            break;
 	        case 'move':
-	            instance.runtime.moveBlock({
+	            instance.blocks.moveBlock({
 	                id: e.blockId,
 	                oldParent: e.oldParentId,
-	                oldField: e.oldInputName,
+	                oldInput: e.oldInputName,
 	                newParent: e.newParentId,
-	                newField: e.newInputName
+	                newInput: e.newInputName
 	            });
 	            break;
 	        case 'delete':
-	            instance.runtime.deleteBlock({
+	            instance.blocks.deleteBlock({
 	                id: e.blockId
 	            });
 	            break;
@@ -113,10 +119,14 @@
 	    instance.flyoutBlockListener = function (e) {
 	        switch (e.type) {
 	        case 'create':
-	            instance.runtime.createBlock(adapter(e), true);
+	            var newBlocks = adapter(e);
+	            // A create event can create many blocks. Add them all.
+	            for (var i = 0; i < newBlocks.length; i++) {
+	                instance.blocks.createBlock(newBlocks[i], true);
+	            }
 	            break;
 	        case 'change':
-	            instance.runtime.changeBlock({
+	            instance.blocks.changeBlock({
 	                id: e.blockId,
 	                element: e.element,
 	                name: e.name,
@@ -124,7 +134,7 @@
 	            });
 	            break;
 	        case 'delete':
-	            instance.runtime.deleteBlock({
+	            instance.blocks.deleteBlock({
 	                id: e.blockId
 	            });
 	            break;
@@ -1186,39 +1196,245 @@
 
 /***/ },
 /* 6 */
+/***/ function(module, exports) {
+
+	/**
+	* @fileoverview
+	 * Store and mutate the VM block representation,
+	 * and handle updates from Scratch Blocks events.
+	 */
+
+	 function Blocks () {
+	     /**
+	      * All blocks in the workspace.
+	      * Keys are block IDs, values are metadata about the block.
+	      * @type {Object.<string, Object>}
+	      */
+	     this._blocks = {};
+
+	     /**
+	      * All stacks in the workspace.
+	      * A list of block IDs that represent stacks (first block in stack).
+	      * @type {Array.<String>}
+	      */
+	     this._stacks = [];
+	 }
+
+	/**
+	 * Provide an object with metadata for the requested block ID.
+	 * @param {!string} blockId ID of block we have stored.
+	 * @return {?Object} Metadata about the block, if it exists.
+	 */
+	 Blocks.prototype.getBlock = function (blockId) {
+	     return this._blocks[blockId];
+	 };
+
+	/**
+	 * Get all known top-level blocks that start stacks.
+	 * @return {Array.<string>} List of block IDs.
+	 */
+	 Blocks.prototype.getStacks = function () {
+	     return this._stacks;
+	 };
+
+	 /**
+	  * Get the next block for a particular block
+	  * @param {?string} id ID of block to get the next block for
+	  * @return {?string} ID of next block in the sequence
+	  */
+	 Blocks.prototype.getNextBlock = function (id) {
+	     if (typeof this._blocks[id] === 'undefined') return null;
+	     return this._blocks[id].next;
+	 };
+
+	 /**
+	  * Get the substack for a particular C-shaped block
+	  * @param {?string} id ID for block to get the substack for
+	  * @param {?number} substackNum Which substack to select (e.g. for if-else)
+	  * @return {?string} ID of block in the substack
+	  */
+	 Blocks.prototype.getSubstack = function (id, substackNum) {
+	     var block = this._blocks[id];
+	     if (typeof block === 'undefined') return null;
+	     if (!substackNum) substackNum = 1;
+
+	     var inputName = 'SUBSTACK';
+	     if (substackNum > 1) {
+	         inputName += substackNum;
+	     }
+
+	     // Empty C-block?
+	     if (!(inputName in block.inputs)) return null;
+	     return block.inputs[inputName].block;
+	 };
+
+	 /**
+	  * Get the opcode for a particular block
+	  * @param {?string} id ID of block to query
+	  * @return {?string} the opcode corresponding to that block
+	  */
+	 Blocks.prototype.getOpcode = function (id) {
+	     if (typeof this._blocks[id] === 'undefined') return null;
+	     return this._blocks[id].opcode;
+	 };
+
+	 // ---------------------------------------------------------------------
+
+	 /**
+	  * Block management: create blocks and stacks from a `create` event
+	  * @param {!Object} block Blockly create event to be processed
+	  */
+	 Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
+	     // Create new block
+	     this._blocks[block.id] = block;
+
+	     // Push block id to stacks array.
+	     // Blocks are added as a top-level stack if they are marked as a top-block
+	     // (if they were top-level XML in the event) and if they are not
+	     // flyout blocks.
+	     if (!opt_isFlyoutBlock && block.topLevel) {
+	         this._addStack(block.id);
+	     }
+	 };
+
+	 /**
+	  * Block management: change block field values
+	  * @param {!Object} args Blockly change event to be processed
+	  */
+	 Blocks.prototype.changeBlock = function (args) {
+	     // Validate
+	     if (args.element !== 'field') return;
+	     if (typeof this._blocks[args.id] === 'undefined') return;
+	     if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
+
+	     // Update block value
+	     this._blocks[args.id].fields[args.name].value = args.value;
+	 };
+
+	 /**
+	  * Block management: move blocks from parent to parent
+	  * @param {!Object} e Blockly move event to be processed
+	  */
+	 Blocks.prototype.moveBlock = function (e) {
+	     // Remove from any old parent.
+	     if (e.oldParent !== undefined) {
+	         var oldParent = this._blocks[e.oldParent];
+	         if (e.oldInput !== undefined &&
+	             oldParent.inputs[e.oldInput].block === e.id) {
+	             // This block was connected to the old parent's input.
+	             oldParent.inputs[e.oldInput].block = null;
+	         } else if (oldParent.next === e.id) {
+	             // This block was connected to the old parent's next connection.
+	             oldParent.next = null;
+	         }
+	     }
+
+	     // Has the block become a top-level block?
+	     if (e.newParent === undefined) {
+	         this._addStack(e.id);
+	     } else {
+	         // Remove stack, if one exists.
+	         this._deleteStack(e.id);
+	         // Otherwise, try to connect it in its new place.
+	         if (e.newInput !== undefined) {
+	             // Moved to the new parent's input.
+	             this._blocks[e.newParent].inputs[e.newInput] = {
+	                 name: e.newInput,
+	                 block: e.id
+	             };
+	         } else {
+	             // Moved to the new parent's next connection.
+	             this._blocks[e.newParent].next = e.id;
+	         }
+	     }
+	 };
+
+	 /**
+	  * Block management: delete blocks and their associated stacks
+	  * @param {!Object} e Blockly delete event to be processed
+	  */
+	 Blocks.prototype.deleteBlock = function (e) {
+	     // @todo In runtime, stop threads running on this stack
+
+	     // Get block
+	     var block = this._blocks[e.id];
+
+	     // Delete children
+	     if (block.next !== null) {
+	         this.deleteBlock({id: block.next});
+	     }
+
+	     // Delete inputs (including substacks)
+	     for (var input in block.inputs) {
+	         // If it's null, the block in this input moved away.
+	         if (block.inputs[input].block !== null) {
+	             this.deleteBlock({id: block.inputs[input].block});
+	         }
+	     }
+
+	     // Delete stack
+	     this._deleteStack(e.id);
+
+	     // Delete block
+	     delete this._blocks[e.id];
+	 };
+
+	 // ---------------------------------------------------------------------
+
+	 /**
+	  * Helper to add a stack to `this._stacks`
+	  * @param {?string} id ID of block that starts the stack
+	  */
+	 Blocks.prototype._addStack = function (id) {
+	     var i = this._stacks.indexOf(id);
+	     if (i > -1) return; // Already in stacks.
+	     this._stacks.push(id);
+	     // Update `topLevel` property on the top block.
+	     this._blocks[id].topLevel = true;
+	 };
+
+	 /**
+	  * Helper to remove a stack from `this._stacks`
+	  * @param {?string} id ID of block that starts the stack
+	  */
+	 Blocks.prototype._deleteStack = function (id) {
+	     var i = this._stacks.indexOf(id);
+	     if (i > -1) this._stacks.splice(i, 1);
+	     // Update `topLevel` property on the top block.
+	     if (this._blocks[id]) this._blocks[id].topLevel = false;
+	 };
+
+	 module.exports = Blocks;
+
+
+/***/ },
+/* 7 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var EventEmitter = __webpack_require__(1);
-	var Sequencer = __webpack_require__(7);
-	var Thread = __webpack_require__(9);
+	var Sequencer = __webpack_require__(8);
+	var Thread = __webpack_require__(10);
 	var util = __webpack_require__(2);
 
 	var defaultBlockPackages = {
-	    'scratch3': __webpack_require__(11),
-	    'wedo2': __webpack_require__(12)
+	    'scratch3': __webpack_require__(12),
+	    'wedo2': __webpack_require__(13)
 	};
 
 	/**
 	 * Manages blocks, stacks, and the sequencer.
+	 * @param blocks Blocks instance for this runtime.
 	 */
-	function Runtime () {
+	function Runtime (blocks) {
 	    // Bind event emitter
 	    EventEmitter.call(this);
 
 	    // State for the runtime
-	    /**
-	     * All blocks in the workspace.
-	     * Keys are block IDs, values are metadata about the block.
-	     * @type {Object.<string, Object>}
-	     */
-	    this.blocks = {};
 
 	    /**
-	     * All stacks in the workspace.
-	     * A list of block IDs that represent stacks (first block in stack).
-	     * @type {Array.<String>}
+	     * Block management and storage
 	     */
-	    this.stacks = [];
+	    this.blocks = blocks;
 
 	    /**
 	     * A list of threads that are currently running in the VM.
@@ -1273,118 +1489,6 @@
 	 */
 	Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
 
-	/**
-	 * Block management: create blocks and stacks from a `create` event
-	 * @param {!Object} block Blockly create event to be processed
-	 */
-	Runtime.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-	    // Create new block
-	    this.blocks[block.id] = block;
-
-	    // Walk each field and add any shadow blocks
-	    // @todo Expand this to cover vertical / nested blocks
-	    for (var i in block.fields) {
-	        var shadows = block.fields[i].blocks;
-	        for (var y in shadows) {
-	            var shadow = shadows[y];
-	            this.blocks[shadow.id] = shadow;
-	        }
-	    }
-
-	    // Push block id to stacks array. New blocks are always a stack even if only
-	    // momentary. If the new block is added to an existing stack this stack will
-	    // be removed by the `moveBlock` method below.
-	    if (!opt_isFlyoutBlock) {
-	        this.stacks.push(block.id);
-	    }
-	};
-
-	/**
-	 * Block management: change block field values
-	 * @param {!Object} args Blockly change event to be processed
-	 */
-	Runtime.prototype.changeBlock = function (args) {
-	    // Validate
-	    if (args.element !== 'field') return;
-	    if (typeof this.blocks[args.id] === 'undefined') return;
-	    if (typeof this.blocks[args.id].fields[args.name] === 'undefined') return;
-
-	    // Update block value
-	    this.blocks[args.id].fields[args.name].value = args.value;
-	};
-
-	/**
-	 * Block management: move blocks from parent to parent
-	 * @param {!Object} e Blockly move event to be processed
-	 */
-	Runtime.prototype.moveBlock = function (e) {
-	    var _this = this;
-
-	    // Block was removed from parent
-	    if (e.newParent === undefined && e.oldParent !== undefined) {
-	        // Add stack
-	        _this.stacks.push(e.id);
-
-	        // Update old parent
-	        if (e.oldField === undefined) {
-	            _this.blocks[e.oldParent].next = null;
-	        } else {
-	            delete _this.blocks[e.oldParent].fields[e.oldField];
-	        }
-	    } else if (e.newParent !== undefined) {
-	        // Block was moved to a new parent
-	        // Either happens because it was previously parentless
-	        // (e.oldParent === undefined)
-	        // or because a block was moved in front of it.
-
-	        // Remove stack
-	        _this._deleteStack(e.id);
-
-	        // Update new parent
-	        if (e.newField === undefined) {
-	            _this.blocks[e.newParent].next = e.id;
-	        } else {
-	            _this.blocks[e.newParent].fields[e.newField] = {
-	                name: e.newField,
-	                value: e.id,
-	                blocks: {}
-	            };
-	        }
-	    }
-	};
-
-	/**
-	 * Block management: delete blocks and their associated stacks
-	 * @param {!Object} e Blockly delete event to be processed
-	 */
-	Runtime.prototype.deleteBlock = function (e) {
-	    // @todo Stop threads running on this stack
-
-	    // Get block
-	    var block = this.blocks[e.id];
-
-	    // Delete children
-	    if (block.next !== null) {
-	        this.deleteBlock({id: block.next});
-	    }
-
-	    // Delete substacks and fields
-	    for (var field in block.fields) {
-	        if (field === 'SUBSTACK') {
-	            this.deleteBlock({id: block.fields[field].value});
-	        } else {
-	            for (var shadow in block.fields[field].blocks) {
-	                this.deleteBlock({id: shadow});
-	            }
-	        }
-	    }
-
-	    // Delete stack
-	    this._deleteStack(e.id);
-
-	    // Delete block
-	    delete this.blocks[e.id];
-	};
 
 	// -----------------------------------------------------------------------------
 	// -----------------------------------------------------------------------------
@@ -1470,10 +1574,11 @@
 	        this._removeThread(this.threads[i]);
 	    }
 	    // Add all top stacks with green flag
-	    for (var j = 0; j < this.stacks.length; j++) {
-	        var topBlock = this.stacks[j];
-	        if (this.blocks[topBlock].opcode === 'event_whenflagclicked') {
-	            this._pushThread(this.stacks[j]);
+	    var stacks = this.blocks.getStacks();
+	    for (var j = 0; j < stacks.length; j++) {
+	        var topBlock = stacks[j];
+	        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
+	            this._pushThread(stacks[j]);
 	        }
 	    }
 	};
@@ -1483,9 +1588,11 @@
 	 */
 	Runtime.prototype.startDistanceSensors = function () {
 	    // Add all top stacks with distance sensor
-	    for (var j = 0; j < this.stacks.length; j++) {
-	        var topBlock = this.stacks[j];
-	        if (this.blocks[topBlock].opcode === 'wedo_whendistanceclose') {
+	    var stacks = this.blocks.getStacks();
+	    for (var j = 0; j < stacks.length; j++) {
+	        var topBlock = stacks[j];
+	        if (this.blocks.getBlock(topBlock).opcode ===
+	            'wedo_whendistanceclose') {
 	            var alreadyRunning = false;
 	            for (var k = 0; k < this.threads.length; k++) {
 	                if (this.threads[k].topBlock === topBlock) {
@@ -1493,7 +1600,7 @@
 	                }
 	            }
 	            if (!alreadyRunning) {
-	                this._pushThread(this.stacks[j]);
+	                this._pushThread(stacks[j]);
 	            }
 	        }
 	    }
@@ -1547,58 +1654,16 @@
 	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 	};
 
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Helper to remove a stack from `this.stacks`
-	 * @param {?string} id ID of block that starts the stack
-	 */
-	Runtime.prototype._deleteStack = function (id) {
-	    var i = this.stacks.indexOf(id);
-	    if (i > -1) this.stacks.splice(i, 1);
-	};
-
-	/**
-	 * Helper to get the next block for a particular block
-	 * @param {?string} id ID of block to get the next block for
-	 * @return {?string} ID of next block in the sequence
-	 */
-	Runtime.prototype._getNextBlock = function (id) {
-	    if (typeof this.blocks[id] === 'undefined') return null;
-	    return this.blocks[id].next;
-	};
-
-	/**
-	 * Helper to get the substack for a particular C-shaped block
-	 * @param {?string} id ID for block to get the substack for
-	 * @return {?string} ID of block in the substack
-	 */
-	Runtime.prototype._getSubstack = function (id) {
-	    if (typeof this.blocks[id] === 'undefined') return null;
-	    return this.blocks[id].fields['SUBSTACK'];
-	};
-
-	/**
-	 * Helper to get the opcode for a particular block
-	 * @param {?string} id ID of block to query
-	 * @return {?string} the opcode corresponding to that block
-	 */
-	Runtime.prototype._getOpcode = function (id) {
-	    if (typeof this.blocks[id] === 'undefined') return null;
-	    return this.blocks[id].opcode;
-	};
-
 	module.exports = Runtime;
 
 
 /***/ },
-/* 7 */
+/* 8 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Timer = __webpack_require__(8);
-	var Thread = __webpack_require__(9);
-	var YieldTimers = __webpack_require__(10);
+	var Timer = __webpack_require__(9);
+	var Thread = __webpack_require__(10);
+	var YieldTimers = __webpack_require__(11);
 
 	function Sequencer (runtime) {
 	    /**
@@ -1695,13 +1760,13 @@
 	    // If the primitive would like to do control flow,
 	    // it can overwrite nextBlock.
 	    var currentBlock = thread.nextBlock;
-	    if (!currentBlock || !this.runtime.blocks[currentBlock]) {
+	    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
 	        thread.status = Thread.STATUS_DONE;
 	        return;
 	    }
-	    thread.nextBlock = this.runtime._getNextBlock(currentBlock);
+	    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
 
-	    var opcode = this.runtime._getOpcode(currentBlock);
+	    var opcode = this.runtime.blocks.getOpcode(currentBlock);
 
 	    // Push the current block to the stack
 	    thread.stack.push(currentBlock);
@@ -1728,7 +1793,7 @@
 	    var threadDoneCallback = function () {
 	        thread.status = Thread.STATUS_DONE;
 	        // Refresh nextBlock in case it has changed during a yield.
-	        thread.nextBlock = instance.runtime._getNextBlock(currentBlock);
+	        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
 	        // Pop the stack and stack frame
 	        thread.stack.pop();
 	        thread.stackFrames.pop();
@@ -1739,9 +1804,10 @@
 	     * @todo very hacked...
 	     */
 	    var startHats = function(callback) {
-	        for (var i = 0; i < instance.runtime.stacks.length; i++) {
-	            var stack = instance.runtime.stacks[i];
-	            var stackBlock = instance.runtime.blocks[stack];
+	        var stacks = instance.runtime.blocks.getStacks();
+	        for (var i = 0; i < stacks.length; i++) {
+	            var stack = stacks[i];
+	            var stackBlock = instance.runtime.blocks.getBlock(stack);
 	            var result = callback(stackBlock);
 	            if (result) {
 	                // Check if the stack is already running
@@ -1772,7 +1838,7 @@
 	     */
 	    var threadStartSubstack = function () {
 	        // Set nextBlock to the start of the substack
-	        var substack = instance.runtime._getSubstack(currentBlock);
+	        var substack = instance.runtime.blocks.getSubstack(currentBlock);
 	        if (substack && substack.value) {
 	            thread.nextBlock = substack.value;
 	        } else {
@@ -1783,7 +1849,7 @@
 
 	    // @todo extreme hack to get the single argument value for prototype
 	    var argValues = [];
-	    var blockInputs = this.runtime.blocks[currentBlock].fields;
+	    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
 	    for (var bi in blockInputs) {
 	        var outer = blockInputs[bi];
 	        for (var b in outer.blocks) {
@@ -1840,7 +1906,7 @@
 
 
 /***/ },
-/* 8 */
+/* 9 */
 /***/ function(module, exports) {
 
 	/**
@@ -1866,7 +1932,7 @@
 
 
 /***/ },
-/* 9 */
+/* 10 */
 /***/ function(module, exports) {
 
 	/**
@@ -1937,13 +2003,13 @@
 
 
 /***/ },
-/* 10 */
+/* 11 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/**
 	 * @fileoverview Timers that are synchronized with the Scratch sequencer.
 	 */
-	var Timer = __webpack_require__(8);
+	var Timer = __webpack_require__(9);
 
 	function YieldTimers () {}
 
@@ -2033,7 +2099,7 @@
 
 
 /***/ },
-/* 11 */
+/* 12 */
 /***/ function(module, exports) {
 
 	function Scratch3Blocks(runtime) {
@@ -2121,11 +2187,11 @@
 
 
 /***/ },
-/* 12 */
+/* 13 */
 /***/ function(module, exports, __webpack_require__) {
 
 	
-	var YieldTimers = __webpack_require__(10);
+	var YieldTimers = __webpack_require__(11);
 
 	function WeDo2Blocks(runtime) {
 	    /**
@@ -2281,11 +2347,11 @@
 
 
 /***/ },
-/* 13 */
+/* 14 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var html = __webpack_require__(14);
-	var memoize = __webpack_require__(63);
+	var html = __webpack_require__(15);
+	var memoize = __webpack_require__(64);
 	var parseDOM = memoize(html.parseDOM, {
 	    length: 1,
 	    resolvers: [String],
@@ -2295,90 +2361,134 @@
 	/**
 	 * Adapter between block creation events and block representation which can be
 	 * used by the Scratch runtime.
-	 *
-	 * @param {Object} `Blockly.events.create`
-	 *
-	 * @return {Object}
+	 * @param {Object} e `Blockly.events.create`
+	 * @return {Array.<Object>} List of blocks from this CREATE event.
 	 */
 	module.exports = function (e) {
 	    // Validate input
 	    if (typeof e !== 'object') return;
-	    if (typeof e.blockId !== 'string') return;
 	    if (typeof e.xml !== 'object') return;
 
-	    // Storage object
-	    var obj = {
-	        id: e.blockId,
-	        opcode: null,
-	        next: null,
-	        fields: {}
-	    };
-
-	    // Set opcode
-	    if (typeof e.xml.attributes === 'object') {
-	        obj.opcode = e.xml.attributes.type.value;
-	    }
-
-	    // Extract fields from event's `innerHTML`
-	    if (typeof e.xml.innerHTML !== 'string') return obj;
-	    if (e.xml.innerHTML === '') return obj;
-	    obj.fields = extract(parseDOM(e.xml.innerHTML));
-
-	    return obj;
+	    return domToBlocks(parseDOM(e.xml.outerHTML));
 	};
 
 	/**
-	 * Extracts fields from a block's innerHTML.
-	 * @todo Extend this to support vertical grammar / nested blocks.
-	 *
-	 * @param {Object} DOM representation of block's innerHTML
-	 *
-	 * @return {Object}
+	 * Convert outer blocks DOM from a Blockly CREATE event
+	 * to a usable form for the Scratch runtime.
+	 * This structure is based on Blockly xml.js:`domToWorkspace` and `domToBlock`.
+	 * @param {Element} blocksDOM DOM tree for this event.
+	 * @return {Array.<Object>} Usable list of blocks from this CREATE event.
 	 */
-	function extract (dom) {
-	    // Storage object
-	    var fields = {};
+	function domToBlocks (blocksDOM) {
+	    // At this level, there could be multiple blocks adjacent in the DOM tree.
+	    var blocks = {};
+	    for (var i = 0; i < blocksDOM.length; i++) {
+	        var block = blocksDOM[i];
+	        if (!block.name || !block.attribs) {
+	            continue;
+	        }
+	        var tagName = block.name.toLowerCase();
+	        if (tagName == 'block' || tagName == 'shadow') {
+	            domToBlock(block, blocks, true);
+	        }
+	    }
+	    // Flatten blocks object into a list.
+	    var blocksList = [];
+	    for (var b in blocks) {
+	        blocksList.push(blocks[b]);
+	    }
+	    return blocksList;
+	}
 
-	    // Field
-	    var field = dom[0];
-	    var fieldName = field.attribs.name;
-	    fields[fieldName] = {
-	        name: fieldName,
-	        value: null,
-	        blocks: {}
+	/**
+	 * Convert and an individual block DOM to the representation tree.
+	 * Based on Blockly's `domToBlockHeadless_`.
+	 * @param {Element} blockDOM DOM tree for an individual block.
+	 * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
+	 * @param {Object} blocks Collection of blocks to add to.
+	 */
+	function domToBlock (blockDOM, blocks, isTopBlock) {
+	    // Block skeleton.
+	    var block = {
+	        id: blockDOM.attribs.id, // Block ID
+	        opcode: blockDOM.attribs.type, // For execution, "event_whengreenflag".
+	        inputs: {}, // Inputs to this block and the blocks they point to.
+	        fields: {}, // Fields on this block and their values.
+	        next: null, // Next block in the stack, if one exists.
+	        topLevel: isTopBlock // If this block starts a stack.
 	    };
 
-	    // Shadow block
-	    var shadow = field.children[0];
-	    var shadowId = shadow.attribs.id;
-	    var shadowOpcode = shadow.attribs.type;
-	    fields[fieldName].blocks[shadowId] = {
-	        id: shadowId,
-	        opcode: shadowOpcode,
-	        next: null,
-	        fields: {}
-	    };
+	    // Add the block to the representation tree.
+	    blocks[block.id] = block;
 
-	    // Primitive
-	    var primitive = shadow.children[0];
-	    var primitiveName = primitive.attribs.name;
-	    var primitiveValue = primitive.children[0].data;
-	    fields[fieldName].blocks[shadowId].fields[primitiveName] = {
-	        name: primitiveName,
-	        value: primitiveValue,
-	        blocks: null
-	    };
+	    // Process XML children and find enclosed blocks, fields, etc.
+	    for (var i = 0; i < blockDOM.children.length; i++) {
+	        var xmlChild = blockDOM.children[i];
+	        // Enclosed blocks and shadows
+	        var childBlockNode = null;
+	        var childShadowNode = null;
+	        for (var j = 0; j < xmlChild.children.length; j++) {
+	            var grandChildNode = xmlChild.children[j];
+	            if (!grandChildNode.name) {
+	                // Non-XML tag node.
+	                continue;
+	            }
+	            var grandChildNodeName = grandChildNode.name.toLowerCase();
+	            if (grandChildNodeName == 'block') {
+	                childBlockNode = grandChildNode;
+	            } else if (grandChildNodeName == 'shadow') {
+	                childShadowNode = grandChildNode;
+	            }
+	        }
 
-	    return fields;
+	        // Use shadow block only if there's no real block node.
+	        if (!childBlockNode && childShadowNode) {
+	            childBlockNode = childShadowNode;
+	        }
+
+	        // Not all Blockly-type blocks are handled here,
+	        // as we won't be using all of them for Scratch.
+	        switch (xmlChild.name.toLowerCase()) {
+	        case 'field':
+	            // Add the field to this block.
+	            var fieldName = xmlChild.attribs.name;
+	            block.fields[fieldName] = {
+	                name: fieldName,
+	                value: xmlChild.children[0].data
+	            };
+	            break;
+	        case 'value':
+	        case 'statement':
+	            // Recursively generate block structure for input block.
+	            domToBlock(childBlockNode, blocks, false);
+	            // Link this block's input to the child block.
+	            var inputName = xmlChild.attribs.name;
+	            block.inputs[inputName] = {
+	                name: inputName,
+	                block: childBlockNode.attribs.id
+	            };
+	            break;
+	        case 'next':
+	            if (!childBlockNode || !childBlockNode.attribs) {
+	                // Invalid child block.
+	                continue;
+	            }
+	            // Recursively generate block structure for next block.
+	            domToBlock(childBlockNode, blocks, false);
+	            // Link next block to this block.
+	            block.next = childBlockNode.attribs.id;
+	            break;
+	        }
+	    }
 	}
 
 
 /***/ },
-/* 14 */
+/* 15 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Parser = __webpack_require__(15),
-	    DomHandler = __webpack_require__(22);
+	var Parser = __webpack_require__(16),
+	    DomHandler = __webpack_require__(23);
 
 	function defineProp(name, value){
 		delete module.exports[name];
@@ -2388,26 +2498,26 @@
 
 	module.exports = {
 		Parser: Parser,
-		Tokenizer: __webpack_require__(16),
-		ElementType: __webpack_require__(23),
+		Tokenizer: __webpack_require__(17),
+		ElementType: __webpack_require__(24),
 		DomHandler: DomHandler,
 		get FeedHandler(){
-			return defineProp("FeedHandler", __webpack_require__(26));
+			return defineProp("FeedHandler", __webpack_require__(27));
 		},
 		get Stream(){
-			return defineProp("Stream", __webpack_require__(27));
+			return defineProp("Stream", __webpack_require__(28));
 		},
 		get WritableStream(){
-			return defineProp("WritableStream", __webpack_require__(28));
+			return defineProp("WritableStream", __webpack_require__(29));
 		},
 		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(49));
+			return defineProp("ProxyHandler", __webpack_require__(50));
 		},
 		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(50));
+			return defineProp("DomUtils", __webpack_require__(51));
 		},
 		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(62));
+			return defineProp("CollectingHandler", __webpack_require__(63));
 		},
 		// For legacy support
 		DefaultHandler: DomHandler,
@@ -2448,10 +2558,10 @@
 
 
 /***/ },
-/* 15 */
+/* 16 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Tokenizer = __webpack_require__(16);
+	var Tokenizer = __webpack_require__(17);
 
 	/*
 		Options:
@@ -2806,15 +2916,15 @@
 
 
 /***/ },
-/* 16 */
+/* 17 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Tokenizer;
 
-	var decodeCodePoint = __webpack_require__(17),
-	    entityMap = __webpack_require__(19),
-	    legacyMap = __webpack_require__(20),
-	    xmlMap    = __webpack_require__(21),
+	var decodeCodePoint = __webpack_require__(18),
+	    entityMap = __webpack_require__(20),
+	    legacyMap = __webpack_require__(21),
+	    xmlMap    = __webpack_require__(22),
 
 	    i = 0,
 
@@ -3718,10 +3828,10 @@
 
 
 /***/ },
-/* 17 */
+/* 18 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var decodeMap = __webpack_require__(18);
+	var decodeMap = __webpack_require__(19);
 
 	module.exports = decodeCodePoint;
 
@@ -3750,7 +3860,7 @@
 
 
 /***/ },
-/* 18 */
+/* 19 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -3785,7 +3895,7 @@
 	};
 
 /***/ },
-/* 19 */
+/* 20 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5917,7 +6027,7 @@
 	};
 
 /***/ },
-/* 20 */
+/* 21 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -6030,7 +6140,7 @@
 	};
 
 /***/ },
-/* 21 */
+/* 22 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -6042,14 +6152,14 @@
 	};
 
 /***/ },
-/* 22 */
+/* 23 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(23);
+	var ElementType = __webpack_require__(24);
 
 	var re_whitespace = /\s+/g;
-	var NodePrototype = __webpack_require__(24);
-	var ElementPrototype = __webpack_require__(25);
+	var NodePrototype = __webpack_require__(25);
+	var ElementPrototype = __webpack_require__(26);
 
 	function DomHandler(callback, options, elementCB){
 		if(typeof callback === "object"){
@@ -6230,7 +6340,7 @@
 
 
 /***/ },
-/* 23 */
+/* 24 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -6251,7 +6361,7 @@
 
 
 /***/ },
-/* 24 */
+/* 25 */
 /***/ function(module, exports) {
 
 	// This object will be used as the prototype for Nodes when creating a
@@ -6301,11 +6411,11 @@
 
 
 /***/ },
-/* 25 */
+/* 26 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// DOM-Level-1-compliant structure
-	var NodePrototype = __webpack_require__(24);
+	var NodePrototype = __webpack_require__(25);
 	var ElementPrototype = module.exports = Object.create(NodePrototype);
 
 	var domLvl1 = {
@@ -6327,10 +6437,10 @@
 
 
 /***/ },
-/* 26 */
+/* 27 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var index = __webpack_require__(14),
+	var index = __webpack_require__(15),
 	    DomHandler = index.DomHandler,
 		DomUtils = index.DomUtils;
 
@@ -6428,12 +6538,12 @@
 
 
 /***/ },
-/* 27 */
+/* 28 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(28);
+	var Parser = __webpack_require__(29);
 
 	function Stream(options){
 		Parser.call(this, new Cbs(this), options);
@@ -6447,7 +6557,7 @@
 		this.scope = scope;
 	}
 
-	var EVENTS = __webpack_require__(14).EVENTS;
+	var EVENTS = __webpack_require__(15).EVENTS;
 
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
@@ -6468,13 +6578,13 @@
 	});
 
 /***/ },
-/* 28 */
+/* 29 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(15),
-	    WritableStream = __webpack_require__(29).Writable || __webpack_require__(48).Writable;
+	var Parser = __webpack_require__(16),
+	    WritableStream = __webpack_require__(30).Writable || __webpack_require__(49).Writable;
 
 	function Stream(cbs, options){
 		var parser = this._parser = new Parser(cbs, options);
@@ -6494,7 +6604,7 @@
 	};
 
 /***/ },
-/* 29 */
+/* 30 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -6524,11 +6634,11 @@
 	var inherits = __webpack_require__(5);
 
 	inherits(Stream, EE);
-	Stream.Readable = __webpack_require__(30);
-	Stream.Writable = __webpack_require__(44);
-	Stream.Duplex = __webpack_require__(45);
-	Stream.Transform = __webpack_require__(46);
-	Stream.PassThrough = __webpack_require__(47);
+	Stream.Readable = __webpack_require__(31);
+	Stream.Writable = __webpack_require__(45);
+	Stream.Duplex = __webpack_require__(46);
+	Stream.Transform = __webpack_require__(47);
+	Stream.PassThrough = __webpack_require__(48);
 
 	// Backwards-compat with node 0.4.x
 	Stream.Stream = Stream;
@@ -6627,24 +6737,24 @@
 
 
 /***/ },
-/* 30 */
+/* 31 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(31);
-	exports.Stream = __webpack_require__(29);
+	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(32);
+	exports.Stream = __webpack_require__(30);
 	exports.Readable = exports;
-	exports.Writable = __webpack_require__(40);
-	exports.Duplex = __webpack_require__(39);
-	exports.Transform = __webpack_require__(42);
-	exports.PassThrough = __webpack_require__(43);
+	exports.Writable = __webpack_require__(41);
+	exports.Duplex = __webpack_require__(40);
+	exports.Transform = __webpack_require__(43);
+	exports.PassThrough = __webpack_require__(44);
 	if (!process.browser && process.env.READABLE_STREAM === 'disable') {
-	  module.exports = __webpack_require__(29);
+	  module.exports = __webpack_require__(30);
 	}
 
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 31 */
+/* 32 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -6671,12 +6781,12 @@
 	module.exports = Readable;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(32);
+	var isArray = __webpack_require__(33);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(33).Buffer;
+	var Buffer = __webpack_require__(34).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
@@ -6689,10 +6799,10 @@
 	};
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(29);
+	var Stream = __webpack_require__(30);
 
 	/*<replacement>*/
-	var util = __webpack_require__(37);
+	var util = __webpack_require__(38);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -6700,7 +6810,7 @@
 
 
 	/*<replacement>*/
-	var debug = __webpack_require__(38);
+	var debug = __webpack_require__(39);
 	if (debug && debug.debuglog) {
 	  debug = debug.debuglog('stream');
 	} else {
@@ -6712,7 +6822,7 @@
 	util.inherits(Readable, Stream);
 
 	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(39);
+	  var Duplex = __webpack_require__(40);
 
 	  options = options || {};
 
@@ -6773,14 +6883,14 @@
 	  this.encoding = null;
 	  if (options.encoding) {
 	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(41).StringDecoder;
+	      StringDecoder = __webpack_require__(42).StringDecoder;
 	    this.decoder = new StringDecoder(options.encoding);
 	    this.encoding = options.encoding;
 	  }
 	}
 
 	function Readable(options) {
-	  var Duplex = __webpack_require__(39);
+	  var Duplex = __webpack_require__(40);
 
 	  if (!(this instanceof Readable))
 	    return new Readable(options);
@@ -6883,7 +6993,7 @@
 	// backwards compatibility.
 	Readable.prototype.setEncoding = function(enc) {
 	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(41).StringDecoder;
+	    StringDecoder = __webpack_require__(42).StringDecoder;
 	  this._readableState.decoder = new StringDecoder(enc);
 	  this._readableState.encoding = enc;
 	  return this;
@@ -7602,7 +7712,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 32 */
+/* 33 */
 /***/ function(module, exports) {
 
 	module.exports = Array.isArray || function (arr) {
@@ -7611,7 +7721,7 @@
 
 
 /***/ },
-/* 33 */
+/* 34 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
@@ -7624,9 +7734,9 @@
 
 	'use strict'
 
-	var base64 = __webpack_require__(34)
-	var ieee754 = __webpack_require__(35)
-	var isArray = __webpack_require__(36)
+	var base64 = __webpack_require__(35)
+	var ieee754 = __webpack_require__(36)
+	var isArray = __webpack_require__(37)
 
 	exports.Buffer = Buffer
 	exports.SlowBuffer = SlowBuffer
@@ -9163,10 +9273,10 @@
 	  return i
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33).Buffer, (function() { return this; }())))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer, (function() { return this; }())))
 
 /***/ },
-/* 34 */
+/* 35 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -9296,7 +9406,7 @@
 
 
 /***/ },
-/* 35 */
+/* 36 */
 /***/ function(module, exports) {
 
 	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -9386,7 +9496,7 @@
 
 
 /***/ },
-/* 36 */
+/* 37 */
 /***/ function(module, exports) {
 
 	var toString = {}.toString;
@@ -9397,7 +9507,7 @@
 
 
 /***/ },
-/* 37 */
+/* 38 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9508,16 +9618,16 @@
 	  return Object.prototype.toString.call(o);
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33).Buffer))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer))
 
 /***/ },
-/* 38 */
+/* 39 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 39 */
+/* 40 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9558,12 +9668,12 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(37);
+	var util = __webpack_require__(38);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Readable = __webpack_require__(31);
-	var Writable = __webpack_require__(40);
+	var Readable = __webpack_require__(32);
+	var Writable = __webpack_require__(41);
 
 	util.inherits(Duplex, Readable);
 
@@ -9613,7 +9723,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 40 */
+/* 41 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9644,18 +9754,18 @@
 	module.exports = Writable;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(33).Buffer;
+	var Buffer = __webpack_require__(34).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(37);
+	var util = __webpack_require__(38);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(29);
+	var Stream = __webpack_require__(30);
 
 	util.inherits(Writable, Stream);
 
@@ -9666,7 +9776,7 @@
 	}
 
 	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(39);
+	  var Duplex = __webpack_require__(40);
 
 	  options = options || {};
 
@@ -9754,7 +9864,7 @@
 	}
 
 	function Writable(options) {
-	  var Duplex = __webpack_require__(39);
+	  var Duplex = __webpack_require__(40);
 
 	  // Writable ctor is applied to Duplexes, though they're not
 	  // instanceof Writable, they're instanceof Readable.
@@ -10097,7 +10207,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 41 */
+/* 42 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10121,7 +10231,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__(33).Buffer;
+	var Buffer = __webpack_require__(34).Buffer;
 
 	var isBufferEncoding = Buffer.isEncoding
 	  || function(encoding) {
@@ -10324,7 +10434,7 @@
 
 
 /***/ },
-/* 42 */
+/* 43 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10393,10 +10503,10 @@
 
 	module.exports = Transform;
 
-	var Duplex = __webpack_require__(39);
+	var Duplex = __webpack_require__(40);
 
 	/*<replacement>*/
-	var util = __webpack_require__(37);
+	var util = __webpack_require__(38);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10539,7 +10649,7 @@
 
 
 /***/ },
-/* 43 */
+/* 44 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10569,10 +10679,10 @@
 
 	module.exports = PassThrough;
 
-	var Transform = __webpack_require__(42);
+	var Transform = __webpack_require__(43);
 
 	/*<replacement>*/
-	var util = __webpack_require__(37);
+	var util = __webpack_require__(38);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10590,25 +10700,18 @@
 	};
 
 
-/***/ },
-/* 44 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(40)
-
-
 /***/ },
 /* 45 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(39)
+	module.exports = __webpack_require__(41)
 
 
 /***/ },
 /* 46 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(42)
+	module.exports = __webpack_require__(40)
 
 
 /***/ },
@@ -10620,12 +10723,19 @@
 
 /***/ },
 /* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+	module.exports = __webpack_require__(44)
+
+
+/***/ },
+/* 49 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 49 */
+/* 50 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = ProxyHandler;
@@ -10634,7 +10744,7 @@
 		this._cbs = cbs || {};
 	}
 
-	var EVENTS = __webpack_require__(14).EVENTS;
+	var EVENTS = __webpack_require__(15).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -10657,18 +10767,18 @@
 	});
 
 /***/ },
-/* 50 */
+/* 51 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var DomUtils = module.exports;
 
 	[
-		__webpack_require__(51),
-		__webpack_require__(57),
+		__webpack_require__(52),
 		__webpack_require__(58),
 		__webpack_require__(59),
 		__webpack_require__(60),
-		__webpack_require__(61)
+		__webpack_require__(61),
+		__webpack_require__(62)
 	].forEach(function(ext){
 		Object.keys(ext).forEach(function(key){
 			DomUtils[key] = ext[key].bind(DomUtils);
@@ -10677,11 +10787,11 @@
 
 
 /***/ },
-/* 51 */
+/* 52 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(23),
-	    getOuterHTML = __webpack_require__(52),
+	var ElementType = __webpack_require__(24),
+	    getOuterHTML = __webpack_require__(53),
 	    isTag = ElementType.isTag;
 
 	module.exports = {
@@ -10705,14 +10815,14 @@
 
 
 /***/ },
-/* 52 */
+/* 53 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/*
 	  Module dependencies
 	*/
-	var ElementType = __webpack_require__(53);
-	var entities = __webpack_require__(54);
+	var ElementType = __webpack_require__(54);
+	var entities = __webpack_require__(55);
 
 	/*
 	  Boolean Attributes
@@ -10889,7 +10999,7 @@
 
 
 /***/ },
-/* 53 */
+/* 54 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -10908,11 +11018,11 @@
 	};
 
 /***/ },
-/* 54 */
+/* 55 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var encode = __webpack_require__(55),
-	    decode = __webpack_require__(56);
+	var encode = __webpack_require__(56),
+	    decode = __webpack_require__(57);
 
 	exports.decode = function(data, level){
 		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
@@ -10947,15 +11057,15 @@
 
 
 /***/ },
-/* 55 */
+/* 56 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var inverseXML = getInverseObj(__webpack_require__(21)),
+	var inverseXML = getInverseObj(__webpack_require__(22)),
 	    xmlReplacer = getInverseReplacer(inverseXML);
 
 	exports.XML = getInverse(inverseXML, xmlReplacer);
 
-	var inverseHTML = getInverseObj(__webpack_require__(19)),
+	var inverseHTML = getInverseObj(__webpack_require__(20)),
 	    htmlReplacer = getInverseReplacer(inverseHTML);
 
 	exports.HTML = getInverse(inverseHTML, htmlReplacer);
@@ -11026,13 +11136,13 @@
 
 
 /***/ },
-/* 56 */
+/* 57 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var entityMap = __webpack_require__(19),
-	    legacyMap = __webpack_require__(20),
-	    xmlMap    = __webpack_require__(21),
-	    decodeCodePoint = __webpack_require__(17);
+	var entityMap = __webpack_require__(20),
+	    legacyMap = __webpack_require__(21),
+	    xmlMap    = __webpack_require__(22),
+	    decodeCodePoint = __webpack_require__(18);
 
 	var decodeXMLStrict  = getStrictDecoder(xmlMap),
 	    decodeHTMLStrict = getStrictDecoder(entityMap);
@@ -11103,7 +11213,7 @@
 	};
 
 /***/ },
-/* 57 */
+/* 58 */
 /***/ function(module, exports) {
 
 	var getChildren = exports.getChildren = function(elem){
@@ -11133,7 +11243,7 @@
 
 
 /***/ },
-/* 58 */
+/* 59 */
 /***/ function(module, exports) {
 
 	exports.removeElement = function(elem){
@@ -11216,10 +11326,10 @@
 
 
 /***/ },
-/* 59 */
+/* 60 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var isTag = __webpack_require__(23).isTag;
+	var isTag = __webpack_require__(24).isTag;
 
 	module.exports = {
 		filter: filter,
@@ -11316,10 +11426,10 @@
 
 
 /***/ },
-/* 60 */
+/* 61 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(23);
+	var ElementType = __webpack_require__(24);
 	var isTag = exports.isTag = ElementType.isTag;
 
 	exports.testElement = function(options, element){
@@ -11409,7 +11519,7 @@
 
 
 /***/ },
-/* 61 */
+/* 62 */
 /***/ function(module, exports) {
 
 	// removeSubsets
@@ -11556,7 +11666,7 @@
 
 
 /***/ },
-/* 62 */
+/* 63 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = CollectingHandler;
@@ -11566,7 +11676,7 @@
 		this.events = [];
 	}
 
-	var EVENTS = __webpack_require__(14).EVENTS;
+	var EVENTS = __webpack_require__(15).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -11617,14 +11727,14 @@
 
 
 /***/ },
-/* 63 */
+/* 64 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var normalizeOpts = __webpack_require__(64)
-	  , resolveLength = __webpack_require__(65)
-	  , plain         = __webpack_require__(71);
+	var normalizeOpts = __webpack_require__(65)
+	  , resolveLength = __webpack_require__(66)
+	  , plain         = __webpack_require__(72);
 
 	module.exports = function (fn/*, options*/) {
 		var options = normalizeOpts(arguments[1]), length;
@@ -11634,31 +11744,31 @@
 			if (length !== 0) {
 				if (options.primitive) {
 					if (length === false) {
-						options.normalizer = __webpack_require__(108);
+						options.normalizer = __webpack_require__(109);
 					} else if (length > 1) {
-						options.normalizer = __webpack_require__(109)(length);
+						options.normalizer = __webpack_require__(110)(length);
 					}
 				} else {
-					if (length === false) options.normalizer = __webpack_require__(110)();
-					else if (length === 1) options.normalizer = __webpack_require__(112)();
-					else options.normalizer = __webpack_require__(113)(length);
+					if (length === false) options.normalizer = __webpack_require__(111)();
+					else if (length === 1) options.normalizer = __webpack_require__(113)();
+					else options.normalizer = __webpack_require__(114)(length);
 				}
 			}
 		}
 
 		// Assure extensions
-		if (options.async) __webpack_require__(114);
-		if (options.dispose) __webpack_require__(117);
-		if (options.maxAge) __webpack_require__(118);
-		if (options.max) __webpack_require__(121);
-		if (options.refCounter) __webpack_require__(123);
+		if (options.async) __webpack_require__(115);
+		if (options.dispose) __webpack_require__(118);
+		if (options.maxAge) __webpack_require__(119);
+		if (options.max) __webpack_require__(122);
+		if (options.refCounter) __webpack_require__(124);
 
 		return plain(fn, options);
 	};
 
 
 /***/ },
-/* 64 */
+/* 65 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11681,12 +11791,12 @@
 
 
 /***/ },
-/* 65 */
+/* 66 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(66);
+	var toPosInt = __webpack_require__(67);
 
 	module.exports = function (optsLength, fnLength, isAsync) {
 		var length;
@@ -11702,12 +11812,12 @@
 
 
 /***/ },
-/* 66 */
+/* 67 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toInteger = __webpack_require__(67)
+	var toInteger = __webpack_require__(68)
 
 	  , max = Math.max;
 
@@ -11715,12 +11825,12 @@
 
 
 /***/ },
-/* 67 */
+/* 68 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var sign = __webpack_require__(68)
+	var sign = __webpack_require__(69)
 
 	  , abs = Math.abs, floor = Math.floor;
 
@@ -11733,18 +11843,18 @@
 
 
 /***/ },
-/* 68 */
+/* 69 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(69)()
+	module.exports = __webpack_require__(70)()
 		? Math.sign
-		: __webpack_require__(70);
+		: __webpack_require__(71);
 
 
 /***/ },
-/* 69 */
+/* 70 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11757,7 +11867,7 @@
 
 
 /***/ },
-/* 70 */
+/* 71 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11770,16 +11880,16 @@
 
 
 /***/ },
-/* 71 */
+/* 72 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable      = __webpack_require__(72)
-	  , forEach       = __webpack_require__(73)
-	  , extensions    = __webpack_require__(76)
-	  , configure     = __webpack_require__(77)
-	  , resolveLength = __webpack_require__(65)
+	var callable      = __webpack_require__(73)
+	  , forEach       = __webpack_require__(74)
+	  , extensions    = __webpack_require__(77)
+	  , configure     = __webpack_require__(78)
+	  , resolveLength = __webpack_require__(66)
 
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -11811,7 +11921,7 @@
 
 
 /***/ },
-/* 72 */
+/* 73 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11823,16 +11933,16 @@
 
 
 /***/ },
-/* 73 */
+/* 74 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(74)('forEach');
+	module.exports = __webpack_require__(75)('forEach');
 
 
 /***/ },
-/* 74 */
+/* 75 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Internal method, used by iteration functions.
@@ -11841,8 +11951,8 @@
 
 	'use strict';
 
-	var callable = __webpack_require__(72)
-	  , value    = __webpack_require__(75)
+	var callable = __webpack_require__(73)
+	  , value    = __webpack_require__(76)
 
 	  , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
 	  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
@@ -11867,7 +11977,7 @@
 
 
 /***/ },
-/* 75 */
+/* 76 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11879,24 +11989,24 @@
 
 
 /***/ },
-/* 76 */
+/* 77 */
 /***/ function(module, exports) {
 
 	'use strict';
 
 
 /***/ },
-/* 77 */
+/* 78 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var customError      = __webpack_require__(78)
-	  , defineLength     = __webpack_require__(85)
-	  , d                = __webpack_require__(87)
-	  , ee               = __webpack_require__(92).methods
-	  , resolveResolve   = __webpack_require__(93)
-	  , resolveNormalize = __webpack_require__(107)
+	var customError      = __webpack_require__(79)
+	  , defineLength     = __webpack_require__(86)
+	  , d                = __webpack_require__(88)
+	  , ee               = __webpack_require__(93).methods
+	  , resolveResolve   = __webpack_require__(94)
+	  , resolveNormalize = __webpack_require__(108)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty
@@ -12036,12 +12146,12 @@
 
 
 /***/ },
-/* 78 */
+/* 79 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign = __webpack_require__(79)
+	var assign = __webpack_require__(80)
 
 	  , captureStackTrace = Error.captureStackTrace;
 
@@ -12062,18 +12172,18 @@
 
 
 /***/ },
-/* 79 */
+/* 80 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(80)()
+	module.exports = __webpack_require__(81)()
 		? Object.assign
-		: __webpack_require__(81);
+		: __webpack_require__(82);
 
 
 /***/ },
-/* 80 */
+/* 81 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12088,13 +12198,13 @@
 
 
 /***/ },
-/* 81 */
+/* 82 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var keys  = __webpack_require__(82)
-	  , value = __webpack_require__(75)
+	var keys  = __webpack_require__(83)
+	  , value = __webpack_require__(76)
 
 	  , max = Math.max;
 
@@ -12116,18 +12226,18 @@
 
 
 /***/ },
-/* 82 */
+/* 83 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(83)()
+	module.exports = __webpack_require__(84)()
 		? Object.keys
-		: __webpack_require__(84);
+		: __webpack_require__(85);
 
 
 /***/ },
-/* 83 */
+/* 84 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12141,7 +12251,7 @@
 
 
 /***/ },
-/* 84 */
+/* 85 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12154,12 +12264,12 @@
 
 
 /***/ },
-/* 85 */
+/* 86 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(66)
+	var toPosInt = __webpack_require__(67)
 
 	  , test = function (a, b) {}, desc, defineProperty
 	  , generate, mixin;
@@ -12180,7 +12290,7 @@
 			return defineProperty(fn, 'length', desc);
 		};
 	} else {
-		mixin = __webpack_require__(86);
+		mixin = __webpack_require__(87);
 		generate = (function () {
 			var cache = [];
 			return function (l) {
@@ -12204,12 +12314,12 @@
 
 
 /***/ },
-/* 86 */
+/* 87 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var value = __webpack_require__(75)
+	var value = __webpack_require__(76)
 
 	  , defineProperty = Object.defineProperty
 	  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
@@ -12229,15 +12339,15 @@
 
 
 /***/ },
-/* 87 */
+/* 88 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign        = __webpack_require__(79)
-	  , normalizeOpts = __webpack_require__(64)
-	  , isCallable    = __webpack_require__(88)
-	  , contains      = __webpack_require__(89)
+	var assign        = __webpack_require__(80)
+	  , normalizeOpts = __webpack_require__(65)
+	  , isCallable    = __webpack_require__(89)
+	  , contains      = __webpack_require__(90)
 
 	  , d;
 
@@ -12298,7 +12408,7 @@
 
 
 /***/ },
-/* 88 */
+/* 89 */
 /***/ function(module, exports) {
 
 	// Deprecated
@@ -12309,18 +12419,18 @@
 
 
 /***/ },
-/* 89 */
+/* 90 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(90)()
+	module.exports = __webpack_require__(91)()
 		? String.prototype.contains
-		: __webpack_require__(91);
+		: __webpack_require__(92);
 
 
 /***/ },
-/* 90 */
+/* 91 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12334,7 +12444,7 @@
 
 
 /***/ },
-/* 91 */
+/* 92 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12347,13 +12457,13 @@
 
 
 /***/ },
-/* 92 */
+/* 93 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var d        = __webpack_require__(87)
-	  , callable = __webpack_require__(72)
+	var d        = __webpack_require__(88)
+	  , callable = __webpack_require__(73)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, defineProperty = Object.defineProperty
@@ -12485,13 +12595,13 @@
 
 
 /***/ },
-/* 93 */
+/* 94 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toArray  = __webpack_require__(94)
-	  , callable = __webpack_require__(72)
+	var toArray  = __webpack_require__(95)
+	  , callable = __webpack_require__(73)
 
 	  , slice = Array.prototype.slice
 	  , resolveArgs;
@@ -12512,12 +12622,12 @@
 
 
 /***/ },
-/* 94 */
+/* 95 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var from = __webpack_require__(95)
+	var from = __webpack_require__(96)
 
 	  , isArray = Array.isArray;
 
@@ -12527,18 +12637,18 @@
 
 
 /***/ },
-/* 95 */
+/* 96 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(96)()
+	module.exports = __webpack_require__(97)()
 		? Array.from
-		: __webpack_require__(97);
+		: __webpack_require__(98);
 
 
 /***/ },
-/* 96 */
+/* 97 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12553,18 +12663,18 @@
 
 
 /***/ },
-/* 97 */
+/* 98 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var iteratorSymbol = __webpack_require__(98).iterator
-	  , isArguments    = __webpack_require__(103)
-	  , isFunction     = __webpack_require__(104)
-	  , toPosInt       = __webpack_require__(66)
-	  , callable       = __webpack_require__(72)
-	  , validValue     = __webpack_require__(75)
-	  , isString       = __webpack_require__(106)
+	var iteratorSymbol = __webpack_require__(99).iterator
+	  , isArguments    = __webpack_require__(104)
+	  , isFunction     = __webpack_require__(105)
+	  , toPosInt       = __webpack_require__(67)
+	  , callable       = __webpack_require__(73)
+	  , validValue     = __webpack_require__(76)
+	  , isString       = __webpack_require__(107)
 
 	  , isArray = Array.isArray, call = Function.prototype.call
 	  , desc = { configurable: true, enumerable: true, writable: true, value: null }
@@ -12665,16 +12775,16 @@
 
 
 /***/ },
-/* 98 */
+/* 99 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(99)() ? Symbol : __webpack_require__(100);
+	module.exports = __webpack_require__(100)() ? Symbol : __webpack_require__(101);
 
 
 /***/ },
-/* 99 */
+/* 100 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12698,15 +12808,15 @@
 
 
 /***/ },
-/* 100 */
+/* 101 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
 
 	'use strict';
 
-	var d              = __webpack_require__(87)
-	  , validateSymbol = __webpack_require__(101)
+	var d              = __webpack_require__(88)
+	  , validateSymbol = __webpack_require__(102)
 
 	  , create = Object.create, defineProperties = Object.defineProperties
 	  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
@@ -12811,12 +12921,12 @@
 
 
 /***/ },
-/* 101 */
+/* 102 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var isSymbol = __webpack_require__(102);
+	var isSymbol = __webpack_require__(103);
 
 	module.exports = function (value) {
 		if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
@@ -12825,7 +12935,7 @@
 
 
 /***/ },
-/* 102 */
+/* 103 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12836,7 +12946,7 @@
 
 
 /***/ },
-/* 103 */
+/* 104 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12849,14 +12959,14 @@
 
 
 /***/ },
-/* 104 */
+/* 105 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
 	var toString = Object.prototype.toString
 
-	  , id = toString.call(__webpack_require__(105));
+	  , id = toString.call(__webpack_require__(106));
 
 	module.exports = function (f) {
 		return (typeof f === "function") && (toString.call(f) === id);
@@ -12864,7 +12974,7 @@
 
 
 /***/ },
-/* 105 */
+/* 106 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12873,7 +12983,7 @@
 
 
 /***/ },
-/* 106 */
+/* 107 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12889,12 +12999,12 @@
 
 
 /***/ },
-/* 107 */
+/* 108 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable = __webpack_require__(72);
+	var callable = __webpack_require__(73);
 
 	module.exports = function (userNormalizer) {
 		var normalizer;
@@ -12912,7 +13022,7 @@
 
 
 /***/ },
-/* 108 */
+/* 109 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12927,7 +13037,7 @@
 
 
 /***/ },
-/* 109 */
+/* 110 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12945,12 +13055,12 @@
 
 
 /***/ },
-/* 110 */
+/* 111 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(111)
+	var indexOf = __webpack_require__(112)
 	  , create = Object.create;
 
 	module.exports = function () {
@@ -13039,13 +13149,13 @@
 
 
 /***/ },
-/* 111 */
+/* 112 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(66)
-	  , value    = __webpack_require__(75)
+	var toPosInt = __webpack_require__(67)
+	  , value    = __webpack_require__(76)
 
 	  , indexOf = Array.prototype.indexOf
 	  , hasOwnProperty = Object.prototype.hasOwnProperty
@@ -13074,12 +13184,12 @@
 
 
 /***/ },
-/* 112 */
+/* 113 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(111);
+	var indexOf = __webpack_require__(112);
 
 	module.exports = function () {
 		var lastId = 0, argsMap = [], cache = [];
@@ -13109,12 +13219,12 @@
 
 
 /***/ },
-/* 113 */
+/* 114 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(111)
+	var indexOf = __webpack_require__(112)
 	  , create = Object.create;
 
 	module.exports = function (length) {
@@ -13186,23 +13296,23 @@
 
 
 /***/ },
-/* 114 */
+/* 115 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Support for asynchronous functions
 
 	'use strict';
 
-	var aFrom        = __webpack_require__(95)
-	  , mixin        = __webpack_require__(86)
-	  , defineLength = __webpack_require__(85)
-	  , nextTick     = __webpack_require__(115)
+	var aFrom        = __webpack_require__(96)
+	  , mixin        = __webpack_require__(87)
+	  , defineLength = __webpack_require__(86)
+	  , nextTick     = __webpack_require__(116)
 
 	  , slice = Array.prototype.slice
 	  , apply = Function.prototype.apply, create = Object.create
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
-	__webpack_require__(76).async = function (tbi, conf) {
+	__webpack_require__(77).async = function (tbi, conf) {
 		var waiting = create(null), cache = create(null)
 		  , base = conf.memoized, original = conf.original
 		  , currentCallback, currentContext, currentArgs;
@@ -13338,7 +13448,7 @@
 
 
 /***/ },
-/* 115 */
+/* 116 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process, setImmediate) {'use strict';
@@ -13406,10 +13516,10 @@
 		return null;
 	}());
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(116).setImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(117).setImmediate))
 
 /***/ },
-/* 116 */
+/* 117 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(3).nextTick;
@@ -13488,19 +13598,19 @@
 	exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
 	  delete immediateIds[id];
 	};
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(116).setImmediate, __webpack_require__(116).clearImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117).setImmediate, __webpack_require__(117).clearImmediate))
 
 /***/ },
-/* 117 */
+/* 118 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Call dispose callback on each cache purge
 
 	'use strict';
 
-	var callable   = __webpack_require__(72)
-	  , forEach    = __webpack_require__(73)
-	  , extensions = __webpack_require__(76)
+	var callable   = __webpack_require__(73)
+	  , forEach    = __webpack_require__(74)
+	  , extensions = __webpack_require__(77)
 
 	  , slice = Array.prototype.slice, apply = Function.prototype.apply;
 
@@ -13524,18 +13634,18 @@
 
 
 /***/ },
-/* 118 */
+/* 119 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Timeout cached values
 
 	'use strict';
 
-	var aFrom      = __webpack_require__(95)
-	  , noop       = __webpack_require__(105)
-	  , forEach    = __webpack_require__(73)
-	  , timeout    = __webpack_require__(119)
-	  , extensions = __webpack_require__(76)
+	var aFrom      = __webpack_require__(96)
+	  , noop       = __webpack_require__(106)
+	  , forEach    = __webpack_require__(74)
+	  , timeout    = __webpack_require__(120)
+	  , extensions = __webpack_require__(77)
 
 	  , max = Math.max, min = Math.min, create = Object.create;
 
@@ -13600,13 +13710,13 @@
 
 
 /***/ },
-/* 119 */
+/* 120 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt   = __webpack_require__(66)
-	  , maxTimeout = __webpack_require__(120);
+	var toPosInt   = __webpack_require__(67)
+	  , maxTimeout = __webpack_require__(121);
 
 	module.exports = function (value) {
 		value = toPosInt(value);
@@ -13616,7 +13726,7 @@
 
 
 /***/ },
-/* 120 */
+/* 121 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -13625,16 +13735,16 @@
 
 
 /***/ },
-/* 121 */
+/* 122 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Limit cache size, LRU (least recently used) algorithm.
 
 	'use strict';
 
-	var toPosInteger = __webpack_require__(66)
-	  , lruQueue     = __webpack_require__(122)
-	  , extensions   = __webpack_require__(76);
+	var toPosInteger = __webpack_require__(67)
+	  , lruQueue     = __webpack_require__(123)
+	  , extensions   = __webpack_require__(77);
 
 	extensions.max = function (max, conf, options) {
 		var postfix, queue, hit;
@@ -13657,12 +13767,12 @@
 
 
 /***/ },
-/* 122 */
+/* 123 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(66)
+	var toPosInt = __webpack_require__(67)
 
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -13711,15 +13821,15 @@
 
 
 /***/ },
-/* 123 */
+/* 124 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Reference counter, useful for garbage collector like functionality
 
 	'use strict';
 
-	var d          = __webpack_require__(87)
-	  , extensions = __webpack_require__(76)
+	var d          = __webpack_require__(88)
+	  , extensions = __webpack_require__(77)
 
 	  , create = Object.create, defineProperties = Object.defineProperties;
 
diff --git a/vm.min.js b/vm.min.js
index 76b9e3767..7a06ccf04 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,10 +1,10 @@
-!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.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId){if("stackclick"===e.element)return void t.runtime.toggleStack(e.blockId);switch(e.type){case"create":t.runtime.createBlock(a(e),!1);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.runtime.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldField:e.oldInputName,newParent:e.newParentId,newField:e.newInputName});break;case"delete":t.runtime.deleteBlock({id:e.blockId})}}},t.flyoutBlockListener=function(e){switch(e.type){case"create":t.runtime.createBlock(a(e),!0);break;case"change":t.runtime.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.runtime.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(13);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.blocks={},this.stacks=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(7),s=r(9),a=r(2),c={scratch3:r(11),wedo2:r(12)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype.createBlock=function(t,e){this.blocks[t.id]=t;for(var r in t.fields){var n=t.fields[r].blocks;for(var i in n){var o=n[i];this.blocks[o.id]=o}}e||this.stacks.push(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this.blocks[t.id]&&"undefined"!=typeof this.blocks[t.id].fields[t.name]&&(this.blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){var e=this;void 0===t.newParent&&void 0!==t.oldParent?(e.stacks.push(t.id),void 0===t.oldField?e.blocks[t.oldParent].next=null:delete e.blocks[t.oldParent].fields[t.oldField]):void 0!==t.newParent&&(e._deleteStack(t.id),void 0===t.newField?e.blocks[t.newParent].next=t.id:e.blocks[t.newParent].fields[t.newField]={name:t.newField,value:t.id,blocks:{}})},n.prototype.deleteBlock=function(t){var e=this.blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.fields)if("SUBSTACK"===r)this.deleteBlock({id:e.fields[r].value});else for(var n in e.fields[r].blocks)this.deleteBlock({id:n});this._deleteStack(t.id),delete this.blocks[t.id]},n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.stacks.length;e++){var r=this.stacks[e];"event_whenflagclicked"===this.blocks[r].opcode&&this._pushThread(this.stacks[e])}},n.prototype.startDistanceSensors=function(){for(var t=0;t<this.stacks.length;t++){var e=this.stacks[t];if("wedo_whendistanceclose"===this.blocks[e].opcode){for(var r=!1,n=0;n<this.threads.length;n++)this.threads[n].topBlock===e&&(r=!0);r||this._pushThread(this.stacks[t])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},n.prototype._deleteStack=function(t){var e=this.stacks.indexOf(t);e>-1&&this.stacks.splice(e,1)},n.prototype._getNextBlock=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].next},n.prototype._getSubstack=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].fields.SUBSTACK},n.prototype._getOpcode=function(t){return"undefined"==typeof this.blocks[t]?null:this.blocks[t].opcode},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks[r])return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime._getNextBlock(r);var n=this.runtime._getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime._getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=0;e<c.runtime.stacks.length;e++){var r=c.runtime.stacks[e],n=c.runtime.blocks[r],i=t(n);if(i){for(var o=!1,s=0;s<c.runtime.threads.length;s++)if(c.runtime.threads[s].topBlock==r){o=!0;break}o||c.runtime._pushThread(r)}}},h=!1,f=function(){var e=c.runtime._getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks[r].fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(8);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(10);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){var e={},r=t[0],n=r.attribs.name;e[n]={name:n,value:null,blocks:{}};var i=r.children[0],o=i.attribs.id,s=i.attribs.type;e[n].blocks[o]={id:o,opcode:s,next:null,fields:{}};var a=i.children[0],c=a.attribs.name,u=a.children[0].data;return e[n].blocks[o].fields[c]={name:c,value:u,blocks:null},e}var i=r(14),o=r(63),s=o(i.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){if("object"==typeof t&&"string"==typeof t.blockId&&"object"==typeof t.xml){var e={id:t.blockId,opcode:null,next:null,fields:{}};return"object"==typeof t.xml.attributes&&(e.opcode=t.xml.attributes.type.value),"string"!=typeof t.xml.innerHTML?e:""===t.xml.innerHTML?e:(e.fields=n(s(t.xml.innerHTML)),e)}}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(15),o=r(22);t.exports={Parser:i,Tokenizer:r(16),ElementType:r(23),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(26))},get Stream(){return n("Stream",r(27))},get WritableStream(){return n("WritableStream",r(28))},get ProxyHandler(){return n("ProxyHandler",r(49))},get DomUtils(){return n("DomUtils",r(50))},get CollectingHandler(){return n("CollectingHandler",r(62))},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(16),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(17),u=r(19),l=r(20),h=r(21),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,P=f++,U=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,
-this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(18);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(23),o=/\s+/g,s=r(24),a=r(25),c={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(24),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(14),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(28);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(14).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(15),o=r(29).Writable||r(48).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(30),n.Writable=r(44),n.Duplex=r(45),n.Transform=r(46),n.PassThrough=r(47),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(31),e.Stream=r(29),e.Readable=e,e.Writable=r(40),e.Duplex=r(39),e.Transform=r(42),e.PassThrough=r(43),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(29))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(39);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&&(L||(L=r(41).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(39);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(32),E=r(33).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(29),A=r(37);A.inherits=r(5);var L,O=r(38);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(41).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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.blocks=new s,t.runtime=new a(t.blocks),t.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId){if("stackclick"===e.element)return void t.runtime.toggleStack(e.blockId);switch(e.type){case"create":for(var r=c(e),n=0;n<r.length;n++)t.blocks.createBlock(r[n],!1);break;case"change":t.blocks.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.blocks.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldInput:e.oldInputName,newParent:e.newParentId,newInput:e.newInputName});break;case"delete":t.blocks.deleteBlock({id:e.blockId})}}},t.flyoutBlockListener=function(e){switch(e.type){case"create":for(var r=c(e),n=0;n<r.length;n++)t.blocks.createBlock(r[n],!0);break;case"change":t.blocks.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.blocks.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(7),c=r(14);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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 r(){this._blocks={},this._stacks=[]}r.prototype.getBlock=function(t){return this._blocks[t]},r.prototype.getStacks=function(){return this._stacks},r.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},r.prototype.getSubstack=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var n="SUBSTACK";return e>1&&(n+=e),n in r.inputs?r.inputs[n].block:null},r.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},r.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},r.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},r.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},r.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},r.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},r.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=r},function(t,e,r){function n(t){i.call(this),this.blocks=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(8),s=r(10),a=r(2),c={scratch3:r(12),wedo2:r(13)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=this.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r];"event_whenflagclicked"===this.blocks.getBlock(n).opcode&&this._pushThread(e[r])}},n.prototype.startDistanceSensors=function(){for(var t=this.blocks.getStacks(),e=0;e<t.length;e++){var r=t[e];if("wedo_whendistanceclose"===this.blocks.getBlock(r).opcode){for(var n=!1,i=0;i<this.threads.length;i++)this.threads[i].topBlock===r&&(n=!0);n||this._pushThread(t[e])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks.getBlock(r))return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime.blocks.getNextBlock(r);var n=this.runtime.blocks.getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime.blocks.getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=c.runtime.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r],i=c.runtime.blocks.getBlock(n),o=t(i);if(o){for(var s=!1,a=0;a<c.runtime.threads.length;a++)if(c.runtime.threads[a].topBlock==n){s=!0;break}s||c.runtime._pushThread(n)}}},h=!1,f=function(){var e=c.runtime.blocks.getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks.getBlock(r).fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(9);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(11);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var l=s.children[u];if(l.name){var h=l.name.toLowerCase();"block"==h?a=l:"shadow"==h&&(c=l)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name;n.fields[f]={name:f,value:s.children[0].data};break;case"value":case"statement":i(a,e,!1);var p=s.attribs.name;n.inputs[p]={name:p,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(15),s=r(64),a=s(o.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(a(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(16),o=r(23);t.exports={Parser:i,Tokenizer:r(17),ElementType:r(24),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(27))},get Stream(){return n("Stream",r(28))},get WritableStream(){return n("WritableStream",r(29))},get ProxyHandler(){return n("ProxyHandler",r(50))},get DomUtils(){return n("DomUtils",r(51))},get CollectingHandler(){return n("CollectingHandler",r(63))},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(17),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(18),u=r(20),l=r(21),h=r(22),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,U=f++,P=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,
+this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",U,L),a.prototype._stateBeforeCdata5=o("A",P,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===P?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(19);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(24),o=/\s+/g,s=r(25),a=r(26),c={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(25),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(15),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(29);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(15).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(16),o=r(30).Writable||r(49).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(31),n.Writable=r(45),n.Duplex=r(46),n.Transform=r(47),n.PassThrough=r(48),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(32),e.Stream=r(30),e.Readable=e,e.Writable=r(41),e.Duplex=r(40),e.Transform=r(43),e.PassThrough=r(44),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(30))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(40);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&&(L||(L=r(42).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(40);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(33),E=r(34).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(30),A=r(38);A.inherits=r(5);var L,O=r(39);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(42).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return I(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(34),J=r(35),X=r(36);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(33).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(33).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(37);a.inherits=r(5);var c=r(31),u=r(40);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(39);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(39);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(33).Buffer;o.WritableState=i;var S=r(37);S.inherits=r(5);var x=r(29);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(33).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(39),c=r(37);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(42),o=r(37);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(39)},function(t,e,r){t.exports=r(42)},function(t,e,r){t.exports=r(43)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(51),r(57),r(58),r(59),r(60),r(61)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(23),s=r(52),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(53),l=r(54),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(55),i=r(56);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(21)),l=i(u);e.XML=a(u,l);var h=n(r(19)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(19),a=r(20),c=r(21),u=r(17),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(23).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(23),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(14).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(64),i=r(65),o=r(71);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(108):e>1&&(s.normalizer=r(109)(e)):e===!1?s.normalizer=r(110)():1===e?s.normalizer=r(112)():s.normalizer=r(113)(e))),s.async&&r(114),s.dispose&&r(117),s.maxAge&&r(118),s.max&&r(121),s.refCounter&&r(123),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(66);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(67),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(68),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(69)()?Math.sign:r(70)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(72),i=r(73),o=r(76),s=r(77),a=r(65),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(74)("forEach")},function(t,e,r){"use strict";var n=r(72),i=r(75),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(78),i=r(85),o=r(87),s=r(92).methods,a=r(93),c=r(107),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(79),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(80)()?Object.assign:r(81)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(82),i=r(75),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(83)()?Object.keys:r(84)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(66),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(86),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(75),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(79),o=r(64),s=r(88),a=r(89);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(90)()?String.prototype.contains:r(91)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(87),h=r(72),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(94),o=r(72),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(95),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(96)()?Array.from:r(97)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(98).iterator,i=r(103),o=r(104),s=r(66),a=r(72),c=r(75),u=r(106),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(99)()?Symbol:r(100)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(87),a=r(101),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(102);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(105));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(72);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(111),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(66),i=r(75),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(111);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(111),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(95),i=r(86),o=r(85),s=r(115),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(76).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(116).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(116).setImmediate,r(116).clearImmediate)},function(t,e,r){"use strict";var n=r(72),i=r(73),o=r(76),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(95),i=r(105),o=r(73),s=r(119),a=r(76),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(66),i=r(120);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(66),i=r(122),o=r(76);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(66),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(87),i=r(76),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}}]);
\ No newline at end of file
+"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return I(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function U(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(35),J=r(36),X=r(37);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(34).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(34).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(38);a.inherits=r(5);var c=r(32),u=r(41);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(40);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(40);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(34).Buffer;o.WritableState=i;var S=r(38);S.inherits=r(5);var x=r(30);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(34).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(40),c=r(38);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(43),o=r(38);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(41)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(43)},function(t,e,r){t.exports=r(44)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(15).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(52),r(58),r(59),r(60),r(61),r(62)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(24),s=r(53),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(54),l=r(55),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(56),i=r(57);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(22)),l=i(u);e.XML=a(u,l);var h=n(r(20)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(20),a=r(21),c=r(22),u=r(18),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(24).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(24),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(15).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(65),i=r(66),o=r(72);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(109):e>1&&(s.normalizer=r(110)(e)):e===!1?s.normalizer=r(111)():1===e?s.normalizer=r(113)():s.normalizer=r(114)(e))),s.async&&r(115),s.dispose&&r(118),s.maxAge&&r(119),s.max&&r(122),s.refCounter&&r(124),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(67);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(68),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(69),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(70)()?Math.sign:r(71)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(73),i=r(74),o=r(77),s=r(78),a=r(66),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(75)("forEach")},function(t,e,r){"use strict";var n=r(73),i=r(76),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(79),i=r(86),o=r(88),s=r(93).methods,a=r(94),c=r(108),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(80),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(81)()?Object.assign:r(82)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(83),i=r(76),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(84)()?Object.keys:r(85)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(67),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(87),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(76),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(80),o=r(65),s=r(89),a=r(90);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(91)()?String.prototype.contains:r(92)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(88),h=r(73),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(95),o=r(73),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(96),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(97)()?Array.from:r(98)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(99).iterator,i=r(104),o=r(105),s=r(67),a=r(73),c=r(76),u=r(107),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(100)()?Symbol:r(101)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(88),a=r(102),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(103);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(106));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(73);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(112),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(67),i=r(76),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(112);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(112),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(96),i=r(87),o=r(86),s=r(116),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(77).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(117).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(117).setImmediate,r(117).clearImmediate)},function(t,e,r){"use strict";var n=r(73),i=r(74),o=r(77),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(96),i=r(106),o=r(74),s=r(120),a=r(77),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(67),i=r(121);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(67),i=r(123),o=r(77);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(67),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(88),i=r(77),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}}]);
\ No newline at end of file

From cb4dd7b5116678e1f5cd1fe6b79d5ef2cda72607 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 20:26:58 -0400
Subject: [PATCH 044/302] Add zoom options to playground

---
 playground/playground.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/playground/playground.js b/playground/playground.js
index 1cc5a4b2e..b2bf0d0db 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -7,6 +7,11 @@ window.onload = function() {
     var workspace = window.Blockly.inject('blocks', {
         toolbox: toolbox,
         media: '../node_modules/scratch-blocks/media/',
+        zoom: {
+            controls: true,
+            wheel: true,
+            startScale: 0.75
+        },
         colours: {
             workspace: '#334771',
             flyout: '#283856',

From f2734950d72a347b9bbd943c3adadf5c7760d57b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 20:44:08 -0400
Subject: [PATCH 045/302] Add tab to VM playground to show threads

---
 playground/index.html     | 10 +++++++++-
 playground/playground.css |  9 ++++++++-
 playground/playground.js  | 34 +++++++++++++++++++++++++++++++---
 3 files changed, 48 insertions(+), 5 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 87cef30b3..3d10a22d0 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -12,8 +12,16 @@
         <h2>Scratch VM Playground</h2>
         <button id="greenflag">Green flag</button>
         <button id="stopall">Stop</button>
+        <p>
+            <a id="threadexplorer-link" href="#">VM Threads</a><br />
+            <a id="blockexplorer-link" href="#">VM Block Representation</a>
+        </p>
+        <div id="tab-threadexplorer">
+            Thread explorer
+            <pre id="threadexplorer"></pre>
+        </div>
         <div id="tab-blockexplorer">
-            <h3>VM Block Representation</h3>
+            Block explorer
             <pre id="blockexplorer"></pre>
         </div>
     </div>
diff --git a/playground/playground.css b/playground/playground.css
index b20b2bd91..451a7cad5 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -1,6 +1,9 @@
 body {
     background: rgb(36,36,36);
 }
+a {
+    color: rgb(217,217,217);
+}
 #blocks {
     position: absolute;
     left: 40%;
@@ -17,7 +20,7 @@ body {
     bottom: 0;
     width: 35%;
 }
-#blockexplorer {
+#blockexplorer, #threadexplorer {
     position: absolute;
     width: 100%;
     height: 75%;
@@ -28,3 +31,7 @@ body {
     font-family: monospace;
     font-size: 10pt;
 }
+
+#tab-blockexplorer {
+    display: none;
+}
diff --git a/playground/playground.js b/playground/playground.js
index b2bf0d0db..d47f097a7 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -29,13 +29,26 @@ window.onload = function() {
     // Block events.
     workspace.addChangeListener(vm.blockListener);
 
-    var explorer = document.getElementById('blockexplorer');
+    var blockexplorer = document.getElementById('blockexplorer');
     workspace.addChangeListener(function() {
         // On a change, update the block explorer.
-        explorer.innerHTML = JSON.stringify(vm.runtime.blocks, null, 2);
-        window.hljs.highlightBlock(explorer);
+        blockexplorer.innerHTML = JSON.stringify(vm.runtime.blocks, null, 2);
+        window.hljs.highlightBlock(blockexplorer);
     });
 
+    var threadexplorer = document.getElementById('threadexplorer');
+    var cachedThreadJSON = '';
+    var updateThreadExplorer = function () {
+        var newJSON = JSON.stringify(vm.runtime.threads, null, 2);
+        if (newJSON != cachedThreadJSON) {
+            cachedThreadJSON = newJSON;
+            threadexplorer.innerHTML = cachedThreadJSON;
+            window.hljs.highlightBlock(threadexplorer);
+        }
+        window.requestAnimationFrame(updateThreadExplorer);
+    };
+    updateThreadExplorer();
+
     // Feedback for stacks running.
     vm.runtime.on('STACK_GLOW_ON', function(blockId) {
         workspace.glowStack(blockId, true);
@@ -54,4 +67,19 @@ window.onload = function() {
     document.getElementById('stopall').addEventListener('click', function() {
         vm.runtime.stopAll();
     });
+
+    var tabBlockExplorer = document.getElementById('tab-blockexplorer');
+    var tabThreadExplorer = document.getElementById('tab-threadexplorer');
+
+    // Handlers to show different explorers.
+    document.getElementById('threadexplorer-link').addEventListener('click',
+        function () {
+            tabBlockExplorer.style.display = 'none';
+            tabThreadExplorer.style.display = 'block';
+        });
+    document.getElementById('blockexplorer-link').addEventListener('click',
+        function () {
+            tabBlockExplorer.style.display = 'block';
+            tabThreadExplorer.style.display = 'none';
+        });
 };

From 5767e05d569baa6be9cff3965e9ae2c72e52a7bf Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 20:59:34 -0400
Subject: [PATCH 046/302] Add block-by-block feedback to the VM playground

---
 playground/playground.js | 9 ++++++++-
 src/engine/runtime.js    | 8 +++++++-
 src/engine/sequencer.js  | 5 +++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index d47f097a7..2b3cb28c4 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -49,13 +49,20 @@ window.onload = function() {
     };
     updateThreadExplorer();
 
-    // Feedback for stacks running.
+    // Feedback for stacks and blocks running.
     vm.runtime.on('STACK_GLOW_ON', function(blockId) {
         workspace.glowStack(blockId, true);
     });
     vm.runtime.on('STACK_GLOW_OFF', function(blockId) {
         workspace.glowStack(blockId, false);
     });
+    vm.runtime.on('BLOCK_GLOW_ON', function(blockId) {
+        workspace.glowBlock(blockId, true);
+    });
+    vm.runtime.on('BLOCK_GLOW_OFF', function(blockId) {
+        workspace.glowBlock(blockId, false);
+    });
+
 
     // Run threads
     vm.runtime.start();
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 9531eadc7..c4aa06e49 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -199,7 +199,13 @@ Runtime.prototype.startDistanceSensors = function () {
 Runtime.prototype.stopAll = function () {
     var threadsCopy = this.threads.slice();
     while (threadsCopy.length > 0) {
-        this._removeThread(threadsCopy.pop());
+        var poppedThread = threadsCopy.pop();
+        // Unglow any blocks on this thread's stack.
+        for (var i = 0; i < poppedThread.stack.length; i++) {
+            this.glowBlock(poppedThread.stack[i], false);
+        }
+        // Actually remove the thread.
+        this._removeThread(poppedThread);
     }
     // @todo call stop function in all extensions/packages/WeDo stub
     if (window.native) {
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 95a28f7bf..2f1126d43 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -134,6 +134,8 @@ Sequencer.prototype.stepThread = function (thread) {
         // Pop the stack and stack frame
         thread.stack.pop();
         thread.stackFrames.pop();
+        // Stop showing run feedback in the editor.
+        instance.runtime.glowBlock(currentBlock, false);
     };
 
     /**
@@ -199,6 +201,9 @@ Sequencer.prototype.stepThread = function (thread) {
         }
     }
 
+    // Start showing run feedback in the editor.
+    this.runtime.glowBlock(currentBlock, true);
+
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + currentBlock);
     }

From c1e30cf2ee342217eaa1bb85b45eb41d3ca95bfd Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 7 Jun 2016 21:05:32 -0400
Subject: [PATCH 047/302] Add sequencer-level debug console logs

---
 .eslintrc               |  2 +-
 src/blocks/scratch3.js  |  7 -------
 src/blocks/wedo2.js     |  2 --
 src/engine/sequencer.js | 19 ++++++++++++++++++-
 4 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/.eslintrc b/.eslintrc
index 0d67347a8..aacaef356 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -8,7 +8,7 @@
         "max-len": [2, 80, 4],
         "semi": [2, "always"],
         "strict": [2, "never"],
-        "no-console": [2, {"allow": ["log", "warn", "error"]}]
+        "no-console": [2, {"allow": ["log", "warn", "error", "groupCollapsed", "groupEnd"]}]
     },
     "env": {
         "node": true,
diff --git a/src/blocks/scratch3.js b/src/blocks/scratch3.js
index 6bf327642..a2f132532 100644
--- a/src/blocks/scratch3.js
+++ b/src/blocks/scratch3.js
@@ -23,7 +23,6 @@ Scratch3Blocks.prototype.getPrimitives = function() {
 };
 
 Scratch3Blocks.prototype.repeat = function(argValues, util) {
-    console.log('Running: control_repeat');
     // Initialize loop
     if (util.stackFrame.loopCounter === undefined) {
         util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
@@ -37,12 +36,10 @@ Scratch3Blocks.prototype.repeat = function(argValues, util) {
 };
 
 Scratch3Blocks.prototype.forever = function(argValues, util) {
-    console.log('Running: control_forever');
     util.startSubstack();
 };
 
 Scratch3Blocks.prototype.wait = function(argValues, util) {
-    console.log('Running: control_wait');
     util.yield();
     util.timeout(function() {
         util.done();
@@ -50,23 +47,19 @@ Scratch3Blocks.prototype.wait = function(argValues, util) {
 };
 
 Scratch3Blocks.prototype.stop = function() {
-    console.log('Running: control_stop');
     // @todo - don't use this.runtime
     this.runtime.stopAll();
 };
 
 Scratch3Blocks.prototype.whenFlagClicked = function() {
-    console.log('Running: event_whenflagclicked');
     // No-op
 };
 
 Scratch3Blocks.prototype.whenBroadcastReceived = function() {
-    console.log('Running: event_whenbroadcastreceived');
     // No-op
 };
 
 Scratch3Blocks.prototype.broadcast = function(argValues, util) {
-    console.log('Running: event_broadcast');
     util.startHats(function(hat) {
         if (hat.opcode === 'event_whenbroadcastreceived') {
             var shadows = hat.fields.CHOICE.blocks;
diff --git a/src/blocks/wedo2.js b/src/blocks/wedo2.js
index 86c73de07..5074b26a1 100644
--- a/src/blocks/wedo2.js
+++ b/src/blocks/wedo2.js
@@ -144,11 +144,9 @@ WeDo2Blocks.prototype.setColor = function(argValues, util) {
 };
 
 WeDo2Blocks.prototype.whenDistanceClose = function() {
-    console.log('Running: wedo_whendistanceclose');
 };
 
 WeDo2Blocks.prototype.whenTilt = function() {
-    console.log('Running: wedo_whentilt');
 };
 
 module.exports = WeDo2Blocks;
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 2f1126d43..a1572c3b3 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -24,6 +24,12 @@ function Sequencer (runtime) {
  */
 Sequencer.WORK_TIME = 10;
 
+/**
+ * If set, block calls, args, and return values will be logged to the console.
+ * @const {boolean}
+ */
+Sequencer.DEBUG_BLOCK_CALLS = true;
+
 /**
  * Step through all threads in `this.threads`, running them in order.
  * @return {Array.<Thread>} All threads which have finished in this iteration.
@@ -213,9 +219,15 @@ Sequencer.prototype.stepThread = function (thread) {
             console.warn('Could not get implementation for opcode: ' + opcode);
         }
         else {
+            if (Sequencer.DEBUG_BLOCK_CALLS) {
+                console.groupCollapsed('Executing: ' + opcode);
+                console.log('with arguments: ', argValues);
+                console.log('and stack frame: ', currentStackFrame);
+            }
+            var blockFunctionReturnValue = null;
             try {
                 // @todo deal with the return value
-                blockFunction(argValues, {
+                blockFunctionReturnValue = blockFunction(argValues, {
                     yield: threadYieldCallback,
                     done: threadDoneCallback,
                     timeout: YieldTimers.timeout,
@@ -238,6 +250,11 @@ Sequencer.prototype.stepThread = function (thread) {
                     // Thread executed without yielding - move to done
                     threadDoneCallback();
                 }
+                if (Sequencer.DEBUG_BLOCK_CALLS) {
+                    console.log('ending stack frame: ', currentStackFrame);
+                    console.log('returned: ', blockFunctionReturnValue);
+                    console.groupEnd();
+                }
             }
         }
     }

From 8fa29bc6de2aa2c0222ace9e6036b4c854642666 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 13:27:01 -0400
Subject: [PATCH 048/302] Spacing fix in blocks.js

---
 src/engine/blocks.js | 324 +++++++++++++++++++++----------------------
 1 file changed, 162 insertions(+), 162 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 896e9c8b4..bb4505352 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -1,207 +1,207 @@
 /**
-* @fileoverview
+ * @fileoverview
  * Store and mutate the VM block representation,
  * and handle updates from Scratch Blocks events.
  */
 
- function Blocks () {
-     /**
-      * All blocks in the workspace.
-      * Keys are block IDs, values are metadata about the block.
-      * @type {Object.<string, Object>}
-      */
-     this._blocks = {};
+function Blocks () {
+    /**
+     * All blocks in the workspace.
+     * Keys are block IDs, values are metadata about the block.
+     * @type {Object.<string, Object>}
+     */
+    this._blocks = {};
 
-     /**
-      * All stacks in the workspace.
-      * A list of block IDs that represent stacks (first block in stack).
-      * @type {Array.<String>}
-      */
-     this._stacks = [];
- }
+    /**
+     * All stacks in the workspace.
+     * A list of block IDs that represent stacks (first block in stack).
+     * @type {Array.<String>}
+     */
+    this._stacks = [];
+}
 
 /**
  * Provide an object with metadata for the requested block ID.
  * @param {!string} blockId ID of block we have stored.
  * @return {?Object} Metadata about the block, if it exists.
  */
- Blocks.prototype.getBlock = function (blockId) {
-     return this._blocks[blockId];
- };
+Blocks.prototype.getBlock = function (blockId) {
+    return this._blocks[blockId];
+};
 
 /**
  * Get all known top-level blocks that start stacks.
  * @return {Array.<string>} List of block IDs.
  */
- Blocks.prototype.getStacks = function () {
-     return this._stacks;
- };
+Blocks.prototype.getStacks = function () {
+    return this._stacks;
+};
 
  /**
   * Get the next block for a particular block
   * @param {?string} id ID of block to get the next block for
   * @return {?string} ID of next block in the sequence
   */
- Blocks.prototype.getNextBlock = function (id) {
-     if (typeof this._blocks[id] === 'undefined') return null;
-     return this._blocks[id].next;
- };
+Blocks.prototype.getNextBlock = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    return this._blocks[id].next;
+};
 
- /**
-  * Get the substack for a particular C-shaped block
-  * @param {?string} id ID for block to get the substack for
-  * @param {?number} substackNum Which substack to select (e.g. for if-else)
-  * @return {?string} ID of block in the substack
-  */
- Blocks.prototype.getSubstack = function (id, substackNum) {
-     var block = this._blocks[id];
-     if (typeof block === 'undefined') return null;
-     if (!substackNum) substackNum = 1;
+/**
+ * Get the substack for a particular C-shaped block
+ * @param {?string} id ID for block to get the substack for
+ * @param {?number} substackNum Which substack to select (e.g. for if-else)
+ * @return {?string} ID of block in the substack
+ */
+Blocks.prototype.getSubstack = function (id, substackNum) {
+    var block = this._blocks[id];
+    if (typeof block === 'undefined') return null;
+    if (!substackNum) substackNum = 1;
 
-     var inputName = 'SUBSTACK';
-     if (substackNum > 1) {
-         inputName += substackNum;
-     }
+    var inputName = 'SUBSTACK';
+    if (substackNum > 1) {
+        inputName += substackNum;
+    }
 
-     // Empty C-block?
-     if (!(inputName in block.inputs)) return null;
-     return block.inputs[inputName].block;
- };
+    // Empty C-block?
+    if (!(inputName in block.inputs)) return null;
+    return block.inputs[inputName].block;
+};
 
- /**
-  * Get the opcode for a particular block
-  * @param {?string} id ID of block to query
-  * @return {?string} the opcode corresponding to that block
-  */
- Blocks.prototype.getOpcode = function (id) {
-     if (typeof this._blocks[id] === 'undefined') return null;
-     return this._blocks[id].opcode;
- };
+/**
+ * Get the opcode for a particular block
+ * @param {?string} id ID of block to query
+ * @return {?string} the opcode corresponding to that block
+ */
+Blocks.prototype.getOpcode = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    return this._blocks[id].opcode;
+};
 
- // ---------------------------------------------------------------------
+// ---------------------------------------------------------------------
 
- /**
-  * Block management: create blocks and stacks from a `create` event
-  * @param {!Object} block Blockly create event to be processed
-  */
- Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-     // Create new block
-     this._blocks[block.id] = block;
+/**
+ * Block management: create blocks and stacks from a `create` event
+ * @param {!Object} block Blockly create event to be processed
+ */
+Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
+    // Create new block
+    this._blocks[block.id] = block;
 
-     // Push block id to stacks array.
-     // Blocks are added as a top-level stack if they are marked as a top-block
-     // (if they were top-level XML in the event) and if they are not
-     // flyout blocks.
-     if (!opt_isFlyoutBlock && block.topLevel) {
-         this._addStack(block.id);
-     }
- };
+    // Push block id to stacks array.
+    // Blocks are added as a top-level stack if they are marked as a top-block
+    // (if they were top-level XML in the event) and if they are not
+    // flyout blocks.
+    if (!opt_isFlyoutBlock && block.topLevel) {
+        this._addStack(block.id);
+    }
+};
 
- /**
-  * Block management: change block field values
-  * @param {!Object} args Blockly change event to be processed
-  */
- Blocks.prototype.changeBlock = function (args) {
-     // Validate
-     if (args.element !== 'field') return;
-     if (typeof this._blocks[args.id] === 'undefined') return;
-     if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
+/**
+ * Block management: change block field values
+ * @param {!Object} args Blockly change event to be processed
+ */
+Blocks.prototype.changeBlock = function (args) {
+    // Validate
+    if (args.element !== 'field') return;
+    if (typeof this._blocks[args.id] === 'undefined') return;
+    if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
 
-     // Update block value
-     this._blocks[args.id].fields[args.name].value = args.value;
- };
+    // Update block value
+    this._blocks[args.id].fields[args.name].value = args.value;
+};
 
- /**
-  * Block management: move blocks from parent to parent
-  * @param {!Object} e Blockly move event to be processed
-  */
- Blocks.prototype.moveBlock = function (e) {
-     // Remove from any old parent.
-     if (e.oldParent !== undefined) {
-         var oldParent = this._blocks[e.oldParent];
-         if (e.oldInput !== undefined &&
-             oldParent.inputs[e.oldInput].block === e.id) {
-             // This block was connected to the old parent's input.
-             oldParent.inputs[e.oldInput].block = null;
-         } else if (oldParent.next === e.id) {
-             // This block was connected to the old parent's next connection.
-             oldParent.next = null;
-         }
-     }
+/**
+ * Block management: move blocks from parent to parent
+ * @param {!Object} e Blockly move event to be processed
+ */
+Blocks.prototype.moveBlock = function (e) {
+    // Remove from any old parent.
+    if (e.oldParent !== undefined) {
+        var oldParent = this._blocks[e.oldParent];
+        if (e.oldInput !== undefined &&
+            oldParent.inputs[e.oldInput].block === e.id) {
+            // This block was connected to the old parent's input.
+            oldParent.inputs[e.oldInput].block = null;
+        } else if (oldParent.next === e.id) {
+            // This block was connected to the old parent's next connection.
+            oldParent.next = null;
+        }
+    }
 
-     // Has the block become a top-level block?
-     if (e.newParent === undefined) {
-         this._addStack(e.id);
-     } else {
-         // Remove stack, if one exists.
-         this._deleteStack(e.id);
-         // Otherwise, try to connect it in its new place.
-         if (e.newInput !== undefined) {
+    // Has the block become a top-level block?
+    if (e.newParent === undefined) {
+        this._addStack(e.id);
+    } else {
+        // Remove stack, if one exists.
+        this._deleteStack(e.id);
+        // Otherwise, try to connect it in its new place.
+        if (e.newInput !== undefined) {
              // Moved to the new parent's input.
-             this._blocks[e.newParent].inputs[e.newInput] = {
-                 name: e.newInput,
-                 block: e.id
-             };
-         } else {
-             // Moved to the new parent's next connection.
-             this._blocks[e.newParent].next = e.id;
-         }
-     }
- };
+            this._blocks[e.newParent].inputs[e.newInput] = {
+                name: e.newInput,
+                block: e.id
+            };
+        } else {
+            // Moved to the new parent's next connection.
+            this._blocks[e.newParent].next = e.id;
+        }
+    }
+};
 
- /**
-  * Block management: delete blocks and their associated stacks
-  * @param {!Object} e Blockly delete event to be processed
-  */
- Blocks.prototype.deleteBlock = function (e) {
-     // @todo In runtime, stop threads running on this stack
+/**
+ * Block management: delete blocks and their associated stacks
+ * @param {!Object} e Blockly delete event to be processed
+ */
+Blocks.prototype.deleteBlock = function (e) {
+    // @todo In runtime, stop threads running on this stack
 
-     // Get block
-     var block = this._blocks[e.id];
+    // Get block
+    var block = this._blocks[e.id];
 
-     // Delete children
-     if (block.next !== null) {
-         this.deleteBlock({id: block.next});
-     }
+    // Delete children
+    if (block.next !== null) {
+        this.deleteBlock({id: block.next});
+    }
 
-     // Delete inputs (including substacks)
-     for (var input in block.inputs) {
-         // If it's null, the block in this input moved away.
-         if (block.inputs[input].block !== null) {
-             this.deleteBlock({id: block.inputs[input].block});
-         }
-     }
+    // Delete inputs (including substacks)
+    for (var input in block.inputs) {
+        // If it's null, the block in this input moved away.
+        if (block.inputs[input].block !== null) {
+            this.deleteBlock({id: block.inputs[input].block});
+        }
+    }
 
-     // Delete stack
-     this._deleteStack(e.id);
+    // Delete stack
+    this._deleteStack(e.id);
 
-     // Delete block
-     delete this._blocks[e.id];
- };
+    // Delete block
+    delete this._blocks[e.id];
+};
 
- // ---------------------------------------------------------------------
+// ---------------------------------------------------------------------
 
- /**
-  * Helper to add a stack to `this._stacks`
-  * @param {?string} id ID of block that starts the stack
-  */
- Blocks.prototype._addStack = function (id) {
-     var i = this._stacks.indexOf(id);
-     if (i > -1) return; // Already in stacks.
-     this._stacks.push(id);
-     // Update `topLevel` property on the top block.
-     this._blocks[id].topLevel = true;
- };
+/**
+ * Helper to add a stack to `this._stacks`
+ * @param {?string} id ID of block that starts the stack
+ */
+Blocks.prototype._addStack = function (id) {
+    var i = this._stacks.indexOf(id);
+    if (i > -1) return; // Already in stacks.
+    this._stacks.push(id);
+    // Update `topLevel` property on the top block.
+    this._blocks[id].topLevel = true;
+};
 
- /**
-  * Helper to remove a stack from `this._stacks`
-  * @param {?string} id ID of block that starts the stack
-  */
- Blocks.prototype._deleteStack = function (id) {
-     var i = this._stacks.indexOf(id);
-     if (i > -1) this._stacks.splice(i, 1);
-     // Update `topLevel` property on the top block.
-     if (this._blocks[id]) this._blocks[id].topLevel = false;
- };
+/**
+ * Helper to remove a stack from `this._stacks`
+ * @param {?string} id ID of block that starts the stack
+ */
+Blocks.prototype._deleteStack = function (id) {
+    var i = this._stacks.indexOf(id);
+    if (i > -1) this._stacks.splice(i, 1);
+    // Update `topLevel` property on the top block.
+    if (this._blocks[id]) this._blocks[id].topLevel = false;
+};
 
- module.exports = Blocks;
+module.exports = Blocks;

From 7a42e9ae683cfa717850284425d06d73df5be589 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 13:44:09 -0400
Subject: [PATCH 049/302] Move blockListener to blocks.js; combine flyout
 listener

---
 playground/playground.js |  3 +-
 src/engine/blocks.js     | 66 ++++++++++++++++++++++++++++++++
 src/index.js             | 83 ++++------------------------------------
 3 files changed, 75 insertions(+), 77 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 1cc5a4b2e..3926ecb90 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -20,9 +20,10 @@ window.onload = function() {
     });
     window.workspace = workspace;
 
-    // @todo: Also bind to flyout events.
     // Block events.
     workspace.addChangeListener(vm.blockListener);
+    var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
+    flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 
     var explorer = document.getElementById('blockexplorer');
     workspace.addChangeListener(function() {
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index bb4505352..3cac50854 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -1,3 +1,5 @@
+var adapter = require('./adapter');
+
 /**
  * @fileoverview
  * Store and mutate the VM block representation,
@@ -80,6 +82,70 @@ Blocks.prototype.getOpcode = function (id) {
 
 // ---------------------------------------------------------------------
 
+/**
+ * Create event listener for blocks. Handles validation and serves as a generic
+ * adapter between the blocks and the runtime interface.
+ * @param {boolean} isFlyout If true, create a listener for flyout events.
+ * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
+ * @return {Function} A generated listener to attach to Blockly instance.
+ */
+
+Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
+    /**
+     * The actual generated block listener.
+     * @param {Object} Blockly "block" event
+     */
+    var instance = this;
+    return function (e) {
+        // Validate event
+        if (typeof e !== 'object') return;
+        if (typeof e.blockId !== 'string') return;
+
+        // UI event: clicked stacks toggle in the runtime.
+        if (e.element === 'stackclick') {
+            if (opt_runtime) {
+                opt_runtime.toggleStack(e.blockId);
+            }
+            return;
+        }
+
+        // Block create/update/destroy
+        switch (e.type) {
+        case 'create':
+            var newBlocks = adapter(e);
+            // A create event can create many blocks. Add them all.
+            for (var i = 0; i < newBlocks.length; i++) {
+                instance.createBlock(newBlocks[i], isFlyout);
+            }
+            break;
+        case 'change':
+            instance.changeBlock({
+                id: e.blockId,
+                element: e.element,
+                name: e.name,
+                value: e.newValue
+            });
+            break;
+        case 'move':
+            instance.moveBlock({
+                id: e.blockId,
+                oldParent: e.oldParentId,
+                oldInput: e.oldInputName,
+                newParent: e.newParentId,
+                newInput: e.newInputName
+            });
+            break;
+        case 'delete':
+            instance.deleteBlock({
+                id: e.blockId
+            });
+            break;
+        }
+    };
+};
+
+// ---------------------------------------------------------------------
+
 /**
  * Block management: create blocks and stacks from a `create` event
  * @param {!Object} block Blockly create event to be processed
diff --git a/src/index.js b/src/index.js
index 9f3917a54..e8558a19e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,7 +3,6 @@ var util = require('util');
 
 var Blocks = require('./engine/blocks');
 var Runtime = require('./engine/runtime');
-var adapter = require('./engine/adapter');
 
 /**
  * Handles connections between blocks, stage, and extensions.
@@ -20,83 +19,15 @@ function VirtualMachine () {
     instance.runtime = new Runtime(instance.blocks);
 
     /**
-     * Event listener for blocks. Handles validation and serves as a generic
-     * adapter between the blocks and the runtime interface.
-     *
-     * @param {Object} Blockly "block" event
+     * Event listeners for scratch-blocks.
      */
-    instance.blockListener = function (e) {
-        // Validate event
-        if (typeof e !== 'object') return;
-        if (typeof e.blockId !== 'string') return;
+    instance.blockListener = (
+        instance.blocks.generateBlockListener(false, instance.runtime)
+    );
 
-        // UI event: clicked stacks toggle in the runtime.
-        if (e.element === 'stackclick') {
-            instance.runtime.toggleStack(e.blockId);
-            return;
-        }
-
-        // Block create/update/destroy
-        switch (e.type) {
-        case 'create':
-            var newBlocks = adapter(e);
-            // A create event can create many blocks. Add them all.
-            for (var i = 0; i < newBlocks.length; i++) {
-                instance.blocks.createBlock(newBlocks[i], false);
-            }
-            break;
-        case 'change':
-            instance.blocks.changeBlock({
-                id: e.blockId,
-                element: e.element,
-                name: e.name,
-                value: e.newValue
-            });
-            break;
-        case 'move':
-            instance.blocks.moveBlock({
-                id: e.blockId,
-                oldParent: e.oldParentId,
-                oldInput: e.oldInputName,
-                newParent: e.newParentId,
-                newInput: e.newInputName
-            });
-            break;
-        case 'delete':
-            instance.blocks.deleteBlock({
-                id: e.blockId
-            });
-            break;
-        }
-    };
-
-    instance.flyoutBlockListener = function (e) {
-        switch (e.type) {
-        case 'create':
-            var newBlocks = adapter(e);
-            // A create event can create many blocks. Add them all.
-            for (var i = 0; i < newBlocks.length; i++) {
-                instance.blocks.createBlock(newBlocks[i], true);
-            }
-            break;
-        case 'change':
-            instance.blocks.changeBlock({
-                id: e.blockId,
-                element: e.element,
-                name: e.name,
-                value: e.newValue
-            });
-            break;
-        case 'delete':
-            instance.blocks.deleteBlock({
-                id: e.blockId
-            });
-            break;
-        case 'stackclick':
-            instance.runtime.toggleStack(e.blockId);
-            break;
-        }
-    };
+    instance.flyoutBlockListener = (
+        instance.blocks.generateBlockListener(true, instance.runtime)
+    );
 }
 
 /**

From de359b6859560063fd613d56bf7debcc59501923 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 16:27:38 -0400
Subject: [PATCH 050/302] Add .editorconfig

---
 .editorconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..e84613dd6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+charset = utf-8
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.{js,html}]
+indent_style = space

From 1f1a4941f3556ea3b866bb476ce3d71cc03c81d8 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 16:57:08 -0400
Subject: [PATCH 051/302] Add .eslintrc rule to check JSDoc syntax

And fix the broken syntax rules
---
 .eslintrc               |  3 ++-
 src/blocks/wedo2.js     | 14 +++++++-------
 src/engine/adapter.js   |  2 +-
 src/engine/blocks.js    |  1 +
 src/engine/runtime.js   |  2 +-
 src/engine/sequencer.js |  4 ++++
 src/index.js            |  2 +-
 7 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/.eslintrc b/.eslintrc
index 0d67347a8..7624840ff 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -8,7 +8,8 @@
         "max-len": [2, 80, 4],
         "semi": [2, "always"],
         "strict": [2, "never"],
-        "no-console": [2, {"allow": ["log", "warn", "error"]}]
+        "no-console": [2, {"allow": ["log", "warn", "error"]}],
+        "valid-jsdoc": ["error", {"requireReturn": false}]
     },
     "env": {
         "node": true,
diff --git a/src/blocks/wedo2.js b/src/blocks/wedo2.js
index 86c73de07..52f2c372d 100644
--- a/src/blocks/wedo2.js
+++ b/src/blocks/wedo2.js
@@ -41,9 +41,9 @@ WeDo2Blocks.prototype.getPrimitives = function() {
 /**
  * Clamp a value between a minimum and maximum value.
  * @todo move this to a common utility class.
- * @param val The value to clamp.
- * @param min The minimum return value.
- * @param max The maximum return value.
+ * @param {number} val The value to clamp.
+ * @param {number} min The minimum return value.
+ * @param {number} max The maximum return value.
  * @returns {number} The clamped value.
  * @private
  */
@@ -53,9 +53,9 @@ WeDo2Blocks.prototype._clamp = function(val, min, max) {
 
 /**
  * Common implementation for motor blocks.
- * @param direction The direction to turn ('left' or 'right').
- * @param durationSeconds The number of seconds to run.
- * @param util The util instance to use for yielding and finishing.
+ * @param {string} direction The direction to turn ('left' or 'right').
+ * @param {number} durationSeconds The number of seconds to run.
+ * @param {Object} util The util instance to use for yielding and finishing.
  * @private
  */
 WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
@@ -108,7 +108,7 @@ WeDo2Blocks.prototype.motorSpeed = function(argValues) {
 /**
  * Convert a color name to a WeDo color index.
  * Supports 'mystery' for a random hue.
- * @param colorName The color to retrieve.
+ * @param {string} colorName The color to retrieve.
  * @returns {number} The WeDo color index.
  * @private
  */
diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 48613ec5d..73b69b084 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -52,8 +52,8 @@ function domToBlocks (blocksDOM) {
  * Convert and an individual block DOM to the representation tree.
  * Based on Blockly's `domToBlockHeadless_`.
  * @param {Element} blockDOM DOM tree for an individual block.
- * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
  * @param {Object} blocks Collection of blocks to add to.
+ * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
  */
 function domToBlock (blockDOM, blocks, isTopBlock) {
     // Block skeleton.
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index bb4505352..b1da172a9 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -83,6 +83,7 @@ Blocks.prototype.getOpcode = function (id) {
 /**
  * Block management: create blocks and stacks from a `create` event
  * @param {!Object} block Blockly create event to be processed
+ * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
  */
 Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
     // Create new block
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 9531eadc7..5e72eb7d2 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -10,7 +10,7 @@ var defaultBlockPackages = {
 
 /**
  * Manages blocks, stacks, and the sequencer.
- * @param blocks Blocks instance for this runtime.
+ * @param {!Blocks} blocks Blocks instance for this runtime.
  */
 function Runtime (blocks) {
     // Bind event emitter
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 95a28f7bf..1d9f3a214 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -26,6 +26,7 @@ Sequencer.WORK_TIME = 10;
 
 /**
  * Step through all threads in `this.threads`, running them in order.
+ * @param {Array.<Thread>} threads List of which threads to step.
  * @return {Array.<Thread>} All threads which have finished in this iteration.
  */
 Sequencer.prototype.stepThreads = function (threads) {
@@ -139,6 +140,9 @@ Sequencer.prototype.stepThread = function (thread) {
     /**
      * A callback for the primitive to start hats.
      * @todo very hacked...
+     * Provide a callback that is passed in a block and returns true
+     * if it is a hat that should be triggered.
+     * @param {Function} callback Provided callback.
      */
     var startHats = function(callback) {
         var stacks = instance.runtime.blocks.getStacks();
diff --git a/src/index.js b/src/index.js
index 9f3917a54..3bb6bb52f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -23,7 +23,7 @@ function VirtualMachine () {
      * Event listener for blocks. Handles validation and serves as a generic
      * adapter between the blocks and the runtime interface.
      *
-     * @param {Object} Blockly "block" event
+     * @param {Object} e Blockly "block" event
      */
     instance.blockListener = function (e) {
         // Validate event

From b9bd037963da2b3bf412432b0ce843d337cf377c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 17:25:26 -0400
Subject: [PATCH 052/302] Fixing eslint JSDoc from merge

---
 src/engine/blocks.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index e9ac68427..752cbb4d3 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -91,11 +91,11 @@ Blocks.prototype.getOpcode = function (id) {
  */
 
 Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
+    var instance = this;
     /**
      * The actual generated block listener.
-     * @param {Object} Blockly "block" event
+     * @param {Object} e Blockly "block" event
      */
-    var instance = this;
     return function (e) {
         // Validate event
         if (typeof e !== 'object') return;

From 20cb88c0666383daeaeba39c7dd7e845131aba19 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 17:30:22 -0400
Subject: [PATCH 053/302] Update README.md with new block change listener calls

---
 README.md | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index a14c91d8d..b354de29a 100644
--- a/README.md
+++ b/README.md
@@ -16,16 +16,9 @@ var VirtualMachine = require('scratch-vm');
 var vm = new VirtualMachine();
 
 // Block events
-workspace.addChangeListener(function(e) {
-    // Handle "tapping" a block
-    if (e instanceof Blockly.Events.Ui && e.element === 'click') {
-        var stackBlock = workspace.getBlockById(e.blockId).getRootBlock().id;
-        vm.runtime.toggleStack(stackBlock);
-    // Otherwise, pass along to the block listener
-    } else {
-        vm.blockListener(e);
-    }
-});
+workspace.addChangeListener(vm.blockListener);
+var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
+flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 
 // Run threads
 vm.runtime.start();

From 30a9854b5755e763cb5cb28b3f516890af751d7d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 8 Jun 2016 17:31:18 -0400
Subject: [PATCH 054/302] Recompile June 8

---
 vm.js     | 2975 +++++++++++++++++++++++++++--------------------------
 vm.min.js |   11 +-
 2 files changed, 1504 insertions(+), 1482 deletions(-)

diff --git a/vm.js b/vm.js
index 1e9813127..00353aaa0 100644
--- a/vm.js
+++ b/vm.js
@@ -48,8 +48,7 @@
 	var util = __webpack_require__(2);
 
 	var Blocks = __webpack_require__(6);
-	var Runtime = __webpack_require__(7);
-	var adapter = __webpack_require__(14);
+	var Runtime = __webpack_require__(118);
 
 	/**
 	 * Handles connections between blocks, stage, and extensions.
@@ -66,83 +65,15 @@
 	    instance.runtime = new Runtime(instance.blocks);
 
 	    /**
-	     * Event listener for blocks. Handles validation and serves as a generic
-	     * adapter between the blocks and the runtime interface.
-	     *
-	     * @param {Object} Blockly "block" event
+	     * Event listeners for scratch-blocks.
 	     */
-	    instance.blockListener = function (e) {
-	        // Validate event
-	        if (typeof e !== 'object') return;
-	        if (typeof e.blockId !== 'string') return;
+	    instance.blockListener = (
+	        instance.blocks.generateBlockListener(false, instance.runtime)
+	    );
 
-	        // UI event: clicked stacks toggle in the runtime.
-	        if (e.element === 'stackclick') {
-	            instance.runtime.toggleStack(e.blockId);
-	            return;
-	        }
-
-	        // Block create/update/destroy
-	        switch (e.type) {
-	        case 'create':
-	            var newBlocks = adapter(e);
-	            // A create event can create many blocks. Add them all.
-	            for (var i = 0; i < newBlocks.length; i++) {
-	                instance.blocks.createBlock(newBlocks[i], false);
-	            }
-	            break;
-	        case 'change':
-	            instance.blocks.changeBlock({
-	                id: e.blockId,
-	                element: e.element,
-	                name: e.name,
-	                value: e.newValue
-	            });
-	            break;
-	        case 'move':
-	            instance.blocks.moveBlock({
-	                id: e.blockId,
-	                oldParent: e.oldParentId,
-	                oldInput: e.oldInputName,
-	                newParent: e.newParentId,
-	                newInput: e.newInputName
-	            });
-	            break;
-	        case 'delete':
-	            instance.blocks.deleteBlock({
-	                id: e.blockId
-	            });
-	            break;
-	        }
-	    };
-
-	    instance.flyoutBlockListener = function (e) {
-	        switch (e.type) {
-	        case 'create':
-	            var newBlocks = adapter(e);
-	            // A create event can create many blocks. Add them all.
-	            for (var i = 0; i < newBlocks.length; i++) {
-	                instance.blocks.createBlock(newBlocks[i], true);
-	            }
-	            break;
-	        case 'change':
-	            instance.blocks.changeBlock({
-	                id: e.blockId,
-	                element: e.element,
-	                name: e.name,
-	                value: e.newValue
-	            });
-	            break;
-	        case 'delete':
-	            instance.blocks.deleteBlock({
-	                id: e.blockId
-	            });
-	            break;
-	        case 'stackclick':
-	            instance.runtime.toggleStack(e.blockId);
-	            break;
-	        }
-	    };
+	    instance.flyoutBlockListener = (
+	        instance.blocks.generateBlockListener(true, instance.runtime)
+	    );
 	}
 
 	/**
@@ -1196,1162 +1127,290 @@
 
 /***/ },
 /* 6 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
+
+	var adapter = __webpack_require__(7);
 
 	/**
-	* @fileoverview
+	 * @fileoverview
 	 * Store and mutate the VM block representation,
 	 * and handle updates from Scratch Blocks events.
 	 */
 
-	 function Blocks () {
-	     /**
-	      * All blocks in the workspace.
-	      * Keys are block IDs, values are metadata about the block.
-	      * @type {Object.<string, Object>}
-	      */
-	     this._blocks = {};
+	function Blocks () {
+	    /**
+	     * All blocks in the workspace.
+	     * Keys are block IDs, values are metadata about the block.
+	     * @type {Object.<string, Object>}
+	     */
+	    this._blocks = {};
 
-	     /**
-	      * All stacks in the workspace.
-	      * A list of block IDs that represent stacks (first block in stack).
-	      * @type {Array.<String>}
-	      */
-	     this._stacks = [];
-	 }
+	    /**
+	     * All stacks in the workspace.
+	     * A list of block IDs that represent stacks (first block in stack).
+	     * @type {Array.<String>}
+	     */
+	    this._stacks = [];
+	}
 
 	/**
 	 * Provide an object with metadata for the requested block ID.
 	 * @param {!string} blockId ID of block we have stored.
 	 * @return {?Object} Metadata about the block, if it exists.
 	 */
-	 Blocks.prototype.getBlock = function (blockId) {
-	     return this._blocks[blockId];
-	 };
+	Blocks.prototype.getBlock = function (blockId) {
+	    return this._blocks[blockId];
+	};
 
 	/**
 	 * Get all known top-level blocks that start stacks.
 	 * @return {Array.<string>} List of block IDs.
 	 */
-	 Blocks.prototype.getStacks = function () {
-	     return this._stacks;
-	 };
+	Blocks.prototype.getStacks = function () {
+	    return this._stacks;
+	};
 
 	 /**
 	  * Get the next block for a particular block
 	  * @param {?string} id ID of block to get the next block for
 	  * @return {?string} ID of next block in the sequence
 	  */
-	 Blocks.prototype.getNextBlock = function (id) {
-	     if (typeof this._blocks[id] === 'undefined') return null;
-	     return this._blocks[id].next;
-	 };
+	Blocks.prototype.getNextBlock = function (id) {
+	    if (typeof this._blocks[id] === 'undefined') return null;
+	    return this._blocks[id].next;
+	};
 
-	 /**
-	  * Get the substack for a particular C-shaped block
-	  * @param {?string} id ID for block to get the substack for
-	  * @param {?number} substackNum Which substack to select (e.g. for if-else)
-	  * @return {?string} ID of block in the substack
-	  */
-	 Blocks.prototype.getSubstack = function (id, substackNum) {
-	     var block = this._blocks[id];
-	     if (typeof block === 'undefined') return null;
-	     if (!substackNum) substackNum = 1;
+	/**
+	 * Get the substack for a particular C-shaped block
+	 * @param {?string} id ID for block to get the substack for
+	 * @param {?number} substackNum Which substack to select (e.g. for if-else)
+	 * @return {?string} ID of block in the substack
+	 */
+	Blocks.prototype.getSubstack = function (id, substackNum) {
+	    var block = this._blocks[id];
+	    if (typeof block === 'undefined') return null;
+	    if (!substackNum) substackNum = 1;
 
-	     var inputName = 'SUBSTACK';
-	     if (substackNum > 1) {
-	         inputName += substackNum;
-	     }
+	    var inputName = 'SUBSTACK';
+	    if (substackNum > 1) {
+	        inputName += substackNum;
+	    }
 
-	     // Empty C-block?
-	     if (!(inputName in block.inputs)) return null;
-	     return block.inputs[inputName].block;
-	 };
+	    // Empty C-block?
+	    if (!(inputName in block.inputs)) return null;
+	    return block.inputs[inputName].block;
+	};
 
-	 /**
-	  * Get the opcode for a particular block
-	  * @param {?string} id ID of block to query
-	  * @return {?string} the opcode corresponding to that block
-	  */
-	 Blocks.prototype.getOpcode = function (id) {
-	     if (typeof this._blocks[id] === 'undefined') return null;
-	     return this._blocks[id].opcode;
-	 };
+	/**
+	 * Get the opcode for a particular block
+	 * @param {?string} id ID of block to query
+	 * @return {?string} the opcode corresponding to that block
+	 */
+	Blocks.prototype.getOpcode = function (id) {
+	    if (typeof this._blocks[id] === 'undefined') return null;
+	    return this._blocks[id].opcode;
+	};
 
-	 // ---------------------------------------------------------------------
+	// ---------------------------------------------------------------------
 
-	 /**
-	  * Block management: create blocks and stacks from a `create` event
-	  * @param {!Object} block Blockly create event to be processed
-	  */
-	 Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-	     // Create new block
-	     this._blocks[block.id] = block;
+	/**
+	 * Create event listener for blocks. Handles validation and serves as a generic
+	 * adapter between the blocks and the runtime interface.
+	 * @param {boolean} isFlyout If true, create a listener for flyout events.
+	 * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
+	 * @return {Function} A generated listener to attach to Blockly instance.
+	 */
 
-	     // Push block id to stacks array.
-	     // Blocks are added as a top-level stack if they are marked as a top-block
-	     // (if they were top-level XML in the event) and if they are not
-	     // flyout blocks.
-	     if (!opt_isFlyoutBlock && block.topLevel) {
-	         this._addStack(block.id);
-	     }
-	 };
+	Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
+	    var instance = this;
+	    /**
+	     * The actual generated block listener.
+	     * @param {Object} e Blockly "block" event
+	     */
+	    return function (e) {
+	        // Validate event
+	        if (typeof e !== 'object') return;
+	        if (typeof e.blockId !== 'string') return;
 
-	 /**
-	  * Block management: change block field values
-	  * @param {!Object} args Blockly change event to be processed
-	  */
-	 Blocks.prototype.changeBlock = function (args) {
-	     // Validate
-	     if (args.element !== 'field') return;
-	     if (typeof this._blocks[args.id] === 'undefined') return;
-	     if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
+	        // UI event: clicked stacks toggle in the runtime.
+	        if (e.element === 'stackclick') {
+	            if (opt_runtime) {
+	                opt_runtime.toggleStack(e.blockId);
+	            }
+	            return;
+	        }
 
-	     // Update block value
-	     this._blocks[args.id].fields[args.name].value = args.value;
-	 };
+	        // Block create/update/destroy
+	        switch (e.type) {
+	        case 'create':
+	            var newBlocks = adapter(e);
+	            // A create event can create many blocks. Add them all.
+	            for (var i = 0; i < newBlocks.length; i++) {
+	                instance.createBlock(newBlocks[i], isFlyout);
+	            }
+	            break;
+	        case 'change':
+	            instance.changeBlock({
+	                id: e.blockId,
+	                element: e.element,
+	                name: e.name,
+	                value: e.newValue
+	            });
+	            break;
+	        case 'move':
+	            instance.moveBlock({
+	                id: e.blockId,
+	                oldParent: e.oldParentId,
+	                oldInput: e.oldInputName,
+	                newParent: e.newParentId,
+	                newInput: e.newInputName
+	            });
+	            break;
+	        case 'delete':
+	            instance.deleteBlock({
+	                id: e.blockId
+	            });
+	            break;
+	        }
+	    };
+	};
 
-	 /**
-	  * Block management: move blocks from parent to parent
-	  * @param {!Object} e Blockly move event to be processed
-	  */
-	 Blocks.prototype.moveBlock = function (e) {
-	     // Remove from any old parent.
-	     if (e.oldParent !== undefined) {
-	         var oldParent = this._blocks[e.oldParent];
-	         if (e.oldInput !== undefined &&
-	             oldParent.inputs[e.oldInput].block === e.id) {
-	             // This block was connected to the old parent's input.
-	             oldParent.inputs[e.oldInput].block = null;
-	         } else if (oldParent.next === e.id) {
-	             // This block was connected to the old parent's next connection.
-	             oldParent.next = null;
-	         }
-	     }
+	// ---------------------------------------------------------------------
 
-	     // Has the block become a top-level block?
-	     if (e.newParent === undefined) {
-	         this._addStack(e.id);
-	     } else {
-	         // Remove stack, if one exists.
-	         this._deleteStack(e.id);
-	         // Otherwise, try to connect it in its new place.
-	         if (e.newInput !== undefined) {
+	/**
+	 * Block management: create blocks and stacks from a `create` event
+	 * @param {!Object} block Blockly create event to be processed
+	 * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
+	 */
+	Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
+	    // Create new block
+	    this._blocks[block.id] = block;
+
+	    // Push block id to stacks array.
+	    // Blocks are added as a top-level stack if they are marked as a top-block
+	    // (if they were top-level XML in the event) and if they are not
+	    // flyout blocks.
+	    if (!opt_isFlyoutBlock && block.topLevel) {
+	        this._addStack(block.id);
+	    }
+	};
+
+	/**
+	 * Block management: change block field values
+	 * @param {!Object} args Blockly change event to be processed
+	 */
+	Blocks.prototype.changeBlock = function (args) {
+	    // Validate
+	    if (args.element !== 'field') return;
+	    if (typeof this._blocks[args.id] === 'undefined') return;
+	    if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
+
+	    // Update block value
+	    this._blocks[args.id].fields[args.name].value = args.value;
+	};
+
+	/**
+	 * Block management: move blocks from parent to parent
+	 * @param {!Object} e Blockly move event to be processed
+	 */
+	Blocks.prototype.moveBlock = function (e) {
+	    // Remove from any old parent.
+	    if (e.oldParent !== undefined) {
+	        var oldParent = this._blocks[e.oldParent];
+	        if (e.oldInput !== undefined &&
+	            oldParent.inputs[e.oldInput].block === e.id) {
+	            // This block was connected to the old parent's input.
+	            oldParent.inputs[e.oldInput].block = null;
+	        } else if (oldParent.next === e.id) {
+	            // This block was connected to the old parent's next connection.
+	            oldParent.next = null;
+	        }
+	    }
+
+	    // Has the block become a top-level block?
+	    if (e.newParent === undefined) {
+	        this._addStack(e.id);
+	    } else {
+	        // Remove stack, if one exists.
+	        this._deleteStack(e.id);
+	        // Otherwise, try to connect it in its new place.
+	        if (e.newInput !== undefined) {
 	             // Moved to the new parent's input.
-	             this._blocks[e.newParent].inputs[e.newInput] = {
-	                 name: e.newInput,
-	                 block: e.id
-	             };
-	         } else {
-	             // Moved to the new parent's next connection.
-	             this._blocks[e.newParent].next = e.id;
-	         }
-	     }
-	 };
+	            this._blocks[e.newParent].inputs[e.newInput] = {
+	                name: e.newInput,
+	                block: e.id
+	            };
+	        } else {
+	            // Moved to the new parent's next connection.
+	            this._blocks[e.newParent].next = e.id;
+	        }
+	    }
+	};
 
-	 /**
-	  * Block management: delete blocks and their associated stacks
-	  * @param {!Object} e Blockly delete event to be processed
-	  */
-	 Blocks.prototype.deleteBlock = function (e) {
-	     // @todo In runtime, stop threads running on this stack
+	/**
+	 * Block management: delete blocks and their associated stacks
+	 * @param {!Object} e Blockly delete event to be processed
+	 */
+	Blocks.prototype.deleteBlock = function (e) {
+	    // @todo In runtime, stop threads running on this stack
 
-	     // Get block
-	     var block = this._blocks[e.id];
+	    // Get block
+	    var block = this._blocks[e.id];
 
-	     // Delete children
-	     if (block.next !== null) {
-	         this.deleteBlock({id: block.next});
-	     }
+	    // Delete children
+	    if (block.next !== null) {
+	        this.deleteBlock({id: block.next});
+	    }
 
-	     // Delete inputs (including substacks)
-	     for (var input in block.inputs) {
-	         // If it's null, the block in this input moved away.
-	         if (block.inputs[input].block !== null) {
-	             this.deleteBlock({id: block.inputs[input].block});
-	         }
-	     }
+	    // Delete inputs (including substacks)
+	    for (var input in block.inputs) {
+	        // If it's null, the block in this input moved away.
+	        if (block.inputs[input].block !== null) {
+	            this.deleteBlock({id: block.inputs[input].block});
+	        }
+	    }
 
-	     // Delete stack
-	     this._deleteStack(e.id);
+	    // Delete stack
+	    this._deleteStack(e.id);
 
-	     // Delete block
-	     delete this._blocks[e.id];
-	 };
+	    // Delete block
+	    delete this._blocks[e.id];
+	};
 
-	 // ---------------------------------------------------------------------
+	// ---------------------------------------------------------------------
 
-	 /**
-	  * Helper to add a stack to `this._stacks`
-	  * @param {?string} id ID of block that starts the stack
-	  */
-	 Blocks.prototype._addStack = function (id) {
-	     var i = this._stacks.indexOf(id);
-	     if (i > -1) return; // Already in stacks.
-	     this._stacks.push(id);
-	     // Update `topLevel` property on the top block.
-	     this._blocks[id].topLevel = true;
-	 };
+	/**
+	 * Helper to add a stack to `this._stacks`
+	 * @param {?string} id ID of block that starts the stack
+	 */
+	Blocks.prototype._addStack = function (id) {
+	    var i = this._stacks.indexOf(id);
+	    if (i > -1) return; // Already in stacks.
+	    this._stacks.push(id);
+	    // Update `topLevel` property on the top block.
+	    this._blocks[id].topLevel = true;
+	};
 
-	 /**
-	  * Helper to remove a stack from `this._stacks`
-	  * @param {?string} id ID of block that starts the stack
-	  */
-	 Blocks.prototype._deleteStack = function (id) {
-	     var i = this._stacks.indexOf(id);
-	     if (i > -1) this._stacks.splice(i, 1);
-	     // Update `topLevel` property on the top block.
-	     if (this._blocks[id]) this._blocks[id].topLevel = false;
-	 };
+	/**
+	 * Helper to remove a stack from `this._stacks`
+	 * @param {?string} id ID of block that starts the stack
+	 */
+	Blocks.prototype._deleteStack = function (id) {
+	    var i = this._stacks.indexOf(id);
+	    if (i > -1) this._stacks.splice(i, 1);
+	    // Update `topLevel` property on the top block.
+	    if (this._blocks[id]) this._blocks[id].topLevel = false;
+	};
 
-	 module.exports = Blocks;
+	module.exports = Blocks;
 
 
 /***/ },
 /* 7 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var EventEmitter = __webpack_require__(1);
-	var Sequencer = __webpack_require__(8);
-	var Thread = __webpack_require__(10);
-	var util = __webpack_require__(2);
-
-	var defaultBlockPackages = {
-	    'scratch3': __webpack_require__(12),
-	    'wedo2': __webpack_require__(13)
-	};
-
-	/**
-	 * Manages blocks, stacks, and the sequencer.
-	 * @param blocks Blocks instance for this runtime.
-	 */
-	function Runtime (blocks) {
-	    // Bind event emitter
-	    EventEmitter.call(this);
-
-	    // State for the runtime
-
-	    /**
-	     * Block management and storage
-	     */
-	    this.blocks = blocks;
-
-	    /**
-	     * A list of threads that are currently running in the VM.
-	     * Threads are added when execution starts and pruned when execution ends.
-	     * @type {Array.<Thread>}
-	     */
-	    this.threads = [];
-
-	    /** @type {!Sequencer} */
-	    this.sequencer = new Sequencer(this);
-
-	    /**
-	     * Map to look up a block primitive's implementation function by its opcode.
-	     * This is a two-step lookup: package name first, then primitive name.
-	     * @type {Object.<string, Function>}
-	     */
-	    this._primitives = {};
-	    this._registerBlockPackages();
-	}
-
-	/**
-	 * Event name for glowing a stack
-	 * @const {string}
-	 */
-	Runtime.STACK_GLOW_ON = 'STACK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a stack
-	 * @const {string}
-	 */
-	Runtime.STACK_GLOW_OFF = 'STACK_GLOW_OFF';
-
-	/**
-	 * Event name for glowing a block
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a block
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
-
-	/**
-	 * Inherit from EventEmitter
-	 */
-	util.inherits(Runtime, EventEmitter);
-
-	/**
-	 * How rapidly we try to step threads, in ms.
-	 */
-	Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
-
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Register default block packages with this runtime.
-	 * @todo Prefix opcodes with package name.
-	 * @private
-	 */
-	Runtime.prototype._registerBlockPackages = function () {
-	    for (var packageName in defaultBlockPackages) {
-	        if (defaultBlockPackages.hasOwnProperty(packageName)) {
-	            // @todo pass a different runtime depending on package privilege?
-	            var packageObject = new (defaultBlockPackages[packageName])(this);
-	            var packageContents = packageObject.getPrimitives();
-	            for (var op in packageContents) {
-	                if (packageContents.hasOwnProperty(op)) {
-	                    this._primitives[op] =
-	                        packageContents[op].bind(packageObject);
-	                }
-	            }
-	        }
-	    }
-	};
-
-	/**
-	 * Retrieve the function associated with the given opcode.
-	 * @param {!string} opcode The opcode to look up.
-	 * @return {Function} The function which implements the opcode.
-	 */
-	Runtime.prototype.getOpcodeFunction = function (opcode) {
-	    return this._primitives[opcode];
-	};
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Create a thread and push it to the list of threads.
-	 * @param {!string} id ID of block that starts the stack
-	 */
-	Runtime.prototype._pushThread = function (id) {
-	    this.emit(Runtime.STACK_GLOW_ON, id);
-	    var thread = new Thread(id);
-	    this.threads.push(thread);
-	};
-
-	/**
-	 * Remove a thread from the list of threads.
-	 * @param {?Thread} thread Thread object to remove from actives
-	 */
-	Runtime.prototype._removeThread = function (thread) {
-	    var i = this.threads.indexOf(thread);
-	    if (i > -1) {
-	        this.emit(Runtime.STACK_GLOW_OFF, thread.topBlock);
-	        this.threads.splice(i, 1);
-	    }
-	};
-
-	/**
-	 * Toggle a stack
-	 * @param {!string} stackId ID of block that starts the stack
-	 */
-	Runtime.prototype.toggleStack = function (stackId) {
-	    // Remove any existing thread
-	    for (var i = 0; i < this.threads.length; i++) {
-	        if (this.threads[i].topBlock == stackId) {
-	            this._removeThread(this.threads[i]);
-	            return;
-	        }
-	    }
-	    // Otherwise add it
-	    this._pushThread(stackId);
-	};
-
-	/**
-	 * Green flag, which stops currently running threads
-	 * and adds all top-level stacks that start with the green flag
-	 */
-	Runtime.prototype.greenFlag = function () {
-	    // Remove all existing threads
-	    for (var i = 0; i < this.threads.length; i++) {
-	        this._removeThread(this.threads[i]);
-	    }
-	    // Add all top stacks with green flag
-	    var stacks = this.blocks.getStacks();
-	    for (var j = 0; j < stacks.length; j++) {
-	        var topBlock = stacks[j];
-	        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
-	            this._pushThread(stacks[j]);
-	        }
-	    }
-	};
-
-	/**
-	 * Distance sensor hack
-	 */
-	Runtime.prototype.startDistanceSensors = function () {
-	    // Add all top stacks with distance sensor
-	    var stacks = this.blocks.getStacks();
-	    for (var j = 0; j < stacks.length; j++) {
-	        var topBlock = stacks[j];
-	        if (this.blocks.getBlock(topBlock).opcode ===
-	            'wedo_whendistanceclose') {
-	            var alreadyRunning = false;
-	            for (var k = 0; k < this.threads.length; k++) {
-	                if (this.threads[k].topBlock === topBlock) {
-	                    alreadyRunning = true;
-	                }
-	            }
-	            if (!alreadyRunning) {
-	                this._pushThread(stacks[j]);
-	            }
-	        }
-	    }
-	};
-
-	/**
-	 * Stop "everything"
-	 */
-	Runtime.prototype.stopAll = function () {
-	    var threadsCopy = this.threads.slice();
-	    while (threadsCopy.length > 0) {
-	        this._removeThread(threadsCopy.pop());
-	    }
-	    // @todo call stop function in all extensions/packages/WeDo stub
-	    if (window.native) {
-	        window.native.motorStop();
-	    }
-	};
-
-	/**
-	 * Repeatedly run `sequencer.stepThreads` and filter out
-	 * inactive threads after each iteration.
-	 */
-	Runtime.prototype._step = function () {
-	    var inactiveThreads = this.sequencer.stepThreads(this.threads);
-	    for (var i = 0; i < inactiveThreads.length; i++) {
-	        this._removeThread(inactiveThreads[i]);
-	    }
-	};
-
-	/**
-	 * Emit feedback for block glowing (used in the sequencer).
-	 * @param {?string} blockId ID for the block to update glow
-	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
-	 */
-	Runtime.prototype.glowBlock = function (blockId, isGlowing) {
-	    if (isGlowing) {
-	        this.emit(Runtime.BLOCK_GLOW_ON, blockId);
-	    } else {
-	        this.emit(Runtime.BLOCK_GLOW_OFF, blockId);
-	    }
-	};
-
-	/**
-	 * Set up timers to repeatedly step in a browser
-	 */
-	Runtime.prototype.start = function () {
-	    if (!window.setInterval) return;
-	    window.setInterval(function() {
-	        this._step();
-	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
-	};
-
-	module.exports = Runtime;
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Timer = __webpack_require__(9);
-	var Thread = __webpack_require__(10);
-	var YieldTimers = __webpack_require__(11);
-
-	function Sequencer (runtime) {
-	    /**
-	     * A utility timer for timing thread sequencing.
-	     * @type {!Timer}
-	     */
-	    this.timer = new Timer();
-
-	    /**
-	     * Reference to the runtime owning this sequencer.
-	     * @type {!Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * The sequencer does as much work as it can within WORK_TIME milliseconds,
-	 * then yields. This is essentially a rate-limiter for blocks.
-	 * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
-	 * @const {!number}
-	 */
-	Sequencer.WORK_TIME = 10;
-
-	/**
-	 * Step through all threads in `this.threads`, running them in order.
-	 * @return {Array.<Thread>} All threads which have finished in this iteration.
-	 */
-	Sequencer.prototype.stepThreads = function (threads) {
-	    // Start counting toward WORK_TIME
-	    this.timer.start();
-	    // List of threads which have been killed by this step.
-	    var inactiveThreads = [];
-	    // If all of the threads are yielding, we should yield.
-	    var numYieldingThreads = 0;
-	    // While there are still threads to run and we are within WORK_TIME,
-	    // continue executing threads.
-	    while (threads.length > 0 &&
-	           threads.length > numYieldingThreads &&
-	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
-	        // New threads at the end of the iteration.
-	        var newThreads = [];
-	        // Attempt to run each thread one time
-	        for (var i = 0; i < threads.length; i++) {
-	            var activeThread = threads[i];
-	            if (activeThread.status === Thread.STATUS_RUNNING) {
-	                // Normal-mode thread: step.
-	                this.stepThread(activeThread);
-	            } else if (activeThread.status === Thread.STATUS_YIELD) {
-	                // Yield-mode thread: check if the time has passed.
-	                YieldTimers.resolve(activeThread.yieldTimerId);
-	                numYieldingThreads++;
-	            } else if (activeThread.status === Thread.STATUS_DONE) {
-	                // Moved to a done state - finish up
-	                activeThread.status = Thread.STATUS_RUNNING;
-	                // @todo Deal with the return value
-	            }
-	            // First attempt to pop from the stack
-	            if (activeThread.stack.length > 0 &&
-	                activeThread.nextBlock === null &&
-	                activeThread.status === Thread.STATUS_DONE) {
-	                activeThread.nextBlock = activeThread.stack.pop();
-	                // Don't pop stack frame - we need the data.
-	                // A new one won't be created when we execute.
-	                if (activeThread.nextBlock !== null) {
-	                    activeThread.status === Thread.STATUS_RUNNING;
-	                }
-	            }
-	            if (activeThread.nextBlock === null &&
-	                activeThread.status === Thread.STATUS_DONE) {
-	                // Finished with this thread - tell runtime to clean it up.
-	                inactiveThreads.push(activeThread);
-	            } else {
-	                // Keep this thead in the loop.
-	                newThreads.push(activeThread);
-	            }
-	        }
-	        // Effectively filters out threads that have stopped.
-	        threads = newThreads;
-	    }
-	    return inactiveThreads;
-	};
-
-	/**
-	 * Step the requested thread
-	 * @param {!Thread} thread Thread object to step
-	 */
-	Sequencer.prototype.stepThread = function (thread) {
-	    // Save the yield timer ID, in case a primitive makes a new one
-	    // @todo hack - perhaps patch this to allow more than one timer per
-	    // primitive, for example...
-	    var oldYieldTimerId = YieldTimers.timerId;
-
-	    // Save the current block and set the nextBlock.
-	    // If the primitive would like to do control flow,
-	    // it can overwrite nextBlock.
-	    var currentBlock = thread.nextBlock;
-	    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
-	        thread.status = Thread.STATUS_DONE;
-	        return;
-	    }
-	    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
-
-	    var opcode = this.runtime.blocks.getOpcode(currentBlock);
-
-	    // Push the current block to the stack
-	    thread.stack.push(currentBlock);
-	    // Push an empty stack frame, if we need one.
-	    // Might not, if we just popped the stack.
-	    if (thread.stack.length > thread.stackFrames.length) {
-	        thread.stackFrames.push({});
-	    }
-	    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
-
-	    /**
-	     * A callback for the primitive to indicate its thread should yield.
-	     * @type {Function}
-	     */
-	    var threadYieldCallback = function () {
-	        thread.status = Thread.STATUS_YIELD;
-	    };
-
-	    /**
-	     * A callback for the primitive to indicate its thread is finished
-	     * @type {Function}
-	     */
-	    var instance = this;
-	    var threadDoneCallback = function () {
-	        thread.status = Thread.STATUS_DONE;
-	        // Refresh nextBlock in case it has changed during a yield.
-	        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
-	        // Pop the stack and stack frame
-	        thread.stack.pop();
-	        thread.stackFrames.pop();
-	    };
-
-	    /**
-	     * A callback for the primitive to start hats.
-	     * @todo very hacked...
-	     */
-	    var startHats = function(callback) {
-	        var stacks = instance.runtime.blocks.getStacks();
-	        for (var i = 0; i < stacks.length; i++) {
-	            var stack = stacks[i];
-	            var stackBlock = instance.runtime.blocks.getBlock(stack);
-	            var result = callback(stackBlock);
-	            if (result) {
-	                // Check if the stack is already running
-	                var stackRunning = false;
-
-	                for (var j = 0; j < instance.runtime.threads.length; j++) {
-	                    if (instance.runtime.threads[j].topBlock == stack) {
-	                        stackRunning = true;
-	                        break;
-	                    }
-	                }
-	                if (!stackRunning) {
-	                    instance.runtime._pushThread(stack);
-	                }
-	            }
-	        }
-	    };
-
-	    /**
-	     * Record whether we have switched stack,
-	     * to avoid proceeding the thread automatically.
-	     * @type {boolean}
-	     */
-	    var switchedStack = false;
-	    /**
-	     * A callback for a primitive to start a substack.
-	     * @type {Function}
-	     */
-	    var threadStartSubstack = function () {
-	        // Set nextBlock to the start of the substack
-	        var substack = instance.runtime.blocks.getSubstack(currentBlock);
-	        if (substack && substack.value) {
-	            thread.nextBlock = substack.value;
-	        } else {
-	            thread.nextBlock = null;
-	        }
-	        switchedStack = true;
-	    };
-
-	    // @todo extreme hack to get the single argument value for prototype
-	    var argValues = [];
-	    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
-	    for (var bi in blockInputs) {
-	        var outer = blockInputs[bi];
-	        for (var b in outer.blocks) {
-	            var block = outer.blocks[b];
-	            var fields = block.fields;
-	            for (var f in fields) {
-	                var field = fields[f];
-	                argValues.push(field.value);
-	            }
-	        }
-	    }
-
-	    if (!opcode) {
-	        console.warn('Could not get opcode for block: ' + currentBlock);
-	    }
-	    else {
-	        var blockFunction = this.runtime.getOpcodeFunction(opcode);
-	        if (!blockFunction) {
-	            console.warn('Could not get implementation for opcode: ' + opcode);
-	        }
-	        else {
-	            try {
-	                // @todo deal with the return value
-	                blockFunction(argValues, {
-	                    yield: threadYieldCallback,
-	                    done: threadDoneCallback,
-	                    timeout: YieldTimers.timeout,
-	                    stackFrame: currentStackFrame,
-	                    startSubstack: threadStartSubstack,
-	                    startHats: startHats
-	                });
-	            }
-	            catch(e) {
-	                console.error(
-	                    'Exception calling block function for opcode: ' +
-	                    opcode + '\n' + e);
-	            } finally {
-	                // Update if the thread has set a yield timer ID
-	                // @todo hack
-	                if (YieldTimers.timerId > oldYieldTimerId) {
-	                    thread.yieldTimerId = YieldTimers.timerId;
-	                }
-	                if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
-	                    // Thread executed without yielding - move to done
-	                    threadDoneCallback();
-	                }
-	            }
-	        }
-	    }
-
-	};
-
-	module.exports = Sequencer;
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports) {
-
-	/**
-	 * Constructor
-	 */
-	function Timer () {
-	    this.startTime = 0;
-	}
-
-	Timer.prototype.time = function () {
-	    return Date.now();
-	};
-
-	Timer.prototype.start = function () {
-	    this.startTime = this.time();
-	};
-
-	Timer.prototype.timeElapsed = function () {
-	    return this.time() - this.startTime;
-	};
-
-	module.exports = Timer;
-
-
-/***/ },
-/* 10 */
-/***/ function(module, exports) {
-
-	/**
-	 * A thread is a running stack context and all the metadata needed.
-	 * @param {?string} firstBlock First block to execute in the thread.
-	 * @constructor
-	 */
-	function Thread (firstBlock) {
-	    /**
-	     * ID of top block of the thread
-	     * @type {!string}
-	     */
-	    this.topBlock = firstBlock;
-	    /**
-	     * ID of next block that the thread will execute, or null if none.
-	     * @type {?string}
-	     */
-	    this.nextBlock = firstBlock;
-	    /**
-	     * Stack for the thread. When the sequencer enters a control structure,
-	     * the block is pushed onto the stack so we know where to exit.
-	     * @type {Array.<string>}
-	     */
-	    this.stack = [];
-
-	    /**
-	     * Stack frames for the thread. Store metadata for the executing blocks.
-	     * @type {Array.<Object>}
-	     */
-	    this.stackFrames = [];
-
-	    /**
-	     * Status of the thread, one of three states (below)
-	     * @type {number}
-	     */
-	    this.status = 0; /* Thread.STATUS_RUNNING */
-
-	    /**
-	     * Yield timer ID (for checking when the thread should unyield).
-	     * @type {number}
-	     */
-	    this.yieldTimerId = -1;
-	}
-
-	/**
-	 * Thread status for initialized or running thread.
-	 * Threads are in this state when the primitive is called for the first time.
-	 * @const
-	 */
-	Thread.STATUS_RUNNING = 0;
-
-	/**
-	 * Thread status for a yielded thread.
-	 * Threads are in this state when a primitive has yielded.
-	 * @const
-	 */
-	Thread.STATUS_YIELD = 1;
-
-	/**
-	 * Thread status for a finished/done thread.
-	 * Thread is moved to this state when the interpreter
-	 * can proceed with execution.
-	 * @const
-	 */
-	Thread.STATUS_DONE = 2;
-
-	module.exports = Thread;
-
-
-/***/ },
-/* 11 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/**
-	 * @fileoverview Timers that are synchronized with the Scratch sequencer.
-	 */
-	var Timer = __webpack_require__(9);
-
-	function YieldTimers () {}
-
-	/**
-	 * Shared collection of timers.
-	 * Each timer is a [Function, number] with the callback
-	 * and absolute time for it to run.
-	 * @type {Object.<number,Array>}
-	 */
-	YieldTimers.timers = {};
-
-	/**
-	 * Monotonically increasing timer ID.
-	 * @type {number}
-	 */
-	YieldTimers.timerId = 0;
-
-	/**
-	 * Utility for measuring time.
-	 * @type {!Timer}
-	 */
-	YieldTimers.globalTimer = new Timer();
-
-	/**
-	 * The timeout function is passed to primitives and is intended
-	 * as a convenient replacement for window.setTimeout.
-	 * The sequencer will attempt to resolve the timer every time
-	 * the yielded thread would have been stepped.
-	 * @param {!Function} callback To be called when the timer is done.
-	 * @param {number} timeDelta Time to wait, in ms.
-	 * @return {number} Timer ID to be used with other methods.
-	 */
-	YieldTimers.timeout = function (callback, timeDelta) {
-	    var id = ++YieldTimers.timerId;
-	    YieldTimers.timers[id] = [
-	        callback,
-	        YieldTimers.globalTimer.time() + timeDelta
-	    ];
-	    return id;
-	};
-
-	/**
-	 * Attempt to resolve a timeout.
-	 * If the time has passed, call the callback.
-	 * Otherwise, do nothing.
-	 * @param {number} id Timer ID to resolve.
-	 * @return {boolean} True if the timer has resolved.
-	 */
-	YieldTimers.resolve = function (id) {
-	    var timer = YieldTimers.timers[id];
-	    if (!timer) {
-	        // No such timer.
-	        return false;
-	    }
-	    var callback = timer[0];
-	    var time = timer[1];
-	    if (YieldTimers.globalTimer.time() < time) {
-	        // Not done yet.
-	        return false;
-	    }
-	    // Execute the callback and remove the timer.
-	    callback();
-	    delete YieldTimers.timers[id];
-	    return true;
-	};
-
-	/**
-	 * Reject a timer so the callback never executes.
-	 * @param {number} id Timer ID to reject.
-	 */
-	YieldTimers.reject = function (id) {
-	    if (YieldTimers.timers[id]) {
-	        delete YieldTimers.timers[id];
-	    }
-	};
-
-	/**
-	 * Reject all timers currently stored.
-	 * Especially useful for a Scratch "stop."
-	 */
-	YieldTimers.rejectAll = function () {
-	    YieldTimers.timers = {};
-	    YieldTimers.timerId = 0;
-	};
-
-	module.exports = YieldTimers;
-
-
-/***/ },
-/* 12 */
-/***/ function(module, exports) {
-
-	function Scratch3Blocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3Blocks.prototype.getPrimitives = function() {
-	    return {
-	        'control_repeat': this.repeat,
-	        'control_forever': this.forever,
-	        'control_wait': this.wait,
-	        'control_stop': this.stop,
-	        'event_whenflagclicked': this.whenFlagClicked,
-	        'event_whenbroadcastreceived': this.whenBroadcastReceived,
-	        'event_broadcast': this.broadcast
-	    };
-	};
-
-	Scratch3Blocks.prototype.repeat = function(argValues, util) {
-	    console.log('Running: control_repeat');
-	    // Initialize loop
-	    if (util.stackFrame.loopCounter === undefined) {
-	        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
-	    }
-	    // Decrease counter
-	    util.stackFrame.loopCounter--;
-	    // If we still have some left, start the substack
-	    if (util.stackFrame.loopCounter >= 0) {
-	        util.startSubstack();
-	    }
-	};
-
-	Scratch3Blocks.prototype.forever = function(argValues, util) {
-	    console.log('Running: control_forever');
-	    util.startSubstack();
-	};
-
-	Scratch3Blocks.prototype.wait = function(argValues, util) {
-	    console.log('Running: control_wait');
-	    util.yield();
-	    util.timeout(function() {
-	        util.done();
-	    }, 1000 * parseFloat(argValues[0]));
-	};
-
-	Scratch3Blocks.prototype.stop = function() {
-	    console.log('Running: control_stop');
-	    // @todo - don't use this.runtime
-	    this.runtime.stopAll();
-	};
-
-	Scratch3Blocks.prototype.whenFlagClicked = function() {
-	    console.log('Running: event_whenflagclicked');
-	    // No-op
-	};
-
-	Scratch3Blocks.prototype.whenBroadcastReceived = function() {
-	    console.log('Running: event_whenbroadcastreceived');
-	    // No-op
-	};
-
-	Scratch3Blocks.prototype.broadcast = function(argValues, util) {
-	    console.log('Running: event_broadcast');
-	    util.startHats(function(hat) {
-	        if (hat.opcode === 'event_whenbroadcastreceived') {
-	            var shadows = hat.fields.CHOICE.blocks;
-	            for (var sb in shadows) {
-	                var shadowblock = shadows[sb];
-	                return shadowblock.fields.CHOICE.value === argValues[0];
-	            }
-	        }
-	        return false;
-	    });
-	};
-
-	module.exports = Scratch3Blocks;
-
-
-/***/ },
-/* 13 */
-/***/ function(module, exports, __webpack_require__) {
-
-	
-	var YieldTimers = __webpack_require__(11);
-
-	function WeDo2Blocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-
-	    /**
-	     * Current motor speed, as a percentage (100 = full speed).
-	     * @type {number}
-	     * @private
-	     */
-	    this._motorSpeed = 100;
-
-	    /**
-	     * The timeout ID for a pending motor action.
-	     * @type {?int}
-	     * @private
-	     */
-	    this._motorTimeout = null;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	WeDo2Blocks.prototype.getPrimitives = function() {
-	    return {
-	        'wedo_motorclockwise': this.motorClockwise,
-	        'wedo_motorcounterclockwise': this.motorCounterClockwise,
-	        'wedo_motorspeed': this.motorSpeed,
-	        'wedo_setcolor': this.setColor,
-	        'wedo_whendistanceclose': this.whenDistanceClose,
-	        'wedo_whentilt': this.whenTilt
-	    };
-	};
-
-	/**
-	 * Clamp a value between a minimum and maximum value.
-	 * @todo move this to a common utility class.
-	 * @param val The value to clamp.
-	 * @param min The minimum return value.
-	 * @param max The maximum return value.
-	 * @returns {number} The clamped value.
-	 * @private
-	 */
-	WeDo2Blocks.prototype._clamp = function(val, min, max) {
-	    return Math.max(min, Math.min(val, max));
-	};
-
-	/**
-	 * Common implementation for motor blocks.
-	 * @param direction The direction to turn ('left' or 'right').
-	 * @param durationSeconds The number of seconds to run.
-	 * @param util The util instance to use for yielding and finishing.
-	 * @private
-	 */
-	WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
-	    if (this._motorTimeout > 0) {
-	        // @todo maybe this should go through util
-	        YieldTimers.resolve(this._motorTimeout);
-	        this._motorTimeout = null;
-	    }
-	    if (window.native) {
-	        window.native.motorRun(direction, this._motorSpeed);
-	    }
-
-	    var instance = this;
-	    var myTimeout = this._motorTimeout = util.timeout(function() {
-	        if (instance._motorTimeout == myTimeout) {
-	            instance._motorTimeout = null;
-	        }
-	        if (window.native) {
-	            window.native.motorStop();
-	        }
-	        util.done();
-	    }, 1000 * durationSeconds);
-
-	    util.yield();
-	};
-
-	WeDo2Blocks.prototype.motorClockwise = function(argValues, util) {
-	    this._motorOnFor('right', parseFloat(argValues[0]), util);
-	};
-
-	WeDo2Blocks.prototype.motorCounterClockwise = function(argValues, util) {
-	    this._motorOnFor('left', parseFloat(argValues[0]), util);
-	};
-
-	WeDo2Blocks.prototype.motorSpeed = function(argValues) {
-	    var speed = argValues[0];
-	    switch (speed) {
-	    case 'slow':
-	        this._motorSpeed = 20;
-	        break;
-	    case 'medium':
-	        this._motorSpeed = 50;
-	        break;
-	    case 'fast':
-	        this._motorSpeed = 100;
-	        break;
-	    }
-	};
-
-	/**
-	 * Convert a color name to a WeDo color index.
-	 * Supports 'mystery' for a random hue.
-	 * @param colorName The color to retrieve.
-	 * @returns {number} The WeDo color index.
-	 * @private
-	 */
-	WeDo2Blocks.prototype._getColor = function(colorName) {
-	    var colors = {
-	        'yellow': 7,
-	        'orange': 8,
-	        'coral': 9,
-	        'magenta': 1,
-	        'purple': 2,
-	        'blue': 3,
-	        'green': 6,
-	        'white': 10
-	    };
-
-	    if (colorName == 'mystery') {
-	        return Math.floor((Math.random() * 10) + 1);
-	    }
-
-	    return colors[colorName];
-	};
-
-	WeDo2Blocks.prototype.setColor = function(argValues, util) {
-	    if (window.native) {
-	        var colorIndex = this._getColor(argValues[0]);
-	        window.native.setLedColor(colorIndex);
-	    }
-	    // Pause for quarter second
-	    util.yield();
-	    util.timeout(function() {
-	        util.done();
-	    }, 250);
-	};
-
-	WeDo2Blocks.prototype.whenDistanceClose = function() {
-	    console.log('Running: wedo_whendistanceclose');
-	};
-
-	WeDo2Blocks.prototype.whenTilt = function() {
-	    console.log('Running: wedo_whentilt');
-	};
-
-	module.exports = WeDo2Blocks;
-
-
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var html = __webpack_require__(15);
-	var memoize = __webpack_require__(64);
+	var html = __webpack_require__(8);
+	var memoize = __webpack_require__(57);
 	var parseDOM = memoize(html.parseDOM, {
 	    length: 1,
 	    resolvers: [String],
@@ -2404,8 +1463,8 @@
 	 * Convert and an individual block DOM to the representation tree.
 	 * Based on Blockly's `domToBlockHeadless_`.
 	 * @param {Element} blockDOM DOM tree for an individual block.
-	 * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
 	 * @param {Object} blocks Collection of blocks to add to.
+	 * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
 	 */
 	function domToBlock (blockDOM, blocks, isTopBlock) {
 	    // Block skeleton.
@@ -2484,11 +1543,11 @@
 
 
 /***/ },
-/* 15 */
+/* 8 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Parser = __webpack_require__(16),
-	    DomHandler = __webpack_require__(23);
+	var Parser = __webpack_require__(9),
+	    DomHandler = __webpack_require__(16);
 
 	function defineProp(name, value){
 		delete module.exports[name];
@@ -2498,26 +1557,26 @@
 
 	module.exports = {
 		Parser: Parser,
-		Tokenizer: __webpack_require__(17),
-		ElementType: __webpack_require__(24),
+		Tokenizer: __webpack_require__(10),
+		ElementType: __webpack_require__(17),
 		DomHandler: DomHandler,
 		get FeedHandler(){
-			return defineProp("FeedHandler", __webpack_require__(27));
+			return defineProp("FeedHandler", __webpack_require__(20));
 		},
 		get Stream(){
-			return defineProp("Stream", __webpack_require__(28));
+			return defineProp("Stream", __webpack_require__(21));
 		},
 		get WritableStream(){
-			return defineProp("WritableStream", __webpack_require__(29));
+			return defineProp("WritableStream", __webpack_require__(22));
 		},
 		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(50));
+			return defineProp("ProxyHandler", __webpack_require__(43));
 		},
 		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(51));
+			return defineProp("DomUtils", __webpack_require__(44));
 		},
 		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(63));
+			return defineProp("CollectingHandler", __webpack_require__(56));
 		},
 		// For legacy support
 		DefaultHandler: DomHandler,
@@ -2558,10 +1617,10 @@
 
 
 /***/ },
-/* 16 */
+/* 9 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Tokenizer = __webpack_require__(17);
+	var Tokenizer = __webpack_require__(10);
 
 	/*
 		Options:
@@ -2916,15 +1975,15 @@
 
 
 /***/ },
-/* 17 */
+/* 10 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Tokenizer;
 
-	var decodeCodePoint = __webpack_require__(18),
-	    entityMap = __webpack_require__(20),
-	    legacyMap = __webpack_require__(21),
-	    xmlMap    = __webpack_require__(22),
+	var decodeCodePoint = __webpack_require__(11),
+	    entityMap = __webpack_require__(13),
+	    legacyMap = __webpack_require__(14),
+	    xmlMap    = __webpack_require__(15),
 
 	    i = 0,
 
@@ -3828,10 +2887,10 @@
 
 
 /***/ },
-/* 18 */
+/* 11 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var decodeMap = __webpack_require__(19);
+	var decodeMap = __webpack_require__(12);
 
 	module.exports = decodeCodePoint;
 
@@ -3860,7 +2919,7 @@
 
 
 /***/ },
-/* 19 */
+/* 12 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -3895,7 +2954,7 @@
 	};
 
 /***/ },
-/* 20 */
+/* 13 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -6027,7 +5086,7 @@
 	};
 
 /***/ },
-/* 21 */
+/* 14 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -6140,7 +5199,7 @@
 	};
 
 /***/ },
-/* 22 */
+/* 15 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -6152,14 +5211,14 @@
 	};
 
 /***/ },
-/* 23 */
+/* 16 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(24);
+	var ElementType = __webpack_require__(17);
 
 	var re_whitespace = /\s+/g;
-	var NodePrototype = __webpack_require__(25);
-	var ElementPrototype = __webpack_require__(26);
+	var NodePrototype = __webpack_require__(18);
+	var ElementPrototype = __webpack_require__(19);
 
 	function DomHandler(callback, options, elementCB){
 		if(typeof callback === "object"){
@@ -6340,7 +5399,7 @@
 
 
 /***/ },
-/* 24 */
+/* 17 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -6361,7 +5420,7 @@
 
 
 /***/ },
-/* 25 */
+/* 18 */
 /***/ function(module, exports) {
 
 	// This object will be used as the prototype for Nodes when creating a
@@ -6411,11 +5470,11 @@
 
 
 /***/ },
-/* 26 */
+/* 19 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// DOM-Level-1-compliant structure
-	var NodePrototype = __webpack_require__(25);
+	var NodePrototype = __webpack_require__(18);
 	var ElementPrototype = module.exports = Object.create(NodePrototype);
 
 	var domLvl1 = {
@@ -6437,10 +5496,10 @@
 
 
 /***/ },
-/* 27 */
+/* 20 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var index = __webpack_require__(15),
+	var index = __webpack_require__(8),
 	    DomHandler = index.DomHandler,
 		DomUtils = index.DomUtils;
 
@@ -6538,12 +5597,12 @@
 
 
 /***/ },
-/* 28 */
+/* 21 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(29);
+	var Parser = __webpack_require__(22);
 
 	function Stream(options){
 		Parser.call(this, new Cbs(this), options);
@@ -6557,7 +5616,7 @@
 		this.scope = scope;
 	}
 
-	var EVENTS = __webpack_require__(15).EVENTS;
+	var EVENTS = __webpack_require__(8).EVENTS;
 
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
@@ -6578,13 +5637,13 @@
 	});
 
 /***/ },
-/* 29 */
+/* 22 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(16),
-	    WritableStream = __webpack_require__(30).Writable || __webpack_require__(49).Writable;
+	var Parser = __webpack_require__(9),
+	    WritableStream = __webpack_require__(23).Writable || __webpack_require__(42).Writable;
 
 	function Stream(cbs, options){
 		var parser = this._parser = new Parser(cbs, options);
@@ -6604,7 +5663,7 @@
 	};
 
 /***/ },
-/* 30 */
+/* 23 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -6634,11 +5693,11 @@
 	var inherits = __webpack_require__(5);
 
 	inherits(Stream, EE);
-	Stream.Readable = __webpack_require__(31);
-	Stream.Writable = __webpack_require__(45);
-	Stream.Duplex = __webpack_require__(46);
-	Stream.Transform = __webpack_require__(47);
-	Stream.PassThrough = __webpack_require__(48);
+	Stream.Readable = __webpack_require__(24);
+	Stream.Writable = __webpack_require__(38);
+	Stream.Duplex = __webpack_require__(39);
+	Stream.Transform = __webpack_require__(40);
+	Stream.PassThrough = __webpack_require__(41);
 
 	// Backwards-compat with node 0.4.x
 	Stream.Stream = Stream;
@@ -6737,24 +5796,24 @@
 
 
 /***/ },
-/* 31 */
+/* 24 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(32);
-	exports.Stream = __webpack_require__(30);
+	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(25);
+	exports.Stream = __webpack_require__(23);
 	exports.Readable = exports;
-	exports.Writable = __webpack_require__(41);
-	exports.Duplex = __webpack_require__(40);
-	exports.Transform = __webpack_require__(43);
-	exports.PassThrough = __webpack_require__(44);
+	exports.Writable = __webpack_require__(34);
+	exports.Duplex = __webpack_require__(33);
+	exports.Transform = __webpack_require__(36);
+	exports.PassThrough = __webpack_require__(37);
 	if (!process.browser && process.env.READABLE_STREAM === 'disable') {
-	  module.exports = __webpack_require__(30);
+	  module.exports = __webpack_require__(23);
 	}
 
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 32 */
+/* 25 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -6781,12 +5840,12 @@
 	module.exports = Readable;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(33);
+	var isArray = __webpack_require__(26);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(34).Buffer;
+	var Buffer = __webpack_require__(27).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
@@ -6799,10 +5858,10 @@
 	};
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(30);
+	var Stream = __webpack_require__(23);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
+	var util = __webpack_require__(31);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -6810,7 +5869,7 @@
 
 
 	/*<replacement>*/
-	var debug = __webpack_require__(39);
+	var debug = __webpack_require__(32);
 	if (debug && debug.debuglog) {
 	  debug = debug.debuglog('stream');
 	} else {
@@ -6822,7 +5881,7 @@
 	util.inherits(Readable, Stream);
 
 	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(40);
+	  var Duplex = __webpack_require__(33);
 
 	  options = options || {};
 
@@ -6883,14 +5942,14 @@
 	  this.encoding = null;
 	  if (options.encoding) {
 	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(42).StringDecoder;
+	      StringDecoder = __webpack_require__(35).StringDecoder;
 	    this.decoder = new StringDecoder(options.encoding);
 	    this.encoding = options.encoding;
 	  }
 	}
 
 	function Readable(options) {
-	  var Duplex = __webpack_require__(40);
+	  var Duplex = __webpack_require__(33);
 
 	  if (!(this instanceof Readable))
 	    return new Readable(options);
@@ -6993,7 +6052,7 @@
 	// backwards compatibility.
 	Readable.prototype.setEncoding = function(enc) {
 	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(42).StringDecoder;
+	    StringDecoder = __webpack_require__(35).StringDecoder;
 	  this._readableState.decoder = new StringDecoder(enc);
 	  this._readableState.encoding = enc;
 	  return this;
@@ -7712,7 +6771,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 33 */
+/* 26 */
 /***/ function(module, exports) {
 
 	module.exports = Array.isArray || function (arr) {
@@ -7721,7 +6780,7 @@
 
 
 /***/ },
-/* 34 */
+/* 27 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
@@ -7734,9 +6793,9 @@
 
 	'use strict'
 
-	var base64 = __webpack_require__(35)
-	var ieee754 = __webpack_require__(36)
-	var isArray = __webpack_require__(37)
+	var base64 = __webpack_require__(28)
+	var ieee754 = __webpack_require__(29)
+	var isArray = __webpack_require__(30)
 
 	exports.Buffer = Buffer
 	exports.SlowBuffer = SlowBuffer
@@ -9273,10 +8332,10 @@
 	  return i
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer, (function() { return this; }())))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27).Buffer, (function() { return this; }())))
 
 /***/ },
-/* 35 */
+/* 28 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -9406,7 +8465,7 @@
 
 
 /***/ },
-/* 36 */
+/* 29 */
 /***/ function(module, exports) {
 
 	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -9496,7 +8555,7 @@
 
 
 /***/ },
-/* 37 */
+/* 30 */
 /***/ function(module, exports) {
 
 	var toString = {}.toString;
@@ -9507,7 +8566,7 @@
 
 
 /***/ },
-/* 38 */
+/* 31 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9618,16 +8677,16 @@
 	  return Object.prototype.toString.call(o);
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34).Buffer))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27).Buffer))
 
 /***/ },
-/* 39 */
+/* 32 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 40 */
+/* 33 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9668,12 +8727,12 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
+	var util = __webpack_require__(31);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Readable = __webpack_require__(32);
-	var Writable = __webpack_require__(41);
+	var Readable = __webpack_require__(25);
+	var Writable = __webpack_require__(34);
 
 	util.inherits(Duplex, Readable);
 
@@ -9723,7 +8782,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 41 */
+/* 34 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9754,18 +8813,18 @@
 	module.exports = Writable;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(34).Buffer;
+	var Buffer = __webpack_require__(27).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
+	var util = __webpack_require__(31);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(30);
+	var Stream = __webpack_require__(23);
 
 	util.inherits(Writable, Stream);
 
@@ -9776,7 +8835,7 @@
 	}
 
 	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(40);
+	  var Duplex = __webpack_require__(33);
 
 	  options = options || {};
 
@@ -9864,7 +8923,7 @@
 	}
 
 	function Writable(options) {
-	  var Duplex = __webpack_require__(40);
+	  var Duplex = __webpack_require__(33);
 
 	  // Writable ctor is applied to Duplexes, though they're not
 	  // instanceof Writable, they're instanceof Readable.
@@ -10207,7 +9266,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 42 */
+/* 35 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10231,7 +9290,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__(34).Buffer;
+	var Buffer = __webpack_require__(27).Buffer;
 
 	var isBufferEncoding = Buffer.isEncoding
 	  || function(encoding) {
@@ -10434,7 +9493,7 @@
 
 
 /***/ },
-/* 43 */
+/* 36 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10503,10 +9562,10 @@
 
 	module.exports = Transform;
 
-	var Duplex = __webpack_require__(40);
+	var Duplex = __webpack_require__(33);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
+	var util = __webpack_require__(31);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10649,7 +9708,7 @@
 
 
 /***/ },
-/* 44 */
+/* 37 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10679,10 +9738,10 @@
 
 	module.exports = PassThrough;
 
-	var Transform = __webpack_require__(43);
+	var Transform = __webpack_require__(36);
 
 	/*<replacement>*/
-	var util = __webpack_require__(38);
+	var util = __webpack_require__(31);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10701,41 +9760,41 @@
 
 
 /***/ },
-/* 45 */
+/* 38 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(41)
+	module.exports = __webpack_require__(34)
 
 
 /***/ },
-/* 46 */
+/* 39 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(40)
+	module.exports = __webpack_require__(33)
 
 
 /***/ },
-/* 47 */
+/* 40 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(43)
+	module.exports = __webpack_require__(36)
 
 
 /***/ },
-/* 48 */
+/* 41 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(44)
+	module.exports = __webpack_require__(37)
 
 
 /***/ },
-/* 49 */
+/* 42 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 50 */
+/* 43 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = ProxyHandler;
@@ -10744,7 +9803,7 @@
 		this._cbs = cbs || {};
 	}
 
-	var EVENTS = __webpack_require__(15).EVENTS;
+	var EVENTS = __webpack_require__(8).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -10767,18 +9826,18 @@
 	});
 
 /***/ },
-/* 51 */
+/* 44 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var DomUtils = module.exports;
 
 	[
+		__webpack_require__(45),
+		__webpack_require__(51),
 		__webpack_require__(52),
-		__webpack_require__(58),
-		__webpack_require__(59),
-		__webpack_require__(60),
-		__webpack_require__(61),
-		__webpack_require__(62)
+		__webpack_require__(53),
+		__webpack_require__(54),
+		__webpack_require__(55)
 	].forEach(function(ext){
 		Object.keys(ext).forEach(function(key){
 			DomUtils[key] = ext[key].bind(DomUtils);
@@ -10787,11 +9846,11 @@
 
 
 /***/ },
-/* 52 */
+/* 45 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(24),
-	    getOuterHTML = __webpack_require__(53),
+	var ElementType = __webpack_require__(17),
+	    getOuterHTML = __webpack_require__(46),
 	    isTag = ElementType.isTag;
 
 	module.exports = {
@@ -10815,14 +9874,14 @@
 
 
 /***/ },
-/* 53 */
+/* 46 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/*
 	  Module dependencies
 	*/
-	var ElementType = __webpack_require__(54);
-	var entities = __webpack_require__(55);
+	var ElementType = __webpack_require__(47);
+	var entities = __webpack_require__(48);
 
 	/*
 	  Boolean Attributes
@@ -10999,7 +10058,7 @@
 
 
 /***/ },
-/* 54 */
+/* 47 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -11018,11 +10077,11 @@
 	};
 
 /***/ },
-/* 55 */
+/* 48 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var encode = __webpack_require__(56),
-	    decode = __webpack_require__(57);
+	var encode = __webpack_require__(49),
+	    decode = __webpack_require__(50);
 
 	exports.decode = function(data, level){
 		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
@@ -11057,15 +10116,15 @@
 
 
 /***/ },
-/* 56 */
+/* 49 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var inverseXML = getInverseObj(__webpack_require__(22)),
+	var inverseXML = getInverseObj(__webpack_require__(15)),
 	    xmlReplacer = getInverseReplacer(inverseXML);
 
 	exports.XML = getInverse(inverseXML, xmlReplacer);
 
-	var inverseHTML = getInverseObj(__webpack_require__(20)),
+	var inverseHTML = getInverseObj(__webpack_require__(13)),
 	    htmlReplacer = getInverseReplacer(inverseHTML);
 
 	exports.HTML = getInverse(inverseHTML, htmlReplacer);
@@ -11136,13 +10195,13 @@
 
 
 /***/ },
-/* 57 */
+/* 50 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var entityMap = __webpack_require__(20),
-	    legacyMap = __webpack_require__(21),
-	    xmlMap    = __webpack_require__(22),
-	    decodeCodePoint = __webpack_require__(18);
+	var entityMap = __webpack_require__(13),
+	    legacyMap = __webpack_require__(14),
+	    xmlMap    = __webpack_require__(15),
+	    decodeCodePoint = __webpack_require__(11);
 
 	var decodeXMLStrict  = getStrictDecoder(xmlMap),
 	    decodeHTMLStrict = getStrictDecoder(entityMap);
@@ -11213,7 +10272,7 @@
 	};
 
 /***/ },
-/* 58 */
+/* 51 */
 /***/ function(module, exports) {
 
 	var getChildren = exports.getChildren = function(elem){
@@ -11243,7 +10302,7 @@
 
 
 /***/ },
-/* 59 */
+/* 52 */
 /***/ function(module, exports) {
 
 	exports.removeElement = function(elem){
@@ -11326,10 +10385,10 @@
 
 
 /***/ },
-/* 60 */
+/* 53 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var isTag = __webpack_require__(24).isTag;
+	var isTag = __webpack_require__(17).isTag;
 
 	module.exports = {
 		filter: filter,
@@ -11426,10 +10485,10 @@
 
 
 /***/ },
-/* 61 */
+/* 54 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(24);
+	var ElementType = __webpack_require__(17);
 	var isTag = exports.isTag = ElementType.isTag;
 
 	exports.testElement = function(options, element){
@@ -11519,7 +10578,7 @@
 
 
 /***/ },
-/* 62 */
+/* 55 */
 /***/ function(module, exports) {
 
 	// removeSubsets
@@ -11666,7 +10725,7 @@
 
 
 /***/ },
-/* 63 */
+/* 56 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = CollectingHandler;
@@ -11676,7 +10735,7 @@
 		this.events = [];
 	}
 
-	var EVENTS = __webpack_require__(15).EVENTS;
+	var EVENTS = __webpack_require__(8).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -11727,14 +10786,14 @@
 
 
 /***/ },
-/* 64 */
+/* 57 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var normalizeOpts = __webpack_require__(65)
-	  , resolveLength = __webpack_require__(66)
-	  , plain         = __webpack_require__(72);
+	var normalizeOpts = __webpack_require__(58)
+	  , resolveLength = __webpack_require__(59)
+	  , plain         = __webpack_require__(65);
 
 	module.exports = function (fn/*, options*/) {
 		var options = normalizeOpts(arguments[1]), length;
@@ -11744,31 +10803,31 @@
 			if (length !== 0) {
 				if (options.primitive) {
 					if (length === false) {
-						options.normalizer = __webpack_require__(109);
+						options.normalizer = __webpack_require__(102);
 					} else if (length > 1) {
-						options.normalizer = __webpack_require__(110)(length);
+						options.normalizer = __webpack_require__(103)(length);
 					}
 				} else {
-					if (length === false) options.normalizer = __webpack_require__(111)();
-					else if (length === 1) options.normalizer = __webpack_require__(113)();
-					else options.normalizer = __webpack_require__(114)(length);
+					if (length === false) options.normalizer = __webpack_require__(104)();
+					else if (length === 1) options.normalizer = __webpack_require__(106)();
+					else options.normalizer = __webpack_require__(107)(length);
 				}
 			}
 		}
 
 		// Assure extensions
-		if (options.async) __webpack_require__(115);
-		if (options.dispose) __webpack_require__(118);
-		if (options.maxAge) __webpack_require__(119);
-		if (options.max) __webpack_require__(122);
-		if (options.refCounter) __webpack_require__(124);
+		if (options.async) __webpack_require__(108);
+		if (options.dispose) __webpack_require__(111);
+		if (options.maxAge) __webpack_require__(112);
+		if (options.max) __webpack_require__(115);
+		if (options.refCounter) __webpack_require__(117);
 
 		return plain(fn, options);
 	};
 
 
 /***/ },
-/* 65 */
+/* 58 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11791,12 +10850,12 @@
 
 
 /***/ },
-/* 66 */
+/* 59 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(67);
+	var toPosInt = __webpack_require__(60);
 
 	module.exports = function (optsLength, fnLength, isAsync) {
 		var length;
@@ -11812,12 +10871,12 @@
 
 
 /***/ },
-/* 67 */
+/* 60 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toInteger = __webpack_require__(68)
+	var toInteger = __webpack_require__(61)
 
 	  , max = Math.max;
 
@@ -11825,12 +10884,12 @@
 
 
 /***/ },
-/* 68 */
+/* 61 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var sign = __webpack_require__(69)
+	var sign = __webpack_require__(62)
 
 	  , abs = Math.abs, floor = Math.floor;
 
@@ -11843,18 +10902,18 @@
 
 
 /***/ },
-/* 69 */
+/* 62 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(70)()
+	module.exports = __webpack_require__(63)()
 		? Math.sign
-		: __webpack_require__(71);
+		: __webpack_require__(64);
 
 
 /***/ },
-/* 70 */
+/* 63 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11867,7 +10926,7 @@
 
 
 /***/ },
-/* 71 */
+/* 64 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11880,16 +10939,16 @@
 
 
 /***/ },
-/* 72 */
+/* 65 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable      = __webpack_require__(73)
-	  , forEach       = __webpack_require__(74)
-	  , extensions    = __webpack_require__(77)
-	  , configure     = __webpack_require__(78)
-	  , resolveLength = __webpack_require__(66)
+	var callable      = __webpack_require__(66)
+	  , forEach       = __webpack_require__(67)
+	  , extensions    = __webpack_require__(70)
+	  , configure     = __webpack_require__(71)
+	  , resolveLength = __webpack_require__(59)
 
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -11921,7 +10980,7 @@
 
 
 /***/ },
-/* 73 */
+/* 66 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11933,16 +10992,16 @@
 
 
 /***/ },
-/* 74 */
+/* 67 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(75)('forEach');
+	module.exports = __webpack_require__(68)('forEach');
 
 
 /***/ },
-/* 75 */
+/* 68 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Internal method, used by iteration functions.
@@ -11951,8 +11010,8 @@
 
 	'use strict';
 
-	var callable = __webpack_require__(73)
-	  , value    = __webpack_require__(76)
+	var callable = __webpack_require__(66)
+	  , value    = __webpack_require__(69)
 
 	  , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
 	  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
@@ -11977,7 +11036,7 @@
 
 
 /***/ },
-/* 76 */
+/* 69 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -11989,24 +11048,24 @@
 
 
 /***/ },
-/* 77 */
+/* 70 */
 /***/ function(module, exports) {
 
 	'use strict';
 
 
 /***/ },
-/* 78 */
+/* 71 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var customError      = __webpack_require__(79)
-	  , defineLength     = __webpack_require__(86)
-	  , d                = __webpack_require__(88)
-	  , ee               = __webpack_require__(93).methods
-	  , resolveResolve   = __webpack_require__(94)
-	  , resolveNormalize = __webpack_require__(108)
+	var customError      = __webpack_require__(72)
+	  , defineLength     = __webpack_require__(79)
+	  , d                = __webpack_require__(81)
+	  , ee               = __webpack_require__(86).methods
+	  , resolveResolve   = __webpack_require__(87)
+	  , resolveNormalize = __webpack_require__(101)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty
@@ -12146,12 +11205,12 @@
 
 
 /***/ },
-/* 79 */
+/* 72 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign = __webpack_require__(80)
+	var assign = __webpack_require__(73)
 
 	  , captureStackTrace = Error.captureStackTrace;
 
@@ -12172,18 +11231,18 @@
 
 
 /***/ },
-/* 80 */
+/* 73 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(81)()
+	module.exports = __webpack_require__(74)()
 		? Object.assign
-		: __webpack_require__(82);
+		: __webpack_require__(75);
 
 
 /***/ },
-/* 81 */
+/* 74 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12198,13 +11257,13 @@
 
 
 /***/ },
-/* 82 */
+/* 75 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var keys  = __webpack_require__(83)
-	  , value = __webpack_require__(76)
+	var keys  = __webpack_require__(76)
+	  , value = __webpack_require__(69)
 
 	  , max = Math.max;
 
@@ -12226,18 +11285,18 @@
 
 
 /***/ },
-/* 83 */
+/* 76 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(84)()
+	module.exports = __webpack_require__(77)()
 		? Object.keys
-		: __webpack_require__(85);
+		: __webpack_require__(78);
 
 
 /***/ },
-/* 84 */
+/* 77 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12251,7 +11310,7 @@
 
 
 /***/ },
-/* 85 */
+/* 78 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12264,12 +11323,12 @@
 
 
 /***/ },
-/* 86 */
+/* 79 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(67)
+	var toPosInt = __webpack_require__(60)
 
 	  , test = function (a, b) {}, desc, defineProperty
 	  , generate, mixin;
@@ -12290,7 +11349,7 @@
 			return defineProperty(fn, 'length', desc);
 		};
 	} else {
-		mixin = __webpack_require__(87);
+		mixin = __webpack_require__(80);
 		generate = (function () {
 			var cache = [];
 			return function (l) {
@@ -12314,12 +11373,12 @@
 
 
 /***/ },
-/* 87 */
+/* 80 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var value = __webpack_require__(76)
+	var value = __webpack_require__(69)
 
 	  , defineProperty = Object.defineProperty
 	  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
@@ -12339,15 +11398,15 @@
 
 
 /***/ },
-/* 88 */
+/* 81 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var assign        = __webpack_require__(80)
-	  , normalizeOpts = __webpack_require__(65)
-	  , isCallable    = __webpack_require__(89)
-	  , contains      = __webpack_require__(90)
+	var assign        = __webpack_require__(73)
+	  , normalizeOpts = __webpack_require__(58)
+	  , isCallable    = __webpack_require__(82)
+	  , contains      = __webpack_require__(83)
 
 	  , d;
 
@@ -12408,7 +11467,7 @@
 
 
 /***/ },
-/* 89 */
+/* 82 */
 /***/ function(module, exports) {
 
 	// Deprecated
@@ -12419,18 +11478,18 @@
 
 
 /***/ },
-/* 90 */
+/* 83 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(91)()
+	module.exports = __webpack_require__(84)()
 		? String.prototype.contains
-		: __webpack_require__(92);
+		: __webpack_require__(85);
 
 
 /***/ },
-/* 91 */
+/* 84 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12444,7 +11503,7 @@
 
 
 /***/ },
-/* 92 */
+/* 85 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12457,13 +11516,13 @@
 
 
 /***/ },
-/* 93 */
+/* 86 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var d        = __webpack_require__(88)
-	  , callable = __webpack_require__(73)
+	var d        = __webpack_require__(81)
+	  , callable = __webpack_require__(66)
 
 	  , apply = Function.prototype.apply, call = Function.prototype.call
 	  , create = Object.create, defineProperty = Object.defineProperty
@@ -12595,13 +11654,13 @@
 
 
 /***/ },
-/* 94 */
+/* 87 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toArray  = __webpack_require__(95)
-	  , callable = __webpack_require__(73)
+	var toArray  = __webpack_require__(88)
+	  , callable = __webpack_require__(66)
 
 	  , slice = Array.prototype.slice
 	  , resolveArgs;
@@ -12622,12 +11681,12 @@
 
 
 /***/ },
-/* 95 */
+/* 88 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var from = __webpack_require__(96)
+	var from = __webpack_require__(89)
 
 	  , isArray = Array.isArray;
 
@@ -12637,18 +11696,18 @@
 
 
 /***/ },
-/* 96 */
+/* 89 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(97)()
+	module.exports = __webpack_require__(90)()
 		? Array.from
-		: __webpack_require__(98);
+		: __webpack_require__(91);
 
 
 /***/ },
-/* 97 */
+/* 90 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12663,18 +11722,18 @@
 
 
 /***/ },
-/* 98 */
+/* 91 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var iteratorSymbol = __webpack_require__(99).iterator
-	  , isArguments    = __webpack_require__(104)
-	  , isFunction     = __webpack_require__(105)
-	  , toPosInt       = __webpack_require__(67)
-	  , callable       = __webpack_require__(73)
-	  , validValue     = __webpack_require__(76)
-	  , isString       = __webpack_require__(107)
+	var iteratorSymbol = __webpack_require__(92).iterator
+	  , isArguments    = __webpack_require__(97)
+	  , isFunction     = __webpack_require__(98)
+	  , toPosInt       = __webpack_require__(60)
+	  , callable       = __webpack_require__(66)
+	  , validValue     = __webpack_require__(69)
+	  , isString       = __webpack_require__(100)
 
 	  , isArray = Array.isArray, call = Function.prototype.call
 	  , desc = { configurable: true, enumerable: true, writable: true, value: null }
@@ -12775,16 +11834,16 @@
 
 
 /***/ },
-/* 99 */
+/* 92 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	module.exports = __webpack_require__(100)() ? Symbol : __webpack_require__(101);
+	module.exports = __webpack_require__(93)() ? Symbol : __webpack_require__(94);
 
 
 /***/ },
-/* 100 */
+/* 93 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12808,15 +11867,15 @@
 
 
 /***/ },
-/* 101 */
+/* 94 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
 
 	'use strict';
 
-	var d              = __webpack_require__(88)
-	  , validateSymbol = __webpack_require__(102)
+	var d              = __webpack_require__(81)
+	  , validateSymbol = __webpack_require__(95)
 
 	  , create = Object.create, defineProperties = Object.defineProperties
 	  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
@@ -12921,12 +11980,12 @@
 
 
 /***/ },
-/* 102 */
+/* 95 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var isSymbol = __webpack_require__(103);
+	var isSymbol = __webpack_require__(96);
 
 	module.exports = function (value) {
 		if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
@@ -12935,7 +11994,7 @@
 
 
 /***/ },
-/* 103 */
+/* 96 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12946,7 +12005,7 @@
 
 
 /***/ },
-/* 104 */
+/* 97 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12959,14 +12018,14 @@
 
 
 /***/ },
-/* 105 */
+/* 98 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
 	var toString = Object.prototype.toString
 
-	  , id = toString.call(__webpack_require__(106));
+	  , id = toString.call(__webpack_require__(99));
 
 	module.exports = function (f) {
 		return (typeof f === "function") && (toString.call(f) === id);
@@ -12974,7 +12033,7 @@
 
 
 /***/ },
-/* 106 */
+/* 99 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12983,7 +12042,7 @@
 
 
 /***/ },
-/* 107 */
+/* 100 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -12999,12 +12058,12 @@
 
 
 /***/ },
-/* 108 */
+/* 101 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var callable = __webpack_require__(73);
+	var callable = __webpack_require__(66);
 
 	module.exports = function (userNormalizer) {
 		var normalizer;
@@ -13022,7 +12081,7 @@
 
 
 /***/ },
-/* 109 */
+/* 102 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -13037,7 +12096,7 @@
 
 
 /***/ },
-/* 110 */
+/* 103 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -13055,12 +12114,12 @@
 
 
 /***/ },
-/* 111 */
+/* 104 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(112)
+	var indexOf = __webpack_require__(105)
 	  , create = Object.create;
 
 	module.exports = function () {
@@ -13149,13 +12208,13 @@
 
 
 /***/ },
-/* 112 */
+/* 105 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(67)
-	  , value    = __webpack_require__(76)
+	var toPosInt = __webpack_require__(60)
+	  , value    = __webpack_require__(69)
 
 	  , indexOf = Array.prototype.indexOf
 	  , hasOwnProperty = Object.prototype.hasOwnProperty
@@ -13184,12 +12243,12 @@
 
 
 /***/ },
-/* 113 */
+/* 106 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(112);
+	var indexOf = __webpack_require__(105);
 
 	module.exports = function () {
 		var lastId = 0, argsMap = [], cache = [];
@@ -13219,12 +12278,12 @@
 
 
 /***/ },
-/* 114 */
+/* 107 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var indexOf = __webpack_require__(112)
+	var indexOf = __webpack_require__(105)
 	  , create = Object.create;
 
 	module.exports = function (length) {
@@ -13296,23 +12355,23 @@
 
 
 /***/ },
-/* 115 */
+/* 108 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Support for asynchronous functions
 
 	'use strict';
 
-	var aFrom        = __webpack_require__(96)
-	  , mixin        = __webpack_require__(87)
-	  , defineLength = __webpack_require__(86)
-	  , nextTick     = __webpack_require__(116)
+	var aFrom        = __webpack_require__(89)
+	  , mixin        = __webpack_require__(80)
+	  , defineLength = __webpack_require__(79)
+	  , nextTick     = __webpack_require__(109)
 
 	  , slice = Array.prototype.slice
 	  , apply = Function.prototype.apply, create = Object.create
 	  , hasOwnProperty = Object.prototype.hasOwnProperty;
 
-	__webpack_require__(77).async = function (tbi, conf) {
+	__webpack_require__(70).async = function (tbi, conf) {
 		var waiting = create(null), cache = create(null)
 		  , base = conf.memoized, original = conf.original
 		  , currentCallback, currentContext, currentArgs;
@@ -13448,7 +12507,7 @@
 
 
 /***/ },
-/* 116 */
+/* 109 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process, setImmediate) {'use strict';
@@ -13516,10 +12575,10 @@
 		return null;
 	}());
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(117).setImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(110).setImmediate))
 
 /***/ },
-/* 117 */
+/* 110 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(3).nextTick;
@@ -13598,19 +12657,19 @@
 	exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
 	  delete immediateIds[id];
 	};
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117).setImmediate, __webpack_require__(117).clearImmediate))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110).setImmediate, __webpack_require__(110).clearImmediate))
 
 /***/ },
-/* 118 */
+/* 111 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Call dispose callback on each cache purge
 
 	'use strict';
 
-	var callable   = __webpack_require__(73)
-	  , forEach    = __webpack_require__(74)
-	  , extensions = __webpack_require__(77)
+	var callable   = __webpack_require__(66)
+	  , forEach    = __webpack_require__(67)
+	  , extensions = __webpack_require__(70)
 
 	  , slice = Array.prototype.slice, apply = Function.prototype.apply;
 
@@ -13634,18 +12693,18 @@
 
 
 /***/ },
-/* 119 */
+/* 112 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Timeout cached values
 
 	'use strict';
 
-	var aFrom      = __webpack_require__(96)
-	  , noop       = __webpack_require__(106)
-	  , forEach    = __webpack_require__(74)
-	  , timeout    = __webpack_require__(120)
-	  , extensions = __webpack_require__(77)
+	var aFrom      = __webpack_require__(89)
+	  , noop       = __webpack_require__(99)
+	  , forEach    = __webpack_require__(67)
+	  , timeout    = __webpack_require__(113)
+	  , extensions = __webpack_require__(70)
 
 	  , max = Math.max, min = Math.min, create = Object.create;
 
@@ -13710,13 +12769,13 @@
 
 
 /***/ },
-/* 120 */
+/* 113 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt   = __webpack_require__(67)
-	  , maxTimeout = __webpack_require__(121);
+	var toPosInt   = __webpack_require__(60)
+	  , maxTimeout = __webpack_require__(114);
 
 	module.exports = function (value) {
 		value = toPosInt(value);
@@ -13726,7 +12785,7 @@
 
 
 /***/ },
-/* 121 */
+/* 114 */
 /***/ function(module, exports) {
 
 	'use strict';
@@ -13735,16 +12794,16 @@
 
 
 /***/ },
-/* 122 */
+/* 115 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Limit cache size, LRU (least recently used) algorithm.
 
 	'use strict';
 
-	var toPosInteger = __webpack_require__(67)
-	  , lruQueue     = __webpack_require__(123)
-	  , extensions   = __webpack_require__(77);
+	var toPosInteger = __webpack_require__(60)
+	  , lruQueue     = __webpack_require__(116)
+	  , extensions   = __webpack_require__(70);
 
 	extensions.max = function (max, conf, options) {
 		var postfix, queue, hit;
@@ -13767,12 +12826,12 @@
 
 
 /***/ },
-/* 123 */
+/* 116 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var toPosInt = __webpack_require__(67)
+	var toPosInt = __webpack_require__(60)
 
 	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;
 
@@ -13821,15 +12880,15 @@
 
 
 /***/ },
-/* 124 */
+/* 117 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Reference counter, useful for garbage collector like functionality
 
 	'use strict';
 
-	var d          = __webpack_require__(88)
-	  , extensions = __webpack_require__(77)
+	var d          = __webpack_require__(81)
+	  , extensions = __webpack_require__(70)
 
 	  , create = Object.create, defineProperties = Object.defineProperties;
 
@@ -13865,5 +12924,967 @@
 	};
 
 
+/***/ },
+/* 118 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var EventEmitter = __webpack_require__(1);
+	var Sequencer = __webpack_require__(119);
+	var Thread = __webpack_require__(121);
+	var util = __webpack_require__(2);
+
+	var defaultBlockPackages = {
+	    'scratch3': __webpack_require__(123),
+	    'wedo2': __webpack_require__(124)
+	};
+
+	/**
+	 * Manages blocks, stacks, and the sequencer.
+	 * @param {!Blocks} blocks Blocks instance for this runtime.
+	 */
+	function Runtime (blocks) {
+	    // Bind event emitter
+	    EventEmitter.call(this);
+
+	    // State for the runtime
+
+	    /**
+	     * Block management and storage
+	     */
+	    this.blocks = blocks;
+
+	    /**
+	     * A list of threads that are currently running in the VM.
+	     * Threads are added when execution starts and pruned when execution ends.
+	     * @type {Array.<Thread>}
+	     */
+	    this.threads = [];
+
+	    /** @type {!Sequencer} */
+	    this.sequencer = new Sequencer(this);
+
+	    /**
+	     * Map to look up a block primitive's implementation function by its opcode.
+	     * This is a two-step lookup: package name first, then primitive name.
+	     * @type {Object.<string, Function>}
+	     */
+	    this._primitives = {};
+	    this._registerBlockPackages();
+	}
+
+	/**
+	 * Event name for glowing a stack
+	 * @const {string}
+	 */
+	Runtime.STACK_GLOW_ON = 'STACK_GLOW_ON';
+
+	/**
+	 * Event name for unglowing a stack
+	 * @const {string}
+	 */
+	Runtime.STACK_GLOW_OFF = 'STACK_GLOW_OFF';
+
+	/**
+	 * Event name for glowing a block
+	 * @const {string}
+	 */
+	Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
+
+	/**
+	 * Event name for unglowing a block
+	 * @const {string}
+	 */
+	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
+
+	/**
+	 * Inherit from EventEmitter
+	 */
+	util.inherits(Runtime, EventEmitter);
+
+	/**
+	 * How rapidly we try to step threads, in ms.
+	 */
+	Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
+
+
+	// -----------------------------------------------------------------------------
+	// -----------------------------------------------------------------------------
+
+	/**
+	 * Register default block packages with this runtime.
+	 * @todo Prefix opcodes with package name.
+	 * @private
+	 */
+	Runtime.prototype._registerBlockPackages = function () {
+	    for (var packageName in defaultBlockPackages) {
+	        if (defaultBlockPackages.hasOwnProperty(packageName)) {
+	            // @todo pass a different runtime depending on package privilege?
+	            var packageObject = new (defaultBlockPackages[packageName])(this);
+	            var packageContents = packageObject.getPrimitives();
+	            for (var op in packageContents) {
+	                if (packageContents.hasOwnProperty(op)) {
+	                    this._primitives[op] =
+	                        packageContents[op].bind(packageObject);
+	                }
+	            }
+	        }
+	    }
+	};
+
+	/**
+	 * Retrieve the function associated with the given opcode.
+	 * @param {!string} opcode The opcode to look up.
+	 * @return {Function} The function which implements the opcode.
+	 */
+	Runtime.prototype.getOpcodeFunction = function (opcode) {
+	    return this._primitives[opcode];
+	};
+
+	// -----------------------------------------------------------------------------
+	// -----------------------------------------------------------------------------
+
+	/**
+	 * Create a thread and push it to the list of threads.
+	 * @param {!string} id ID of block that starts the stack
+	 */
+	Runtime.prototype._pushThread = function (id) {
+	    this.emit(Runtime.STACK_GLOW_ON, id);
+	    var thread = new Thread(id);
+	    this.threads.push(thread);
+	};
+
+	/**
+	 * Remove a thread from the list of threads.
+	 * @param {?Thread} thread Thread object to remove from actives
+	 */
+	Runtime.prototype._removeThread = function (thread) {
+	    var i = this.threads.indexOf(thread);
+	    if (i > -1) {
+	        this.emit(Runtime.STACK_GLOW_OFF, thread.topBlock);
+	        this.threads.splice(i, 1);
+	    }
+	};
+
+	/**
+	 * Toggle a stack
+	 * @param {!string} stackId ID of block that starts the stack
+	 */
+	Runtime.prototype.toggleStack = function (stackId) {
+	    // Remove any existing thread
+	    for (var i = 0; i < this.threads.length; i++) {
+	        if (this.threads[i].topBlock == stackId) {
+	            this._removeThread(this.threads[i]);
+	            return;
+	        }
+	    }
+	    // Otherwise add it
+	    this._pushThread(stackId);
+	};
+
+	/**
+	 * Green flag, which stops currently running threads
+	 * and adds all top-level stacks that start with the green flag
+	 */
+	Runtime.prototype.greenFlag = function () {
+	    // Remove all existing threads
+	    for (var i = 0; i < this.threads.length; i++) {
+	        this._removeThread(this.threads[i]);
+	    }
+	    // Add all top stacks with green flag
+	    var stacks = this.blocks.getStacks();
+	    for (var j = 0; j < stacks.length; j++) {
+	        var topBlock = stacks[j];
+	        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
+	            this._pushThread(stacks[j]);
+	        }
+	    }
+	};
+
+	/**
+	 * Distance sensor hack
+	 */
+	Runtime.prototype.startDistanceSensors = function () {
+	    // Add all top stacks with distance sensor
+	    var stacks = this.blocks.getStacks();
+	    for (var j = 0; j < stacks.length; j++) {
+	        var topBlock = stacks[j];
+	        if (this.blocks.getBlock(topBlock).opcode ===
+	            'wedo_whendistanceclose') {
+	            var alreadyRunning = false;
+	            for (var k = 0; k < this.threads.length; k++) {
+	                if (this.threads[k].topBlock === topBlock) {
+	                    alreadyRunning = true;
+	                }
+	            }
+	            if (!alreadyRunning) {
+	                this._pushThread(stacks[j]);
+	            }
+	        }
+	    }
+	};
+
+	/**
+	 * Stop "everything"
+	 */
+	Runtime.prototype.stopAll = function () {
+	    var threadsCopy = this.threads.slice();
+	    while (threadsCopy.length > 0) {
+	        var poppedThread = threadsCopy.pop();
+	        // Unglow any blocks on this thread's stack.
+	        for (var i = 0; i < poppedThread.stack.length; i++) {
+	            this.glowBlock(poppedThread.stack[i], false);
+	        }
+	        // Actually remove the thread.
+	        this._removeThread(poppedThread);
+	    }
+	    // @todo call stop function in all extensions/packages/WeDo stub
+	    if (window.native) {
+	        window.native.motorStop();
+	    }
+	};
+
+	/**
+	 * Repeatedly run `sequencer.stepThreads` and filter out
+	 * inactive threads after each iteration.
+	 */
+	Runtime.prototype._step = function () {
+	    var inactiveThreads = this.sequencer.stepThreads(this.threads);
+	    for (var i = 0; i < inactiveThreads.length; i++) {
+	        this._removeThread(inactiveThreads[i]);
+	    }
+	};
+
+	/**
+	 * Emit feedback for block glowing (used in the sequencer).
+	 * @param {?string} blockId ID for the block to update glow
+	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
+	 */
+	Runtime.prototype.glowBlock = function (blockId, isGlowing) {
+	    if (isGlowing) {
+	        this.emit(Runtime.BLOCK_GLOW_ON, blockId);
+	    } else {
+	        this.emit(Runtime.BLOCK_GLOW_OFF, blockId);
+	    }
+	};
+
+	/**
+	 * Set up timers to repeatedly step in a browser
+	 */
+	Runtime.prototype.start = function () {
+	    if (!window.setInterval) return;
+	    window.setInterval(function() {
+	        this._step();
+	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
+	};
+
+	module.exports = Runtime;
+
+
+/***/ },
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Timer = __webpack_require__(120);
+	var Thread = __webpack_require__(121);
+	var YieldTimers = __webpack_require__(122);
+
+	function Sequencer (runtime) {
+	    /**
+	     * A utility timer for timing thread sequencing.
+	     * @type {!Timer}
+	     */
+	    this.timer = new Timer();
+
+	    /**
+	     * Reference to the runtime owning this sequencer.
+	     * @type {!Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * The sequencer does as much work as it can within WORK_TIME milliseconds,
+	 * then yields. This is essentially a rate-limiter for blocks.
+	 * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
+	 * @const {!number}
+	 */
+	Sequencer.WORK_TIME = 10;
+
+	/**
+	 * If set, block calls, args, and return values will be logged to the console.
+	 * @const {boolean}
+	 */
+	Sequencer.DEBUG_BLOCK_CALLS = true;
+
+	/**
+	 * Step through all threads in `this.threads`, running them in order.
+	 * @param {Array.<Thread>} threads List of which threads to step.
+	 * @return {Array.<Thread>} All threads which have finished in this iteration.
+	 */
+	Sequencer.prototype.stepThreads = function (threads) {
+	    // Start counting toward WORK_TIME
+	    this.timer.start();
+	    // List of threads which have been killed by this step.
+	    var inactiveThreads = [];
+	    // If all of the threads are yielding, we should yield.
+	    var numYieldingThreads = 0;
+	    // While there are still threads to run and we are within WORK_TIME,
+	    // continue executing threads.
+	    while (threads.length > 0 &&
+	           threads.length > numYieldingThreads &&
+	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
+	        // New threads at the end of the iteration.
+	        var newThreads = [];
+	        // Attempt to run each thread one time
+	        for (var i = 0; i < threads.length; i++) {
+	            var activeThread = threads[i];
+	            if (activeThread.status === Thread.STATUS_RUNNING) {
+	                // Normal-mode thread: step.
+	                this.stepThread(activeThread);
+	            } else if (activeThread.status === Thread.STATUS_YIELD) {
+	                // Yield-mode thread: check if the time has passed.
+	                YieldTimers.resolve(activeThread.yieldTimerId);
+	                numYieldingThreads++;
+	            } else if (activeThread.status === Thread.STATUS_DONE) {
+	                // Moved to a done state - finish up
+	                activeThread.status = Thread.STATUS_RUNNING;
+	                // @todo Deal with the return value
+	            }
+	            // First attempt to pop from the stack
+	            if (activeThread.stack.length > 0 &&
+	                activeThread.nextBlock === null &&
+	                activeThread.status === Thread.STATUS_DONE) {
+	                activeThread.nextBlock = activeThread.stack.pop();
+	                // Don't pop stack frame - we need the data.
+	                // A new one won't be created when we execute.
+	                if (activeThread.nextBlock !== null) {
+	                    activeThread.status === Thread.STATUS_RUNNING;
+	                }
+	            }
+	            if (activeThread.nextBlock === null &&
+	                activeThread.status === Thread.STATUS_DONE) {
+	                // Finished with this thread - tell runtime to clean it up.
+	                inactiveThreads.push(activeThread);
+	            } else {
+	                // Keep this thead in the loop.
+	                newThreads.push(activeThread);
+	            }
+	        }
+	        // Effectively filters out threads that have stopped.
+	        threads = newThreads;
+	    }
+	    return inactiveThreads;
+	};
+
+	/**
+	 * Step the requested thread
+	 * @param {!Thread} thread Thread object to step
+	 */
+	Sequencer.prototype.stepThread = function (thread) {
+	    // Save the yield timer ID, in case a primitive makes a new one
+	    // @todo hack - perhaps patch this to allow more than one timer per
+	    // primitive, for example...
+	    var oldYieldTimerId = YieldTimers.timerId;
+
+	    // Save the current block and set the nextBlock.
+	    // If the primitive would like to do control flow,
+	    // it can overwrite nextBlock.
+	    var currentBlock = thread.nextBlock;
+	    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
+	        thread.status = Thread.STATUS_DONE;
+	        return;
+	    }
+	    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
+
+	    var opcode = this.runtime.blocks.getOpcode(currentBlock);
+
+	    // Push the current block to the stack
+	    thread.stack.push(currentBlock);
+	    // Push an empty stack frame, if we need one.
+	    // Might not, if we just popped the stack.
+	    if (thread.stack.length > thread.stackFrames.length) {
+	        thread.stackFrames.push({});
+	    }
+	    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
+
+	    /**
+	     * A callback for the primitive to indicate its thread should yield.
+	     * @type {Function}
+	     */
+	    var threadYieldCallback = function () {
+	        thread.status = Thread.STATUS_YIELD;
+	    };
+
+	    /**
+	     * A callback for the primitive to indicate its thread is finished
+	     * @type {Function}
+	     */
+	    var instance = this;
+	    var threadDoneCallback = function () {
+	        thread.status = Thread.STATUS_DONE;
+	        // Refresh nextBlock in case it has changed during a yield.
+	        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
+	        // Pop the stack and stack frame
+	        thread.stack.pop();
+	        thread.stackFrames.pop();
+	        // Stop showing run feedback in the editor.
+	        instance.runtime.glowBlock(currentBlock, false);
+	    };
+
+	    /**
+	     * A callback for the primitive to start hats.
+	     * @todo very hacked...
+	     * Provide a callback that is passed in a block and returns true
+	     * if it is a hat that should be triggered.
+	     * @param {Function} callback Provided callback.
+	     */
+	    var startHats = function(callback) {
+	        var stacks = instance.runtime.blocks.getStacks();
+	        for (var i = 0; i < stacks.length; i++) {
+	            var stack = stacks[i];
+	            var stackBlock = instance.runtime.blocks.getBlock(stack);
+	            var result = callback(stackBlock);
+	            if (result) {
+	                // Check if the stack is already running
+	                var stackRunning = false;
+
+	                for (var j = 0; j < instance.runtime.threads.length; j++) {
+	                    if (instance.runtime.threads[j].topBlock == stack) {
+	                        stackRunning = true;
+	                        break;
+	                    }
+	                }
+	                if (!stackRunning) {
+	                    instance.runtime._pushThread(stack);
+	                }
+	            }
+	        }
+	    };
+
+	    /**
+	     * Record whether we have switched stack,
+	     * to avoid proceeding the thread automatically.
+	     * @type {boolean}
+	     */
+	    var switchedStack = false;
+	    /**
+	     * A callback for a primitive to start a substack.
+	     * @type {Function}
+	     */
+	    var threadStartSubstack = function () {
+	        // Set nextBlock to the start of the substack
+	        var substack = instance.runtime.blocks.getSubstack(currentBlock);
+	        if (substack && substack.value) {
+	            thread.nextBlock = substack.value;
+	        } else {
+	            thread.nextBlock = null;
+	        }
+	        switchedStack = true;
+	    };
+
+	    // @todo extreme hack to get the single argument value for prototype
+	    var argValues = [];
+	    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
+	    for (var bi in blockInputs) {
+	        var outer = blockInputs[bi];
+	        for (var b in outer.blocks) {
+	            var block = outer.blocks[b];
+	            var fields = block.fields;
+	            for (var f in fields) {
+	                var field = fields[f];
+	                argValues.push(field.value);
+	            }
+	        }
+	    }
+
+	    // Start showing run feedback in the editor.
+	    this.runtime.glowBlock(currentBlock, true);
+
+	    if (!opcode) {
+	        console.warn('Could not get opcode for block: ' + currentBlock);
+	    }
+	    else {
+	        var blockFunction = this.runtime.getOpcodeFunction(opcode);
+	        if (!blockFunction) {
+	            console.warn('Could not get implementation for opcode: ' + opcode);
+	        }
+	        else {
+	            if (Sequencer.DEBUG_BLOCK_CALLS) {
+	                console.groupCollapsed('Executing: ' + opcode);
+	                console.log('with arguments: ', argValues);
+	                console.log('and stack frame: ', currentStackFrame);
+	            }
+	            var blockFunctionReturnValue = null;
+	            try {
+	                // @todo deal with the return value
+	                blockFunctionReturnValue = blockFunction(argValues, {
+	                    yield: threadYieldCallback,
+	                    done: threadDoneCallback,
+	                    timeout: YieldTimers.timeout,
+	                    stackFrame: currentStackFrame,
+	                    startSubstack: threadStartSubstack,
+	                    startHats: startHats
+	                });
+	            }
+	            catch(e) {
+	                console.error(
+	                    'Exception calling block function for opcode: ' +
+	                    opcode + '\n' + e);
+	            } finally {
+	                // Update if the thread has set a yield timer ID
+	                // @todo hack
+	                if (YieldTimers.timerId > oldYieldTimerId) {
+	                    thread.yieldTimerId = YieldTimers.timerId;
+	                }
+	                if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
+	                    // Thread executed without yielding - move to done
+	                    threadDoneCallback();
+	                }
+	                if (Sequencer.DEBUG_BLOCK_CALLS) {
+	                    console.log('ending stack frame: ', currentStackFrame);
+	                    console.log('returned: ', blockFunctionReturnValue);
+	                    console.groupEnd();
+	                }
+	            }
+	        }
+	    }
+
+	};
+
+	module.exports = Sequencer;
+
+
+/***/ },
+/* 120 */
+/***/ function(module, exports) {
+
+	/**
+	 * Constructor
+	 */
+	function Timer () {
+	    this.startTime = 0;
+	}
+
+	Timer.prototype.time = function () {
+	    return Date.now();
+	};
+
+	Timer.prototype.start = function () {
+	    this.startTime = this.time();
+	};
+
+	Timer.prototype.timeElapsed = function () {
+	    return this.time() - this.startTime;
+	};
+
+	module.exports = Timer;
+
+
+/***/ },
+/* 121 */
+/***/ function(module, exports) {
+
+	/**
+	 * A thread is a running stack context and all the metadata needed.
+	 * @param {?string} firstBlock First block to execute in the thread.
+	 * @constructor
+	 */
+	function Thread (firstBlock) {
+	    /**
+	     * ID of top block of the thread
+	     * @type {!string}
+	     */
+	    this.topBlock = firstBlock;
+	    /**
+	     * ID of next block that the thread will execute, or null if none.
+	     * @type {?string}
+	     */
+	    this.nextBlock = firstBlock;
+	    /**
+	     * Stack for the thread. When the sequencer enters a control structure,
+	     * the block is pushed onto the stack so we know where to exit.
+	     * @type {Array.<string>}
+	     */
+	    this.stack = [];
+
+	    /**
+	     * Stack frames for the thread. Store metadata for the executing blocks.
+	     * @type {Array.<Object>}
+	     */
+	    this.stackFrames = [];
+
+	    /**
+	     * Status of the thread, one of three states (below)
+	     * @type {number}
+	     */
+	    this.status = 0; /* Thread.STATUS_RUNNING */
+
+	    /**
+	     * Yield timer ID (for checking when the thread should unyield).
+	     * @type {number}
+	     */
+	    this.yieldTimerId = -1;
+	}
+
+	/**
+	 * Thread status for initialized or running thread.
+	 * Threads are in this state when the primitive is called for the first time.
+	 * @const
+	 */
+	Thread.STATUS_RUNNING = 0;
+
+	/**
+	 * Thread status for a yielded thread.
+	 * Threads are in this state when a primitive has yielded.
+	 * @const
+	 */
+	Thread.STATUS_YIELD = 1;
+
+	/**
+	 * Thread status for a finished/done thread.
+	 * Thread is moved to this state when the interpreter
+	 * can proceed with execution.
+	 * @const
+	 */
+	Thread.STATUS_DONE = 2;
+
+	module.exports = Thread;
+
+
+/***/ },
+/* 122 */
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * @fileoverview Timers that are synchronized with the Scratch sequencer.
+	 */
+	var Timer = __webpack_require__(120);
+
+	function YieldTimers () {}
+
+	/**
+	 * Shared collection of timers.
+	 * Each timer is a [Function, number] with the callback
+	 * and absolute time for it to run.
+	 * @type {Object.<number,Array>}
+	 */
+	YieldTimers.timers = {};
+
+	/**
+	 * Monotonically increasing timer ID.
+	 * @type {number}
+	 */
+	YieldTimers.timerId = 0;
+
+	/**
+	 * Utility for measuring time.
+	 * @type {!Timer}
+	 */
+	YieldTimers.globalTimer = new Timer();
+
+	/**
+	 * The timeout function is passed to primitives and is intended
+	 * as a convenient replacement for window.setTimeout.
+	 * The sequencer will attempt to resolve the timer every time
+	 * the yielded thread would have been stepped.
+	 * @param {!Function} callback To be called when the timer is done.
+	 * @param {number} timeDelta Time to wait, in ms.
+	 * @return {number} Timer ID to be used with other methods.
+	 */
+	YieldTimers.timeout = function (callback, timeDelta) {
+	    var id = ++YieldTimers.timerId;
+	    YieldTimers.timers[id] = [
+	        callback,
+	        YieldTimers.globalTimer.time() + timeDelta
+	    ];
+	    return id;
+	};
+
+	/**
+	 * Attempt to resolve a timeout.
+	 * If the time has passed, call the callback.
+	 * Otherwise, do nothing.
+	 * @param {number} id Timer ID to resolve.
+	 * @return {boolean} True if the timer has resolved.
+	 */
+	YieldTimers.resolve = function (id) {
+	    var timer = YieldTimers.timers[id];
+	    if (!timer) {
+	        // No such timer.
+	        return false;
+	    }
+	    var callback = timer[0];
+	    var time = timer[1];
+	    if (YieldTimers.globalTimer.time() < time) {
+	        // Not done yet.
+	        return false;
+	    }
+	    // Execute the callback and remove the timer.
+	    callback();
+	    delete YieldTimers.timers[id];
+	    return true;
+	};
+
+	/**
+	 * Reject a timer so the callback never executes.
+	 * @param {number} id Timer ID to reject.
+	 */
+	YieldTimers.reject = function (id) {
+	    if (YieldTimers.timers[id]) {
+	        delete YieldTimers.timers[id];
+	    }
+	};
+
+	/**
+	 * Reject all timers currently stored.
+	 * Especially useful for a Scratch "stop."
+	 */
+	YieldTimers.rejectAll = function () {
+	    YieldTimers.timers = {};
+	    YieldTimers.timerId = 0;
+	};
+
+	module.exports = YieldTimers;
+
+
+/***/ },
+/* 123 */
+/***/ function(module, exports) {
+
+	function Scratch3Blocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3Blocks.prototype.getPrimitives = function() {
+	    return {
+	        'control_repeat': this.repeat,
+	        'control_forever': this.forever,
+	        'control_wait': this.wait,
+	        'control_stop': this.stop,
+	        'event_whenflagclicked': this.whenFlagClicked,
+	        'event_whenbroadcastreceived': this.whenBroadcastReceived,
+	        'event_broadcast': this.broadcast
+	    };
+	};
+
+	Scratch3Blocks.prototype.repeat = function(argValues, util) {
+	    // Initialize loop
+	    if (util.stackFrame.loopCounter === undefined) {
+	        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
+	    }
+	    // Decrease counter
+	    util.stackFrame.loopCounter--;
+	    // If we still have some left, start the substack
+	    if (util.stackFrame.loopCounter >= 0) {
+	        util.startSubstack();
+	    }
+	};
+
+	Scratch3Blocks.prototype.forever = function(argValues, util) {
+	    util.startSubstack();
+	};
+
+	Scratch3Blocks.prototype.wait = function(argValues, util) {
+	    util.yield();
+	    util.timeout(function() {
+	        util.done();
+	    }, 1000 * parseFloat(argValues[0]));
+	};
+
+	Scratch3Blocks.prototype.stop = function() {
+	    // @todo - don't use this.runtime
+	    this.runtime.stopAll();
+	};
+
+	Scratch3Blocks.prototype.whenFlagClicked = function() {
+	    // No-op
+	};
+
+	Scratch3Blocks.prototype.whenBroadcastReceived = function() {
+	    // No-op
+	};
+
+	Scratch3Blocks.prototype.broadcast = function(argValues, util) {
+	    util.startHats(function(hat) {
+	        if (hat.opcode === 'event_whenbroadcastreceived') {
+	            var shadows = hat.fields.CHOICE.blocks;
+	            for (var sb in shadows) {
+	                var shadowblock = shadows[sb];
+	                return shadowblock.fields.CHOICE.value === argValues[0];
+	            }
+	        }
+	        return false;
+	    });
+	};
+
+	module.exports = Scratch3Blocks;
+
+
+/***/ },
+/* 124 */
+/***/ function(module, exports, __webpack_require__) {
+
+	
+	var YieldTimers = __webpack_require__(122);
+
+	function WeDo2Blocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+
+	    /**
+	     * Current motor speed, as a percentage (100 = full speed).
+	     * @type {number}
+	     * @private
+	     */
+	    this._motorSpeed = 100;
+
+	    /**
+	     * The timeout ID for a pending motor action.
+	     * @type {?int}
+	     * @private
+	     */
+	    this._motorTimeout = null;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	WeDo2Blocks.prototype.getPrimitives = function() {
+	    return {
+	        'wedo_motorclockwise': this.motorClockwise,
+	        'wedo_motorcounterclockwise': this.motorCounterClockwise,
+	        'wedo_motorspeed': this.motorSpeed,
+	        'wedo_setcolor': this.setColor,
+	        'wedo_whendistanceclose': this.whenDistanceClose,
+	        'wedo_whentilt': this.whenTilt
+	    };
+	};
+
+	/**
+	 * Clamp a value between a minimum and maximum value.
+	 * @todo move this to a common utility class.
+	 * @param {number} val The value to clamp.
+	 * @param {number} min The minimum return value.
+	 * @param {number} max The maximum return value.
+	 * @returns {number} The clamped value.
+	 * @private
+	 */
+	WeDo2Blocks.prototype._clamp = function(val, min, max) {
+	    return Math.max(min, Math.min(val, max));
+	};
+
+	/**
+	 * Common implementation for motor blocks.
+	 * @param {string} direction The direction to turn ('left' or 'right').
+	 * @param {number} durationSeconds The number of seconds to run.
+	 * @param {Object} util The util instance to use for yielding and finishing.
+	 * @private
+	 */
+	WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
+	    if (this._motorTimeout > 0) {
+	        // @todo maybe this should go through util
+	        YieldTimers.resolve(this._motorTimeout);
+	        this._motorTimeout = null;
+	    }
+	    if (window.native) {
+	        window.native.motorRun(direction, this._motorSpeed);
+	    }
+
+	    var instance = this;
+	    var myTimeout = this._motorTimeout = util.timeout(function() {
+	        if (instance._motorTimeout == myTimeout) {
+	            instance._motorTimeout = null;
+	        }
+	        if (window.native) {
+	            window.native.motorStop();
+	        }
+	        util.done();
+	    }, 1000 * durationSeconds);
+
+	    util.yield();
+	};
+
+	WeDo2Blocks.prototype.motorClockwise = function(argValues, util) {
+	    this._motorOnFor('right', parseFloat(argValues[0]), util);
+	};
+
+	WeDo2Blocks.prototype.motorCounterClockwise = function(argValues, util) {
+	    this._motorOnFor('left', parseFloat(argValues[0]), util);
+	};
+
+	WeDo2Blocks.prototype.motorSpeed = function(argValues) {
+	    var speed = argValues[0];
+	    switch (speed) {
+	    case 'slow':
+	        this._motorSpeed = 20;
+	        break;
+	    case 'medium':
+	        this._motorSpeed = 50;
+	        break;
+	    case 'fast':
+	        this._motorSpeed = 100;
+	        break;
+	    }
+	};
+
+	/**
+	 * Convert a color name to a WeDo color index.
+	 * Supports 'mystery' for a random hue.
+	 * @param {string} colorName The color to retrieve.
+	 * @returns {number} The WeDo color index.
+	 * @private
+	 */
+	WeDo2Blocks.prototype._getColor = function(colorName) {
+	    var colors = {
+	        'yellow': 7,
+	        'orange': 8,
+	        'coral': 9,
+	        'magenta': 1,
+	        'purple': 2,
+	        'blue': 3,
+	        'green': 6,
+	        'white': 10
+	    };
+
+	    if (colorName == 'mystery') {
+	        return Math.floor((Math.random() * 10) + 1);
+	    }
+
+	    return colors[colorName];
+	};
+
+	WeDo2Blocks.prototype.setColor = function(argValues, util) {
+	    if (window.native) {
+	        var colorIndex = this._getColor(argValues[0]);
+	        window.native.setLedColor(colorIndex);
+	    }
+	    // Pause for quarter second
+	    util.yield();
+	    util.timeout(function() {
+	        util.done();
+	    }, 250);
+	};
+
+	WeDo2Blocks.prototype.whenDistanceClose = function() {
+	};
+
+	WeDo2Blocks.prototype.whenTilt = function() {
+	};
+
+	module.exports = WeDo2Blocks;
+
+
 /***/ }
 /******/ ]);
\ No newline at end of file
diff --git a/vm.min.js b/vm.min.js
index 7a06ccf04..53caf1d28 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,10 +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.blocks=new s,t.runtime=new a(t.blocks),t.blockListener=function(e){if("object"==typeof e&&"string"==typeof e.blockId){if("stackclick"===e.element)return void t.runtime.toggleStack(e.blockId);switch(e.type){case"create":for(var r=c(e),n=0;n<r.length;n++)t.blocks.createBlock(r[n],!1);break;case"change":t.blocks.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":t.blocks.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldInput:e.oldInputName,newParent:e.newParentId,newInput:e.newInputName});break;case"delete":t.blocks.deleteBlock({id:e.blockId})}}},t.flyoutBlockListener=function(e){switch(e.type){case"create":for(var r=c(e),n=0;n<r.length;n++)t.blocks.createBlock(r[n],!0);break;case"change":t.blocks.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"delete":t.blocks.deleteBlock({id:e.blockId});break;case"stackclick":t.runtime.toggleStack(e.blockId)}}}var i=r(1),o=r(2),s=r(6),a=r(7),c=r(14);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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 r(){this._blocks={},this._stacks=[]}r.prototype.getBlock=function(t){return this._blocks[t]},r.prototype.getStacks=function(){return this._stacks},r.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},r.prototype.getSubstack=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var n="SUBSTACK";return e>1&&(n+=e),n in r.inputs?r.inputs[n].block:null},r.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},r.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},r.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},r.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},r.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},r.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},r.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=r},function(t,e,r){function n(t){i.call(this),this.blocks=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(8),s=r(10),a=r(2),c={scratch3:r(12),wedo2:r(13)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=this.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r];"event_whenflagclicked"===this.blocks.getBlock(n).opcode&&this._pushThread(e[r])}},n.prototype.startDistanceSensors=function(){for(var t=this.blocks.getStacks(),e=0;e<t.length;e++){var r=t[e];if("wedo_whendistanceclose"===this.blocks.getBlock(r).opcode){for(var n=!1,i=0;i<this.threads.length;i++)this.threads[i].topBlock===r&&(n=!0);n||this._pushThread(t[e])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;)this._removeThread(t.pop());window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks.getBlock(r))return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime.blocks.getNextBlock(r);var n=this.runtime.blocks.getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var i=t.stackFrames[t.stackFrames.length-1],a=function(){t.status=o.STATUS_YIELD},c=this,u=function(){t.status=o.STATUS_DONE,t.nextBlock=c.runtime.blocks.getNextBlock(r),t.stack.pop(),t.stackFrames.pop()},l=function(t){for(var e=c.runtime.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r],i=c.runtime.blocks.getBlock(n),o=t(i);if(o){for(var s=!1,a=0;a<c.runtime.threads.length;a++)if(c.runtime.threads[a].topBlock==n){s=!0;break}s||c.runtime._pushThread(n)}}},h=!1,f=function(){var e=c.runtime.blocks.getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,h=!0},p=[],d=this.runtime.blocks.getBlock(r).fields;for(var g in d){var _=d[g];for(var m in _.blocks){var b=_.blocks[m],y=b.fields;for(var v in y){var w=y[v];p.push(w.value)}}}if(n){var S=this.runtime.getOpcodeFunction(n);if(S)try{S(p,{"yield":a,done:u,timeout:s.timeout,stackFrame:i,startSubstack:f,startHats:l})}catch(x){console.error("Exception calling block function for opcode: "+n+"\n"+x)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||h||u()}else console.warn("Could not get implementation for opcode: "+n)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(9);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){console.log("Running: control_repeat"),void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){console.log("Running: control_forever"),e.startSubstack()},r.prototype.wait=function(t,e){console.log("Running: control_wait"),e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){console.log("Running: control_stop"),this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){console.log("Running: event_whenflagclicked")},r.prototype.whenBroadcastReceived=function(){console.log("Running: event_whenbroadcastreceived")},r.prototype.broadcast=function(t,e){console.log("Running: event_broadcast"),e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(11);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){console.log("Running: wedo_whendistanceclose")},n.prototype.whenTilt=function(){console.log("Running: wedo_whentilt")},t.exports=n},function(t,e,r){function n(t){for(var e={},r=0;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var l=s.children[u];if(l.name){var h=l.name.toLowerCase();"block"==h?a=l:"shadow"==h&&(c=l)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name;n.fields[f]={name:f,value:s.children[0].data};break;case"value":case"statement":i(a,e,!1);var p=s.attribs.name;n.inputs[p]={name:p,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(15),s=r(64),a=s(o.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(a(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(16),o=r(23);t.exports={Parser:i,Tokenizer:r(17),ElementType:r(24),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(27))},get Stream(){return n("Stream",r(28))},get WritableStream(){return n("WritableStream",r(29))},get ProxyHandler(){return n("ProxyHandler",r(50))},get DomUtils(){return n("DomUtils",r(51))},get CollectingHandler(){return n("CollectingHandler",r(63))},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(17),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(18),u=r(20),l=r(21),h=r(22),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,I=f++,C=f++,B=f++,D=f++,N=f++,R=f++,q=f++,j=f++,U=f++,P=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,
-this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?I:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",j,L),a.prototype._stateBeforeCdata4=o("T",U,L),a.prototype._stateBeforeCdata5=o("A",P,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===j?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===P?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(19);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(24),o=/\s+/g,s=r(25),a=r(26),c={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(25),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(15),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(29);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(15).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(16),o=r(30).Writable||r(49).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(31),n.Writable=r(45),n.Duplex=r(46),n.Transform=r(47),n.PassThrough=r(48),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(32),e.Stream=r(30),e.Readable=e,e.Writable=r(41),e.Duplex=r(40),e.Transform=r(43),e.PassThrough=r(44),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(30))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(40);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&&(L||(L=r(42).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(40);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=I)t=I;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(33),E=r(34).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(30),A=r(38);A.inherits=r(5);var L,O=r(39);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(42).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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.blocks=new s,t.runtime=new a(t.blocks),t.blockListener=t.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=t.blocks.generateBlockListener(!0,t.runtime)}var i=r(1),o=r(2),s=r(6),a=r(118);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)I(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),I(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){this._blocks={},this._stacks=[]}var i=r(7);n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getStacks=function(){return this._stacks},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getSubstack=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var n="SUBSTACK";return e>1&&(n+=e),n in r.inputs?r.inputs[n].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleStack(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},n.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var l=s.children[u];if(l.name){var h=l.name.toLowerCase();"block"==h?a=l:"shadow"==h&&(c=l)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name;n.fields[f]={name:f,value:s.children[0].data};break;case"value":case"statement":i(a,e,!1);var p=s.attribs.name;n.inputs[p]={name:p,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(8),s=r(57),a=s(o.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(a(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(9),o=r(16);t.exports={Parser:i,Tokenizer:r(10),ElementType:r(17),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(20))},get Stream(){return n("Stream",r(21))},get WritableStream(){return n("WritableStream",r(22))},get ProxyHandler(){return n("ProxyHandler",r(43))},get DomUtils(){return n("DomUtils",r(44))},get CollectingHandler(){return n("CollectingHandler",r(56))},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(10),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(11),u=r(13),l=r(14),h=r(15),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,C=f++,I=f++,B=f++,D=f++,N=f++,R=f++,q=f++,U=f++,j=f++,P=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?C:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=I,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=I},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=I)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",j,L),a.prototype._stateBeforeCdata5=o("A",P,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===I?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===U?this._stateBeforeCdata4(t):this._state===j?this._stateBeforeCdata5(t):this._state===P?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),
+this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===I||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(12);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(17),o=/\s+/g,s=r(18),a=r(19),c={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(18),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(8),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(22);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(8).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(9),o=r(23).Writable||r(42).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(24),n.Writable=r(38),n.Duplex=r(39),n.Transform=r(40),n.PassThrough=r(41),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(25),e.Stream=r(23),e.Readable=e,e.Writable=r(34),e.Duplex=r(33),e.Transform=r(36),e.PassThrough=r(37),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(23))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(33);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&&(L||(L=r(35).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(33);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=C)t=C;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(26),E=r(27).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(23),A=r(31);A.inherits=r(5);var L,O=r(32);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(35).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return I(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function U(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(35),J=r(36),X=r(37);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(34).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(34).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(38);a.inherits=r(5);var c=r(32),u=r(41);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(40);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(40);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(34).Buffer;o.WritableState=i;var S=r(38);S.inherits=r(5);var x=r(30);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(34).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(40),c=r(38);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(43),o=r(38);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(41)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(43)},function(t,e,r){t.exports=r(44)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(15).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(52),r(58),r(59),r(60),r(61),r(62)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(24),s=r(53),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(54),l=r(55),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(56),i=r(57);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(22)),l=i(u);e.XML=a(u,l);var h=n(r(20)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(20),a=r(21),c=r(22),u=r(18),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(24).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(24),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(15).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(65),i=r(66),o=r(72);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(109):e>1&&(s.normalizer=r(110)(e)):e===!1?s.normalizer=r(111)():1===e?s.normalizer=r(113)():s.normalizer=r(114)(e))),s.async&&r(115),s.dispose&&r(118),s.maxAge&&r(119),s.max&&r(122),s.refCounter&&r(124),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(67);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(68),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(69),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(70)()?Math.sign:r(71)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(73),i=r(74),o=r(77),s=r(78),a=r(66),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(75)("forEach")},function(t,e,r){"use strict";var n=r(73),i=r(76),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(79),i=r(86),o=r(88),s=r(93).methods,a=r(94),c=r(108),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(80),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(81)()?Object.assign:r(82)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(83),i=r(76),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(84)()?Object.keys:r(85)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(67),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(87),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(76),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(80),o=r(65),s=r(89),a=r(90);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(91)()?String.prototype.contains:r(92)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(88),h=r(73),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(95),o=r(73),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(96),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(97)()?Array.from:r(98)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(99).iterator,i=r(104),o=r(105),s=r(67),a=r(73),c=r(76),u=r(107),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(100)()?Symbol:r(101)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(88),a=r(102),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(103);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(106));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(73);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(112),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(67),i=r(76),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(112);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(112),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(96),i=r(87),o=r(86),s=r(116),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(77).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(117).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(117).setImmediate,r(117).clearImmediate)},function(t,e,r){"use strict";var n=r(73),i=r(74),o=r(77),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(96),i=r(106),o=r(74),s=r(120),a=r(77),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(67),i=r(121);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(67),i=r(123),o=r(77);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(67),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(88),i=r(77),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}}]);
\ No newline at end of file
+"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function j(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(28),J=r(29),X=r(30);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(27).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(27).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(31);a.inherits=r(5);var c=r(25),u=r(34);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(33);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(33);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(27).Buffer;o.WritableState=i;var S=r(31);S.inherits=r(5);var x=r(23);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(27).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(33),c=r(31);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(36),o=r(31);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(34)},function(t,e,r){t.exports=r(33)},function(t,e,r){t.exports=r(36)},function(t,e,r){t.exports=r(37)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(8).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(45),r(51),r(52),r(53),r(54),r(55)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(17),s=r(46),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(47),l=r(48),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(49),i=r(50);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(15)),l=i(u);e.XML=a(u,l);var h=n(r(13)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(13),a=r(14),c=r(15),u=r(11),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(17).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(17),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(8).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(58),i=r(59),o=r(65);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(102):e>1&&(s.normalizer=r(103)(e)):e===!1?s.normalizer=r(104)():1===e?s.normalizer=r(106)():s.normalizer=r(107)(e))),s.async&&r(108),s.dispose&&r(111),s.maxAge&&r(112),s.max&&r(115),s.refCounter&&r(117),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(60);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(61),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(62),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(63)()?Math.sign:r(64)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(66),i=r(67),o=r(70),s=r(71),a=r(59),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(68)("forEach")},function(t,e,r){"use strict";var n=r(66),i=r(69),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(72),i=r(79),o=r(81),s=r(86).methods,a=r(87),c=r(101),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(73),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(74)()?Object.assign:r(75)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(76),i=r(69),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(77)()?Object.keys:r(78)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(60),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(80),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(69),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(73),o=r(58),s=r(82),a=r(83);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(84)()?String.prototype.contains:r(85)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(81),h=r(66),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(88),o=r(66),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(89),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(90)()?Array.from:r(91)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(92).iterator,i=r(97),o=r(98),s=r(60),a=r(66),c=r(69),u=r(100),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(93)()?Symbol:r(94)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(81),a=r(95),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(96);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(99));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(66);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(105),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(60),i=r(69),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(105);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(105),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(89),i=r(80),o=r(79),s=r(109),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(70).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(110).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(110).setImmediate,r(110).clearImmediate)},function(t,e,r){"use strict";var n=r(66),i=r(67),o=r(70),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(89),i=r(99),o=r(67),s=r(113),a=r(70),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(60),i=r(114);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(60),i=r(116),o=r(70);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(60),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(81),i=r(70),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}},function(t,e,r){function n(t){i.call(this),this.blocks=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(119),s=r(121),a=r(2),c={scratch3:r(123),wedo2:r(124)};n.STACK_GLOW_ON="STACK_GLOW_ON",
+n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=this.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r];"event_whenflagclicked"===this.blocks.getBlock(n).opcode&&this._pushThread(e[r])}},n.prototype.startDistanceSensors=function(){for(var t=this.blocks.getStacks(),e=0;e<t.length;e++){var r=t[e];if("wedo_whendistanceclose"===this.blocks.getBlock(r).opcode){for(var n=!1,i=0;i<this.threads.length;i++)this.threads[i].topBlock===r&&(n=!0);n||this._pushThread(t[e])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(120),o=r(121),s=r(122);n.WORK_TIME=10,n.DEBUG_BLOCK_CALLS=!0,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks.getBlock(r))return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime.blocks.getNextBlock(r);var i=this.runtime.blocks.getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var a=t.stackFrames[t.stackFrames.length-1],c=function(){t.status=o.STATUS_YIELD},u=this,l=function(){t.status=o.STATUS_DONE,t.nextBlock=u.runtime.blocks.getNextBlock(r),t.stack.pop(),t.stackFrames.pop(),u.runtime.glowBlock(r,!1)},h=function(t){for(var e=u.runtime.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r],i=u.runtime.blocks.getBlock(n),o=t(i);if(o){for(var s=!1,a=0;a<u.runtime.threads.length;a++)if(u.runtime.threads[a].topBlock==n){s=!0;break}s||u.runtime._pushThread(n)}}},f=!1,p=function(){var e=u.runtime.blocks.getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,f=!0},d=[],g=this.runtime.blocks.getBlock(r).fields;for(var _ in g){var m=g[_];for(var b in m.blocks){var y=m.blocks[b],v=y.fields;for(var w in v){var S=v[w];d.push(S.value)}}}if(this.runtime.glowBlock(r,!0),i){var x=this.runtime.getOpcodeFunction(i);if(x){n.DEBUG_BLOCK_CALLS&&(console.groupCollapsed("Executing: "+i),console.log("with arguments: ",d),console.log("and stack frame: ",a));var E=null;try{E=x(d,{"yield":c,done:l,timeout:s.timeout,stackFrame:a,startSubstack:p,startHats:h})}catch(k){console.error("Exception calling block function for opcode: "+i+"\n"+k)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||f||l(),n.DEBUG_BLOCK_CALLS&&(console.log("ending stack frame: ",a),console.log("returned: ",E),console.groupEnd())}}else console.warn("Could not get implementation for opcode: "+i)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(120);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){e.startSubstack()},r.prototype.wait=function(t,e){e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(t,e){e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(122);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){},n.prototype.whenTilt=function(){},t.exports=n}]);
\ No newline at end of file

From bd7f3245a24f803437c9ffcb7a128a1159667239 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 11:45:58 -0400
Subject: [PATCH 055/302] Move scratch3 blocks into separate packages.

---
 src/blocks/scratch3.js         | 75 ----------------------------------
 src/blocks/scratch3_control.js | 51 +++++++++++++++++++++++
 src/blocks/scratch3_event.js   | 43 +++++++++++++++++++
 src/engine/runtime.js          |  3 +-
 4 files changed, 96 insertions(+), 76 deletions(-)
 delete mode 100644 src/blocks/scratch3.js
 create mode 100644 src/blocks/scratch3_control.js
 create mode 100644 src/blocks/scratch3_event.js

diff --git a/src/blocks/scratch3.js b/src/blocks/scratch3.js
deleted file mode 100644
index a2f132532..000000000
--- a/src/blocks/scratch3.js
+++ /dev/null
@@ -1,75 +0,0 @@
-function Scratch3Blocks(runtime) {
-    /**
-     * The runtime instantiating this block package.
-     * @type {Runtime}
-     */
-    this.runtime = runtime;
-}
-
-/**
- * Retrieve the block primitives implemented by this package.
- * @return {Object.<string, Function>} Mapping of opcode to Function.
- */
-Scratch3Blocks.prototype.getPrimitives = function() {
-    return {
-        'control_repeat': this.repeat,
-        'control_forever': this.forever,
-        'control_wait': this.wait,
-        'control_stop': this.stop,
-        'event_whenflagclicked': this.whenFlagClicked,
-        'event_whenbroadcastreceived': this.whenBroadcastReceived,
-        'event_broadcast': this.broadcast
-    };
-};
-
-Scratch3Blocks.prototype.repeat = function(argValues, util) {
-    // Initialize loop
-    if (util.stackFrame.loopCounter === undefined) {
-        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
-    }
-    // Decrease counter
-    util.stackFrame.loopCounter--;
-    // If we still have some left, start the substack
-    if (util.stackFrame.loopCounter >= 0) {
-        util.startSubstack();
-    }
-};
-
-Scratch3Blocks.prototype.forever = function(argValues, util) {
-    util.startSubstack();
-};
-
-Scratch3Blocks.prototype.wait = function(argValues, util) {
-    util.yield();
-    util.timeout(function() {
-        util.done();
-    }, 1000 * parseFloat(argValues[0]));
-};
-
-Scratch3Blocks.prototype.stop = function() {
-    // @todo - don't use this.runtime
-    this.runtime.stopAll();
-};
-
-Scratch3Blocks.prototype.whenFlagClicked = function() {
-    // No-op
-};
-
-Scratch3Blocks.prototype.whenBroadcastReceived = function() {
-    // No-op
-};
-
-Scratch3Blocks.prototype.broadcast = function(argValues, util) {
-    util.startHats(function(hat) {
-        if (hat.opcode === 'event_whenbroadcastreceived') {
-            var shadows = hat.fields.CHOICE.blocks;
-            for (var sb in shadows) {
-                var shadowblock = shadows[sb];
-                return shadowblock.fields.CHOICE.value === argValues[0];
-            }
-        }
-        return false;
-    });
-};
-
-module.exports = Scratch3Blocks;
diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
new file mode 100644
index 000000000..50e7af645
--- /dev/null
+++ b/src/blocks/scratch3_control.js
@@ -0,0 +1,51 @@
+function Scratch3ControlBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3ControlBlocks.prototype.getPrimitives = function() {
+    return {
+        'control_repeat': this.repeat,
+        'control_forever': this.forever,
+        'control_wait': this.wait,
+        'control_stop': this.stop
+    };
+};
+
+Scratch3ControlBlocks.prototype.repeat = function(argValues, util) {
+    // Initialize loop
+    if (util.stackFrame.loopCounter === undefined) {
+        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
+    }
+    // Decrease counter
+    util.stackFrame.loopCounter--;
+    // If we still have some left, start the substack
+    if (util.stackFrame.loopCounter >= 0) {
+        util.startSubstack();
+    }
+};
+
+Scratch3ControlBlocks.prototype.forever = function(argValues, util) {
+    util.startSubstack();
+};
+
+Scratch3ControlBlocks.prototype.wait = function(argValues, util) {
+    util.yield();
+    util.timeout(function() {
+        util.done();
+    }, 1000 * parseFloat(argValues[0]));
+};
+
+Scratch3ControlBlocks.prototype.stop = function() {
+    // @todo - don't use this.runtime
+    this.runtime.stopAll();
+};
+
+module.exports = Scratch3ControlBlocks;
diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
new file mode 100644
index 000000000..ff15416df
--- /dev/null
+++ b/src/blocks/scratch3_event.js
@@ -0,0 +1,43 @@
+function Scratch3EventBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3EventBlocks.prototype.getPrimitives = function() {
+    return {
+        'event_whenflagclicked': this.whenFlagClicked,
+        'event_whenbroadcastreceived': this.whenBroadcastReceived,
+        'event_broadcast': this.broadcast
+    };
+};
+
+
+Scratch3EventBlocks.prototype.whenFlagClicked = function() {
+    // No-op
+};
+
+Scratch3EventBlocks.prototype.whenBroadcastReceived = function() {
+    // No-op
+};
+
+Scratch3EventBlocks.prototype.broadcast = function(argValues, util) {
+    util.startHats(function(hat) {
+        if (hat.opcode === 'event_whenbroadcastreceived') {
+            var shadows = hat.fields.CHOICE.blocks;
+            for (var sb in shadows) {
+                var shadowblock = shadows[sb];
+                return shadowblock.fields.CHOICE.value === argValues[0];
+            }
+        }
+        return false;
+    });
+};
+
+module.exports = Scratch3EventBlocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 930fa0ea5..5b4fab48d 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -4,7 +4,8 @@ var Thread = require('./thread');
 var util = require('util');
 
 var defaultBlockPackages = {
-    'scratch3': require('../blocks/scratch3'),
+    'scratch3_control': require('../blocks/scratch3_control'),
+    'scratch3_event': require('../blocks/scratch3_event'),
     'wedo2': require('../blocks/wedo2')
 };
 

From 38fb9f4de21732e6e315923ecf842e178aeaaea4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 11:49:03 -0400
Subject: [PATCH 056/302] Temporarily disable flyout listeners until we fix
 GH-69

---
 playground/playground.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 5669212d7..19560bbae 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -27,8 +27,9 @@ window.onload = function() {
 
     // Block events.
     workspace.addChangeListener(vm.blockListener);
-    var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
-    flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
+    // @todo: Re-enable flyout listening after fixing GH-69.
+    //var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
+    //flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 
     var blockexplorer = document.getElementById('blockexplorer');
     workspace.addChangeListener(function() {

From 3898fe1c450cf634c7c64de496f236248fcdb1d0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 13:26:07 -0400
Subject: [PATCH 057/302] Instrument blocks.js with getters for fields and
 inputs

---
 src/engine/blocks.js | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 752cbb4d3..5ee0a7e10 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -22,6 +22,13 @@ function Blocks () {
     this._stacks = [];
 }
 
+/**
+ * Blockly inputs that represent statements/substacks
+ * are prefixed with this string.
+ * @const{string}
+ */
+Blocks.SUBSTACK_INPUT_PREFIX = 'SUBSTACK';
+
 /**
  * Provide an object with metadata for the requested block ID.
  * @param {!string} blockId ID of block we have stored.
@@ -60,7 +67,7 @@ Blocks.prototype.getSubstack = function (id, substackNum) {
     if (typeof block === 'undefined') return null;
     if (!substackNum) substackNum = 1;
 
-    var inputName = 'SUBSTACK';
+    var inputName = Blocks.SUBSTACK_INPUT_PREFIX;
     if (substackNum > 1) {
         inputName += substackNum;
     }
@@ -80,6 +87,34 @@ Blocks.prototype.getOpcode = function (id) {
     return this._blocks[id].opcode;
 };
 
+/**
+ * Get all fields and their values for a block.
+ * @param {?string} id ID of block to query.
+ * @return {!Object} All fields and their values.
+ */
+Blocks.prototype.getFields = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    return this._blocks[id].fields;
+};
+
+/**
+ * Get all non-substack inputs for a block.
+ * @param {?string} id ID of block to query.
+ * @return {!Object} All non-substack inputs and their associated blocks.
+ */
+Blocks.prototype.getInputs = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    var inputs = {};
+    for (var input in this._blocks[id].inputs) {
+        // Ignore blocks prefixed with substack prefix.
+        if (input.substring(0, Blocks.SUBSTACK_INPUT_PREFIX.length)
+            != Blocks.SUBSTACK_INPUT_PREFIX) {
+            inputs[input] = this._blocks[id].inputs[input];
+        }
+    }
+    return inputs;
+};
+
 // ---------------------------------------------------------------------
 
 /**

From 6e5ebcf6dfb8f690fdc666d80cc8b9be1052f56e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 13:27:30 -0400
Subject: [PATCH 058/302] Split execution into separate function and file

---
 src/engine/execute.js   | 154 ++++++++++++++++++++++++++++++++++++++
 src/engine/sequencer.js | 160 +---------------------------------------
 2 files changed, 156 insertions(+), 158 deletions(-)
 create mode 100644 src/engine/execute.js

diff --git a/src/engine/execute.js b/src/engine/execute.js
new file mode 100644
index 000000000..fcb2db8e3
--- /dev/null
+++ b/src/engine/execute.js
@@ -0,0 +1,154 @@
+var Thread = require('./thread');
+var YieldTimers = require('../util/yieldtimers.js');
+
+var execute = function (sequencer, thread, blockId) {
+    var runtime = sequencer.runtime;
+
+    // Save the yield timer ID, in case a primitive makes a new one
+    // @todo hack - perhaps patch this to allow more than one timer per
+    // primitive, for example...
+    var oldYieldTimerId = YieldTimers.timerId;
+
+    var opcode = runtime.blocks.getOpcode(blockId);
+
+    // Push the current block to the stack
+    thread.stack.push(blockId);
+    // Push an empty stack frame, if we need one.
+    // Might not, if we just popped the stack.
+    if (thread.stack.length > thread.stackFrames.length) {
+        thread.stackFrames.push({});
+    }
+    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
+
+    /**
+     * A callback for the primitive to indicate its thread should yield.
+     * @type {Function}
+     */
+    var threadYieldCallback = function () {
+        thread.status = Thread.STATUS_YIELD;
+    };
+
+    /**
+     * A callback for the primitive to indicate its thread is finished
+     * @type {Function}
+     */
+    var threadDoneCallback = function () {
+        thread.status = Thread.STATUS_DONE;
+        // Refresh nextBlock in case it has changed during a yield.
+        thread.nextBlock = runtime.blocks.getNextBlock(blockId);
+        // Pop the stack and stack frame
+        thread.stack.pop();
+        thread.stackFrames.pop();
+        // Stop showing run feedback in the editor.
+        runtime.glowBlock(blockId, false);
+    };
+
+    /**
+     * A callback for the primitive to start hats.
+     * @todo very hacked...
+     * Provide a callback that is passed in a block and returns true
+     * if it is a hat that should be triggered.
+     * @param {Function} callback Provided callback.
+     */
+    var startHats = function(callback) {
+        var stacks = runtime.blocks.getStacks();
+        for (var i = 0; i < stacks.length; i++) {
+            var stack = stacks[i];
+            var stackBlock = runtime.blocks.getBlock(stack);
+            var result = callback(stackBlock);
+            if (result) {
+                // Check if the stack is already running
+                var stackRunning = false;
+
+                for (var j = 0; j < runtime.threads.length; j++) {
+                    if (runtime.threads[j].topBlock == stack) {
+                        stackRunning = true;
+                        break;
+                    }
+                }
+                if (!stackRunning) {
+                    runtime._pushThread(stack);
+                }
+            }
+        }
+    };
+
+    /**
+     * Record whether we have switched stack,
+     * to avoid proceeding the thread automatically.
+     * @type {boolean}
+     */
+    var switchedStack = false;
+    /**
+     * A callback for a primitive to start a substack.
+     * @type {Function}
+     */
+    var threadStartSubstack = function () {
+        // Set nextBlock to the start of the substack
+        var substack = runtime.blocks.getSubstack(blockId);
+        if (substack && substack.value) {
+            thread.nextBlock = substack.value;
+        } else {
+            thread.nextBlock = null;
+        }
+        switchedStack = true;
+    };
+
+    var argValues = {};
+
+    // Start showing run feedback in the editor.
+    runtime.glowBlock(blockId, true);
+
+    if (!opcode) {
+        console.warn('Could not get opcode for block: ' + blockId);
+        console.groupEnd();
+        return;
+    }
+
+    var blockFunction = runtime.getOpcodeFunction(opcode);
+    if (!blockFunction) {
+        console.warn('Could not get implementation for opcode: ' + opcode);
+        console.groupEnd();
+        return;
+    }
+
+    if (sequencer.DEBUG_BLOCK_CALLS) {
+        console.groupCollapsed('Executing: ' + opcode);
+        console.log('with arguments: ', argValues);
+        console.log('and stack frame: ', currentStackFrame);
+    }
+    var blockFunctionReturnValue = null;
+    try {
+        // @todo deal with the return value
+        blockFunctionReturnValue = blockFunction(argValues, {
+            yield: threadYieldCallback,
+            done: threadDoneCallback,
+            timeout: YieldTimers.timeout,
+            stackFrame: currentStackFrame,
+            startSubstack: threadStartSubstack,
+            startHats: startHats
+        });
+    }
+    catch(e) {
+        console.error(
+            'Exception calling block function for opcode: ' +
+            opcode + '\n' + e);
+    } finally {
+        // Update if the thread has set a yield timer ID
+        // @todo hack
+        if (YieldTimers.timerId > oldYieldTimerId) {
+            thread.yieldTimerId = YieldTimers.timerId;
+        }
+        if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
+            // Thread executed without yielding - move to done
+            threadDoneCallback();
+        }
+        if (sequencer.DEBUG_BLOCK_CALLS) {
+            console.log('ending stack frame: ', currentStackFrame);
+            console.log('returned: ', blockFunctionReturnValue);
+            console.groupEnd();
+        }
+    }
+};
+
+module.exports = execute;
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index c31081798..785bcbb0c 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -1,6 +1,7 @@
 var Timer = require('../util/timer');
 var Thread = require('./thread');
 var YieldTimers = require('../util/yieldtimers.js');
+var execute = require('./execute.js');
 
 function Sequencer (runtime) {
     /**
@@ -95,11 +96,6 @@ Sequencer.prototype.stepThreads = function (threads) {
  * @param {!Thread} thread Thread object to step
  */
 Sequencer.prototype.stepThread = function (thread) {
-    // Save the yield timer ID, in case a primitive makes a new one
-    // @todo hack - perhaps patch this to allow more than one timer per
-    // primitive, for example...
-    var oldYieldTimerId = YieldTimers.timerId;
-
     // Save the current block and set the nextBlock.
     // If the primitive would like to do control flow,
     // it can overwrite nextBlock.
@@ -110,159 +106,7 @@ Sequencer.prototype.stepThread = function (thread) {
     }
     thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
 
-    var opcode = this.runtime.blocks.getOpcode(currentBlock);
-
-    // Push the current block to the stack
-    thread.stack.push(currentBlock);
-    // Push an empty stack frame, if we need one.
-    // Might not, if we just popped the stack.
-    if (thread.stack.length > thread.stackFrames.length) {
-        thread.stackFrames.push({});
-    }
-    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
-
-    /**
-     * A callback for the primitive to indicate its thread should yield.
-     * @type {Function}
-     */
-    var threadYieldCallback = function () {
-        thread.status = Thread.STATUS_YIELD;
-    };
-
-    /**
-     * A callback for the primitive to indicate its thread is finished
-     * @type {Function}
-     */
-    var instance = this;
-    var threadDoneCallback = function () {
-        thread.status = Thread.STATUS_DONE;
-        // Refresh nextBlock in case it has changed during a yield.
-        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
-        // Pop the stack and stack frame
-        thread.stack.pop();
-        thread.stackFrames.pop();
-        // Stop showing run feedback in the editor.
-        instance.runtime.glowBlock(currentBlock, false);
-    };
-
-    /**
-     * A callback for the primitive to start hats.
-     * @todo very hacked...
-     * Provide a callback that is passed in a block and returns true
-     * if it is a hat that should be triggered.
-     * @param {Function} callback Provided callback.
-     */
-    var startHats = function(callback) {
-        var stacks = instance.runtime.blocks.getStacks();
-        for (var i = 0; i < stacks.length; i++) {
-            var stack = stacks[i];
-            var stackBlock = instance.runtime.blocks.getBlock(stack);
-            var result = callback(stackBlock);
-            if (result) {
-                // Check if the stack is already running
-                var stackRunning = false;
-
-                for (var j = 0; j < instance.runtime.threads.length; j++) {
-                    if (instance.runtime.threads[j].topBlock == stack) {
-                        stackRunning = true;
-                        break;
-                    }
-                }
-                if (!stackRunning) {
-                    instance.runtime._pushThread(stack);
-                }
-            }
-        }
-    };
-
-    /**
-     * Record whether we have switched stack,
-     * to avoid proceeding the thread automatically.
-     * @type {boolean}
-     */
-    var switchedStack = false;
-    /**
-     * A callback for a primitive to start a substack.
-     * @type {Function}
-     */
-    var threadStartSubstack = function () {
-        // Set nextBlock to the start of the substack
-        var substack = instance.runtime.blocks.getSubstack(currentBlock);
-        if (substack && substack.value) {
-            thread.nextBlock = substack.value;
-        } else {
-            thread.nextBlock = null;
-        }
-        switchedStack = true;
-    };
-
-    // @todo extreme hack to get the single argument value for prototype
-    var argValues = [];
-    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
-    for (var bi in blockInputs) {
-        var outer = blockInputs[bi];
-        for (var b in outer.blocks) {
-            var block = outer.blocks[b];
-            var fields = block.fields;
-            for (var f in fields) {
-                var field = fields[f];
-                argValues.push(field.value);
-            }
-        }
-    }
-
-    // Start showing run feedback in the editor.
-    this.runtime.glowBlock(currentBlock, true);
-
-    if (!opcode) {
-        console.warn('Could not get opcode for block: ' + currentBlock);
-    }
-    else {
-        var blockFunction = this.runtime.getOpcodeFunction(opcode);
-        if (!blockFunction) {
-            console.warn('Could not get implementation for opcode: ' + opcode);
-        }
-        else {
-            if (Sequencer.DEBUG_BLOCK_CALLS) {
-                console.groupCollapsed('Executing: ' + opcode);
-                console.log('with arguments: ', argValues);
-                console.log('and stack frame: ', currentStackFrame);
-            }
-            var blockFunctionReturnValue = null;
-            try {
-                // @todo deal with the return value
-                blockFunctionReturnValue = blockFunction(argValues, {
-                    yield: threadYieldCallback,
-                    done: threadDoneCallback,
-                    timeout: YieldTimers.timeout,
-                    stackFrame: currentStackFrame,
-                    startSubstack: threadStartSubstack,
-                    startHats: startHats
-                });
-            }
-            catch(e) {
-                console.error(
-                    'Exception calling block function for opcode: ' +
-                    opcode + '\n' + e);
-            } finally {
-                // Update if the thread has set a yield timer ID
-                // @todo hack
-                if (YieldTimers.timerId > oldYieldTimerId) {
-                    thread.yieldTimerId = YieldTimers.timerId;
-                }
-                if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
-                    // Thread executed without yielding - move to done
-                    threadDoneCallback();
-                }
-                if (Sequencer.DEBUG_BLOCK_CALLS) {
-                    console.log('ending stack frame: ', currentStackFrame);
-                    console.log('returned: ', blockFunctionReturnValue);
-                    console.groupEnd();
-                }
-            }
-        }
-    }
-
+    execute(this, thread, currentBlock, false);
 };
 
 module.exports = Sequencer;

From c4517a451bfc4c8a8574ebc97dbda19a8622266d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 13:28:06 -0400
Subject: [PATCH 059/302] Add `isInput` execution property to avoid proceeding
 the thread

---
 src/engine/execute.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index fcb2db8e3..ac2ccc28a 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,7 +1,7 @@
 var Thread = require('./thread');
 var YieldTimers = require('../util/yieldtimers.js');
 
-var execute = function (sequencer, thread, blockId) {
+var execute = function (sequencer, thread, blockId, isInput) {
     var runtime = sequencer.runtime;
 
     // Save the yield timer ID, in case a primitive makes a new one
@@ -33,12 +33,16 @@ var execute = function (sequencer, thread, blockId) {
      * @type {Function}
      */
     var threadDoneCallback = function () {
-        thread.status = Thread.STATUS_DONE;
-        // Refresh nextBlock in case it has changed during a yield.
-        thread.nextBlock = runtime.blocks.getNextBlock(blockId);
         // Pop the stack and stack frame
         thread.stack.pop();
         thread.stackFrames.pop();
+        // If we're not executing an input sub-block,
+        // mark the thread as done and proceed to the next block.
+        if (!isInput) {
+            thread.status = Thread.STATUS_DONE;
+            // Refresh nextBlock in case it has changed during a yield.
+            thread.nextBlock = runtime.blocks.getNextBlock(blockId);
+        }
         // Stop showing run feedback in the editor.
         runtime.glowBlock(blockId, false);
     };

From 1d16a9711594423c463132a5f2b340095fcee6bb Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 13:28:50 -0400
Subject: [PATCH 060/302] Recursive evaluation for block arguments

---
 src/engine/execute.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index ac2ccc28a..721ef0b73 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -98,8 +98,24 @@ var execute = function (sequencer, thread, blockId, isInput) {
         switchedStack = true;
     };
 
+    // Generate values for arguments (inputs).
     var argValues = {};
 
+    // Add all fields on this block to the argValues.
+    var fields = runtime.blocks.getFields(blockId);
+    for (var fieldName in fields) {
+        argValues[fieldName] = fields[fieldName];
+    }
+
+    // Recursively evaluate input blocks.
+    var inputs = runtime.blocks.getInputs(blockId);
+    for (var inputName in inputs) {
+        var input = inputs[inputName];
+        var inputBlockId = input.block;
+        var result = execute(sequencer, thread, inputBlockId, true);
+        argValues[input.name] = result;
+    }
+
     // Start showing run feedback in the editor.
     runtime.glowBlock(blockId, true);
 

From 9df470255e387b605710dc8915361d37766c1f7b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:22:58 -0400
Subject: [PATCH 061/302] Add helpers to thread object

---
 src/engine/thread.js | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/src/engine/thread.js b/src/engine/thread.js
index 07ceaca35..4142ba88b 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -38,6 +38,12 @@ function Thread (firstBlock) {
      * @type {number}
      */
     this.yieldTimerId = -1;
+
+    /**
+     * Whether the thread has switched stack in the course of execution.
+     * @type {boolean}
+     */
+    this.switchedStack = false;
 }
 
 /**
@@ -62,4 +68,41 @@ Thread.STATUS_YIELD = 1;
  */
 Thread.STATUS_DONE = 2;
 
+/**
+ * Push stack and update stack frames appropriately.
+ * @param {string} blockId Block ID to push to stack.
+ */
+Thread.prototype.pushStack = function (blockId) {
+    this.stack.push(blockId);
+    // Push an empty stack frame, if we need one.
+    // Might not, if we just popped the stack.
+    if (this.stack.length > this.stackFrames.length) {
+        this.stackFrames.push({});
+    }
+};
+
+/**
+ * Pop last block on the stack and its stack frame.
+ * @returns {string} Block ID popped from the stack.
+ */
+Thread.prototype.popStack = function () {
+    this.stackFrames.pop();
+    return this.stack.pop();
+};
+
+/**
+ * Get last stack frame.
+ * @return {?Object} Last stack frame stored on this thread.
+ */
+Thread.prototype.getLastStackFrame = function () {
+    return this.stackFrames[this.stackFrames.length - 1];
+};
+
+/**
+ * Yields the thread.
+ */
+Thread.prototype.yield = function () {
+    this.status = Thread.STATUS_YIELD;
+};
+
 module.exports = Thread;

From c21700380f0117350adc49a2e005f37a53a06eb5 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:23:34 -0400
Subject: [PATCH 062/302] Pull sequencer-related callbacks out of execute

---
 src/engine/execute.js   | 127 ++++++++--------------------------------
 src/engine/sequencer.js |  67 ++++++++++++++-------
 2 files changed, 69 insertions(+), 125 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 721ef0b73..bd869a946 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,7 +1,12 @@
-var Thread = require('./thread');
 var YieldTimers = require('../util/yieldtimers.js');
 
-var execute = function (sequencer, thread, blockId, isInput) {
+/**
+ * If set, block calls, args, and return values will be logged to the console.
+ * @const {boolean}
+ */
+var DEBUG_BLOCK_CALLS = true;
+
+var execute = function (sequencer, thread, blockId) {
     var runtime = sequencer.runtime;
 
     // Save the yield timer ID, in case a primitive makes a new one
@@ -12,91 +17,8 @@ var execute = function (sequencer, thread, blockId, isInput) {
     var opcode = runtime.blocks.getOpcode(blockId);
 
     // Push the current block to the stack
-    thread.stack.push(blockId);
-    // Push an empty stack frame, if we need one.
-    // Might not, if we just popped the stack.
-    if (thread.stack.length > thread.stackFrames.length) {
-        thread.stackFrames.push({});
-    }
-    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
-
-    /**
-     * A callback for the primitive to indicate its thread should yield.
-     * @type {Function}
-     */
-    var threadYieldCallback = function () {
-        thread.status = Thread.STATUS_YIELD;
-    };
-
-    /**
-     * A callback for the primitive to indicate its thread is finished
-     * @type {Function}
-     */
-    var threadDoneCallback = function () {
-        // Pop the stack and stack frame
-        thread.stack.pop();
-        thread.stackFrames.pop();
-        // If we're not executing an input sub-block,
-        // mark the thread as done and proceed to the next block.
-        if (!isInput) {
-            thread.status = Thread.STATUS_DONE;
-            // Refresh nextBlock in case it has changed during a yield.
-            thread.nextBlock = runtime.blocks.getNextBlock(blockId);
-        }
-        // Stop showing run feedback in the editor.
-        runtime.glowBlock(blockId, false);
-    };
-
-    /**
-     * A callback for the primitive to start hats.
-     * @todo very hacked...
-     * Provide a callback that is passed in a block and returns true
-     * if it is a hat that should be triggered.
-     * @param {Function} callback Provided callback.
-     */
-    var startHats = function(callback) {
-        var stacks = runtime.blocks.getStacks();
-        for (var i = 0; i < stacks.length; i++) {
-            var stack = stacks[i];
-            var stackBlock = runtime.blocks.getBlock(stack);
-            var result = callback(stackBlock);
-            if (result) {
-                // Check if the stack is already running
-                var stackRunning = false;
-
-                for (var j = 0; j < runtime.threads.length; j++) {
-                    if (runtime.threads[j].topBlock == stack) {
-                        stackRunning = true;
-                        break;
-                    }
-                }
-                if (!stackRunning) {
-                    runtime._pushThread(stack);
-                }
-            }
-        }
-    };
-
-    /**
-     * Record whether we have switched stack,
-     * to avoid proceeding the thread automatically.
-     * @type {boolean}
-     */
-    var switchedStack = false;
-    /**
-     * A callback for a primitive to start a substack.
-     * @type {Function}
-     */
-    var threadStartSubstack = function () {
-        // Set nextBlock to the start of the substack
-        var substack = runtime.blocks.getSubstack(blockId);
-        if (substack && substack.value) {
-            thread.nextBlock = substack.value;
-        } else {
-            thread.nextBlock = null;
-        }
-        switchedStack = true;
-    };
+    thread.pushStack(blockId);
+    var currentStackFrame = thread.getLastStackFrame();
 
     // Generate values for arguments (inputs).
     var argValues = {};
@@ -112,13 +34,10 @@ var execute = function (sequencer, thread, blockId, isInput) {
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
-        var result = execute(sequencer, thread, inputBlockId, true);
+        var result = execute(sequencer, thread, inputBlockId);
         argValues[input.name] = result;
     }
 
-    // Start showing run feedback in the editor.
-    runtime.glowBlock(blockId, true);
-
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + blockId);
         console.groupEnd();
@@ -132,21 +51,24 @@ var execute = function (sequencer, thread, blockId, isInput) {
         return;
     }
 
-    if (sequencer.DEBUG_BLOCK_CALLS) {
+    if (DEBUG_BLOCK_CALLS) {
         console.groupCollapsed('Executing: ' + opcode);
         console.log('with arguments: ', argValues);
         console.log('and stack frame: ', currentStackFrame);
     }
-    var blockFunctionReturnValue = null;
+    var primitiveReturnValue = null;
     try {
         // @todo deal with the return value
-        blockFunctionReturnValue = blockFunction(argValues, {
-            yield: threadYieldCallback,
-            done: threadDoneCallback,
+        primitiveReturnValue = blockFunction(argValues, {
+            yield: thread.yield,
+            done: function() {
+                sequencer.proceedThread(thread, blockId);
+            },
             timeout: YieldTimers.timeout,
             stackFrame: currentStackFrame,
-            startSubstack: threadStartSubstack,
-            startHats: startHats
+            startSubstack: function () {
+                sequencer.stepToSubstack(thread, blockId);
+            }
         });
     }
     catch(e) {
@@ -159,15 +81,12 @@ var execute = function (sequencer, thread, blockId, isInput) {
         if (YieldTimers.timerId > oldYieldTimerId) {
             thread.yieldTimerId = YieldTimers.timerId;
         }
-        if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
-            // Thread executed without yielding - move to done
-            threadDoneCallback();
-        }
-        if (sequencer.DEBUG_BLOCK_CALLS) {
+        if (DEBUG_BLOCK_CALLS) {
             console.log('ending stack frame: ', currentStackFrame);
-            console.log('returned: ', blockFunctionReturnValue);
+            console.log('returned: ', primitiveReturnValue);
             console.groupEnd();
         }
+        return primitiveReturnValue;
     }
 };
 
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 785bcbb0c..56539a6b4 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -25,12 +25,6 @@ function Sequencer (runtime) {
  */
 Sequencer.WORK_TIME = 10;
 
-/**
- * If set, block calls, args, and return values will be logged to the console.
- * @const {boolean}
- */
-Sequencer.DEBUG_BLOCK_CALLS = true;
-
 /**
  * Step through all threads in `this.threads`, running them in order.
  * @param {Array.<Thread>} threads List of which threads to step.
@@ -65,17 +59,6 @@ Sequencer.prototype.stepThreads = function (threads) {
                 activeThread.status = Thread.STATUS_RUNNING;
                 // @todo Deal with the return value
             }
-            // First attempt to pop from the stack
-            if (activeThread.stack.length > 0 &&
-                activeThread.nextBlock === null &&
-                activeThread.status === Thread.STATUS_DONE) {
-                activeThread.nextBlock = activeThread.stack.pop();
-                // Don't pop stack frame - we need the data.
-                // A new one won't be created when we execute.
-                if (activeThread.nextBlock !== null) {
-                    activeThread.status === Thread.STATUS_RUNNING;
-                }
-            }
             if (activeThread.nextBlock === null &&
                 activeThread.status === Thread.STATUS_DONE) {
                 // Finished with this thread - tell runtime to clean it up.
@@ -99,14 +82,56 @@ Sequencer.prototype.stepThread = function (thread) {
     // Save the current block and set the nextBlock.
     // If the primitive would like to do control flow,
     // it can overwrite nextBlock.
-    var currentBlock = thread.nextBlock;
-    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
+    var currentBlockId = thread.nextBlock;
+    if (!currentBlockId || !this.runtime.blocks.getBlock(currentBlockId)) {
         thread.status = Thread.STATUS_DONE;
         return;
     }
-    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
+    // Start showing run feedback in the editor.
+    this.runtime.glowBlock(currentBlockId, true);
+    // Execute the block
+    execute(this, thread, currentBlockId, false);
+    // If the block executed without yielding, move to done.
+    if (thread.status === Thread.STATUS_RUNNING && !thread.switchedStack) {
+        this.proceedThread(thread, currentBlockId);
+    }
+};
 
-    execute(this, thread, currentBlock, false);
+/**
+ * Step a thread into a block's substack.
+ * @param {!Thread} thread Thread object to step to substack.
+ * @param {string} currentBlockId Block which owns a substack to step to.
+ */
+Sequencer.prototype.stepToSubstack = function (thread, currentBlockId) {
+    // Set nextBlock to the start of the substack
+    var substack = this.runtime.blocks.getSubstack(currentBlockId);
+    if (substack && substack.value) {
+        thread.nextBlock = substack.value;
+    } else {
+        thread.nextBlock = null;
+    }
+    thread.switchedStack = true;
+};
+
+/**
+ * Finish stepping a thread and proceed it to the next block.
+ * @param {!Thread} thread Thread object to proceed.
+ * @param {string} currentBlockId Block we are finished with.
+ */
+Sequencer.prototype.proceedThread = function (thread, currentBlockId) {
+    // Stop showing run feedback in the editor.
+    this.runtime.glowBlock(currentBlockId, false);
+    // Pop the stack and stack frame
+    thread.popStack();
+    // Mark the thread as done and proceed to the next block.
+    thread.status = Thread.STATUS_DONE;
+    // Refresh nextBlock in case it has changed during a yield.
+    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlockId);
+    // If none is available, attempt to pop from the stack.
+    // First attempt to pop from the stack
+    if (!thread.nextBlock && thread.stack.length > 0) {
+        thread.nextBlock = thread.popStack();
+    }
 };
 
 module.exports = Sequencer;

From bcd058bdc4c52c66448ef7dc2b48338a111349c9 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:23:45 -0400
Subject: [PATCH 063/302] Disable unimplemented broadcast block

---
 src/blocks/scratch3_event.js | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index ff15416df..18a5ab621 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -27,17 +27,8 @@ Scratch3EventBlocks.prototype.whenBroadcastReceived = function() {
     // No-op
 };
 
-Scratch3EventBlocks.prototype.broadcast = function(argValues, util) {
-    util.startHats(function(hat) {
-        if (hat.opcode === 'event_whenbroadcastreceived') {
-            var shadows = hat.fields.CHOICE.blocks;
-            for (var sb in shadows) {
-                var shadowblock = shadows[sb];
-                return shadowblock.fields.CHOICE.value === argValues[0];
-            }
-        }
-        return false;
-    });
+Scratch3EventBlocks.prototype.broadcast = function() {
+    // @todo
 };
 
 module.exports = Scratch3EventBlocks;

From a987d9d9cce6aae7714f89d14efab8f493e2c66f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:27:11 -0400
Subject: [PATCH 064/302] Only include field value in `execute.argValues`

---
 src/engine/execute.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index bd869a946..9e091e2f0 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -26,7 +26,7 @@ var execute = function (sequencer, thread, blockId) {
     // Add all fields on this block to the argValues.
     var fields = runtime.blocks.getFields(blockId);
     for (var fieldName in fields) {
-        argValues[fieldName] = fields[fieldName];
+        argValues[fieldName] = fields[fieldName].value;
     }
 
     // Recursively evaluate input blocks.

From b0441e2ef5ff41b60151f38b1ec7a4fcfed1e06c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:29:07 -0400
Subject: [PATCH 065/302] Implement stub for number and add blocks

---
 src/blocks/scratch3_operators.js | 29 +++++++++++++++++++++++++++++
 src/engine/runtime.js            |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 src/blocks/scratch3_operators.js

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
new file mode 100644
index 000000000..319f3f36d
--- /dev/null
+++ b/src/blocks/scratch3_operators.js
@@ -0,0 +1,29 @@
+function Scratch3OperatorsBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
+    return {
+        'math_number': this.number,
+        'math_add': this.add
+    };
+};
+
+
+Scratch3OperatorsBlocks.prototype.number = function(args) {
+    return Number(args.NUM);
+};
+
+Scratch3OperatorsBlocks.prototype.add = function(args) {
+    return args.NUM1 + args.NUM2;
+};
+
+module.exports = Scratch3OperatorsBlocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 5b4fab48d..07debdd64 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -6,6 +6,7 @@ var util = require('util');
 var defaultBlockPackages = {
     'scratch3_control': require('../blocks/scratch3_control'),
     'scratch3_event': require('../blocks/scratch3_event'),
+    'scratch3_operators': require('../blocks/scratch3_operators'),
     'wedo2': require('../blocks/wedo2')
 };
 

From 88402ee68cee9bff084395eb1ddfbebe301ace14 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 14:45:54 -0400
Subject: [PATCH 066/302] Move popStack to inside execute

---
 src/engine/execute.js   | 2 ++
 src/engine/sequencer.js | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 9e091e2f0..4991afeb6 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -86,6 +86,8 @@ var execute = function (sequencer, thread, blockId) {
             console.log('returned: ', primitiveReturnValue);
             console.groupEnd();
         }
+        // Pop the stack and stack frame
+        thread.popStack();
         return primitiveReturnValue;
     }
 };
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 56539a6b4..168fccf6a 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -121,8 +121,6 @@ Sequencer.prototype.stepToSubstack = function (thread, currentBlockId) {
 Sequencer.prototype.proceedThread = function (thread, currentBlockId) {
     // Stop showing run feedback in the editor.
     this.runtime.glowBlock(currentBlockId, false);
-    // Pop the stack and stack frame
-    thread.popStack();
     // Mark the thread as done and proceed to the next block.
     thread.status = Thread.STATUS_DONE;
     // Refresh nextBlock in case it has changed during a yield.

From 27064ce1630cae953ce3627b5ff5288412683f8e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 15:06:11 -0400
Subject: [PATCH 067/302] Fix implementation of "wait" block

---
 src/blocks/scratch3_control.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 50e7af645..a3ea897e0 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -40,7 +40,7 @@ Scratch3ControlBlocks.prototype.wait = function(argValues, util) {
     util.yield();
     util.timeout(function() {
         util.done();
-    }, 1000 * parseFloat(argValues[0]));
+    }, 1000 * argValues.DURATION);
 };
 
 Scratch3ControlBlocks.prototype.stop = function() {

From d52938c255f11b0f51c18145c515c771bdf700cd Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 15:06:24 -0400
Subject: [PATCH 068/302] Bind thread.yield passed to primitive to actual
 thread

---
 src/engine/execute.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 4991afeb6..1393b4354 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -60,7 +60,7 @@ var execute = function (sequencer, thread, blockId) {
     try {
         // @todo deal with the return value
         primitiveReturnValue = blockFunction(argValues, {
-            yield: thread.yield,
+            yield: thread.yield.bind(thread),
             done: function() {
                 sequencer.proceedThread(thread, blockId);
             },

From 2cd6bf93bb95cd7ba17582b01d7889bc78adfbd6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 17:05:08 -0400
Subject: [PATCH 069/302] Fix argument for repeat block

---
 src/blocks/scratch3_control.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index a3ea897e0..047e0dcd7 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -22,7 +22,7 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() {
 Scratch3ControlBlocks.prototype.repeat = function(argValues, util) {
     // Initialize loop
     if (util.stackFrame.loopCounter === undefined) {
-        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
+        util.stackFrame.loopCounter = parseInt(argValues.TIMES);
     }
     // Decrease counter
     util.stackFrame.loopCounter--;

From 526a26010149dc2be3ec2365f8d12a2dfee28c3c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 9 Jun 2016 17:08:30 -0400
Subject: [PATCH 070/302] Simplify execution by removing nextBlock

Everything is managed by the stack, including what the execute() function does.
---
 src/engine/execute.js   | 29 ++++++++---------
 src/engine/runtime.js   |  1 +
 src/engine/sequencer.js | 70 ++++++++++++++++++++++++-----------------
 src/engine/thread.js    | 27 ++++++++--------
 4 files changed, 70 insertions(+), 57 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 1393b4354..e8ca1417e 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -6,40 +6,43 @@ var YieldTimers = require('../util/yieldtimers.js');
  */
 var DEBUG_BLOCK_CALLS = true;
 
-var execute = function (sequencer, thread, blockId) {
+var execute = function (sequencer, thread) {
     var runtime = sequencer.runtime;
 
+    // Current block to execute is the one on the top of the stack.
+    var currentBlockId = thread.peekStack();
+    var currentStackFrame = thread.peekStackFrame();
+
     // Save the yield timer ID, in case a primitive makes a new one
     // @todo hack - perhaps patch this to allow more than one timer per
     // primitive, for example...
     var oldYieldTimerId = YieldTimers.timerId;
 
-    var opcode = runtime.blocks.getOpcode(blockId);
-
-    // Push the current block to the stack
-    thread.pushStack(blockId);
-    var currentStackFrame = thread.getLastStackFrame();
+    var opcode = runtime.blocks.getOpcode(currentBlockId);
 
     // Generate values for arguments (inputs).
     var argValues = {};
 
     // Add all fields on this block to the argValues.
-    var fields = runtime.blocks.getFields(blockId);
+    var fields = runtime.blocks.getFields(currentBlockId);
     for (var fieldName in fields) {
         argValues[fieldName] = fields[fieldName].value;
     }
 
     // Recursively evaluate input blocks.
-    var inputs = runtime.blocks.getInputs(blockId);
+    var inputs = runtime.blocks.getInputs(currentBlockId);
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
-        var result = execute(sequencer, thread, inputBlockId);
+        // Push to the stack to evaluate this input.
+        thread.pushStack(inputBlockId);
+        var result = execute(sequencer, thread);
+        thread.popStack();
         argValues[input.name] = result;
     }
 
     if (!opcode) {
-        console.warn('Could not get opcode for block: ' + blockId);
+        console.warn('Could not get opcode for block: ' + currentBlockId);
         console.groupEnd();
         return;
     }
@@ -62,12 +65,12 @@ var execute = function (sequencer, thread, blockId) {
         primitiveReturnValue = blockFunction(argValues, {
             yield: thread.yield.bind(thread),
             done: function() {
-                sequencer.proceedThread(thread, blockId);
+                sequencer.proceedThread(thread);
             },
             timeout: YieldTimers.timeout,
             stackFrame: currentStackFrame,
             startSubstack: function () {
-                sequencer.stepToSubstack(thread, blockId);
+                sequencer.stepToSubstack(thread);
             }
         });
     }
@@ -86,8 +89,6 @@ var execute = function (sequencer, thread, blockId) {
             console.log('returned: ', primitiveReturnValue);
             console.groupEnd();
         }
-        // Pop the stack and stack frame
-        thread.popStack();
         return primitiveReturnValue;
     }
 };
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 07debdd64..a56c063cb 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -122,6 +122,7 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
 Runtime.prototype._pushThread = function (id) {
     this.emit(Runtime.STACK_GLOW_ON, id);
     var thread = new Thread(id);
+    thread.pushStack(id);
     this.threads.push(thread);
 };
 
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 168fccf6a..fa4b6e661 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -49,17 +49,18 @@ Sequencer.prototype.stepThreads = function (threads) {
             var activeThread = threads[i];
             if (activeThread.status === Thread.STATUS_RUNNING) {
                 // Normal-mode thread: step.
-                this.stepThread(activeThread);
+                this.startThread(activeThread);
             } else if (activeThread.status === Thread.STATUS_YIELD) {
                 // Yield-mode thread: check if the time has passed.
-                YieldTimers.resolve(activeThread.yieldTimerId);
-                numYieldingThreads++;
+                if (!YieldTimers.resolve(activeThread.yieldTimerId)) {
+                    numYieldingThreads++;
+                }
             } else if (activeThread.status === Thread.STATUS_DONE) {
                 // Moved to a done state - finish up
                 activeThread.status = Thread.STATUS_RUNNING;
                 // @todo Deal with the return value
             }
-            if (activeThread.nextBlock === null &&
+            if (activeThread.stack.length === 0 &&
                 activeThread.status === Thread.STATUS_DONE) {
                 // Finished with this thread - tell runtime to clean it up.
                 inactiveThreads.push(activeThread);
@@ -78,21 +79,27 @@ Sequencer.prototype.stepThreads = function (threads) {
  * Step the requested thread
  * @param {!Thread} thread Thread object to step
  */
-Sequencer.prototype.stepThread = function (thread) {
-    // Save the current block and set the nextBlock.
-    // If the primitive would like to do control flow,
-    // it can overwrite nextBlock.
-    var currentBlockId = thread.nextBlock;
+Sequencer.prototype.startThread = function (thread) {
+    var currentBlockId = thread.peekStack();
     if (!currentBlockId || !this.runtime.blocks.getBlock(currentBlockId)) {
         thread.status = Thread.STATUS_DONE;
         return;
     }
     // Start showing run feedback in the editor.
     this.runtime.glowBlock(currentBlockId, true);
-    // Execute the block
-    execute(this, thread, currentBlockId, false);
-    // If the block executed without yielding, move to done.
-    if (thread.status === Thread.STATUS_RUNNING && !thread.switchedStack) {
+
+    // Push the current block to the stack, if executing for the first time.
+    if (thread.peekStack() != currentBlockId) {
+        thread.pushStack(currentBlockId);
+    }
+
+    // Execute the current block
+    execute(this, thread);
+
+    // If the block executed without yielding and without doing control flow,
+    // move to done.
+    if (thread.status === Thread.STATUS_RUNNING &&
+        thread.peekStack() === currentBlockId) {
         this.proceedThread(thread, currentBlockId);
     }
 };
@@ -102,15 +109,16 @@ Sequencer.prototype.stepThread = function (thread) {
  * @param {!Thread} thread Thread object to step to substack.
  * @param {string} currentBlockId Block which owns a substack to step to.
  */
-Sequencer.prototype.stepToSubstack = function (thread, currentBlockId) {
-    // Set nextBlock to the start of the substack
-    var substack = this.runtime.blocks.getSubstack(currentBlockId);
-    if (substack && substack.value) {
-        thread.nextBlock = substack.value;
+Sequencer.prototype.stepToSubstack = function (thread) {
+    var currentBlockId = thread.peekStack();
+    var substackId = this.runtime.blocks.getSubstack(currentBlockId);
+    if (substackId) {
+        // Push substack ID to the thread's stack.
+        thread.pushStack(substackId);
     } else {
-        thread.nextBlock = null;
+        // Push null, so we come back to the current block.
+        thread.pushStack(null);
     }
-    thread.switchedStack = true;
 };
 
 /**
@@ -118,17 +126,21 @@ Sequencer.prototype.stepToSubstack = function (thread, currentBlockId) {
  * @param {!Thread} thread Thread object to proceed.
  * @param {string} currentBlockId Block we are finished with.
  */
-Sequencer.prototype.proceedThread = function (thread, currentBlockId) {
-    // Stop showing run feedback in the editor.
+Sequencer.prototype.proceedThread = function (thread) {
+    var currentBlockId = thread.peekStack();
+    // Mark the status as done and proceed to the next block.
     this.runtime.glowBlock(currentBlockId, false);
-    // Mark the thread as done and proceed to the next block.
     thread.status = Thread.STATUS_DONE;
-    // Refresh nextBlock in case it has changed during a yield.
-    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlockId);
-    // If none is available, attempt to pop from the stack.
-    // First attempt to pop from the stack
-    if (!thread.nextBlock && thread.stack.length > 0) {
-        thread.nextBlock = thread.popStack();
+    // Pop from the stack - finished this level of execution.
+    thread.popStack();
+    // Push next connected block, if there is one.
+    var nextBlockId = this.runtime.blocks.getNextBlock(currentBlockId);
+    if (nextBlockId) {
+        thread.pushStack(nextBlockId);
+    }
+    // Pop from the stack until we have a next block.
+    while (thread.peekStack() === null && thread.stack.length > 0) {
+        thread.popStack();
     }
 };
 
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 4142ba88b..c98efab48 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -9,11 +9,7 @@ function Thread (firstBlock) {
      * @type {!string}
      */
     this.topBlock = firstBlock;
-    /**
-     * ID of next block that the thread will execute, or null if none.
-     * @type {?string}
-     */
-    this.nextBlock = firstBlock;
+
     /**
      * Stack for the thread. When the sequencer enters a control structure,
      * the block is pushed onto the stack so we know where to exit.
@@ -38,12 +34,6 @@ function Thread (firstBlock) {
      * @type {number}
      */
     this.yieldTimerId = -1;
-
-    /**
-     * Whether the thread has switched stack in the course of execution.
-     * @type {boolean}
-     */
-    this.switchedStack = false;
 }
 
 /**
@@ -83,7 +73,7 @@ Thread.prototype.pushStack = function (blockId) {
 
 /**
  * Pop last block on the stack and its stack frame.
- * @returns {string} Block ID popped from the stack.
+ * @return {string} Block ID popped from the stack.
  */
 Thread.prototype.popStack = function () {
     this.stackFrames.pop();
@@ -91,10 +81,19 @@ Thread.prototype.popStack = function () {
 };
 
 /**
- * Get last stack frame.
+ * Get top stack item.
+ * @return {?string} Block ID on top of stack.
+ */
+Thread.prototype.peekStack = function () {
+    return this.stack[this.stack.length - 1];
+};
+
+
+/**
+ * Get top stack frame.
  * @return {?Object} Last stack frame stored on this thread.
  */
-Thread.prototype.getLastStackFrame = function () {
+Thread.prototype.peekStackFrame = function () {
     return this.stackFrames[this.stackFrames.length - 1];
 };
 

From 559a2a0fab79c9396ee6a7d3f64ebd44397d35ef Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 08:41:44 -0400
Subject: [PATCH 071/302] Remove redundant piece of code

The stack is pushed in after the thread finishes (`proceedThread`).
---
 src/engine/sequencer.js | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index fa4b6e661..cbccd09be 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -88,11 +88,6 @@ Sequencer.prototype.startThread = function (thread) {
     // Start showing run feedback in the editor.
     this.runtime.glowBlock(currentBlockId, true);
 
-    // Push the current block to the stack, if executing for the first time.
-    if (thread.peekStack() != currentBlockId) {
-        thread.pushStack(currentBlockId);
-    }
-
     // Execute the current block
     execute(this, thread);
 

From 7cc0c00da66dc1378b6069b99f04bd575f35064e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 08:47:54 -0400
Subject: [PATCH 072/302] Correctly deal with empty substacks.

The stack needs to be popped in this situation.
---
 src/engine/sequencer.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index cbccd09be..1593c1904 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -81,7 +81,9 @@ Sequencer.prototype.stepThreads = function (threads) {
  */
 Sequencer.prototype.startThread = function (thread) {
     var currentBlockId = thread.peekStack();
-    if (!currentBlockId || !this.runtime.blocks.getBlock(currentBlockId)) {
+    if (!currentBlockId) {
+        // A "null block" - empty substack. Pop the stack.
+        thread.popStack();
         thread.status = Thread.STATUS_DONE;
         return;
     }

From 506e9c32be428a4dbe3edf78aeaf4ebce31bbdb2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 08:48:39 -0400
Subject: [PATCH 073/302] Don't attempt to glow a block that isn't known in the
 VM

---
 src/engine/runtime.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index a56c063cb..aff2a3aec 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -233,6 +233,9 @@ Runtime.prototype._step = function () {
  * @param {boolean} isGlowing True to turn on glow; false to turn off.
  */
 Runtime.prototype.glowBlock = function (blockId, isGlowing) {
+    if (!this.blocks.getBlock(blockId)) {
+        return;
+    }
     if (isGlowing) {
         this.emit(Runtime.BLOCK_GLOW_ON, blockId);
     } else {

From ca68c55d577f16d4894c4b6681437c2717f4ab1f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 10:36:05 -0400
Subject: [PATCH 074/302] Implement logic_equals, if blocks

---
 src/blocks/scratch3_control.js   | 22 +++++++++++++++++-----
 src/blocks/scratch3_operators.js | 17 +++++++++++++----
 2 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 047e0dcd7..9c09e3684 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -15,14 +15,15 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() {
         'control_repeat': this.repeat,
         'control_forever': this.forever,
         'control_wait': this.wait,
+        'control_if': this.if,
         'control_stop': this.stop
     };
 };
 
-Scratch3ControlBlocks.prototype.repeat = function(argValues, util) {
+Scratch3ControlBlocks.prototype.repeat = function(args, util) {
     // Initialize loop
     if (util.stackFrame.loopCounter === undefined) {
-        util.stackFrame.loopCounter = parseInt(argValues.TIMES);
+        util.stackFrame.loopCounter = parseInt(args.TIMES);
     }
     // Decrease counter
     util.stackFrame.loopCounter--;
@@ -32,15 +33,26 @@ Scratch3ControlBlocks.prototype.repeat = function(argValues, util) {
     }
 };
 
-Scratch3ControlBlocks.prototype.forever = function(argValues, util) {
+Scratch3ControlBlocks.prototype.forever = function(args, util) {
     util.startSubstack();
 };
 
-Scratch3ControlBlocks.prototype.wait = function(argValues, util) {
+Scratch3ControlBlocks.prototype.wait = function(args, util) {
     util.yield();
     util.timeout(function() {
         util.done();
-    }, 1000 * argValues.DURATION);
+    }, 1000 * args.DURATION);
+};
+
+Scratch3ControlBlocks.prototype.if = function(args, util) {
+    // Only execute one time. `if` will be returned to
+    // when the substack finishes, but it shouldn't execute again.
+    if (util.stackFrame.executed === undefined) {
+        util.stackFrame.executed = true;
+        if (args.CONDITION) {
+            util.startSubstack();
+        }
+    }
 };
 
 Scratch3ControlBlocks.prototype.stop = function() {
diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 319f3f36d..eff1fe18d 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -13,17 +13,26 @@ function Scratch3OperatorsBlocks(runtime) {
 Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
     return {
         'math_number': this.number,
-        'math_add': this.add
+        'text': this.text,
+        'math_add': this.add,
+        'logic_equals': this.equals
     };
 };
 
-
-Scratch3OperatorsBlocks.prototype.number = function(args) {
+Scratch3OperatorsBlocks.prototype.number = function (args) {
     return Number(args.NUM);
 };
 
-Scratch3OperatorsBlocks.prototype.add = function(args) {
+Scratch3OperatorsBlocks.prototype.text = function (args) {
+    return String(args.TEXT);
+};
+
+Scratch3OperatorsBlocks.prototype.add = function (args) {
     return args.NUM1 + args.NUM2;
 };
 
+Scratch3OperatorsBlocks.prototype.equals = function (args) {
+    return args.VALUE1 == args.VALUE2;
+};
+
 module.exports = Scratch3OperatorsBlocks;

From 0bf9ab59a18e12bf150f7a95d06c1d3553b7cd2f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 10:40:15 -0400
Subject: [PATCH 075/302] Add implementation for `ifElse`

---
 src/blocks/scratch3_control.js | 14 ++++++++++++++
 src/engine/execute.js          |  4 ++--
 src/engine/sequencer.js        | 13 +++++++++----
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 9c09e3684..1d05a8c7a 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -16,6 +16,7 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() {
         'control_forever': this.forever,
         'control_wait': this.wait,
         'control_if': this.if,
+        'control_if_else': this.ifElse,
         'control_stop': this.stop
     };
 };
@@ -55,6 +56,19 @@ Scratch3ControlBlocks.prototype.if = function(args, util) {
     }
 };
 
+Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
+    // Only execute one time. `ifElse` will be returned to
+    // when the substack finishes, but it shouldn't execute again.
+    if (util.stackFrame.executed === undefined) {
+        util.stackFrame.executed = true;
+        if (args.CONDITION) {
+            util.startSubstack(1);
+        } else {
+            util.startSubstack(2);
+        }
+    }
+};
+
 Scratch3ControlBlocks.prototype.stop = function() {
     // @todo - don't use this.runtime
     this.runtime.stopAll();
diff --git a/src/engine/execute.js b/src/engine/execute.js
index e8ca1417e..5ed51cb62 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -69,8 +69,8 @@ var execute = function (sequencer, thread) {
             },
             timeout: YieldTimers.timeout,
             stackFrame: currentStackFrame,
-            startSubstack: function () {
-                sequencer.stepToSubstack(thread);
+            startSubstack: function (substackNum) {
+                sequencer.stepToSubstack(thread, substackNum);
             }
         });
     }
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 1593c1904..6659f12d8 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -104,11 +104,17 @@ Sequencer.prototype.startThread = function (thread) {
 /**
  * Step a thread into a block's substack.
  * @param {!Thread} thread Thread object to step to substack.
- * @param {string} currentBlockId Block which owns a substack to step to.
+ * @param {Number} substackNum Which substack to step to (i.e., 1, 2).
  */
-Sequencer.prototype.stepToSubstack = function (thread) {
+Sequencer.prototype.stepToSubstack = function (thread, substackNum) {
+    if (!substackNum) {
+        substackNum = 1;
+    }
     var currentBlockId = thread.peekStack();
-    var substackId = this.runtime.blocks.getSubstack(currentBlockId);
+    var substackId = this.runtime.blocks.getSubstack(
+        currentBlockId,
+        substackNum
+    );
     if (substackId) {
         // Push substack ID to the thread's stack.
         thread.pushStack(substackId);
@@ -121,7 +127,6 @@ Sequencer.prototype.stepToSubstack = function (thread) {
 /**
  * Finish stepping a thread and proceed it to the next block.
  * @param {!Thread} thread Thread object to proceed.
- * @param {string} currentBlockId Block we are finished with.
  */
 Sequencer.prototype.proceedThread = function (thread) {
     var currentBlockId = thread.peekStack();

From e9eb7c6e57c1125902e5238a2ae3091402723b76 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 13:34:07 -0400
Subject: [PATCH 076/302] Remove leftover `console.groupEnd`s in `execute`

---
 src/engine/execute.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 5ed51cb62..d2f8381f0 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -43,14 +43,12 @@ var execute = function (sequencer, thread) {
 
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + currentBlockId);
-        console.groupEnd();
         return;
     }
 
     var blockFunction = runtime.getOpcodeFunction(opcode);
     if (!blockFunction) {
         console.warn('Could not get implementation for opcode: ' + opcode);
-        console.groupEnd();
         return;
     }
 

From a58fa43572bef208d2b264d5611a531aed395e5b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 10 Jun 2016 13:38:35 -0400
Subject: [PATCH 077/302] Add reset to `numYieldingThreads` and comment about
 YieldTimers

---
 src/engine/sequencer.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 6659f12d8..deaa15266 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -44,6 +44,8 @@ Sequencer.prototype.stepThreads = function (threads) {
            this.timer.timeElapsed() < Sequencer.WORK_TIME) {
         // New threads at the end of the iteration.
         var newThreads = [];
+        // Reset yielding thread count.
+        numYieldingThreads = 0;
         // Attempt to run each thread one time
         for (var i = 0; i < threads.length; i++) {
             var activeThread = threads[i];
@@ -53,6 +55,8 @@ Sequencer.prototype.stepThreads = function (threads) {
             } else if (activeThread.status === Thread.STATUS_YIELD) {
                 // Yield-mode thread: check if the time has passed.
                 if (!YieldTimers.resolve(activeThread.yieldTimerId)) {
+                    // Thread is still yielding
+                    // if YieldTimers.resolve returns false.
                     numYieldingThreads++;
                 }
             } else if (activeThread.status === Thread.STATUS_DONE) {

From 056fb764923d19b997acd14ef4109800beb5a63c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 13 Jun 2016 11:23:39 -0400
Subject: [PATCH 078/302] Remove try/catch in execution - fix #75

---
 src/engine/execute.js | 50 ++++++++++++++++++-------------------------
 1 file changed, 21 insertions(+), 29 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index d2f8381f0..0d1dbc3cc 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -58,37 +58,29 @@ var execute = function (sequencer, thread) {
         console.log('and stack frame: ', currentStackFrame);
     }
     var primitiveReturnValue = null;
-    try {
-        // @todo deal with the return value
-        primitiveReturnValue = blockFunction(argValues, {
-            yield: thread.yield.bind(thread),
-            done: function() {
-                sequencer.proceedThread(thread);
-            },
-            timeout: YieldTimers.timeout,
-            stackFrame: currentStackFrame,
-            startSubstack: function (substackNum) {
-                sequencer.stepToSubstack(thread, substackNum);
-            }
-        });
-    }
-    catch(e) {
-        console.error(
-            'Exception calling block function for opcode: ' +
-            opcode + '\n' + e);
-    } finally {
-        // Update if the thread has set a yield timer ID
-        // @todo hack
-        if (YieldTimers.timerId > oldYieldTimerId) {
-            thread.yieldTimerId = YieldTimers.timerId;
+    // @todo deal with the return value
+    primitiveReturnValue = blockFunction(argValues, {
+        yield: thread.yield.bind(thread),
+        done: function() {
+            sequencer.proceedThread(thread);
+        },
+        timeout: YieldTimers.timeout,
+        stackFrame: currentStackFrame,
+        startSubstack: function (substackNum) {
+            sequencer.stepToSubstack(thread, substackNum);
         }
-        if (DEBUG_BLOCK_CALLS) {
-            console.log('ending stack frame: ', currentStackFrame);
-            console.log('returned: ', primitiveReturnValue);
-            console.groupEnd();
-        }
-        return primitiveReturnValue;
+    });
+    // Update if the thread has set a yield timer ID
+    // @todo hack
+    if (YieldTimers.timerId > oldYieldTimerId) {
+        thread.yieldTimerId = YieldTimers.timerId;
     }
+    if (DEBUG_BLOCK_CALLS) {
+        console.log('ending stack frame: ', currentStackFrame);
+        console.log('returned: ', primitiveReturnValue);
+        console.groupEnd();
+    }
+    return primitiveReturnValue;
 };
 
 module.exports = execute;

From a1be1d656674a7f3000ef95b69420805a81bd332 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 14 Jun 2016 18:08:41 -0400
Subject: [PATCH 079/302] Update playground and block implementations to match
 scratch-blocks

---
 playground/index.html            | 259 +++++++++++++++++++++++++------
 src/blocks/scratch3_operators.js |   6 +-
 2 files changed, 213 insertions(+), 52 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 3d10a22d0..b78a3f852 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -28,63 +28,224 @@
     <div id="blocks"></div>
 
     <xml id="toolbox" style="display: none">
-      <category name="Events">
-        <block type="event_whenflagclicked"></block>
-        <block type="event_whenbroadcastreceived"></block>
-        <block type="event_broadcast"></block>
-      </category>
-      <category name="Control">
-        <block type="control_forever"></block>
-        <block type="control_repeat">
-          <value name="TIMES">
-            <shadow type="math_number">
-              <field name="NUM">4</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="control_if"></block>
-        <block type="control_if_else"></block>
-        <block type="control_stop"></block>
-        <block type="control_wait">
-          <value name="DURATION">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-        </block>
-      </category>
-      <category name="Wedo">
-          <block type="wedo_setcolor"></block>
-          <block type="wedo_motorspeed"></block>
-          <block type="wedo_whentilt"></block>
-          <block type="wedo_whendistanceclose"></block>
-      </category>
-      <category name="Operators">
-          <block type="math_add">
-            <value name="NUM1">
-              <shadow type="math_number">
-                <field name="NUM">0</field>
-              </shadow>
+        <category name="Events">
+          <block type="event_whenflagclicked"></block>
+          <block type="event_whenbroadcastreceived">
+            <value name="BROADCAST_OPTION">
+              <shadow type="event_broadcast_menu"></shadow>
             </value>
-            <value name="NUM2">
+          </block>
+          <block type="event_broadcast">
+            <value name="BROADCAST_OPTION">
+              <shadow type="event_broadcast_menu"></shadow>
+            </value>
+          </block>
+          <block type="event_broadcastandwait">
+            <value name="BROADCAST_OPTION">
+              <shadow type="event_broadcast_menu"></shadow>
+            </value>
+          </block>
+        </category>
+        <category name="Control">
+          <block type="control_wait">
+            <value name="DURATION">
               <shadow type="math_number">
-                <field name="NUM">0</field>
+                <field name="NUM">1</field>
               </shadow>
             </value>
           </block>
-          <block type="logic_equals">
-            <value name="VALUE1">
-              <shadow type="text">
-                <field name="TEXT">0</field>
-              </shadow>
-            </value>
-            <value name="VALUE2">
-              <shadow type="text">
-                <field name="TEXT">0</field>
+          <block type="control_repeat">
+            <value name="TIMES">
+              <shadow type="math_number">
+                <field name="NUM">4</field>
               </shadow>
             </value>
           </block>
-      </category>
+          <block type="control_forever"></block>
+          <block type="control_if"></block>
+          <block type="control_if_else"></block>
+          <block type="control_wait_until"></block>
+          <block type="control_repeat_until"></block>
+          <block type="control_stop">
+            <value name="STOP_OPTION">
+              <shadow type="control_stop_menu"></shadow>
+            </value>
+          </block>
+          <block type="control_start_as_clone"></block>
+          <block type="control_create_clone_of">
+            <value name="CLONE_OPTION">
+              <shadow type="control_create_clone_of_menu"></shadow>
+            </value>
+          </block>
+          <block type="control_delete_this_clone"></block>
+        </category>
+        <category name="Wedo">
+            <block type="wedo_setcolor"></block>
+            <block type="wedo_motorspeed"></block>
+            <block type="wedo_whentilt"></block>
+            <block type="wedo_whendistanceclose"></block>
+        </category>
+        <category name="Operators">
+            <block type="operator_add">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_subtract">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_multiply">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_divide">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_random">
+              <value name="FROM">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="TO">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_lt">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_equals">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_gt">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_and"></block>
+            <block type="operator_or"></block>
+            <block type="operator_not"></block>
+            <block type="operator_join">
+              <value name="STRING1">
+                <shadow type="text">
+                  <field name="TEXT">hello</field>
+                </shadow>
+              </value>
+              <value name="STRING2">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_letter_of">
+              <value name="LETTER">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="STRING">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_length">
+              <value name="STRING">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_mod">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_round">
+              <value name="NUM">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_mathop">
+              <value name="OPERATOR">
+                <shadow type="operator_mathop_menu"></shadow>
+              </value>
+              <value name="NUM">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+        </category>
     </xml>
 
     <!-- Syntax highlighter -->
diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index eff1fe18d..94329b5a3 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -14,8 +14,8 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
     return {
         'math_number': this.number,
         'text': this.text,
-        'math_add': this.add,
-        'logic_equals': this.equals
+        'operator_add': this.add,
+        'operator_equals': this.equals
     };
 };
 
@@ -32,7 +32,7 @@ Scratch3OperatorsBlocks.prototype.add = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.equals = function (args) {
-    return args.VALUE1 == args.VALUE2;
+    return args.OPERAND1 == args.OPERAND2;
 };
 
 module.exports = Scratch3OperatorsBlocks;

From 7427fe4ff30755e736283ea6ae4b7f173870f462 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 14 Jun 2016 18:14:04 -0400
Subject: [PATCH 080/302] Add fix for `adapter` to deal with empty fields

---
 src/engine/adapter.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 73b69b084..9a9023209 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -100,9 +100,17 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
         case 'field':
             // Add the field to this block.
             var fieldName = xmlChild.attribs.name;
+            var fieldData = '';
+            if (xmlChild.children.length > 0 && xmlChild.children[0].data) {
+                fieldData = xmlChild.children[0].data;
+            } else {
+                // If the child of the field with a data property
+                // doesn't exist, set the data to an empty string.
+                fieldData = '';
+            }
             block.fields[fieldName] = {
                 name: fieldName,
-                value: xmlChild.children[0].data
+                value: fieldData
             };
             break;
         case 'value':

From 9f89caa0e6f267dfaa1849e48a99e0026304fb85 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 14 Jun 2016 18:14:15 -0400
Subject: [PATCH 081/302] Add regression test for adapter's empty field
 handling

---
 test/fixtures/events.json | 6 ++++++
 test/unit/adapter.js      | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index 6d94fc62a..f80610d46 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -53,5 +53,11 @@
         "xml": {
             "outerHTML": "></xml>"
         }
+    },
+    "createemptyfield": {
+        "name": "block",
+        "xml": {
+            "outerHTML":  "<block type='operator_equals' id='l^H_{8[DDyDW?m)HIt@b' x='100' y='362'><value name='OPERAND1'><shadow type='text' id='Ud@4y]bc./]uv~te?brb'><field name='TEXT'></field></shadow></value><value name='OPERAND2'><shadow type='text' id='p8[y..,[K;~G,k7]N;08'><field name='TEXT'></field></shadow></value></block>"
+        }
     }
 }
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 838815626..c31175a72 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -165,3 +165,10 @@ test('create with invalid xml', function (t) {
     t.equal(result.length, 0);
     t.end();
 });
+
+test('create with empty field', function (t) {
+    var result = adapter(events.createemptyfield);
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 3);
+    t.end();
+});

From 652cc8a31cc7b8e0f998e3634b84b15ed4dde8f4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 14:29:40 -0400
Subject: [PATCH 082/302] Fix references to `window`

---
 src/blocks/wedo2.js   |  6 +++---
 src/engine/runtime.js | 25 +++++++++++++++++++------
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/blocks/wedo2.js b/src/blocks/wedo2.js
index d4a2a9308..d7516bc18 100644
--- a/src/blocks/wedo2.js
+++ b/src/blocks/wedo2.js
@@ -64,7 +64,7 @@ WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
         YieldTimers.resolve(this._motorTimeout);
         this._motorTimeout = null;
     }
-    if (window.native) {
+    if (typeof window !== 'undefined' && window.native) {
         window.native.motorRun(direction, this._motorSpeed);
     }
 
@@ -73,7 +73,7 @@ WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
         if (instance._motorTimeout == myTimeout) {
             instance._motorTimeout = null;
         }
-        if (window.native) {
+        if (typeof window !== 'undefined' && window.native) {
             window.native.motorStop();
         }
         util.done();
@@ -132,7 +132,7 @@ WeDo2Blocks.prototype._getColor = function(colorName) {
 };
 
 WeDo2Blocks.prototype.setColor = function(argValues, util) {
-    if (window.native) {
+    if (typeof window !== 'undefined' && window.native) {
         var colorIndex = this._getColor(argValues[0]);
         window.native.setLedColor(colorIndex);
     }
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index aff2a3aec..f6ad79f0b 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -210,10 +210,6 @@ Runtime.prototype.stopAll = function () {
         // Actually remove the thread.
         this._removeThread(poppedThread);
     }
-    // @todo call stop function in all extensions/packages/WeDo stub
-    if (window.native) {
-        window.native.motorStop();
-    }
 };
 
 /**
@@ -243,12 +239,29 @@ Runtime.prototype.glowBlock = function (blockId, isGlowing) {
     }
 };
 
+/**
+ * setInterval implementation that works in a WebWorker or not.
+ * @param {?Function} fcn Function to call.
+ * @param {number} interval Interval at which to call it.
+ * @return {number} Value returned by setInterval.
+ */
+Runtime.prototype._setInterval = function(fcn, interval) {
+    var setInterval = null;
+    if (typeof window !== 'undefined' && window.setInterval) {
+        setInterval = window.setInterval;
+    } else if (typeof self !== 'undefined' && self.setInterval) {
+        setInterval = self.setInterval;
+    } else {
+        return;
+    }
+    return setInterval(fcn, interval);
+};
+
 /**
  * Set up timers to repeatedly step in a browser
  */
 Runtime.prototype.start = function () {
-    if (!window.setInterval) return;
-    window.setInterval(function() {
+    this._setInterval(function() {
         this._step();
     }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 };

From b144ca7a2eb17da951a008a643fbe225b4bf907f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 14:42:24 -0400
Subject: [PATCH 083/302] Add dev server to help with WebWorker development

---
 Makefile     | 4 ++++
 package.json | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 74886ded4..835c16f79 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ ESLINT=./node_modules/.bin/eslint
 NODE=node
 TAP=./node_modules/.bin/tap
 WEBPACK=./node_modules/.bin/webpack --progress --colors
+WEBPACK_DEV_SERVER=./node_modules/.bin/webpack-dev-server
 
 # ------------------------------------------------------------------------------
 
@@ -11,6 +12,9 @@ build:
 watch:
 	$(WEBPACK) --watch
 
+serve:
+	$(WEBPACK_DEV_SERVER) --content-base ./
+
 # ------------------------------------------------------------------------------
 
 lint:
diff --git a/package.json b/package.json
index fdcb4bc84..4639595e3 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
     "json-loader": "0.5.4",
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "tap": "5.7.1",
-    "webpack": "1.13.0"
+    "webpack": "1.13.0",
+    "webpack-dev-server": "^1.14.1"
   }
 }

From 01aecb337251f6cee765f15816085ab33b6d0401 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 14:42:34 -0400
Subject: [PATCH 084/302] Allow worker in eslintrc environment

---
 .eslintrc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.eslintrc b/.eslintrc
index dbd86477a..bcd88942f 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -13,7 +13,8 @@
     },
     "env": {
         "node": true,
-        "browser": true
+        "browser": true,
+        "worker": true
     },
     "extends": "eslint:recommended"
 }

From 783a3688aa244fa8c7f94e7038f1d55ed4f8629c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 14:48:54 -0400
Subject: [PATCH 085/302] Update index.js to support worker environment

---
 src/index.js | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/src/index.js b/src/index.js
index e8558a19e..afe6cc2f4 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,6 +4,12 @@ var util = require('util');
 var Blocks = require('./engine/blocks');
 var Runtime = require('./engine/runtime');
 
+/**
+ * Whether the environment is a WebWorker.
+ * @const{boolean}
+ */
+var ENV_WORKER = typeof importScripts === 'function';
+
 /**
  * Handles connections between blocks, stage, and extensions.
  *
@@ -30,6 +36,55 @@ function VirtualMachine () {
     );
 }
 
+/*
+ * Worker Handlers
+ */
+if (ENV_WORKER) {
+    self.vmInstance = new VirtualMachine();
+    self.onmessage = function (e) {
+        var messageData = e.data;
+        switch (messageData.method) {
+        case 'start':
+            self.vmInstance.runtime.start();
+            break;
+        case 'greenFlag':
+            self.vmInstance.runtime.greenFlag();
+            break;
+        case 'stopAll':
+            self.vmInstance.runtime.stopAll();
+            break;
+        case 'blockListener':
+            self.vmInstance.blockListener(messageData.args);
+            break;
+        case 'flyoutBlockListener':
+            self.vmInstance.flyoutBlockListener(messageData.args);
+            break;
+        case 'getPlaygroundData':
+            self.postMessage({
+                method: 'playgroundData',
+                blocks: self.vmInstance.blocks,
+                threads: self.vmInstance.runtime.threads
+            });
+            break;
+        default:
+            throw 'Unknown method' + messageData.method;
+        }
+    };
+    // Bind runtime's emitted events to postmessages.
+    self.vmInstance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
+        self.postMessage({method: Runtime.STACK_GLOW_ON, id: id});
+    });
+    self.vmInstance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
+        self.postMessage({method: Runtime.STACK_GLOW_OFF, id: id});
+    });
+    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
+        self.postMessage({method: Runtime.BLOCK_GLOW_ON, id: id});
+    });
+    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
+        self.postMessage({method: Runtime.BLOCK_GLOW_OFF, id: id});
+    });
+}
+
 /**
  * Inherit from EventEmitter
  */

From 020bf1ef65a43366eb7364aef3dfb93535e55b17 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 15:28:47 -0400
Subject: [PATCH 086/302] Use absolute version number for webpack-dev-server

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 4639595e3..e55a497e1 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,6 @@
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "tap": "5.7.1",
     "webpack": "1.13.0",
-    "webpack-dev-server": "^1.14.1"
+    "webpack-dev-server": "1.14.1"
   }
 }

From b97974e2ace25efa093fc976e409bebf7ecd319f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 15:30:27 -0400
Subject: [PATCH 087/302] Implement WebWorker interface

---
 src/index.js      | 59 +++++++++++++++++++++++++++++++++++----
 src/worker.js     | 70 +++++++++++++++++++++++++++++++++++++++++++++++
 webpack.config.js |  3 +-
 3 files changed, 125 insertions(+), 7 deletions(-)
 create mode 100644 src/worker.js

diff --git a/src/index.js b/src/index.js
index afe6cc2f4..174f05b1c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -34,10 +34,62 @@ function VirtualMachine () {
     instance.flyoutBlockListener = (
         instance.blocks.generateBlockListener(true, instance.runtime)
     );
+
+    // Runtime emits are passed along as VM emits.
+    instance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
+        instance.emit(Runtime.STACK_GLOW_ON, {id: id});
+    });
+    instance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
+        instance.emit(Runtime.STACK_GLOW_OFF, {id: id});
+    });
+    instance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
+        instance.emit(Runtime.BLOCK_GLOW_ON, {id: id});
+    });
+    instance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
+        instance.emit(Runtime.BLOCK_GLOW_OFF, {id: id});
+    });
 }
 
+/**
+ * Inherit from EventEmitter
+ */
+util.inherits(VirtualMachine, EventEmitter);
+
+/**
+ * Start running the VM - do this before anything else.
+ */
+VirtualMachine.prototype.start = function () {
+    this.runtime.start();
+};
+
+/**
+ * "Green flag" handler - start all threads starting with a green flag.
+ */
+VirtualMachine.prototype.greenFlag = function () {
+    this.runtime.greenFlag();
+};
+
+/**
+ * Stop all threads and running activities.
+ */
+VirtualMachine.prototype.stopAll = function () {
+    this.runtime.stopAll();
+};
+
+/**
+ * Get data for playground. Data comes back in an emitted event.
+ */
+VirtualMachine.prototype.getPlaygroundData = function () {
+    this.emit('playgroundData', {
+        blocks: this.blocks,
+        threads: this.runtime.threads
+    });
+};
+
 /*
- * Worker Handlers
+ * Worker handlers: for all public methods available above,
+ * we must also provide a message handler in case the VM is run
+ * from a worker environment.
  */
 if (ENV_WORKER) {
     self.vmInstance = new VirtualMachine();
@@ -85,11 +137,6 @@ if (ENV_WORKER) {
     });
 }
 
-/**
- * Inherit from EventEmitter
- */
-util.inherits(VirtualMachine, EventEmitter);
-
 /**
  * Export and bind to `window`
  */
diff --git a/src/worker.js b/src/worker.js
new file mode 100644
index 000000000..e96c57bf3
--- /dev/null
+++ b/src/worker.js
@@ -0,0 +1,70 @@
+var EventEmitter = require('events');
+var util = require('util');
+
+function VirtualMachine () {
+    if (!window.Worker) {
+        console.error('WebWorkers not supported in this environment.' +
+            ' Please use the non-worker version (vm.js or vm.min.js).');
+        return;
+    }
+    var instance = this;
+    EventEmitter.call(instance);
+    instance.vmWorker = new Worker('../vm.js');
+
+    // onmessage calls are converted into emitted events.
+    instance.vmWorker.onmessage = function (e) {
+        instance.emit(e.data.method, e.data);
+    };
+
+    instance.blockListener = function (e) {
+        // Messages from Blockly are not serializable by default.
+        // Pull out the necessary, serializable components to pass across.
+        var serializableE = {
+            blockId: e.blockId,
+            element: e.element,
+            type: e.type,
+            name: e.name,
+            newValue: e.newValue,
+            oldParentId: e.oldParentId,
+            oldInputName: e.oldInputName,
+            newParentId: e.newParentId,
+            newInputName: e.newInputName,
+            xml: {
+                outerHTML: (e.xml) ? e.xml.outerHTML : null
+            }
+        };
+        instance.vmWorker.postMessage({
+            method: 'blockListener',
+            args: serializableE
+        });
+    };
+}
+
+/**
+ * Inherit from EventEmitter
+ */
+util.inherits(VirtualMachine, EventEmitter);
+
+// For documentation, please see index.js.
+// These mirror the functionality provided there, with the worker wrapper.
+VirtualMachine.prototype.getPlaygroundData = function () {
+    this.vmWorker.postMessage({method: 'getPlaygroundData'});
+};
+
+VirtualMachine.prototype.start = function () {
+    this.vmWorker.postMessage({method: 'start'});
+};
+
+VirtualMachine.prototype.greenFlag = function () {
+    this.vmWorker.postMessage({method: 'greenFlag'});
+};
+
+VirtualMachine.prototype.stopAll = function () {
+    this.vmWorker.postMessage({method: 'stopAll'});
+};
+
+/**
+ * Export and bind to `window`
+ */
+module.exports = VirtualMachine;
+if (typeof window !== 'undefined') window.VirtualMachine = module.exports;
diff --git a/webpack.config.js b/webpack.config.js
index 6badafd2f..46a89c67c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,7 +3,8 @@ var webpack = require('webpack');
 module.exports = {
     entry: {
         'vm': './src/index.js',
-        'vm.min': './src/index.js'
+        'vm.min': './src/index.js',
+        'vm.worker': './src/worker.js'
     },
     output: {
         path: __dirname,

From 59ff650de1e55780e3a26b02201ff9a3c1fa32a5 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 21 Jun 2016 15:30:36 -0400
Subject: [PATCH 088/302] Update playground to use unified interface and worker

---
 playground/index.html    |  4 ++--
 playground/playground.js | 52 ++++++++++++++++++++++------------------
 2 files changed, 31 insertions(+), 25 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index b78a3f852..0d4903d3d 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -255,8 +255,8 @@
     <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
-    <!-- Compiled VM -->
-    <script src="../vm.js"></script>
+    <!-- VM Worker -->
+    <script src="../vm.worker.js"></script>
     <!-- Playground -->
     <script src="./playground.js"></script>
 </body>
diff --git a/playground/playground.js b/playground/playground.js
index 19560bbae..be683ceb7 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -26,55 +26,61 @@ window.onload = function() {
     window.workspace = workspace;
 
     // Block events.
-    workspace.addChangeListener(vm.blockListener);
     // @todo: Re-enable flyout listening after fixing GH-69.
-    //var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
-    //flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
+    workspace.addChangeListener(vm.blockListener);
 
+    // Playground data
     var blockexplorer = document.getElementById('blockexplorer');
-    workspace.addChangeListener(function() {
-        // On a change, update the block explorer.
-        blockexplorer.innerHTML = JSON.stringify(vm.runtime.blocks, null, 2);
+    var updateBlockExplorer = function(blocks) {
+        blockexplorer.innerHTML = JSON.stringify(blocks, null, 2);
         window.hljs.highlightBlock(blockexplorer);
-    });
+    };
 
     var threadexplorer = document.getElementById('threadexplorer');
     var cachedThreadJSON = '';
-    var updateThreadExplorer = function () {
-        var newJSON = JSON.stringify(vm.runtime.threads, null, 2);
+    var updateThreadExplorer = function (threads) {
+        var newJSON = JSON.stringify(threads, null, 2);
         if (newJSON != cachedThreadJSON) {
             cachedThreadJSON = newJSON;
             threadexplorer.innerHTML = cachedThreadJSON;
             window.hljs.highlightBlock(threadexplorer);
         }
-        window.requestAnimationFrame(updateThreadExplorer);
     };
-    updateThreadExplorer();
+
+    var getPlaygroundData = function () {
+        vm.getPlaygroundData();
+        window.requestAnimationFrame(getPlaygroundData);
+    };
+    getPlaygroundData();
+
+    vm.on('playgroundData', function(data) {
+        updateThreadExplorer(data.threads);
+        updateBlockExplorer(data.blocks);
+    });
 
     // Feedback for stacks and blocks running.
-    vm.runtime.on('STACK_GLOW_ON', function(blockId) {
-        workspace.glowStack(blockId, true);
+    vm.on('STACK_GLOW_ON', function(data) {
+        workspace.glowStack(data.id, true);
     });
-    vm.runtime.on('STACK_GLOW_OFF', function(blockId) {
-        workspace.glowStack(blockId, false);
+    vm.on('STACK_GLOW_OFF', function(data) {
+        workspace.glowStack(data.id, false);
     });
-    vm.runtime.on('BLOCK_GLOW_ON', function(blockId) {
-        workspace.glowBlock(blockId, true);
+    vm.on('BLOCK_GLOW_ON', function(data) {
+        workspace.glowBlock(data.id, true);
     });
-    vm.runtime.on('BLOCK_GLOW_OFF', function(blockId) {
-        workspace.glowBlock(blockId, false);
+    vm.on('BLOCK_GLOW_OFF', function(data) {
+        workspace.glowBlock(data.id, false);
     });
 
-
     // Run threads
-    vm.runtime.start();
+    vm.start();
 
     // Handlers for green flag and stop all.
     document.getElementById('greenflag').addEventListener('click', function() {
-        vm.runtime.greenFlag();
+        vm.greenFlag();
     });
     document.getElementById('stopall').addEventListener('click', function() {
-        vm.runtime.stopAll();
+        vm.stopAll();
     });
 
     var tabBlockExplorer = document.getElementById('tab-blockexplorer');

From 190208b620276837b06d7b0865f67a53fda8243a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 14:36:36 -0400
Subject: [PATCH 089/302] Clean up yield-timers: support multiple, move logic
 to Threads.

---
 src/engine/execute.js   | 14 +-------------
 src/engine/sequencer.js |  8 ++++----
 src/engine/thread.js    | 31 +++++++++++++++++++++++++++++--
 src/util/yieldtimers.js | 19 -------------------
 4 files changed, 34 insertions(+), 38 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 0d1dbc3cc..6c58cd156 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,5 +1,3 @@
-var YieldTimers = require('../util/yieldtimers.js');
-
 /**
  * If set, block calls, args, and return values will be logged to the console.
  * @const {boolean}
@@ -13,11 +11,6 @@ var execute = function (sequencer, thread) {
     var currentBlockId = thread.peekStack();
     var currentStackFrame = thread.peekStackFrame();
 
-    // Save the yield timer ID, in case a primitive makes a new one
-    // @todo hack - perhaps patch this to allow more than one timer per
-    // primitive, for example...
-    var oldYieldTimerId = YieldTimers.timerId;
-
     var opcode = runtime.blocks.getOpcode(currentBlockId);
 
     // Generate values for arguments (inputs).
@@ -64,17 +57,12 @@ var execute = function (sequencer, thread) {
         done: function() {
             sequencer.proceedThread(thread);
         },
-        timeout: YieldTimers.timeout,
+        timeout: thread.addTimeout.bind(thread),
         stackFrame: currentStackFrame,
         startSubstack: function (substackNum) {
             sequencer.stepToSubstack(thread, substackNum);
         }
     });
-    // Update if the thread has set a yield timer ID
-    // @todo hack
-    if (YieldTimers.timerId > oldYieldTimerId) {
-        thread.yieldTimerId = YieldTimers.timerId;
-    }
     if (DEBUG_BLOCK_CALLS) {
         console.log('ending stack frame: ', currentStackFrame);
         console.log('returned: ', primitiveReturnValue);
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index deaa15266..1541d1c6f 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -53,10 +53,10 @@ Sequencer.prototype.stepThreads = function (threads) {
                 // Normal-mode thread: step.
                 this.startThread(activeThread);
             } else if (activeThread.status === Thread.STATUS_YIELD) {
-                // Yield-mode thread: check if the time has passed.
-                if (!YieldTimers.resolve(activeThread.yieldTimerId)) {
-                    // Thread is still yielding
-                    // if YieldTimers.resolve returns false.
+                // Yield-mode thread: resolve timers.
+                activeThread.resolveTimeouts();
+                if (activeThread.status === Thread.STATUS_YIELD) {
+                    // Still yielding.
                     numYieldingThreads++;
                 }
             } else if (activeThread.status === Thread.STATUS_DONE) {
diff --git a/src/engine/thread.js b/src/engine/thread.js
index c98efab48..bd991db27 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -1,3 +1,5 @@
+var YieldTimers = require('../util/yieldtimers.js');
+
 /**
  * A thread is a running stack context and all the metadata needed.
  * @param {?string} firstBlock First block to execute in the thread.
@@ -30,10 +32,10 @@ function Thread (firstBlock) {
     this.status = 0; /* Thread.STATUS_RUNNING */
 
     /**
-     * Yield timer ID (for checking when the thread should unyield).
+     * Execution-synced timeouts.
      * @type {number}
      */
-    this.yieldTimerId = -1;
+    this.timeoutIds = [];
 }
 
 /**
@@ -104,4 +106,29 @@ Thread.prototype.yield = function () {
     this.status = Thread.STATUS_YIELD;
 };
 
+/**
+ * Add an execution-synced timeouts for this thread.
+ * See also: util/yieldtimers.js:timeout
+ * @param {!Function} callback To be called when the timer is done.
+ * @param {number} timeDelta Time to wait, in ms.
+ */
+Thread.prototype.addTimeout = function (callback, timeDelta) {
+    var timeoutId = YieldTimers.timeout(callback, timeDelta);
+    this.timeoutIds.push(timeoutId);
+};
+
+/**
+ * Attempt to resolve all execution-synced timeouts on this thread.
+ */
+Thread.prototype.resolveTimeouts = function () {
+    var newTimeouts = [];
+    for (var i = 0; i < this.timeoutIds.length; i++) {
+        var resolved = YieldTimers.resolve(this.timeoutIds[i]);
+        if (!resolved) {
+            newTimeouts.push(this.timeoutIds[i]);
+        }
+    }
+    this.timeoutIds = newTimeouts;
+};
+
 module.exports = Thread;
diff --git a/src/util/yieldtimers.js b/src/util/yieldtimers.js
index 45e244eaf..84c6d3259 100644
--- a/src/util/yieldtimers.js
+++ b/src/util/yieldtimers.js
@@ -68,23 +68,4 @@ YieldTimers.resolve = function (id) {
     return true;
 };
 
-/**
- * Reject a timer so the callback never executes.
- * @param {number} id Timer ID to reject.
- */
-YieldTimers.reject = function (id) {
-    if (YieldTimers.timers[id]) {
-        delete YieldTimers.timers[id];
-    }
-};
-
-/**
- * Reject all timers currently stored.
- * Especially useful for a Scratch "stop."
- */
-YieldTimers.rejectAll = function () {
-    YieldTimers.timers = {};
-    YieldTimers.timerId = 0;
-};
-
 module.exports = YieldTimers;

From 34659c9b7b2aa4a66664591460a52712e1ea96c5 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 15:08:54 -0400
Subject: [PATCH 090/302] Allow console timers

---
 .eslintrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.eslintrc b/.eslintrc
index bcd88942f..fcb231522 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -8,7 +8,7 @@
         "max-len": [2, 80, 4],
         "semi": [2, "always"],
         "strict": [2, "never"],
-        "no-console": [2, {"allow": ["log", "warn", "error", "groupCollapsed", "groupEnd"]}],
+        "no-console": [2, {"allow": ["log", "warn", "error", "groupCollapsed", "groupEnd", "time", "timeEnd"]}],
         "valid-jsdoc": ["error", {"requireReturn": false}]
     },
     "env": {

From 97f7571c6faa5454579b9776b6e51b8cfbcc9cf2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 15:10:12 -0400
Subject: [PATCH 091/302] Prototype implementation of yielding reporters

---
 src/engine/execute.js   | 53 ++++++++++++++++++++++++++++++++++-------
 src/engine/sequencer.js |  3 +--
 src/engine/thread.js    | 17 ++++++++++++-
 3 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 6c58cd156..add9c9909 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,10 +1,19 @@
+var Thread = require('./thread');
+
 /**
  * If set, block calls, args, and return values will be logged to the console.
  * @const {boolean}
  */
 var DEBUG_BLOCK_CALLS = true;
 
-var execute = function (sequencer, thread) {
+/**
+ * Execute a block.
+ * @param {!Sequencer} sequencer Which sequencer is executing.
+ * @param {!Thread} thread Thread which to read and execute.
+ * @param {string=} opt_waitingInputName If evaluating an input, its name.
+ * @return {?Any} Reported value, if available immediately.
+ */
+var execute = function (sequencer, thread, opt_waitingInputName) {
     var runtime = sequencer.runtime;
 
     // Current block to execute is the one on the top of the stack.
@@ -27,11 +36,29 @@ var execute = function (sequencer, thread) {
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
-        // Push to the stack to evaluate this input.
-        thread.pushStack(inputBlockId);
-        var result = execute(sequencer, thread);
-        thread.popStack();
-        argValues[input.name] = result;
+        // Is there a value for this input waiting in the stack frame?
+        if (currentStackFrame.reported &&
+            currentStackFrame.reported[inputName]) {
+            // Use that value.
+            argValues[inputName] = currentStackFrame.reported[inputName];
+        } else {
+            // Otherwise, we need to evaluate the block.
+            // Push to the stack to evaluate this input.
+            thread.pushStack(inputBlockId);
+            if (DEBUG_BLOCK_CALLS) {
+                console.time('Yielding reporter evaluation');
+            }
+            var result = execute(sequencer, thread, inputName);
+            // Did the reporter yield?
+            if (thread.status === Thread.STATUS_YIELD) {
+                // Reporter yielded; don't pop stack and wait for it to unyield.
+                // The value will be populated once the reporter unyields,
+                // and passed up to the currentStackFrame on next execution.
+                return;
+            }
+            thread.popStack();
+            argValues[inputName] = result;
+        }
     }
 
     if (!opcode) {
@@ -51,21 +78,29 @@ var execute = function (sequencer, thread) {
         console.log('and stack frame: ', currentStackFrame);
     }
     var primitiveReturnValue = null;
-    // @todo deal with the return value
     primitiveReturnValue = blockFunction(argValues, {
         yield: thread.yield.bind(thread),
         done: function() {
             sequencer.proceedThread(thread);
         },
+        report: function(reportedValue) {
+            thread.pushReportedValue(opt_waitingInputName, reportedValue);
+            if (DEBUG_BLOCK_CALLS) {
+                console.log('Reported: ', reportedValue,
+                    ' for ', opt_waitingInputName);
+                console.timeEnd('Yielding reporter evaluation');
+            }
+            sequencer.proceedThread(thread);
+        },
         timeout: thread.addTimeout.bind(thread),
-        stackFrame: currentStackFrame,
+        stackFrame: currentStackFrame.executionContext,
         startSubstack: function (substackNum) {
             sequencer.stepToSubstack(thread, substackNum);
         }
     });
     if (DEBUG_BLOCK_CALLS) {
         console.log('ending stack frame: ', currentStackFrame);
-        console.log('returned: ', primitiveReturnValue);
+        console.log('returned immediately: ', primitiveReturnValue);
         console.groupEnd();
     }
     return primitiveReturnValue;
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 1541d1c6f..e82d4054c 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -1,6 +1,5 @@
 var Timer = require('../util/timer');
 var Thread = require('./thread');
-var YieldTimers = require('../util/yieldtimers.js');
 var execute = require('./execute.js');
 
 function Sequencer (runtime) {
@@ -101,7 +100,7 @@ Sequencer.prototype.startThread = function (thread) {
     // move to done.
     if (thread.status === Thread.STATUS_RUNNING &&
         thread.peekStack() === currentBlockId) {
-        this.proceedThread(thread, currentBlockId);
+        this.proceedThread(thread);
     }
 };
 
diff --git a/src/engine/thread.js b/src/engine/thread.js
index bd991db27..65b251648 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -69,7 +69,10 @@ Thread.prototype.pushStack = function (blockId) {
     // Push an empty stack frame, if we need one.
     // Might not, if we just popped the stack.
     if (this.stack.length > this.stackFrames.length) {
-        this.stackFrames.push({});
+        this.stackFrames.push({
+            reported: {}, // Collects reported input values.
+            executionContext: {} // A context passed to block implementations.
+        });
     }
 };
 
@@ -99,6 +102,18 @@ Thread.prototype.peekStackFrame = function () {
     return this.stackFrames[this.stackFrames.length - 1];
 };
 
+/**
+ * Push a reported value to the parent of the current stack frame.
+ * @param {!string} inputName Name of input reported.
+ * @param {!Any} value Reported value to push.
+ */
+Thread.prototype.pushReportedValue = function (inputName, value) {
+    var parentStackFrame = this.stackFrames[this.stackFrames.length - 2];
+    if (parentStackFrame) {
+        parentStackFrame.reported[inputName] = value;
+    }
+};
+
 /**
  * Yields the thread.
  */

From 7ef3807b18bbe258cb3f318fa7ef4a5c6d6c3e11 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 15:10:28 -0400
Subject: [PATCH 092/302] Example of a yielding reporter (returns random number
 after 1s)

---
 src/blocks/scratch3_operators.js | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 94329b5a3..0b4471c35 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -15,7 +15,8 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'math_number': this.number,
         'text': this.text,
         'operator_add': this.add,
-        'operator_equals': this.equals
+        'operator_equals': this.equals,
+        'operator_random': this.random
     };
 };
 
@@ -35,4 +36,15 @@ Scratch3OperatorsBlocks.prototype.equals = function (args) {
     return args.OPERAND1 == args.OPERAND2;
 };
 
+Scratch3OperatorsBlocks.prototype.random = function (args, util) {
+    // As a demo, this implementation of random returns after 1 second of yield.
+    // @todo Match Scratch 2.0 implementation with int-truncation.
+    // See: http://bit.ly/1Qc0GzC
+    util.yield();
+    setTimeout(function() {
+        var randomValue = (Math.random() * (args.TO - args.FROM)) + args.FROM;
+        util.report(randomValue);
+    }, 1000);
+};
+
 module.exports = Scratch3OperatorsBlocks;

From d15c93af053452c8818059001947caf17e10e8cd Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 15:53:58 -0400
Subject: [PATCH 093/302] Keep "waiting reporter name" on the stack frame.

Also add highlighting for inputs.
---
 src/engine/execute.js | 14 ++++++++------
 src/engine/thread.js  |  8 +++++---
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index add9c9909..6657a3e15 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -10,10 +10,9 @@ var DEBUG_BLOCK_CALLS = true;
  * Execute a block.
  * @param {!Sequencer} sequencer Which sequencer is executing.
  * @param {!Thread} thread Thread which to read and execute.
- * @param {string=} opt_waitingInputName If evaluating an input, its name.
  * @return {?Any} Reported value, if available immediately.
  */
-var execute = function (sequencer, thread, opt_waitingInputName) {
+var execute = function (sequencer, thread) {
     var runtime = sequencer.runtime;
 
     // Current block to execute is the one on the top of the stack.
@@ -48,14 +47,18 @@ var execute = function (sequencer, thread, opt_waitingInputName) {
             if (DEBUG_BLOCK_CALLS) {
                 console.time('Yielding reporter evaluation');
             }
-            var result = execute(sequencer, thread, inputName);
+            runtime.glowBlock(inputBlockId, true);
+            var result = execute(sequencer, thread);
             // Did the reporter yield?
             if (thread.status === Thread.STATUS_YIELD) {
                 // Reporter yielded; don't pop stack and wait for it to unyield.
                 // The value will be populated once the reporter unyields,
                 // and passed up to the currentStackFrame on next execution.
+                // Save name of this input to be filled by child `util.report`.
+                currentStackFrame.waitingReporter = inputName;
                 return;
             }
+            runtime.glowBlock(inputBlockId, false);
             thread.popStack();
             argValues[inputName] = result;
         }
@@ -84,12 +87,11 @@ var execute = function (sequencer, thread, opt_waitingInputName) {
             sequencer.proceedThread(thread);
         },
         report: function(reportedValue) {
-            thread.pushReportedValue(opt_waitingInputName, reportedValue);
             if (DEBUG_BLOCK_CALLS) {
-                console.log('Reported: ', reportedValue,
-                    ' for ', opt_waitingInputName);
+                console.log('Reported: ', reportedValue);
                 console.timeEnd('Yielding reporter evaluation');
             }
+            thread.pushReportedValue(reportedValue);
             sequencer.proceedThread(thread);
         },
         timeout: thread.addTimeout.bind(thread),
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 65b251648..bbb23f678 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -71,6 +71,7 @@ Thread.prototype.pushStack = function (blockId) {
     if (this.stack.length > this.stackFrames.length) {
         this.stackFrames.push({
             reported: {}, // Collects reported input values.
+            waitingReporter: null, // Name of waiting reporter.
             executionContext: {} // A context passed to block implementations.
         });
     }
@@ -104,13 +105,14 @@ Thread.prototype.peekStackFrame = function () {
 
 /**
  * Push a reported value to the parent of the current stack frame.
- * @param {!string} inputName Name of input reported.
  * @param {!Any} value Reported value to push.
  */
-Thread.prototype.pushReportedValue = function (inputName, value) {
+Thread.prototype.pushReportedValue = function (value) {
     var parentStackFrame = this.stackFrames[this.stackFrames.length - 2];
     if (parentStackFrame) {
-        parentStackFrame.reported[inputName] = value;
+        var waitingReporter = parentStackFrame.waitingReporter;
+        parentStackFrame.reported[waitingReporter] = value;
+        parentStackFrame.waitingReporter = null;
     }
 };
 

From bed3e28c02dd1e05d7c6288e29e3a78c6e98d9f0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 17 Jun 2016 17:18:44 -0400
Subject: [PATCH 094/302] Simplifications of `execute` ordering

and always cache returned reporter values in currentStackFrame.reported.
---
 src/engine/execute.js | 34 ++++++++++++++++------------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 6657a3e15..2112da0f0 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -21,6 +21,17 @@ var execute = function (sequencer, thread) {
 
     var opcode = runtime.blocks.getOpcode(currentBlockId);
 
+    if (!opcode) {
+        console.warn('Could not get opcode for block: ' + currentBlockId);
+        return;
+    }
+
+    var blockFunction = runtime.getOpcodeFunction(opcode);
+    if (!blockFunction) {
+        console.warn('Could not get implementation for opcode: ' + opcode);
+        return;
+    }
+
     // Generate values for arguments (inputs).
     var argValues = {};
 
@@ -36,11 +47,7 @@ var execute = function (sequencer, thread) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
         // Is there a value for this input waiting in the stack frame?
-        if (currentStackFrame.reported &&
-            currentStackFrame.reported[inputName]) {
-            // Use that value.
-            argValues[inputName] = currentStackFrame.reported[inputName];
-        } else {
+        if (!currentStackFrame.reported[inputName]) {
             // Otherwise, we need to evaluate the block.
             // Push to the stack to evaluate this input.
             thread.pushStack(inputBlockId);
@@ -50,29 +57,20 @@ var execute = function (sequencer, thread) {
             runtime.glowBlock(inputBlockId, true);
             var result = execute(sequencer, thread);
             // Did the reporter yield?
+            currentStackFrame.waitingReporter = inputName;
             if (thread.status === Thread.STATUS_YIELD) {
                 // Reporter yielded; don't pop stack and wait for it to unyield.
                 // The value will be populated once the reporter unyields,
                 // and passed up to the currentStackFrame on next execution.
                 // Save name of this input to be filled by child `util.report`.
-                currentStackFrame.waitingReporter = inputName;
                 return;
             }
             runtime.glowBlock(inputBlockId, false);
-            thread.popStack();
+            thread.pushReportedValue(result);
             argValues[inputName] = result;
+            thread.popStack();
         }
-    }
-
-    if (!opcode) {
-        console.warn('Could not get opcode for block: ' + currentBlockId);
-        return;
-    }
-
-    var blockFunction = runtime.getOpcodeFunction(opcode);
-    if (!blockFunction) {
-        console.warn('Could not get implementation for opcode: ' + opcode);
-        return;
+        argValues[inputName] = currentStackFrame.reported[inputName];
     }
 
     if (DEBUG_BLOCK_CALLS) {

From 6181bcd5cba666cea2a49ca974f7a326e8b63e12 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:10:19 -0400
Subject: [PATCH 095/302] Refactor Thread.peekParentStackFrame

---
 src/engine/thread.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/engine/thread.js b/src/engine/thread.js
index bbb23f678..746d7dcc6 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -103,12 +103,20 @@ Thread.prototype.peekStackFrame = function () {
     return this.stackFrames[this.stackFrames.length - 1];
 };
 
+/**
+ * Get stack frame above the current top.
+ * @return {?Object} Second to last stack frame stored on this thread.
+ */
+Thread.prototype.peekParentStackFrame = function () {
+    return this.stackFrames[this.stackFrames.length - 2];
+};
+
 /**
  * Push a reported value to the parent of the current stack frame.
  * @param {!Any} value Reported value to push.
  */
 Thread.prototype.pushReportedValue = function (value) {
-    var parentStackFrame = this.stackFrames[this.stackFrames.length - 2];
+    var parentStackFrame = this.peekParentStackFrame();
     if (parentStackFrame) {
         var waitingReporter = parentStackFrame.waitingReporter;
         parentStackFrame.reported[waitingReporter] = value;

From 173f0615d3e99246318ec133bf54ff244aa9edbf Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:11:21 -0400
Subject: [PATCH 096/302] Refactor: always push reports to the stack frame

---
 src/engine/execute.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 2112da0f0..dae207a9c 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -10,7 +10,6 @@ var DEBUG_BLOCK_CALLS = true;
  * Execute a block.
  * @param {!Sequencer} sequencer Which sequencer is executing.
  * @param {!Thread} thread Thread which to read and execute.
- * @return {?Any} Reported value, if available immediately.
  */
 var execute = function (sequencer, thread) {
     var runtime = sequencer.runtime;
@@ -47,7 +46,7 @@ var execute = function (sequencer, thread) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
         // Is there a value for this input waiting in the stack frame?
-        if (!currentStackFrame.reported[inputName]) {
+        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
             // Otherwise, we need to evaluate the block.
             // Push to the stack to evaluate this input.
             thread.pushStack(inputBlockId);
@@ -55,9 +54,8 @@ var execute = function (sequencer, thread) {
                 console.time('Yielding reporter evaluation');
             }
             runtime.glowBlock(inputBlockId, true);
-            var result = execute(sequencer, thread);
-            // Did the reporter yield?
             currentStackFrame.waitingReporter = inputName;
+            execute(sequencer, thread);
             if (thread.status === Thread.STATUS_YIELD) {
                 // Reporter yielded; don't pop stack and wait for it to unyield.
                 // The value will be populated once the reporter unyields,
@@ -66,8 +64,6 @@ var execute = function (sequencer, thread) {
                 return;
             }
             runtime.glowBlock(inputBlockId, false);
-            thread.pushReportedValue(result);
-            argValues[inputName] = result;
             thread.popStack();
         }
         argValues[inputName] = currentStackFrame.reported[inputName];
@@ -98,12 +94,16 @@ var execute = function (sequencer, thread) {
             sequencer.stepToSubstack(thread, substackNum);
         }
     });
+    if (thread.status === Thread.STATUS_RUNNING) {
+        if (DEBUG_BLOCK_CALLS) {
+            console.log('reporting value: ', primitiveReturnValue);
+        }
+        thread.pushReportedValue(primitiveReturnValue);
+    }
     if (DEBUG_BLOCK_CALLS) {
         console.log('ending stack frame: ', currentStackFrame);
-        console.log('returned immediately: ', primitiveReturnValue);
         console.groupEnd();
     }
-    return primitiveReturnValue;
 };
 
 module.exports = execute;

From b21c9edf046807bbdb926cb5afd6813b22475b1a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:24:00 -0400
Subject: [PATCH 097/302] Commenting improvements

---
 src/engine/execute.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index dae207a9c..64e69ac77 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -45,22 +45,22 @@ var execute = function (sequencer, thread) {
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
-        // Is there a value for this input waiting in the stack frame?
+        // Is there no value for this input waiting in the stack frame?
         if (typeof currentStackFrame.reported[inputName] === 'undefined') {
-            // Otherwise, we need to evaluate the block.
+            // If there's not, we need to evaluate the block.
             // Push to the stack to evaluate this input.
             thread.pushStack(inputBlockId);
             if (DEBUG_BLOCK_CALLS) {
-                console.time('Yielding reporter evaluation');
+                console.time('Reporter evaluation');
             }
             runtime.glowBlock(inputBlockId, true);
+            // Save name of input for `Thread.pushReportedValue`.
             currentStackFrame.waitingReporter = inputName;
             execute(sequencer, thread);
             if (thread.status === Thread.STATUS_YIELD) {
                 // Reporter yielded; don't pop stack and wait for it to unyield.
                 // The value will be populated once the reporter unyields,
                 // and passed up to the currentStackFrame on next execution.
-                // Save name of this input to be filled by child `util.report`.
                 return;
             }
             runtime.glowBlock(inputBlockId, false);

From 9d9749681bf21bb23e592d6e0ed367fbf82d197d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:28:12 -0400
Subject: [PATCH 098/302] Comment and `else` for reporter finishes right away

---
 src/engine/execute.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 64e69ac77..6dfd4e331 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -62,9 +62,11 @@ var execute = function (sequencer, thread) {
                 // The value will be populated once the reporter unyields,
                 // and passed up to the currentStackFrame on next execution.
                 return;
+            } else {
+                // Reporter finished right away; pop the stack.
+                runtime.glowBlock(inputBlockId, false);
+                thread.popStack();
             }
-            runtime.glowBlock(inputBlockId, false);
-            thread.popStack();
         }
         argValues[inputName] = currentStackFrame.reported[inputName];
     }

From e83cfa6049f59ca1bfa5c3c704867ed7288518d0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:29:47 -0400
Subject: [PATCH 099/302] Add comment and clear currentStackFrame.reported

---
 src/engine/execute.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 6dfd4e331..007739b0b 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -71,6 +71,12 @@ var execute = function (sequencer, thread) {
         argValues[inputName] = currentStackFrame.reported[inputName];
     }
 
+    // If we've gotten this far, all of the input blocks are evaluated,
+    // and `argValues` is fully populated. So, execute the block primitive.
+    // First, clear `currentStackFrame.reported`, so any subsequent execution
+    // (e.g., on return from a substack) gets fresh inputs.
+    currentStackFrame.reported = {};
+
     if (DEBUG_BLOCK_CALLS) {
         console.groupCollapsed('Executing: ' + opcode);
         console.log('with arguments: ', argValues);

From e56c6e69803c983c424059788dc1f339f6267c3f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:31:48 -0400
Subject: [PATCH 100/302] Rename `primitiveReturnValue` ->
 `primitiveReportedValue`

---
 src/engine/execute.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 007739b0b..2cee0a1c9 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -82,8 +82,8 @@ var execute = function (sequencer, thread) {
         console.log('with arguments: ', argValues);
         console.log('and stack frame: ', currentStackFrame);
     }
-    var primitiveReturnValue = null;
-    primitiveReturnValue = blockFunction(argValues, {
+    var primitiveReportedValue = null;
+    primitiveReportedValue = blockFunction(argValues, {
         yield: thread.yield.bind(thread),
         done: function() {
             sequencer.proceedThread(thread);
@@ -104,9 +104,9 @@ var execute = function (sequencer, thread) {
     });
     if (thread.status === Thread.STATUS_RUNNING) {
         if (DEBUG_BLOCK_CALLS) {
-            console.log('reporting value: ', primitiveReturnValue);
+            console.log('reporting value: ', primitiveReportedValue);
         }
-        thread.pushReportedValue(primitiveReturnValue);
+        thread.pushReportedValue(primitiveReportedValue);
     }
     if (DEBUG_BLOCK_CALLS) {
         console.log('ending stack frame: ', currentStackFrame);

From f210c12d4d37ae401f029de5e280bf411719d4d6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:42:06 -0400
Subject: [PATCH 101/302] Add more operators for testing

---
 src/blocks/scratch3_operators.js | 42 ++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 0b4471c35..03fe3e352 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -15,7 +15,14 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'math_number': this.number,
         'text': this.text,
         '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_random': this.random
     };
 };
@@ -32,10 +39,45 @@ Scratch3OperatorsBlocks.prototype.add = function (args) {
     return args.NUM1 + args.NUM2;
 };
 
+Scratch3OperatorsBlocks.prototype.subtract = function (args) {
+    return args.NUM1 - args.NUM2;
+};
+
+Scratch3OperatorsBlocks.prototype.multiply = function (args) {
+    return args.NUM1 * args.NUM2;
+};
+
+Scratch3OperatorsBlocks.prototype.divide = function (args) {
+    return args.NUM1 / args.NUM2;
+};
+
+Scratch3OperatorsBlocks.prototype.lt = function (args) {
+    return args.OPERAND1 < args.OPERAND2;
+};
+
 Scratch3OperatorsBlocks.prototype.equals = function (args) {
     return args.OPERAND1 == args.OPERAND2;
 };
 
+Scratch3OperatorsBlocks.prototype.gt = function (args) {
+    return args.OPERAND1 > args.OPERAND2;
+};
+
+Scratch3OperatorsBlocks.prototype.and = function (args) {
+    if (!args.OPERAND1 || !args.OPERAND2) {
+        return false;
+    }
+    return true;
+};
+
+Scratch3OperatorsBlocks.prototype.or = function (args) {
+    return args.OPERAND1 || args.OPERAND2;
+};
+
+Scratch3OperatorsBlocks.prototype.not = function (args) {
+    return !args.OPERAND;
+};
+
 Scratch3OperatorsBlocks.prototype.random = function (args, util) {
     // As a demo, this implementation of random returns after 1 second of yield.
     // @todo Match Scratch 2.0 implementation with int-truncation.

From f802faa461ae102cea802f0781b9e80defa4974e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 14:42:56 -0400
Subject: [PATCH 102/302] operator_not in primitive table

---
 src/blocks/scratch3_operators.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 03fe3e352..55b3b1129 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -23,6 +23,7 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'operator_gt': this.gt,
         'operator_and': this.and,
         'operator_or': this.or,
+        'operator_not': this.not,
         'operator_random': this.random
     };
 };

From c63747e61bce51c0ad78ddc6f35f84d90230f60d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 15:04:28 -0400
Subject: [PATCH 103/302] Move stepping logic for reporters to sequencer

---
 src/engine/execute.js   | 23 ++++++-----------------
 src/engine/sequencer.js | 27 +++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 2cee0a1c9..6e1962808 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -48,24 +48,13 @@ var execute = function (sequencer, thread) {
         // Is there no value for this input waiting in the stack frame?
         if (typeof currentStackFrame.reported[inputName] === 'undefined') {
             // If there's not, we need to evaluate the block.
-            // Push to the stack to evaluate this input.
-            thread.pushStack(inputBlockId);
-            if (DEBUG_BLOCK_CALLS) {
-                console.time('Reporter evaluation');
-            }
-            runtime.glowBlock(inputBlockId, true);
-            // Save name of input for `Thread.pushReportedValue`.
-            currentStackFrame.waitingReporter = inputName;
-            execute(sequencer, thread);
-            if (thread.status === Thread.STATUS_YIELD) {
-                // Reporter yielded; don't pop stack and wait for it to unyield.
-                // The value will be populated once the reporter unyields,
-                // and passed up to the currentStackFrame on next execution.
+            var reporterYielded = (
+                sequencer.stepToReporter(thread, inputBlockId, inputName)
+            );
+            // If the reporter yielded, return immediately;
+            // it needs time to finish and report its value.
+            if (reporterYielded) {
                 return;
-            } else {
-                // Reporter finished right away; pop the stack.
-                runtime.glowBlock(inputBlockId, false);
-                thread.popStack();
             }
         }
         argValues[inputName] = currentStackFrame.reported[inputName];
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index e82d4054c..27e3b9996 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -127,6 +127,33 @@ Sequencer.prototype.stepToSubstack = function (thread, substackNum) {
     }
 };
 
+/**
+ * Step a thread into an input reporter, and manage its status appropriately.
+ * @param {!Thread} thread Thread object to step to reporter.
+ * @param {!string} blockId ID of reporter block.
+ * @param {!string} inputName Name of input on parent block.
+ * @return {boolean} True if yielded, false if it finished immediately.
+ */
+Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
+    var currentStackFrame = thread.peekStackFrame();
+    // Push to the stack to evaluate the reporter block.
+    thread.pushStack(blockId);
+    // Save name of input for `Thread.pushReportedValue`.
+    currentStackFrame.waitingReporter = inputName;
+    // Actually execute the block.
+    this.startThread(thread);
+    if (thread.status === Thread.STATUS_YIELD) {
+        // Reporter yielded; caller must wait for it to unyield.
+        // The value will be populated once the reporter unyields,
+        // and passed up to the currentStackFrame on next execution.
+        return true;
+    } else if (thread.status === Thread.STATUS_DONE) {
+        // Reporter finished, mark the thread as running.
+        thread.status = Thread.STATUS_RUNNING;
+        return false;
+    }
+};
+
 /**
  * Finish stepping a thread and proceed it to the next block.
  * @param {!Thread} thread Thread object to proceed.

From d44b806b4f4b883393306dd30aad90647592d210 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 16:44:53 -0400
Subject: [PATCH 104/302] Add blocking yield mode

---
 src/blocks/scratch3_operators.js |  2 +-
 src/engine/execute.js            |  1 +
 src/engine/sequencer.js          | 26 ++++++++++++++++++++++++++
 src/engine/thread.js             | 17 ++++++++++++++++-
 4 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 55b3b1129..fe194da45 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -83,7 +83,7 @@ Scratch3OperatorsBlocks.prototype.random = function (args, util) {
     // As a demo, this implementation of random returns after 1 second of yield.
     // @todo Match Scratch 2.0 implementation with int-truncation.
     // See: http://bit.ly/1Qc0GzC
-    util.yield();
+    util.yieldAndBlock();
     setTimeout(function() {
         var randomValue = (Math.random() * (args.TO - args.FROM)) + args.FROM;
         util.report(randomValue);
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 6e1962808..008305182 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -74,6 +74,7 @@ var execute = function (sequencer, thread) {
     var primitiveReportedValue = null;
     primitiveReportedValue = blockFunction(argValues, {
         yield: thread.yield.bind(thread),
+        yieldAndBlock: thread.yieldAndBlock.bind(thread),
         done: function() {
             sequencer.proceedThread(thread);
         },
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 27e3b9996..480267fdc 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -32,6 +32,13 @@ Sequencer.WORK_TIME = 10;
 Sequencer.prototype.stepThreads = function (threads) {
     // Start counting toward WORK_TIME
     this.timer.start();
+    // Check for a blocking thread.
+    var blockingThread = this.getBlockingThread_(threads);
+    if (blockingThread) {
+        // Attempt to resolve any timeouts, but otherwise stop stepping.
+        blockingThread.resolveTimeouts();
+        return [];
+    }
     // List of threads which have been killed by this step.
     var inactiveThreads = [];
     // If all of the threads are yielding, we should yield.
@@ -63,6 +70,10 @@ Sequencer.prototype.stepThreads = function (threads) {
                 activeThread.status = Thread.STATUS_RUNNING;
                 // @todo Deal with the return value
             }
+            // Has the thread gone into "blocking" mode? If so, stop stepping.
+            if (activeThread.status === Thread.STATUS_YIELD_BLOCK) {
+                return inactiveThreads;
+            }
             if (activeThread.stack.length === 0 &&
                 activeThread.status === Thread.STATUS_DONE) {
                 // Finished with this thread - tell runtime to clean it up.
@@ -78,6 +89,21 @@ Sequencer.prototype.stepThreads = function (threads) {
     return inactiveThreads;
 };
 
+/**
+ * Return the thread blocking all other threads, if one exists.
+ * If not, return false.
+ * @param {Array.<Thread>} threads List of which threads to check.
+ * @return {?Thread} The blocking thread if one exists.
+ */
+Sequencer.prototype.getBlockingThread_ = function (threads) {
+    for (var i = 0; i < threads.length; i++) {
+        if (threads[i].status === Thread.STATUS_YIELD_BLOCK) {
+            return threads[i];
+        }
+    }
+    return false;
+};
+
 /**
  * Step the requested thread
  * @param {!Thread} thread Thread object to step
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 746d7dcc6..781197110 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -52,13 +52,21 @@ Thread.STATUS_RUNNING = 0;
  */
 Thread.STATUS_YIELD = 1;
 
+/**
+ * Thread status for a yielded thread that should block all other threads.
+ * This is desirable when an asynchronous capability should appear to take
+ * a synchronous amount of time (e.g., color touching color).
+ * @const
+ */
+Thread.STATUS_YIELD_BLOCK = 2;
+
 /**
  * Thread status for a finished/done thread.
  * Thread is moved to this state when the interpreter
  * can proceed with execution.
  * @const
  */
-Thread.STATUS_DONE = 2;
+Thread.STATUS_DONE = 3;
 
 /**
  * Push stack and update stack frames appropriately.
@@ -131,6 +139,13 @@ Thread.prototype.yield = function () {
     this.status = Thread.STATUS_YIELD;
 };
 
+/**
+ * Yields the thread and blocks other threads until unyielded.
+ */
+Thread.prototype.yieldAndBlock = function () {
+    this.status = Thread.STATUS_YIELD_BLOCK;
+};
+
 /**
  * Add an execution-synced timeouts for this thread.
  * See also: util/yieldtimers.js:timeout

From 405ad1044e2669563b44d73274187356b6f79f1b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 16:46:45 -0400
Subject: [PATCH 105/302] getBlockingThread_ returns null when none available.

---
 src/engine/sequencer.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 480267fdc..12d86b41b 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -91,7 +91,6 @@ Sequencer.prototype.stepThreads = function (threads) {
 
 /**
  * Return the thread blocking all other threads, if one exists.
- * If not, return false.
  * @param {Array.<Thread>} threads List of which threads to check.
  * @return {?Thread} The blocking thread if one exists.
  */
@@ -101,7 +100,7 @@ Sequencer.prototype.getBlockingThread_ = function (threads) {
             return threads[i];
         }
     }
-    return false;
+    return null;
 };
 
 /**

From 09b9c506a9236831d8f641452619244af28eda9f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 20 Jun 2016 16:47:42 -0400
Subject: [PATCH 106/302] Check for blocking case in stepToReporter

---
 src/engine/sequencer.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 12d86b41b..10657d4d0 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -167,7 +167,8 @@ Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
     currentStackFrame.waitingReporter = inputName;
     // Actually execute the block.
     this.startThread(thread);
-    if (thread.status === Thread.STATUS_YIELD) {
+    if (thread.status === Thread.STATUS_YIELD ||
+        thread.status === Thread.STATUS_YIELD_BLOCK) {
         // Reporter yielded; caller must wait for it to unyield.
         // The value will be populated once the reporter unyields,
         // and passed up to the currentStackFrame on next execution.

From 8f6a88c0955c45870a1ba40ac89c6ced3e14453e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 24 Jun 2016 10:52:49 -0400
Subject: [PATCH 107/302] Ensure predicates always return booleans

---
 src/blocks/scratch3_operators.js | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index fe194da45..837411262 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -53,30 +53,27 @@ Scratch3OperatorsBlocks.prototype.divide = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.lt = function (args) {
-    return args.OPERAND1 < args.OPERAND2;
+    return Boolean(args.OPERAND1 < args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.equals = function (args) {
-    return args.OPERAND1 == args.OPERAND2;
+    return Boolean(args.OPERAND1 == args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.gt = function (args) {
-    return args.OPERAND1 > args.OPERAND2;
+    return Boolean(args.OPERAND1 > args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.and = function (args) {
-    if (!args.OPERAND1 || !args.OPERAND2) {
-        return false;
-    }
-    return true;
+    return Boolean(args.OPERAND1 && args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.or = function (args) {
-    return args.OPERAND1 || args.OPERAND2;
+    return Boolean(args.OPERAND1 || args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.not = function (args) {
-    return !args.OPERAND;
+    return Boolean(!args.OPERAND);
 };
 
 Scratch3OperatorsBlocks.prototype.random = function (args, util) {

From d72cc55c119502121db5b1036a7a2821bd03484a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 24 Jun 2016 11:14:22 -0400
Subject: [PATCH 108/302] Example that uses promises instead of `util.report`

---
 package.json                     |  3 ++-
 src/blocks/scratch3_operators.js | 13 +++++++++----
 src/engine/execute.js            | 27 ++++++++++++++++++---------
 3 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/package.json b/package.json
index e55a497e1..2d4d54773 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,8 @@
   },
   "dependencies": {
     "htmlparser2": "3.9.0",
-    "memoizee": "0.3.10"
+    "memoizee": "0.3.10",
+    "promise": "7.1.1"
   },
   "devDependencies": {
     "eslint": "2.7.0",
diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 837411262..4237f47da 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -1,3 +1,5 @@
+var Promise = require('promise');
+
 function Scratch3OperatorsBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -81,10 +83,13 @@ Scratch3OperatorsBlocks.prototype.random = function (args, util) {
     // @todo Match Scratch 2.0 implementation with int-truncation.
     // See: http://bit.ly/1Qc0GzC
     util.yieldAndBlock();
-    setTimeout(function() {
-        var randomValue = (Math.random() * (args.TO - args.FROM)) + args.FROM;
-        util.report(randomValue);
-    }, 1000);
+    var examplePromise = new Promise(function(resolve) {
+        setTimeout(function() {
+            var res = (Math.random() * (args.TO - args.FROM)) + args.FROM;
+            resolve(res);
+        }, 1000);
+    });
+    return examplePromise;
 };
 
 module.exports = Scratch3OperatorsBlocks;
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 008305182..e491cf778 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,3 +1,4 @@
+var Promise = require('promise');
 var Thread = require('./thread');
 
 /**
@@ -78,21 +79,29 @@ var execute = function (sequencer, thread) {
         done: function() {
             sequencer.proceedThread(thread);
         },
-        report: function(reportedValue) {
-            if (DEBUG_BLOCK_CALLS) {
-                console.log('Reported: ', reportedValue);
-                console.timeEnd('Yielding reporter evaluation');
-            }
-            thread.pushReportedValue(reportedValue);
-            sequencer.proceedThread(thread);
-        },
         timeout: thread.addTimeout.bind(thread),
         stackFrame: currentStackFrame.executionContext,
         startSubstack: function (substackNum) {
             sequencer.stepToSubstack(thread, substackNum);
         }
     });
-    if (thread.status === Thread.STATUS_RUNNING) {
+
+    // Deal with any reported value.
+    // If it's a promise, wait until promise resolves.
+    var isPromise = (
+        primitiveReportedValue &&
+        primitiveReportedValue.then &&
+        typeof primitiveReportedValue.then === 'function'
+    );
+    if (isPromise) {
+        primitiveReportedValue.then(function(resolvedValue) {
+            if (DEBUG_BLOCK_CALLS) {
+                console.log('reporting value: ', resolvedValue);
+            }
+            thread.pushReportedValue(resolvedValue);
+            sequencer.proceedThread(thread);
+        });
+    } else if (thread.status === Thread.STATUS_RUNNING) {
         if (DEBUG_BLOCK_CALLS) {
             console.log('reporting value: ', primitiveReportedValue);
         }

From 57057bfffcebc7e1c5a994500957349bc1fc1a80 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 24 Jun 2016 11:16:56 -0400
Subject: [PATCH 109/302] Remove unused require to fix build

---
 src/engine/execute.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index e491cf778..097af742b 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,4 +1,3 @@
-var Promise = require('promise');
 var Thread = require('./thread');
 
 /**

From 9881ee76b93e2740726298e49e758a784d9c96f4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 24 Jun 2016 11:19:38 -0400
Subject: [PATCH 110/302] Deal with promise rejection also.

---
 src/engine/execute.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 097af742b..528a3bb93 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -94,12 +94,21 @@ var execute = function (sequencer, thread) {
     );
     if (isPromise) {
         primitiveReportedValue.then(function(resolvedValue) {
+            // Promise resolved: the primitive reported a value.
             if (DEBUG_BLOCK_CALLS) {
                 console.log('reporting value: ', resolvedValue);
             }
             thread.pushReportedValue(resolvedValue);
             sequencer.proceedThread(thread);
-        });
+        }, function(rejectionReason) {
+            // Promise rejected: the primitive had some error.
+            // Log it and proceed.
+            if (DEBUG_BLOCK_CALLS) {
+                console.warn('primitive rejected promise: ', rejectionReason);
+            }
+            sequencer.proceedThread(thread);
+        }
+    );
     } else if (thread.status === Thread.STATUS_RUNNING) {
         if (DEBUG_BLOCK_CALLS) {
             console.log('reporting value: ', primitiveReportedValue);

From 9a7ab57f6f5d4a6875901c899cdc546c1a5fc13a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 28 Jun 2016 13:39:44 -0400
Subject: [PATCH 111/302] Always yield thread when a promise is returned.

---
 src/engine/execute.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 528a3bb93..632b29c82 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -93,6 +93,11 @@ var execute = function (sequencer, thread) {
         typeof primitiveReportedValue.then === 'function'
     );
     if (isPromise) {
+        if (thread.status === Thread.STATUS_RUNNING) {
+            // Primitive returned a promise; automatically yield thread.
+            thread.status = Thread.STATUS_YIELD;
+        }
+        // Promise handlers
         primitiveReportedValue.then(function(resolvedValue) {
             // Promise resolved: the primitive reported a value.
             if (DEBUG_BLOCK_CALLS) {
@@ -107,8 +112,7 @@ var execute = function (sequencer, thread) {
                 console.warn('primitive rejected promise: ', rejectionReason);
             }
             sequencer.proceedThread(thread);
-        }
-    );
+        });
     } else if (thread.status === Thread.STATUS_RUNNING) {
         if (DEBUG_BLOCK_CALLS) {
             console.log('reporting value: ', primitiveReportedValue);

From 6daee9a70e5f5ad55e8f45e6fb9edcf7021c1cae Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 16:57:12 -0400
Subject: [PATCH 112/302] Remove VM-locking yield mode per discussion

---
 src/blocks/scratch3_operators.js |  3 +--
 src/engine/execute.js            |  1 -
 src/engine/sequencer.js          | 25 -------------------------
 src/engine/thread.js             | 17 +----------------
 4 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 4237f47da..75077061c 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -78,11 +78,10 @@ Scratch3OperatorsBlocks.prototype.not = function (args) {
     return Boolean(!args.OPERAND);
 };
 
-Scratch3OperatorsBlocks.prototype.random = function (args, util) {
+Scratch3OperatorsBlocks.prototype.random = function (args) {
     // As a demo, this implementation of random returns after 1 second of yield.
     // @todo Match Scratch 2.0 implementation with int-truncation.
     // See: http://bit.ly/1Qc0GzC
-    util.yieldAndBlock();
     var examplePromise = new Promise(function(resolve) {
         setTimeout(function() {
             var res = (Math.random() * (args.TO - args.FROM)) + args.FROM;
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 632b29c82..8fbb73dfc 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -74,7 +74,6 @@ var execute = function (sequencer, thread) {
     var primitiveReportedValue = null;
     primitiveReportedValue = blockFunction(argValues, {
         yield: thread.yield.bind(thread),
-        yieldAndBlock: thread.yieldAndBlock.bind(thread),
         done: function() {
             sequencer.proceedThread(thread);
         },
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 10657d4d0..81813a141 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -32,13 +32,6 @@ Sequencer.WORK_TIME = 10;
 Sequencer.prototype.stepThreads = function (threads) {
     // Start counting toward WORK_TIME
     this.timer.start();
-    // Check for a blocking thread.
-    var blockingThread = this.getBlockingThread_(threads);
-    if (blockingThread) {
-        // Attempt to resolve any timeouts, but otherwise stop stepping.
-        blockingThread.resolveTimeouts();
-        return [];
-    }
     // List of threads which have been killed by this step.
     var inactiveThreads = [];
     // If all of the threads are yielding, we should yield.
@@ -70,10 +63,6 @@ Sequencer.prototype.stepThreads = function (threads) {
                 activeThread.status = Thread.STATUS_RUNNING;
                 // @todo Deal with the return value
             }
-            // Has the thread gone into "blocking" mode? If so, stop stepping.
-            if (activeThread.status === Thread.STATUS_YIELD_BLOCK) {
-                return inactiveThreads;
-            }
             if (activeThread.stack.length === 0 &&
                 activeThread.status === Thread.STATUS_DONE) {
                 // Finished with this thread - tell runtime to clean it up.
@@ -89,20 +78,6 @@ Sequencer.prototype.stepThreads = function (threads) {
     return inactiveThreads;
 };
 
-/**
- * Return the thread blocking all other threads, if one exists.
- * @param {Array.<Thread>} threads List of which threads to check.
- * @return {?Thread} The blocking thread if one exists.
- */
-Sequencer.prototype.getBlockingThread_ = function (threads) {
-    for (var i = 0; i < threads.length; i++) {
-        if (threads[i].status === Thread.STATUS_YIELD_BLOCK) {
-            return threads[i];
-        }
-    }
-    return null;
-};
-
 /**
  * Step the requested thread
  * @param {!Thread} thread Thread object to step
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 781197110..746d7dcc6 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -52,21 +52,13 @@ Thread.STATUS_RUNNING = 0;
  */
 Thread.STATUS_YIELD = 1;
 
-/**
- * Thread status for a yielded thread that should block all other threads.
- * This is desirable when an asynchronous capability should appear to take
- * a synchronous amount of time (e.g., color touching color).
- * @const
- */
-Thread.STATUS_YIELD_BLOCK = 2;
-
 /**
  * Thread status for a finished/done thread.
  * Thread is moved to this state when the interpreter
  * can proceed with execution.
  * @const
  */
-Thread.STATUS_DONE = 3;
+Thread.STATUS_DONE = 2;
 
 /**
  * Push stack and update stack frames appropriately.
@@ -139,13 +131,6 @@ Thread.prototype.yield = function () {
     this.status = Thread.STATUS_YIELD;
 };
 
-/**
- * Yields the thread and blocks other threads until unyielded.
- */
-Thread.prototype.yieldAndBlock = function () {
-    this.status = Thread.STATUS_YIELD_BLOCK;
-};
-
 /**
  * Add an execution-synced timeouts for this thread.
  * See also: util/yieldtimers.js:timeout

From ab6e0d383963e852f454dcfb1d141f914631f485 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 17:06:50 -0400
Subject: [PATCH 113/302] Remove YieldTimers, unused WeDo blocks

---
 playground/index.html          |   6 --
 src/blocks/scratch3_control.js |  13 +--
 src/blocks/wedo2.js            | 152 ---------------------------------
 src/engine/execute.js          |   1 -
 src/engine/runtime.js          |   3 +-
 src/engine/sequencer.js        |  12 +--
 src/engine/thread.js           |  33 -------
 src/util/yieldtimers.js        |  71 ---------------
 8 files changed, 11 insertions(+), 280 deletions(-)
 delete mode 100644 src/blocks/wedo2.js
 delete mode 100644 src/util/yieldtimers.js

diff --git a/playground/index.html b/playground/index.html
index 0d4903d3d..82535807b 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -79,12 +79,6 @@
           </block>
           <block type="control_delete_this_clone"></block>
         </category>
-        <category name="Wedo">
-            <block type="wedo_setcolor"></block>
-            <block type="wedo_motorspeed"></block>
-            <block type="wedo_whentilt"></block>
-            <block type="wedo_whendistanceclose"></block>
-        </category>
         <category name="Operators">
             <block type="operator_add">
               <value name="NUM1">
diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 1d05a8c7a..e13edefd9 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -1,3 +1,5 @@
+var Promise = require('promise');
+
 function Scratch3ControlBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -38,11 +40,12 @@ Scratch3ControlBlocks.prototype.forever = function(args, util) {
     util.startSubstack();
 };
 
-Scratch3ControlBlocks.prototype.wait = function(args, util) {
-    util.yield();
-    util.timeout(function() {
-        util.done();
-    }, 1000 * args.DURATION);
+Scratch3ControlBlocks.prototype.wait = function(args) {
+    return new Promise(function(resolve) {
+        setTimeout(function() {
+            resolve();
+        }, 1000 * args.DURATION);
+    });
 };
 
 Scratch3ControlBlocks.prototype.if = function(args, util) {
diff --git a/src/blocks/wedo2.js b/src/blocks/wedo2.js
deleted file mode 100644
index d7516bc18..000000000
--- a/src/blocks/wedo2.js
+++ /dev/null
@@ -1,152 +0,0 @@
-
-var YieldTimers = require('../util/yieldtimers.js');
-
-function WeDo2Blocks(runtime) {
-    /**
-     * The runtime instantiating this block package.
-     * @type {Runtime}
-     */
-    this.runtime = runtime;
-
-    /**
-     * Current motor speed, as a percentage (100 = full speed).
-     * @type {number}
-     * @private
-     */
-    this._motorSpeed = 100;
-
-    /**
-     * The timeout ID for a pending motor action.
-     * @type {?int}
-     * @private
-     */
-    this._motorTimeout = null;
-}
-
-/**
- * Retrieve the block primitives implemented by this package.
- * @return {Object.<string, Function>} Mapping of opcode to Function.
- */
-WeDo2Blocks.prototype.getPrimitives = function() {
-    return {
-        'wedo_motorclockwise': this.motorClockwise,
-        'wedo_motorcounterclockwise': this.motorCounterClockwise,
-        'wedo_motorspeed': this.motorSpeed,
-        'wedo_setcolor': this.setColor,
-        'wedo_whendistanceclose': this.whenDistanceClose,
-        'wedo_whentilt': this.whenTilt
-    };
-};
-
-/**
- * Clamp a value between a minimum and maximum value.
- * @todo move this to a common utility class.
- * @param {number} val The value to clamp.
- * @param {number} min The minimum return value.
- * @param {number} max The maximum return value.
- * @returns {number} The clamped value.
- * @private
- */
-WeDo2Blocks.prototype._clamp = function(val, min, max) {
-    return Math.max(min, Math.min(val, max));
-};
-
-/**
- * Common implementation for motor blocks.
- * @param {string} direction The direction to turn ('left' or 'right').
- * @param {number} durationSeconds The number of seconds to run.
- * @param {Object} util The util instance to use for yielding and finishing.
- * @private
- */
-WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
-    if (this._motorTimeout > 0) {
-        // @todo maybe this should go through util
-        YieldTimers.resolve(this._motorTimeout);
-        this._motorTimeout = null;
-    }
-    if (typeof window !== 'undefined' && window.native) {
-        window.native.motorRun(direction, this._motorSpeed);
-    }
-
-    var instance = this;
-    var myTimeout = this._motorTimeout = util.timeout(function() {
-        if (instance._motorTimeout == myTimeout) {
-            instance._motorTimeout = null;
-        }
-        if (typeof window !== 'undefined' && window.native) {
-            window.native.motorStop();
-        }
-        util.done();
-    }, 1000 * durationSeconds);
-
-    util.yield();
-};
-
-WeDo2Blocks.prototype.motorClockwise = function(argValues, util) {
-    this._motorOnFor('right', parseFloat(argValues[0]), util);
-};
-
-WeDo2Blocks.prototype.motorCounterClockwise = function(argValues, util) {
-    this._motorOnFor('left', parseFloat(argValues[0]), util);
-};
-
-WeDo2Blocks.prototype.motorSpeed = function(argValues) {
-    var speed = argValues[0];
-    switch (speed) {
-    case 'slow':
-        this._motorSpeed = 20;
-        break;
-    case 'medium':
-        this._motorSpeed = 50;
-        break;
-    case 'fast':
-        this._motorSpeed = 100;
-        break;
-    }
-};
-
-/**
- * Convert a color name to a WeDo color index.
- * Supports 'mystery' for a random hue.
- * @param {string} colorName The color to retrieve.
- * @returns {number} The WeDo color index.
- * @private
- */
-WeDo2Blocks.prototype._getColor = function(colorName) {
-    var colors = {
-        'yellow': 7,
-        'orange': 8,
-        'coral': 9,
-        'magenta': 1,
-        'purple': 2,
-        'blue': 3,
-        'green': 6,
-        'white': 10
-    };
-
-    if (colorName == 'mystery') {
-        return Math.floor((Math.random() * 10) + 1);
-    }
-
-    return colors[colorName];
-};
-
-WeDo2Blocks.prototype.setColor = function(argValues, util) {
-    if (typeof window !== 'undefined' && window.native) {
-        var colorIndex = this._getColor(argValues[0]);
-        window.native.setLedColor(colorIndex);
-    }
-    // Pause for quarter second
-    util.yield();
-    util.timeout(function() {
-        util.done();
-    }, 250);
-};
-
-WeDo2Blocks.prototype.whenDistanceClose = function() {
-};
-
-WeDo2Blocks.prototype.whenTilt = function() {
-};
-
-module.exports = WeDo2Blocks;
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 8fbb73dfc..acff32585 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -77,7 +77,6 @@ var execute = function (sequencer, thread) {
         done: function() {
             sequencer.proceedThread(thread);
         },
-        timeout: thread.addTimeout.bind(thread),
         stackFrame: currentStackFrame.executionContext,
         startSubstack: function (substackNum) {
             sequencer.stepToSubstack(thread, substackNum);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index f6ad79f0b..8c4c862e1 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -6,8 +6,7 @@ var util = require('util');
 var defaultBlockPackages = {
     'scratch3_control': require('../blocks/scratch3_control'),
     'scratch3_event': require('../blocks/scratch3_event'),
-    'scratch3_operators': require('../blocks/scratch3_operators'),
-    'wedo2': require('../blocks/wedo2')
+    'scratch3_operators': require('../blocks/scratch3_operators')
 };
 
 /**
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 81813a141..5eca9c202 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -52,16 +52,8 @@ Sequencer.prototype.stepThreads = function (threads) {
                 // Normal-mode thread: step.
                 this.startThread(activeThread);
             } else if (activeThread.status === Thread.STATUS_YIELD) {
-                // Yield-mode thread: resolve timers.
-                activeThread.resolveTimeouts();
-                if (activeThread.status === Thread.STATUS_YIELD) {
-                    // Still yielding.
-                    numYieldingThreads++;
-                }
-            } else if (activeThread.status === Thread.STATUS_DONE) {
-                // Moved to a done state - finish up
-                activeThread.status = Thread.STATUS_RUNNING;
-                // @todo Deal with the return value
+                // Yielding thread: do nothing for this step.
+                continue;
             }
             if (activeThread.stack.length === 0 &&
                 activeThread.status === Thread.STATUS_DONE) {
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 746d7dcc6..d14d83f90 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -1,5 +1,3 @@
-var YieldTimers = require('../util/yieldtimers.js');
-
 /**
  * A thread is a running stack context and all the metadata needed.
  * @param {?string} firstBlock First block to execute in the thread.
@@ -30,12 +28,6 @@ function Thread (firstBlock) {
      * @type {number}
      */
     this.status = 0; /* Thread.STATUS_RUNNING */
-
-    /**
-     * Execution-synced timeouts.
-     * @type {number}
-     */
-    this.timeoutIds = [];
 }
 
 /**
@@ -131,29 +123,4 @@ Thread.prototype.yield = function () {
     this.status = Thread.STATUS_YIELD;
 };
 
-/**
- * Add an execution-synced timeouts for this thread.
- * See also: util/yieldtimers.js:timeout
- * @param {!Function} callback To be called when the timer is done.
- * @param {number} timeDelta Time to wait, in ms.
- */
-Thread.prototype.addTimeout = function (callback, timeDelta) {
-    var timeoutId = YieldTimers.timeout(callback, timeDelta);
-    this.timeoutIds.push(timeoutId);
-};
-
-/**
- * Attempt to resolve all execution-synced timeouts on this thread.
- */
-Thread.prototype.resolveTimeouts = function () {
-    var newTimeouts = [];
-    for (var i = 0; i < this.timeoutIds.length; i++) {
-        var resolved = YieldTimers.resolve(this.timeoutIds[i]);
-        if (!resolved) {
-            newTimeouts.push(this.timeoutIds[i]);
-        }
-    }
-    this.timeoutIds = newTimeouts;
-};
-
 module.exports = Thread;
diff --git a/src/util/yieldtimers.js b/src/util/yieldtimers.js
deleted file mode 100644
index 84c6d3259..000000000
--- a/src/util/yieldtimers.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @fileoverview Timers that are synchronized with the Scratch sequencer.
- */
-var Timer = require('./timer');
-
-function YieldTimers () {}
-
-/**
- * Shared collection of timers.
- * Each timer is a [Function, number] with the callback
- * and absolute time for it to run.
- * @type {Object.<number,Array>}
- */
-YieldTimers.timers = {};
-
-/**
- * Monotonically increasing timer ID.
- * @type {number}
- */
-YieldTimers.timerId = 0;
-
-/**
- * Utility for measuring time.
- * @type {!Timer}
- */
-YieldTimers.globalTimer = new Timer();
-
-/**
- * The timeout function is passed to primitives and is intended
- * as a convenient replacement for window.setTimeout.
- * The sequencer will attempt to resolve the timer every time
- * the yielded thread would have been stepped.
- * @param {!Function} callback To be called when the timer is done.
- * @param {number} timeDelta Time to wait, in ms.
- * @return {number} Timer ID to be used with other methods.
- */
-YieldTimers.timeout = function (callback, timeDelta) {
-    var id = ++YieldTimers.timerId;
-    YieldTimers.timers[id] = [
-        callback,
-        YieldTimers.globalTimer.time() + timeDelta
-    ];
-    return id;
-};
-
-/**
- * Attempt to resolve a timeout.
- * If the time has passed, call the callback.
- * Otherwise, do nothing.
- * @param {number} id Timer ID to resolve.
- * @return {boolean} True if the timer has resolved.
- */
-YieldTimers.resolve = function (id) {
-    var timer = YieldTimers.timers[id];
-    if (!timer) {
-        // No such timer.
-        return false;
-    }
-    var callback = timer[0];
-    var time = timer[1];
-    if (YieldTimers.globalTimer.time() < time) {
-        // Not done yet.
-        return false;
-    }
-    // Execute the callback and remove the timer.
-    callback();
-    delete YieldTimers.timers[id];
-    return true;
-};
-
-module.exports = YieldTimers;

From ec4567aa8ad99b264673a909543186a50009de8c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 17:12:16 -0400
Subject: [PATCH 114/302] Simplify logic for Thread status

---
 src/engine/sequencer.js | 22 ++++++++++------------
 src/engine/thread.js    |  9 +++++----
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 5eca9c202..1498d6320 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -134,17 +134,10 @@ Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
     currentStackFrame.waitingReporter = inputName;
     // Actually execute the block.
     this.startThread(thread);
-    if (thread.status === Thread.STATUS_YIELD ||
-        thread.status === Thread.STATUS_YIELD_BLOCK) {
-        // Reporter yielded; caller must wait for it to unyield.
-        // The value will be populated once the reporter unyields,
-        // and passed up to the currentStackFrame on next execution.
-        return true;
-    } else if (thread.status === Thread.STATUS_DONE) {
-        // Reporter finished, mark the thread as running.
-        thread.status = Thread.STATUS_RUNNING;
-        return false;
-    }
+    // If a reporter yielded, caller must wait for it to unyield.
+    // The value will be populated once the reporter unyields,
+    // and passed up to the currentStackFrame on next execution.
+    return thread.status === Thread.STATUS_YIELD;
 };
 
 /**
@@ -155,7 +148,8 @@ Sequencer.prototype.proceedThread = function (thread) {
     var currentBlockId = thread.peekStack();
     // Mark the status as done and proceed to the next block.
     this.runtime.glowBlock(currentBlockId, false);
-    thread.status = Thread.STATUS_DONE;
+    // If the block was yielding, move back to running state.
+    thread.status = Thread.STATUS_RUNNING;
     // Pop from the stack - finished this level of execution.
     thread.popStack();
     // Push next connected block, if there is one.
@@ -167,6 +161,10 @@ Sequencer.prototype.proceedThread = function (thread) {
     while (thread.peekStack() === null && thread.stack.length > 0) {
         thread.popStack();
     }
+    // If we still can't find a next block to run, mark the thread as done.
+    if (thread.peekStack() === null) {
+        thread.status = Thread.STATUS_DONE;
+    }
 };
 
 module.exports = Sequencer;
diff --git a/src/engine/thread.js b/src/engine/thread.js
index d14d83f90..e5c4df2e4 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -32,22 +32,23 @@ function Thread (firstBlock) {
 
 /**
  * Thread status for initialized or running thread.
- * Threads are in this state when the primitive is called for the first time.
+ * This is the default state for a thread - execution should run normally,
+ * stepping from block to block.
  * @const
  */
 Thread.STATUS_RUNNING = 0;
 
 /**
  * Thread status for a yielded thread.
- * Threads are in this state when a primitive has yielded.
+ * Threads are in this state when a primitive has yielded; execution is paused
+ * until the relevant primitive unyields.
  * @const
  */
 Thread.STATUS_YIELD = 1;
 
 /**
  * Thread status for a finished/done thread.
- * Thread is moved to this state when the interpreter
- * can proceed with execution.
+ * Thread is in this state when there are no more blocks to execute.
  * @const
  */
 Thread.STATUS_DONE = 2;

From 1c24770f8ca6dba227c4e1033fd43a48ccccbc7c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 17:13:43 -0400
Subject: [PATCH 115/302] Remove debug calls from `execute`

---
 src/engine/execute.js | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index acff32585..188f0bf52 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,11 +1,5 @@
 var Thread = require('./thread');
 
-/**
- * If set, block calls, args, and return values will be logged to the console.
- * @const {boolean}
- */
-var DEBUG_BLOCK_CALLS = true;
-
 /**
  * Execute a block.
  * @param {!Sequencer} sequencer Which sequencer is executing.
@@ -66,11 +60,6 @@ var execute = function (sequencer, thread) {
     // (e.g., on return from a substack) gets fresh inputs.
     currentStackFrame.reported = {};
 
-    if (DEBUG_BLOCK_CALLS) {
-        console.groupCollapsed('Executing: ' + opcode);
-        console.log('with arguments: ', argValues);
-        console.log('and stack frame: ', currentStackFrame);
-    }
     var primitiveReportedValue = null;
     primitiveReportedValue = blockFunction(argValues, {
         yield: thread.yield.bind(thread),
@@ -98,29 +87,17 @@ var execute = function (sequencer, thread) {
         // Promise handlers
         primitiveReportedValue.then(function(resolvedValue) {
             // Promise resolved: the primitive reported a value.
-            if (DEBUG_BLOCK_CALLS) {
-                console.log('reporting value: ', resolvedValue);
-            }
             thread.pushReportedValue(resolvedValue);
             sequencer.proceedThread(thread);
         }, function(rejectionReason) {
             // Promise rejected: the primitive had some error.
             // Log it and proceed.
-            if (DEBUG_BLOCK_CALLS) {
-                console.warn('primitive rejected promise: ', rejectionReason);
-            }
+            console.warn('Primitive rejected promise: ', rejectionReason);
             sequencer.proceedThread(thread);
         });
     } else if (thread.status === Thread.STATUS_RUNNING) {
-        if (DEBUG_BLOCK_CALLS) {
-            console.log('reporting value: ', primitiveReportedValue);
-        }
         thread.pushReportedValue(primitiveReportedValue);
     }
-    if (DEBUG_BLOCK_CALLS) {
-        console.log('ending stack frame: ', currentStackFrame);
-        console.groupEnd();
-    }
 };
 
 module.exports = execute;

From 809528abdc4c60bb941df03daa06798ddd767941 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 13:48:30 -0400
Subject: [PATCH 116/302] Straw-man implementation of targets/sprites/clones

---
 src/engine/execute.js   |  5 ++--
 src/engine/runtime.js   | 63 +++++++++++++++++++----------------------
 src/engine/sequencer.js |  5 ++--
 src/engine/target.js    | 20 +++++++++++++
 src/index.js            | 18 +++++++-----
 src/sprites/clone.js    | 16 +++++++++++
 src/sprites/sprite.js   | 17 +++++++++++
 7 files changed, 99 insertions(+), 45 deletions(-)
 create mode 100644 src/engine/target.js
 create mode 100644 src/sprites/clone.js
 create mode 100644 src/sprites/sprite.js

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 188f0bf52..001178d56 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -7,6 +7,7 @@ var Thread = require('./thread');
  */
 var execute = function (sequencer, thread) {
     var runtime = sequencer.runtime;
+    var target = runtime.targetForThread(thread);
 
     // Current block to execute is the one on the top of the stack.
     var currentBlockId = thread.peekStack();
@@ -29,13 +30,13 @@ var execute = function (sequencer, thread) {
     var argValues = {};
 
     // Add all fields on this block to the argValues.
-    var fields = runtime.blocks.getFields(currentBlockId);
+    var fields = target.blocks.getFields(currentBlockId);
     for (var fieldName in fields) {
         argValues[fieldName] = fields[fieldName].value;
     }
 
     // Recursively evaluate input blocks.
-    var inputs = runtime.blocks.getInputs(currentBlockId);
+    var inputs = target.blocks.getInputs(currentBlockId);
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 8c4c862e1..a0db919ae 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -10,19 +10,19 @@ var defaultBlockPackages = {
 };
 
 /**
- * Manages blocks, stacks, and the sequencer.
- * @param {!Blocks} blocks Blocks instance for this runtime.
+ * Manages targets, stacks, and the sequencer.
+ * @param {!Array.<Target>} targets List of targets for this runtime.
  */
-function Runtime (blocks) {
+function Runtime (targets) {
     // Bind event emitter
     EventEmitter.call(this);
 
     // State for the runtime
 
     /**
-     * Block management and storage
+     * Target management and storage.
      */
-    this.blocks = blocks;
+    this.targets = targets;
 
     /**
      * A list of threads that are currently running in the VM.
@@ -163,32 +163,13 @@ Runtime.prototype.greenFlag = function () {
         this._removeThread(this.threads[i]);
     }
     // Add all top stacks with green flag
-    var stacks = this.blocks.getStacks();
-    for (var j = 0; j < stacks.length; j++) {
-        var topBlock = stacks[j];
-        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
-            this._pushThread(stacks[j]);
-        }
-    }
-};
-
-/**
- * Distance sensor hack
- */
-Runtime.prototype.startDistanceSensors = function () {
-    // Add all top stacks with distance sensor
-    var stacks = this.blocks.getStacks();
-    for (var j = 0; j < stacks.length; j++) {
-        var topBlock = stacks[j];
-        if (this.blocks.getBlock(topBlock).opcode ===
-            'wedo_whendistanceclose') {
-            var alreadyRunning = false;
-            for (var k = 0; k < this.threads.length; k++) {
-                if (this.threads[k].topBlock === topBlock) {
-                    alreadyRunning = true;
-                }
-            }
-            if (!alreadyRunning) {
+    for (var t = 0; t < this.targets.length; t++) {
+        var target = this.targets[t];
+        var stacks = target.blocks.getStacks();
+        for (var j = 0; j < stacks.length; j++) {
+            var topBlock = stacks[j];
+            if (target.blocks.getBlock(topBlock).opcode ===
+                'event_whenflagclicked') {
                 this._pushThread(stacks[j]);
             }
         }
@@ -228,9 +209,6 @@ Runtime.prototype._step = function () {
  * @param {boolean} isGlowing True to turn on glow; false to turn off.
  */
 Runtime.prototype.glowBlock = function (blockId, isGlowing) {
-    if (!this.blocks.getBlock(blockId)) {
-        return;
-    }
     if (isGlowing) {
         this.emit(Runtime.BLOCK_GLOW_ON, blockId);
     } else {
@@ -238,6 +216,23 @@ Runtime.prototype.glowBlock = function (blockId, isGlowing) {
     }
 };
 
+/**
+ * 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;
+        }
+    }
+};
+
 /**
  * setInterval implementation that works in a WebWorker or not.
  * @param {?Function} fcn Function to call.
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 1498d6320..e70955e69 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -106,7 +106,7 @@ Sequencer.prototype.stepToSubstack = function (thread, substackNum) {
         substackNum = 1;
     }
     var currentBlockId = thread.peekStack();
-    var substackId = this.runtime.blocks.getSubstack(
+    var substackId = this.runtime.targetForThread(thread).blocks.getSubstack(
         currentBlockId,
         substackNum
     );
@@ -153,7 +153,8 @@ 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.blocks.getNextBlock(currentBlockId);
+    var nextBlockId = (this.runtime.targetForThread(thread).
+        blocks.getNextBlock(currentBlockId));
     if (nextBlockId) {
         thread.pushStack(nextBlockId);
     }
diff --git a/src/engine/target.js b/src/engine/target.js
new file mode 100644
index 000000000..ad7d192c6
--- /dev/null
+++ b/src/engine/target.js
@@ -0,0 +1,20 @@
+var Blocks = require('./blocks');
+
+/**
+ * @fileoverview
+ * A Target is an abstract "code-running" object for the Scratch VM.
+ * Examples include sprites/clones or potentially physical-world devices.
+ */
+
+/**
+ * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
+ * @constructor
+ */
+function Target (blocks) {
+    if (!blocks) {
+        blocks = new Blocks(this);
+    }
+    this.blocks = blocks;
+}
+
+module.exports = Target;
diff --git a/src/index.js b/src/index.js
index 174f05b1c..08109c0a9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,7 +1,7 @@
 var EventEmitter = require('events');
 var util = require('util');
 
-var Blocks = require('./engine/blocks');
+var Sprite = require('./sprites/sprite');
 var Runtime = require('./engine/runtime');
 
 /**
@@ -21,18 +21,22 @@ function VirtualMachine () {
     // Bind event emitter and runtime to VM instance
     // @todo Post message (Web Worker) polyfill
     EventEmitter.call(instance);
-    instance.blocks = new Blocks();
-    instance.runtime = new Runtime(instance.blocks);
+    // @todo support multiple targets/sprites.
+    // This is just a demo/example.
+    var exampleSprite = new Sprite();
+    var exampleTargets = [exampleSprite.clones[0]];
+    instance.exampleSprite = exampleSprite;
+    instance.runtime = new Runtime(exampleTargets);
 
     /**
      * Event listeners for scratch-blocks.
      */
     instance.blockListener = (
-        instance.blocks.generateBlockListener(false, instance.runtime)
+        exampleSprite.blocks.generateBlockListener(false, instance.runtime)
     );
 
     instance.flyoutBlockListener = (
-        instance.blocks.generateBlockListener(true, instance.runtime)
+        exampleSprite.blocks.generateBlockListener(true, instance.runtime)
     );
 
     // Runtime emits are passed along as VM emits.
@@ -81,7 +85,7 @@ VirtualMachine.prototype.stopAll = function () {
  */
 VirtualMachine.prototype.getPlaygroundData = function () {
     this.emit('playgroundData', {
-        blocks: this.blocks,
+        blocks: this.exampleSprite.blocks,
         threads: this.runtime.threads
     });
 };
@@ -114,7 +118,7 @@ if (ENV_WORKER) {
         case 'getPlaygroundData':
             self.postMessage({
                 method: 'playgroundData',
-                blocks: self.vmInstance.blocks,
+                blocks: self.vmInstance.exampleSprite.blocks,
                 threads: self.vmInstance.runtime.threads
             });
             break;
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
new file mode 100644
index 000000000..afbd56f1c
--- /dev/null
+++ b/src/sprites/clone.js
@@ -0,0 +1,16 @@
+var util = require('util');
+var Target = require('../engine/target');
+
+function Clone(spriteBlocks) {
+    Target.call(this, spriteBlocks);
+}
+util.inherits(Clone, Target);
+
+// Clone-level properties
+Clone.prototype.x = 0;
+
+Clone.prototype.y = 0;
+
+Clone.prototype.direction = 90;
+
+module.exports = Clone;
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
new file mode 100644
index 000000000..1608b0571
--- /dev/null
+++ b/src/sprites/sprite.js
@@ -0,0 +1,17 @@
+var Clone = require('./clone');
+var Blocks = require('../engine/blocks');
+
+function Sprite (blocks) {
+    // Sprites have: shared blocks, shared costumes, shared variables, etc.
+    if (!blocks) {
+        // Shared set of blocks for all clones.
+        blocks = new Blocks();
+    }
+    this.blocks = blocks;
+    this.clones = [];
+
+    // Initial single clone with the shared blocks.
+    this.clones.push(new Clone(this.blocks));
+}
+
+module.exports = Sprite;

From 19da0b003287d9d011b4238b3e73ff1fdcf6e64f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 20:56:55 -0400
Subject: [PATCH 117/302] Add renderer demo using scratch-render-webgl

---
 package.json                     |  3 +-
 playground/index.html            | 55 ++++++++++++++++++++++++++++++++
 playground/playground.css        |  2 +-
 playground/playground.js         | 13 ++++++++
 src/blocks/scratch3_motion.js    | 31 ++++++++++++++++++
 src/blocks/scratch3_operators.js |  7 +++-
 src/engine/execute.js            |  3 +-
 src/engine/runtime.js            |  4 +++
 src/index.js                     | 11 ++++++-
 src/sprites/clone.js             | 25 +++++++++++++++
 src/sprites/sprite.js            |  9 ++++--
 11 files changed, 155 insertions(+), 8 deletions(-)
 create mode 100644 src/blocks/scratch3_motion.js

diff --git a/package.json b/package.json
index 2d4d54773..2b6d7335a 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,8 @@
   "dependencies": {
     "htmlparser2": "3.9.0",
     "memoizee": "0.3.10",
-    "promise": "7.1.1"
+    "promise": "7.1.1",
+    "scratch-render-webgl": "git+https://github.com/LLK/scratch-render-webgl.git"
   },
   "devDependencies": {
     "eslint": "2.7.0",
diff --git a/playground/index.html b/playground/index.html
index 82535807b..e11d72c82 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -13,9 +13,14 @@
         <button id="greenflag">Green flag</button>
         <button id="stopall">Stop</button>
         <p>
+            <a id="renderexplorer-link" href="#">Renderer</a><br />
             <a id="threadexplorer-link" href="#">VM Threads</a><br />
             <a id="blockexplorer-link" href="#">VM Block Representation</a>
         </p>
+        <div id="tab-renderexplorer">
+            Render<br />
+            <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas>
+        </div>
         <div id="tab-threadexplorer">
             Thread explorer
             <pre id="threadexplorer"></pre>
@@ -240,6 +245,54 @@
               </value>
             </block>
         </category>
+        <category name="Motion">
+            <block type="motion_movesteps">
+             <value name="STEPS">
+               <shadow type="math_number">
+                 <field name="NUM">10</field>
+               </shadow>
+             </value>
+           </block>
+           <block type="motion_turnright">
+             <value name="DEGREES">
+               <shadow type="math_number">
+                 <field name="NUM">15</field>
+               </shadow>
+             </value>
+           </block>
+           <block type="motion_turnleft">
+             <value name="DEGREES">
+               <shadow type="math_number">
+                 <field name="NUM">15</field>
+               </shadow>
+             </value>
+           </block>
+           <block type="motion_pointindirection">
+             <value name="DIRECTION">
+               <shadow type="math_number">
+                 <field name="NUM">90</field>
+               </shadow>
+             </value>
+           </block>
+           <block type="motion_pointtowards">
+             <value name="TOWARDS">
+               <shadow type="motion_pointtowards_menu">
+               </shadow>
+             </value>
+           </block>
+           <block type="motion_gotoxy">
+             <value name="X">
+               <shadow type="math_number">
+                 <field name="NUM">0</field>
+               </shadow>
+             </value>
+             <value name="Y">
+               <shadow type="math_number">
+                 <field name="NUM">0</field>
+               </shadow>
+             </value>
+           </block>
+        </category>
     </xml>
 
     <!-- Syntax highlighter -->
@@ -249,6 +302,8 @@
     <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
+    <!-- Renderer -->
+    <script src="../node_modules/scratch-render-webgl/build/render-webgl.js"></script>
     <!-- VM Worker -->
     <script src="../vm.worker.js"></script>
     <!-- Playground -->
diff --git a/playground/playground.css b/playground/playground.css
index 451a7cad5..a15e1d81c 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -32,6 +32,6 @@ a {
     font-size: 10pt;
 }
 
-#tab-blockexplorer {
+#tab-blockexplorer, #tab-threadexplorer {
     display: none;
 }
diff --git a/playground/playground.js b/playground/playground.js
index be683ceb7..220549c9f 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -3,6 +3,10 @@ window.onload = function() {
     var vm = new window.VirtualMachine();
     window.vm = vm;
 
+    var canvas = document.getElementById('scratch-stage');
+    window.renderer = new window.RenderWebGLLocal(canvas);
+    window.renderer.connectWorker(window.vm.vmWorker);
+
     var toolbox = document.getElementById('toolbox');
     var workspace = window.Blockly.inject('blocks', {
         toolbox: toolbox,
@@ -85,16 +89,25 @@ window.onload = function() {
 
     var tabBlockExplorer = document.getElementById('tab-blockexplorer');
     var tabThreadExplorer = document.getElementById('tab-threadexplorer');
+    var tabRenderExplorer = document.getElementById('tab-renderexplorer');
 
     // Handlers to show different explorers.
     document.getElementById('threadexplorer-link').addEventListener('click',
         function () {
             tabBlockExplorer.style.display = 'none';
+            tabRenderExplorer.style.display = 'none';
             tabThreadExplorer.style.display = 'block';
         });
     document.getElementById('blockexplorer-link').addEventListener('click',
         function () {
             tabBlockExplorer.style.display = 'block';
+            tabRenderExplorer.style.display = 'none';
+            tabThreadExplorer.style.display = 'none';
+        });
+    document.getElementById('renderexplorer-link').addEventListener('click',
+        function () {
+            tabBlockExplorer.style.display = 'none';
+            tabRenderExplorer.style.display = 'block';
             tabThreadExplorer.style.display = 'none';
         });
 };
diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
new file mode 100644
index 000000000..4fcc3b056
--- /dev/null
+++ b/src/blocks/scratch3_motion.js
@@ -0,0 +1,31 @@
+function Scratch3MotionBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3MotionBlocks.prototype.getPrimitives = function() {
+    return {
+        'motion_gotoxy': this.goToXY,
+        'motion_turnright': this.turnRight
+    };
+};
+
+Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
+    util.target.setXY(args.X, args.Y);
+};
+
+Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
+    if (args.DEGREES !== args.DEGREES) {
+        throw "Bad degrees" + args.DEGREES;
+    }
+    util.target.setDirection(args.DEGREES + util.target.direction);
+};
+
+module.exports = Scratch3MotionBlocks;
diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 75077061c..86cb50350 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -31,7 +31,12 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
 };
 
 Scratch3OperatorsBlocks.prototype.number = function (args) {
-    return Number(args.NUM);
+    var num = Number(args.NUM);
+    if (num !== num) {
+        // NaN
+        return 0;
+    }
+    return num;
 };
 
 Scratch3OperatorsBlocks.prototype.text = function (args) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 001178d56..aa413a76b 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -70,7 +70,8 @@ var execute = function (sequencer, thread) {
         stackFrame: currentStackFrame.executionContext,
         startSubstack: function (substackNum) {
             sequencer.stepToSubstack(thread, substackNum);
-        }
+        },
+        target: target
     });
 
     // Deal with any reported value.
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index a0db919ae..c51800cdb 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -6,6 +6,7 @@ var util = require('util');
 var defaultBlockPackages = {
     'scratch3_control': require('../blocks/scratch3_control'),
     'scratch3_event': require('../blocks/scratch3_event'),
+    'scratch3_motion': require('../blocks/scratch3_motion'),
     'scratch3_operators': require('../blocks/scratch3_operators')
 };
 
@@ -257,6 +258,9 @@ Runtime.prototype._setInterval = function(fcn, interval) {
 Runtime.prototype.start = function () {
     this._setInterval(function() {
         this._step();
+        if (self.renderer) {
+            self.renderer.draw();
+        }
     }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 };
 
diff --git a/src/index.js b/src/index.js
index 08109c0a9..fff9c52db 100644
--- a/src/index.js
+++ b/src/index.js
@@ -24,6 +24,7 @@ function VirtualMachine () {
     // @todo support multiple targets/sprites.
     // This is just a demo/example.
     var exampleSprite = new Sprite();
+    exampleSprite.createClone();
     var exampleTargets = [exampleSprite.clones[0]];
     instance.exampleSprite = exampleSprite;
     instance.runtime = new Runtime(exampleTargets);
@@ -96,6 +97,10 @@ VirtualMachine.prototype.getPlaygroundData = function () {
  * from a worker environment.
  */
 if (ENV_WORKER) {
+    self.importScripts(
+        './node_modules/scratch-render-webgl/build/render-webgl-worker.js'
+    );
+    self.renderer = new self.RenderWebGLWorker();
     self.vmInstance = new VirtualMachine();
     self.onmessage = function (e) {
         var messageData = e.data;
@@ -123,7 +128,11 @@ if (ENV_WORKER) {
             });
             break;
         default:
-            throw 'Unknown method' + messageData.method;
+            if (e.data.id == 'RendererConnected') {
+                //initRenderWorker();
+            }
+            self.renderer.onmessage(e);
+            break;
         }
     };
     // Bind runtime's emitted events to postmessages.
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index afbd56f1c..f4f99abbe 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -3,9 +3,19 @@ var Target = require('../engine/target');
 
 function Clone(spriteBlocks) {
     Target.call(this, spriteBlocks);
+    this.drawableID = null;
+    this.initDrawable();
 }
 util.inherits(Clone, Target);
 
+Clone.prototype.initDrawable = function () {
+    var createPromise = self.renderer.createDrawable();
+    var instance = this;
+    createPromise.then(function (id) {
+        instance.drawableID = id;
+    });
+};
+
 // Clone-level properties
 Clone.prototype.x = 0;
 
@@ -13,4 +23,19 @@ Clone.prototype.y = 0;
 
 Clone.prototype.direction = 90;
 
+Clone.prototype.setXY = function (x, y) {
+    this.x = x;
+    this.y = y;
+    self.renderer.updateDrawableProperties(this.drawableID, {
+        position: [this.x, this.y]
+    });
+};
+
+Clone.prototype.setDirection = function (direction) {
+    this.direction = direction;
+    self.renderer.updateDrawableProperties(this.drawableID, {
+        direction: this.direction
+    });
+};
+
 module.exports = Clone;
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
index 1608b0571..1ec25b3ba 100644
--- a/src/sprites/sprite.js
+++ b/src/sprites/sprite.js
@@ -9,9 +9,12 @@ function Sprite (blocks) {
     }
     this.blocks = blocks;
     this.clones = [];
-
-    // Initial single clone with the shared blocks.
-    this.clones.push(new Clone(this.blocks));
 }
 
+Sprite.prototype.createClone = function () {
+    var newClone = new Clone(this.blocks);
+    this.clones.push(newClone);
+    return newClone;
+};
+
 module.exports = Sprite;

From 7db38e8422b8512e80a3959e0d8243bc344c023c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 23:07:23 -0400
Subject: [PATCH 118/302] Implement a few math utilities

---
 src/util/math-util.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 src/util/math-util.js

diff --git a/src/util/math-util.js b/src/util/math-util.js
new file mode 100644
index 000000000..2dfd62a6e
--- /dev/null
+++ b/src/util/math-util.js
@@ -0,0 +1,20 @@
+function MathUtil () {}
+
+MathUtil.degToRad = function (deg) {
+    return (Math.PI * (90 - deg)) / 180;
+};
+
+MathUtil.radToDeg = function (rad) {
+    return rad * 180 / Math.PI;
+};
+
+MathUtil.clamp = function (n, min, max) {
+    return Math.min(Math.max(n, min), max);
+};
+
+MathUtil.wrapClamp = function (n, min, max) {
+    var range = (max - min) + 1;
+    return n - Math.floor((n - min) / range) * range;
+};
+
+module.exports = MathUtil;

From 727d2c0d23d00122939435f2ed16ef27ad276bd2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 23:07:34 -0400
Subject: [PATCH 119/302] Clamp clone direction like Scratch 2.0

---
 src/sprites/clone.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index f4f99abbe..b69c68d7a 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -1,4 +1,5 @@
 var util = require('util');
+var MathUtil = require('../util/math-util');
 var Target = require('../engine/target');
 
 function Clone(spriteBlocks) {
@@ -32,7 +33,7 @@ Clone.prototype.setXY = function (x, y) {
 };
 
 Clone.prototype.setDirection = function (direction) {
-    this.direction = direction;
+    this.direction = MathUtil.wrapClamp(direction, -179, 180);
     self.renderer.updateDrawableProperties(this.drawableID, {
         direction: this.direction
     });

From 42f0f66acdef27a58599d59f72c6b8ae784975ab Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 23:08:10 -0400
Subject: [PATCH 120/302] Implement move steps, turn right, turn left, point in
 direction

---
 src/blocks/scratch3_motion.js | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 4fcc3b056..f9171d9e7 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -1,3 +1,5 @@
+var MathUtil = require('../util/math-util');
+
 function Scratch3MotionBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -12,20 +14,35 @@ function Scratch3MotionBlocks(runtime) {
  */
 Scratch3MotionBlocks.prototype.getPrimitives = function() {
     return {
+        'motion_movesteps': this.moveSteps,
         'motion_gotoxy': this.goToXY,
-        'motion_turnright': this.turnRight
+        'motion_turnright': this.turnRight,
+        'motion_turnleft': this.turnLeft,
+        'motion_pointindirection': this.pointInDirection
     };
 };
 
+Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
+    var radians = MathUtil.degToRad(util.target.direction);
+    var dx = args.STEPS * Math.cos(radians);
+    var dy = args.STEPS * Math.sin(radians);
+    util.target.setXY(util.target.x + dx, util.target.y + dy);
+};
+
 Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
     util.target.setXY(args.X, args.Y);
 };
 
 Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
-    if (args.DEGREES !== args.DEGREES) {
-        throw "Bad degrees" + args.DEGREES;
-    }
-    util.target.setDirection(args.DEGREES + util.target.direction);
+    util.target.setDirection(util.target.direction + args.DEGREES);
+};
+
+Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
+    util.target.setDirection(util.target.direction - args.DEGREES);
+};
+
+Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
+    util.target.setDirection(args.DIRECTION);
 };
 
 module.exports = Scratch3MotionBlocks;

From 7db2981ddc66659657624be9461c2ce2c1ad74ec Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 29 Jun 2016 23:51:21 -0400
Subject: [PATCH 121/302] Add additional motion block implementations

---
 playground/index.html         | 164 ++++++++++++++++++++++++----------
 src/blocks/scratch3_motion.js |  32 ++++++-
 2 files changed, 147 insertions(+), 49 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index e11d72c82..2d256e7a2 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -245,54 +245,122 @@
               </value>
             </block>
         </category>
-        <category name="Motion">
-            <block type="motion_movesteps">
-             <value name="STEPS">
-               <shadow type="math_number">
-                 <field name="NUM">10</field>
-               </shadow>
-             </value>
-           </block>
-           <block type="motion_turnright">
-             <value name="DEGREES">
-               <shadow type="math_number">
-                 <field name="NUM">15</field>
-               </shadow>
-             </value>
-           </block>
-           <block type="motion_turnleft">
-             <value name="DEGREES">
-               <shadow type="math_number">
-                 <field name="NUM">15</field>
-               </shadow>
-             </value>
-           </block>
-           <block type="motion_pointindirection">
-             <value name="DIRECTION">
-               <shadow type="math_number">
-                 <field name="NUM">90</field>
-               </shadow>
-             </value>
-           </block>
-           <block type="motion_pointtowards">
-             <value name="TOWARDS">
-               <shadow type="motion_pointtowards_menu">
-               </shadow>
-             </value>
-           </block>
-           <block type="motion_gotoxy">
-             <value name="X">
-               <shadow type="math_number">
-                 <field name="NUM">0</field>
-               </shadow>
-             </value>
-             <value name="Y">
-               <shadow type="math_number">
-                 <field name="NUM">0</field>
-               </shadow>
-             </value>
-           </block>
-        </category>
+        <category name="Looks">
+        <block type="looks_changeeffectby">
+          <value name="EFFECT">
+            <shadow type="looks_effectmenu"></shadow>
+          </value>
+          <value name="CHANGE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_seteffectto">
+          <value name="EFFECT">
+            <shadow type="looks_effectmenu"></shadow>
+          </value>
+          <value name="VALUE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_cleargraphiceffects"></block>
+        <block type="looks_changesizeby">
+          <value name="CHANGE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_setsizeto">
+          <value name="SIZE">
+            <shadow type="math_number">
+              <field name="NUM">100</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_size"></block>
+      </category>
+      <category name="Motion">
+      <block type="motion_movesteps">
+        <value name="STEPS">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_turnright">
+        <value name="DEGREES">
+          <shadow type="math_number">
+            <field name="NUM">15</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_turnleft">
+        <value name="DEGREES">
+          <shadow type="math_number">
+            <field name="NUM">15</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_pointindirection">
+        <value name="DIRECTION">
+          <shadow type="math_number">
+            <field name="NUM">90</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_pointtowards">
+        <value name="TOWARDS">
+          <shadow type="motion_pointtowards_menu">
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_gotoxy">
+        <value name="X">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+        <value name="Y">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_changexby">
+        <value name="DX">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_setx">
+        <value name="X">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_changeyby">
+        <value name="DY">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_sety">
+        <value name="Y">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_xposition"></block>
+      <block type="motion_yposition"></block>
+    </category>
     </xml>
 
     <!-- Syntax highlighter -->
diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index f9171d9e7..de9a2c480 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -18,7 +18,13 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         'motion_gotoxy': this.goToXY,
         'motion_turnright': this.turnRight,
         'motion_turnleft': this.turnLeft,
-        'motion_pointindirection': this.pointInDirection
+        'motion_pointindirection': this.pointInDirection,
+        'motion_changexby': this.changeX,
+        'motion_setx': this.setX,
+        'motion_changeyby': this.changeY,
+        'motion_sety': this.setY,
+        'motion_xposition': this.getX,
+        'motion_yposition': this.getY
     };
 };
 
@@ -45,4 +51,28 @@ Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
     util.target.setDirection(args.DIRECTION);
 };
 
+Scratch3MotionBlocks.prototype.changeX = function (args, util) {
+    util.target.setXY(util.target.x + args.DX, util.target.y);
+};
+
+Scratch3MotionBlocks.prototype.setX = function (args, util) {
+    util.target.setXY(args.X, util.target.y);
+};
+
+Scratch3MotionBlocks.prototype.changeY = function (args, util) {
+    util.target.setXY(util.target.x, util.target.y + args.DY);
+};
+
+Scratch3MotionBlocks.prototype.setY = function (args, util) {
+    util.target.setXY(util.target.x, args.Y);
+};
+
+Scratch3MotionBlocks.prototype.getX = function (args, util) {
+    return util.target.x;
+};
+
+Scratch3MotionBlocks.prototype.getY = function (args, util) {
+    return util.target.y;
+};
+
 module.exports = Scratch3MotionBlocks;

From 1eaed6fff3ee68df3f65ba067b9a1c10ac2b9e59 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 00:11:47 -0400
Subject: [PATCH 122/302] Implement graphic effects and size blocks

---
 playground/index.html        |  4 +--
 src/blocks/scratch3_looks.js | 54 ++++++++++++++++++++++++++++++++++++
 src/engine/runtime.js        |  1 +
 src/sprites/clone.js         | 33 ++++++++++++++++++++++
 4 files changed, 90 insertions(+), 2 deletions(-)
 create mode 100644 src/blocks/scratch3_looks.js

diff --git a/playground/index.html b/playground/index.html
index 2d256e7a2..3565073a0 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -252,7 +252,7 @@
           </value>
           <value name="CHANGE">
             <shadow type="math_number">
-              <field name="NUM">10</field>
+              <field name="NUM">25</field>
             </shadow>
           </value>
         </block>
@@ -262,7 +262,7 @@
           </value>
           <value name="VALUE">
             <shadow type="math_number">
-              <field name="NUM">10</field>
+              <field name="NUM">0</field>
             </shadow>
           </value>
         </block>
diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
new file mode 100644
index 000000000..af8ed9d70
--- /dev/null
+++ b/src/blocks/scratch3_looks.js
@@ -0,0 +1,54 @@
+function Scratch3LooksBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3LooksBlocks.prototype.getPrimitives = function() {
+    return {
+        'looks_effectmenu': this.effectMenu,
+        'looks_changeeffectby': this.changeEffect,
+        'looks_seteffectto': this.setEffect,
+        'looks_cleargraphiceffects': this.clearEffects,
+        'looks_changesizeby': this.changeSize,
+        'looks_setsizeto': this.setSize,
+        'looks_size': this.getSize
+    };
+};
+
+Scratch3LooksBlocks.prototype.effectMenu = function (args) {
+    return args.EFFECT.toLowerCase();
+};
+
+Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
+    var newValue = args.CHANGE + util.target.effects[args.EFFECT];
+    util.target.setEffect(args.EFFECT, newValue);
+};
+
+Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
+    util.target.setEffect(args.EFFECT, args.VALUE);
+};
+
+Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
+    util.target.clearEffects();
+};
+
+Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
+    util.target.setSize(util.target.size + args.CHANGE);
+};
+
+Scratch3LooksBlocks.prototype.setSize = function (args, util) {
+    util.target.setSize(args.SIZE);
+};
+
+Scratch3LooksBlocks.prototype.getSize = function (args, util) {
+    return util.target.size;
+};
+
+module.exports = Scratch3LooksBlocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index c51800cdb..8159729f5 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -6,6 +6,7 @@ var util = require('util');
 var defaultBlockPackages = {
     'scratch3_control': require('../blocks/scratch3_control'),
     'scratch3_event': require('../blocks/scratch3_event'),
+    'scratch3_looks': require('../blocks/scratch3_looks'),
     'scratch3_motion': require('../blocks/scratch3_motion'),
     'scratch3_operators': require('../blocks/scratch3_operators')
 };
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index b69c68d7a..cfee61556 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -24,6 +24,18 @@ Clone.prototype.y = 0;
 
 Clone.prototype.direction = 90;
 
+Clone.prototype.size = 100;
+
+Clone.prototype.effects = {
+    'color': 0,
+    'fisheye': 0,
+    'whirl': 0,
+    'pixelate': 0,
+    'mosaic': 0,
+    'brightness': 0,
+    'ghost': 0
+};
+
 Clone.prototype.setXY = function (x, y) {
     this.x = x;
     this.y = y;
@@ -39,4 +51,25 @@ Clone.prototype.setDirection = function (direction) {
     });
 };
 
+Clone.prototype.setSize = function (size) {
+    this.size = MathUtil.clamp(size, 5, 535);
+    self.renderer.updateDrawableProperties(this.drawableID, {
+        scale: this.size
+    });
+};
+
+Clone.prototype.setEffect = function (effectName, value) {
+    this.effects[effectName] = value;
+    var props = {};
+    props[effectName] = this.effects[effectName];
+    self.renderer.updateDrawableProperties(this.drawableID, props);
+};
+
+Clone.prototype.clearEffects = function () {
+    for (var effectName in this.effects) {
+        this.effects[effectName] = 0;
+    }
+    self.renderer.updateDrawableProperties(this.drawableID, this.effects);
+};
+
 module.exports = Clone;

From bb5acd1ef4f4989e4c0af69ed6b8936851ecf2db Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 19:01:19 -0400
Subject: [PATCH 123/302] Fix merge issue in execute.js

---
 src/engine/execute.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index aa413a76b..9317add96 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -13,7 +13,7 @@ var execute = function (sequencer, thread) {
     var currentBlockId = thread.peekStack();
     var currentStackFrame = thread.peekStackFrame();
 
-    var opcode = runtime.blocks.getOpcode(currentBlockId);
+    var opcode = target.blocks.getOpcode(currentBlockId);
 
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + currentBlockId);

From 5876681bc70b8c3456949e207f727b8feb29666d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 30 Jun 2016 19:04:15 -0400
Subject: [PATCH 124/302] Version of random that truncates ints

---
 src/blocks/scratch3_operators.js | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 86cb50350..c72adf29c 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -84,16 +84,16 @@ Scratch3OperatorsBlocks.prototype.not = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.random = function (args) {
-    // As a demo, this implementation of random returns after 1 second of yield.
-    // @todo Match Scratch 2.0 implementation with int-truncation.
-    // See: http://bit.ly/1Qc0GzC
-    var examplePromise = new Promise(function(resolve) {
-        setTimeout(function() {
-            var res = (Math.random() * (args.TO - args.FROM)) + args.FROM;
-            resolve(res);
-        }, 1000);
-    });
-    return examplePromise;
+    var low = args.FROM <= args.TO ? args.FROM : args.TO;
+    var high = args.FROM <= args.TO ? args.TO : args.FROM;
+    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) {
+        return low + parseInt(Math.random() * ((high + 1) - low));
+    }
+    return (Math.random() * (high - low)) + low;
 };
 
 module.exports = Scratch3OperatorsBlocks;

From de6ba08866838602cbb5072e383a4c65e86cbb63 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 10:44:43 -0400
Subject: [PATCH 125/302] Add single-frame yield mode

---
 src/blocks/scratch3_control.js |  8 +++++++-
 src/engine/execute.js          | 12 ++++++++++--
 src/engine/sequencer.js        | 15 +++++++++++----
 src/engine/thread.js           | 15 +++++++++++----
 4 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index e13edefd9..161934ea4 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -37,7 +37,13 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
 };
 
 Scratch3ControlBlocks.prototype.forever = function(args, util) {
-    util.startSubstack();
+    if (!util.stackFrame.executed) {
+        util.stackFrame.executed = true;
+        util.startSubstack();
+    } else {
+        util.stackFrame.executed = false;
+        util.yieldFrame();
+    }
 };
 
 Scratch3ControlBlocks.prototype.wait = function(args) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 9317add96..529990ca0 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -63,8 +63,14 @@ var execute = function (sequencer, thread) {
 
     var primitiveReportedValue = null;
     primitiveReportedValue = blockFunction(argValues, {
-        yield: thread.yield.bind(thread),
+        yield: function() {
+            thread.setStatus(Thread.STATUS_YIELD);
+        },
+        yieldFrame: function() {
+            thread.setStatus(Thread.STATUS_YIELD_FRAME);
+        },
         done: function() {
+            thread.setStatus(Thread.STATUS_RUNNING);
             sequencer.proceedThread(thread);
         },
         stackFrame: currentStackFrame.executionContext,
@@ -84,17 +90,19 @@ var execute = function (sequencer, thread) {
     if (isPromise) {
         if (thread.status === Thread.STATUS_RUNNING) {
             // Primitive returned a promise; automatically yield thread.
-            thread.status = Thread.STATUS_YIELD;
+            thread.setStatus(Thread.STATUS_YIELD);
         }
         // Promise handlers
         primitiveReportedValue.then(function(resolvedValue) {
             // Promise resolved: the primitive reported a value.
             thread.pushReportedValue(resolvedValue);
+            thread.setStatus(Thread.STATUS_RUNNING);
             sequencer.proceedThread(thread);
         }, function(rejectionReason) {
             // Promise rejected: the primitive had some error.
             // Log it and proceed.
             console.warn('Primitive rejected promise: ', rejectionReason);
+            thread.setStatus(Thread.STATUS_RUNNING);
             sequencer.proceedThread(thread);
         });
     } else if (thread.status === Thread.STATUS_RUNNING) {
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index e70955e69..f780ba255 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -36,6 +36,13 @@ Sequencer.prototype.stepThreads = function (threads) {
     var inactiveThreads = [];
     // If all of the threads are yielding, we should yield.
     var numYieldingThreads = 0;
+    // Clear all yield statuses that were for the previous frame.
+    for (var t = 0; t < threads.length; t++) {
+        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
+            threads[t].setStatus(Thread.STATUS_RUNNING);
+        }
+    }
+
     // While there are still threads to run and we are within WORK_TIME,
     // continue executing threads.
     while (threads.length > 0 &&
@@ -51,8 +58,10 @@ Sequencer.prototype.stepThreads = function (threads) {
             if (activeThread.status === Thread.STATUS_RUNNING) {
                 // Normal-mode thread: step.
                 this.startThread(activeThread);
-            } else if (activeThread.status === Thread.STATUS_YIELD) {
+            } else if (activeThread.status === Thread.STATUS_YIELD ||
+                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
                 // Yielding thread: do nothing for this step.
+                numYieldingThreads++;
                 continue;
             }
             if (activeThread.stack.length === 0 &&
@@ -148,8 +157,6 @@ Sequencer.prototype.proceedThread = function (thread) {
     var currentBlockId = thread.peekStack();
     // Mark the status as done and proceed to the next block.
     this.runtime.glowBlock(currentBlockId, false);
-    // If the block was yielding, move back to running state.
-    thread.status = Thread.STATUS_RUNNING;
     // Pop from the stack - finished this level of execution.
     thread.popStack();
     // Push next connected block, if there is one.
@@ -164,7 +171,7 @@ Sequencer.prototype.proceedThread = function (thread) {
     }
     // If we still can't find a next block to run, mark the thread as done.
     if (thread.peekStack() === null) {
-        thread.status = Thread.STATUS_DONE;
+        thread.setStatus(Thread.STATUS_DONE);
     }
 };
 
diff --git a/src/engine/thread.js b/src/engine/thread.js
index e5c4df2e4..d1bd73fc0 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -46,12 +46,18 @@ Thread.STATUS_RUNNING = 0;
  */
 Thread.STATUS_YIELD = 1;
 
+/**
+ * Thread status for a single-frame yield.
+ * @const
+ */
+Thread.STATUS_YIELD_FRAME = 2;
+
 /**
  * Thread status for a finished/done thread.
  * Thread is in this state when there are no more blocks to execute.
  * @const
  */
-Thread.STATUS_DONE = 2;
+Thread.STATUS_DONE = 3;
 
 /**
  * Push stack and update stack frames appropriately.
@@ -118,10 +124,11 @@ Thread.prototype.pushReportedValue = function (value) {
 };
 
 /**
- * Yields the thread.
+ * Set thread status.
+ * @param {number} status Enum representing thread status.
  */
-Thread.prototype.yield = function () {
-    this.status = Thread.STATUS_YIELD;
+Thread.prototype.setStatus = function (status) {
+    this.status = status;
 };
 
 module.exports = Thread;

From 39c71b559d5da903159d17b8c6f670d3bd252a8d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 10:50:31 -0400
Subject: [PATCH 126/302] Update repeat implementation to execute once per
 frame

---
 src/blocks/scratch3_control.js | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 161934ea4..d938f66ab 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -28,15 +28,27 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
     if (util.stackFrame.loopCounter === undefined) {
         util.stackFrame.loopCounter = parseInt(args.TIMES);
     }
-    // Decrease counter
-    util.stackFrame.loopCounter--;
-    // If we still have some left, start the substack
-    if (util.stackFrame.loopCounter >= 0) {
-        util.startSubstack();
+    // Only execute once per frame.
+    // When the substack finishes, `repeat` will be executed again and
+    // the second branch will be taken, yielding for the rest of the frame.
+    if (!util.stackFrame.executed) {
+        util.stackFrame.executed = true;
+        // Decrease counter
+        util.stackFrame.loopCounter--;
+        // If we still have some left, start the substack
+        if (util.stackFrame.loopCounter >= 0) {
+            util.startSubstack();
+        }
+    } else {
+        util.stackFrame.executed = false;
+        util.yieldFrame();
     }
 };
 
 Scratch3ControlBlocks.prototype.forever = function(args, util) {
+    // Only execute once per frame.
+    // When the substack finishes, `forever` will be executed again and
+    // the second branch will be taken, yielding for the rest of the frame.
     if (!util.stackFrame.executed) {
         util.stackFrame.executed = true;
         util.startSubstack();

From dda4fc8332279e6855c1ddcf3175f77bb57fb849 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:24:06 -0400
Subject: [PATCH 127/302] Yield frame on an empty substack

---
 src/engine/sequencer.js | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index f780ba255..838cb1cfa 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -86,9 +86,10 @@ Sequencer.prototype.stepThreads = function (threads) {
 Sequencer.prototype.startThread = function (thread) {
     var currentBlockId = thread.peekStack();
     if (!currentBlockId) {
-        // A "null block" - empty substack. Pop the stack.
+        // A "null block" - empty substack.
+        // Yield for the frame.
         thread.popStack();
-        thread.status = Thread.STATUS_DONE;
+        thread.setStatus(Thread.STATUS_YIELD_FRAME);
         return;
     }
     // Start showing run feedback in the editor.
@@ -165,12 +166,8 @@ Sequencer.prototype.proceedThread = function (thread) {
     if (nextBlockId) {
         thread.pushStack(nextBlockId);
     }
-    // Pop from the stack until we have a next block.
-    while (thread.peekStack() === null && thread.stack.length > 0) {
-        thread.popStack();
-    }
-    // If we still can't find a next block to run, mark the thread as done.
-    if (thread.peekStack() === null) {
+    // If we can't find a next block to run, mark the thread as done.
+    if (!thread.peekStack()) {
         thread.setStatus(Thread.STATUS_DONE);
     }
 };

From e4f6c9e90cafdb958416d9c42a6aba7be31fc113 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:25:26 -0400
Subject: [PATCH 128/302] "Repeat until" implementation

---
 src/blocks/scratch3_control.js | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index d938f66ab..9498cc019 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -15,6 +15,7 @@ function Scratch3ControlBlocks(runtime) {
 Scratch3ControlBlocks.prototype.getPrimitives = function() {
     return {
         'control_repeat': this.repeat,
+        'control_repeat_until': this.repeatUntil,
         'control_forever': this.forever,
         'control_wait': this.wait,
         'control_if': this.if,
@@ -45,15 +46,31 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
     }
 };
 
+Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
+    // Only execute once per frame.
+    // When the substack finishes, `repeat` will be executed again and
+    // the second branch will be taken, yielding for the rest of the frame.
+    if (!util.stackFrame.executedInFrame) {
+        util.stackFrame.executedInFrame = true;
+        // If the condition is true, start the substack.
+        if (!args.CONDITION) {
+            util.startSubstack();
+        }
+    } else {
+        util.stackFrame.executedInFrame = false;
+        util.yieldFrame();
+    }
+};
+
 Scratch3ControlBlocks.prototype.forever = function(args, util) {
     // Only execute once per frame.
     // When the substack finishes, `forever` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
-    if (!util.stackFrame.executed) {
-        util.stackFrame.executed = true;
+    if (!util.stackFrame.executedInFrame) {
+        util.stackFrame.executedInFrame = true;
         util.startSubstack();
     } else {
-        util.stackFrame.executed = false;
+        util.stackFrame.executedInFrame = false;
         util.yieldFrame();
     }
 };
@@ -69,8 +86,8 @@ Scratch3ControlBlocks.prototype.wait = function(args) {
 Scratch3ControlBlocks.prototype.if = function(args, util) {
     // Only execute one time. `if` will be returned to
     // when the substack finishes, but it shouldn't execute again.
-    if (util.stackFrame.executed === undefined) {
-        util.stackFrame.executed = true;
+    if (util.stackFrame.executedInFrame === undefined) {
+        util.stackFrame.executedInFrame = true;
         if (args.CONDITION) {
             util.startSubstack();
         }

From ad30fa80596cd3df3ffe1bb807c8e8ea446e1422 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:27:01 -0400
Subject: [PATCH 129/302] Temporarily remove per-block glow

---
 src/engine/sequencer.js | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 838cb1cfa..342ad8857 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -92,12 +92,8 @@ Sequencer.prototype.startThread = function (thread) {
         thread.setStatus(Thread.STATUS_YIELD_FRAME);
         return;
     }
-    // Start showing run feedback in the editor.
-    this.runtime.glowBlock(currentBlockId, true);
-
     // Execute the current block
     execute(this, thread);
-
     // If the block executed without yielding and without doing control flow,
     // move to done.
     if (thread.status === Thread.STATUS_RUNNING &&
@@ -157,7 +153,6 @@ Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
 Sequencer.prototype.proceedThread = function (thread) {
     var currentBlockId = thread.peekStack();
     // Mark the status as done and proceed to the next block.
-    this.runtime.glowBlock(currentBlockId, false);
     // Pop from the stack - finished this level of execution.
     thread.popStack();
     // Push next connected block, if there is one.

From 57217f00440153d636c3feb0b4fc2a4644676bdc Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:29:32 -0400
Subject: [PATCH 130/302] Rename `executed` in repeat, ifElse

---
 src/blocks/scratch3_control.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 9498cc019..d1f6a7444 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -32,8 +32,8 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
     // Only execute once per frame.
     // When the substack finishes, `repeat` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
-    if (!util.stackFrame.executed) {
-        util.stackFrame.executed = true;
+    if (!util.stackFrame.executedInFrame) {
+        util.stackFrame.executedInFrame = true;
         // Decrease counter
         util.stackFrame.loopCounter--;
         // If we still have some left, start the substack
@@ -97,8 +97,8 @@ Scratch3ControlBlocks.prototype.if = function(args, util) {
 Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
     // Only execute one time. `ifElse` will be returned to
     // when the substack finishes, but it shouldn't execute again.
-    if (util.stackFrame.executed === undefined) {
-        util.stackFrame.executed = true;
+    if (util.stackFrame.executedInFrame === undefined) {
+        util.stackFrame.executedInFrame = true;
         if (args.CONDITION) {
             util.startSubstack(1);
         } else {

From bb68fcab25bc2ae432ca696c86e6e91f5c794720 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:41:52 -0400
Subject: [PATCH 131/302] Additional fix for repeat's executedInFrame

---
 src/blocks/scratch3_control.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index d1f6a7444..d3cd2fdf6 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -41,7 +41,7 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
             util.startSubstack();
         }
     } else {
-        util.stackFrame.executed = false;
+        util.stackFrame.executedInFrame = false;
         util.yieldFrame();
     }
 };

From 660029010dbb6aed899963919c0ac7fc8b3763cc Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 11:52:43 -0400
Subject: [PATCH 132/302] Feed in requestAnimationFrame events to VM

Not sure exactly how to use these yet, but it seems helpful to have them in there.
---
 playground/playground.js |  7 +++++++
 src/engine/runtime.js    | 22 +++++-----------------
 src/index.js             | 10 ++++++++++
 src/worker.js            |  4 ++++
 4 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 220549c9f..a819effc7 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -79,6 +79,13 @@ window.onload = function() {
     // Run threads
     vm.start();
 
+    // Inform VM of animation frames.
+    var animate = function() {
+        window.vm.animationFrame();
+        requestAnimationFrame(animate);
+    };
+    requestAnimationFrame(animate);
+
     // Handlers for green flag and stop all.
     document.getElementById('greenflag').addEventListener('click', function() {
         vm.greenFlag();
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 8159729f5..afd930246 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -236,32 +236,20 @@ Runtime.prototype.targetForThread = function (thread) {
 };
 
 /**
- * setInterval implementation that works in a WebWorker or not.
- * @param {?Function} fcn Function to call.
- * @param {number} interval Interval at which to call it.
- * @return {number} Value returned by setInterval.
+ * Handle an animation frame from the main thread.
  */
-Runtime.prototype._setInterval = function(fcn, interval) {
-    var setInterval = null;
-    if (typeof window !== 'undefined' && window.setInterval) {
-        setInterval = window.setInterval;
-    } else if (typeof self !== 'undefined' && self.setInterval) {
-        setInterval = self.setInterval;
-    } else {
-        return;
+Runtime.prototype.animationFrame = function () {
+    if (self.renderer) {
+        self.renderer.draw();
     }
-    return setInterval(fcn, interval);
 };
 
 /**
  * Set up timers to repeatedly step in a browser
  */
 Runtime.prototype.start = function () {
-    this._setInterval(function() {
+    self.setInterval(function() {
         this._step();
-        if (self.renderer) {
-            self.renderer.draw();
-        }
     }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 };
 
diff --git a/src/index.js b/src/index.js
index fff9c52db..15b218071 100644
--- a/src/index.js
+++ b/src/index.js
@@ -91,6 +91,13 @@ VirtualMachine.prototype.getPlaygroundData = function () {
     });
 };
 
+/**
+ * Handle an animation frame.
+ */
+VirtualMachine.prototype.animationFrame = function () {
+    this.runtime.animationFrame();
+};
+
 /*
  * Worker handlers: for all public methods available above,
  * we must also provide a message handler in case the VM is run
@@ -127,6 +134,9 @@ if (ENV_WORKER) {
                 threads: self.vmInstance.runtime.threads
             });
             break;
+        case 'animationFrame':
+            self.vmInstance.animationFrame();
+            break;
         default:
             if (e.data.id == 'RendererConnected') {
                 //initRenderWorker();
diff --git a/src/worker.js b/src/worker.js
index e96c57bf3..70e6da5cb 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -63,6 +63,10 @@ VirtualMachine.prototype.stopAll = function () {
     this.vmWorker.postMessage({method: 'stopAll'});
 };
 
+VirtualMachine.prototype.animationFrame = function () {
+    this.vmWorker.postMessage({method: 'animationFrame'});
+};
+
 /**
  * Export and bind to `window`
  */

From 6891a3a5dd139648d945357067b909bcf8a57a32 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 12:56:45 -0400
Subject: [PATCH 133/302] Add direction reporter

---
 src/blocks/scratch3_motion.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index de9a2c480..730eee03f 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -24,7 +24,8 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         'motion_changeyby': this.changeY,
         'motion_sety': this.setY,
         'motion_xposition': this.getX,
-        'motion_yposition': this.getY
+        'motion_yposition': this.getY,
+        'motion_direction': this.getDirection
     };
 };
 
@@ -75,4 +76,8 @@ Scratch3MotionBlocks.prototype.getY = function (args, util) {
     return util.target.y;
 };
 
+Scratch3MotionBlocks.prototype.getDirection = function (args, util) {
+    return util.target.direction;
+};
+
 module.exports = Scratch3MotionBlocks;

From ce941c6fd81c2cdd9b4c483c4663ee03bf9593fc Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 12:56:59 -0400
Subject: [PATCH 134/302] Add show/hide blocks using ghost effect as backend

---
 src/blocks/scratch3_looks.js | 10 ++++++++++
 src/sprites/clone.js         | 12 ++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index af8ed9d70..b2bad1ef7 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -12,6 +12,8 @@ function Scratch3LooksBlocks(runtime) {
  */
 Scratch3LooksBlocks.prototype.getPrimitives = function() {
     return {
+        'looks_show': this.show,
+        'looks_hide': this.hide,
         'looks_effectmenu': this.effectMenu,
         'looks_changeeffectby': this.changeEffect,
         'looks_seteffectto': this.setEffect,
@@ -22,6 +24,14 @@ Scratch3LooksBlocks.prototype.getPrimitives = function() {
     };
 };
 
+Scratch3LooksBlocks.prototype.show = function (args, util) {
+    util.target.setVisible(true);
+};
+
+Scratch3LooksBlocks.prototype.hide = function (args, util) {
+    util.target.setVisible(false);
+};
+
 Scratch3LooksBlocks.prototype.effectMenu = function (args) {
     return args.EFFECT.toLowerCase();
 };
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index cfee61556..a1c8b5c8d 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -24,6 +24,8 @@ Clone.prototype.y = 0;
 
 Clone.prototype.direction = 90;
 
+Clone.prototype.visible = true;
+
 Clone.prototype.size = 100;
 
 Clone.prototype.effects = {
@@ -51,6 +53,16 @@ Clone.prototype.setDirection = function (direction) {
     });
 };
 
+Clone.prototype.setVisible = function (visible) {
+    this.visible = visible;
+    // @todo: Until visibility is implemented in the renderer, use a ghost.
+    if (this.visible) {
+        this.setEffect('ghost', 0);
+    } else {
+        this.setEffect('ghost', 100);
+    }
+};
+
 Clone.prototype.setSize = function (size) {
     this.size = MathUtil.clamp(size, 5, 535);
     self.renderer.updateDrawableProperties(this.drawableID, {

From a47a9a9b7ec8ba48b5a56392d26b18589dcd2c72 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 12:57:13 -0400
Subject: [PATCH 135/302] Add show, hide, direction to palette

---
 playground/index.html | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/playground/index.html b/playground/index.html
index 3565073a0..c08854f88 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -246,6 +246,8 @@
             </block>
         </category>
         <category name="Looks">
+        <block type="looks_show"></block>
+        <block type="looks_hide"></block>
         <block type="looks_changeeffectby">
           <value name="EFFECT">
             <shadow type="looks_effectmenu"></shadow>
@@ -360,6 +362,7 @@
       </block>
       <block type="motion_xposition"></block>
       <block type="motion_yposition"></block>
+      <block type="motion_direction"></block>
     </category>
     </xml>
 

From 890be6611e7bd947108a4b8b5c0651f417ad597c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 13:09:22 -0400
Subject: [PATCH 136/302] Only request debug data from VM thread if a debug tab
 is open

---
 playground/playground.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index a819effc7..800894bb9 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -51,11 +51,14 @@ window.onload = function() {
         }
     };
 
+    // Only request data from the VM thread if the appropriate tab is open.
+    window.exploreTabOpen = false;
     var getPlaygroundData = function () {
         vm.getPlaygroundData();
-        window.requestAnimationFrame(getPlaygroundData);
+        if (window.exploreTabOpen) {
+            window.requestAnimationFrame(getPlaygroundData);
+        }
     };
-    getPlaygroundData();
 
     vm.on('playgroundData', function(data) {
         updateThreadExplorer(data.threads);
@@ -101,18 +104,23 @@ window.onload = function() {
     // Handlers to show different explorers.
     document.getElementById('threadexplorer-link').addEventListener('click',
         function () {
+            window.exploreTabOpen = true;
+            getPlaygroundData();
             tabBlockExplorer.style.display = 'none';
             tabRenderExplorer.style.display = 'none';
             tabThreadExplorer.style.display = 'block';
         });
     document.getElementById('blockexplorer-link').addEventListener('click',
         function () {
+            window.exploreTabOpen = true;
+            getPlaygroundData();
             tabBlockExplorer.style.display = 'block';
             tabRenderExplorer.style.display = 'none';
             tabThreadExplorer.style.display = 'none';
         });
     document.getElementById('renderexplorer-link').addEventListener('click',
         function () {
+            window.exploreTabOpen = false;
             tabBlockExplorer.style.display = 'none';
             tabRenderExplorer.style.display = 'block';
             tabThreadExplorer.style.display = 'none';

From 0ae0ea5f22deeadb84fdeb0a746e3879625e4baf Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 1 Jul 2016 16:30:33 -0400
Subject: [PATCH 137/302] Run threads for 60fps

---
 src/engine/runtime.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index afd930246..c51be795d 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -77,7 +77,7 @@ util.inherits(Runtime, EventEmitter);
 /**
  * How rapidly we try to step threads, in ms.
  */
-Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
+Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
 
 
 // -----------------------------------------------------------------------------

From 34c46adb9c6750522e8f5999fa05a8c4be8b4f75 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 13:17:14 -0400
Subject: [PATCH 138/302] Toolbox update

---
 playground/index.html | 548 ++++++++++++++++++++++++------------------
 1 file changed, 310 insertions(+), 238 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index c08854f88..8ba16c2c1 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -33,259 +33,302 @@
     <div id="blocks"></div>
 
     <xml id="toolbox" style="display: none">
-        <category name="Events">
-          <block type="event_whenflagclicked"></block>
-          <block type="event_whenbroadcastreceived">
-            <value name="BROADCAST_OPTION">
-              <shadow type="event_broadcast_menu"></shadow>
-            </value>
-          </block>
-          <block type="event_broadcast">
-            <value name="BROADCAST_OPTION">
-              <shadow type="event_broadcast_menu"></shadow>
-            </value>
-          </block>
-          <block type="event_broadcastandwait">
-            <value name="BROADCAST_OPTION">
-              <shadow type="event_broadcast_menu"></shadow>
-            </value>
-          </block>
-        </category>
-        <category name="Control">
-          <block type="control_wait">
-            <value name="DURATION">
-              <shadow type="math_number">
-                <field name="NUM">1</field>
-              </shadow>
-            </value>
-          </block>
-          <block type="control_repeat">
-            <value name="TIMES">
-              <shadow type="math_number">
-                <field name="NUM">4</field>
-              </shadow>
-            </value>
-          </block>
-          <block type="control_forever"></block>
-          <block type="control_if"></block>
-          <block type="control_if_else"></block>
-          <block type="control_wait_until"></block>
-          <block type="control_repeat_until"></block>
-          <block type="control_stop">
-            <value name="STOP_OPTION">
-              <shadow type="control_stop_menu"></shadow>
-            </value>
-          </block>
-          <block type="control_start_as_clone"></block>
-          <block type="control_create_clone_of">
-            <value name="CLONE_OPTION">
-              <shadow type="control_create_clone_of_menu"></shadow>
-            </value>
-          </block>
-          <block type="control_delete_this_clone"></block>
-        </category>
-        <category name="Operators">
-            <block type="operator_add">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_subtract">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_multiply">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_divide">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_random">
-              <value name="FROM">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="TO">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_lt">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_equals">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_gt">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_and"></block>
-            <block type="operator_or"></block>
-            <block type="operator_not"></block>
-            <block type="operator_join">
-              <value name="STRING1">
-                <shadow type="text">
-                  <field name="TEXT">hello</field>
-                </shadow>
-              </value>
-              <value name="STRING2">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_letter_of">
-              <value name="LETTER">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="STRING">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_length">
-              <value name="STRING">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_mod">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_round">
-              <value name="NUM">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_mathop">
-              <value name="OPERATOR">
-                <shadow type="operator_mathop_menu"></shadow>
-              </value>
-              <value name="NUM">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-        </category>
-        <category name="Looks">
-        <block type="looks_show"></block>
-        <block type="looks_hide"></block>
-        <block type="looks_changeeffectby">
-          <value name="EFFECT">
-            <shadow type="looks_effectmenu"></shadow>
-          </value>
-          <value name="CHANGE">
+    <category name="Events">
+      <block type="event_whenflagclicked"></block>
+      <block type="event_whenkeypressed">
+        <value name="KEY_OPTION">
+          <shadow type="event_keyoptions"></shadow>
+        </value>
+      </block>
+      <block type="event_whenbroadcastreceived">
+        <value name="BROADCAST_OPTION">
+          <shadow type="event_broadcast_menu"></shadow>
+        </value>
+      </block>
+      <block type="event_broadcast">
+        <value name="BROADCAST_OPTION">
+          <shadow type="event_broadcast_menu"></shadow>
+        </value>
+      </block>
+      <block type="event_broadcastandwait">
+        <value name="BROADCAST_OPTION">
+          <shadow type="event_broadcast_menu"></shadow>
+        </value>
+      </block>
+    </category>
+    <category name="Control">
+      <block type="control_wait">
+        <value name="DURATION">
+          <shadow type="math_positive_number">
+            <field name="NUM">1</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="control_repeat">
+        <value name="TIMES">
+          <shadow type="math_whole_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="control_forever"></block>
+      <block type="control_if"></block>
+      <block type="control_if_else"></block>
+      <block type="control_wait_until"></block>
+      <block type="control_repeat_until"></block>
+      <block type="control_stop">
+        <value name="STOP_OPTION">
+          <shadow type="control_stop_menu"></shadow>
+        </value>
+      </block>
+      <block type="control_start_as_clone"></block>
+      <block type="control_create_clone_of">
+        <value name="CLONE_OPTION">
+          <shadow type="control_create_clone_of_menu"></shadow>
+        </value>
+      </block>
+      <block type="control_delete_this_clone"></block>
+    </category>
+    <category name="Operators">
+        <block type="operator_add">
+          <value name="NUM1">
             <shadow type="math_number">
-              <field name="NUM">25</field>
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
             </shadow>
           </value>
         </block>
-        <block type="looks_seteffectto">
-          <value name="EFFECT">
-            <shadow type="looks_effectmenu"></shadow>
-          </value>
-          <value name="VALUE">
+        <block type="operator_subtract">
+          <value name="NUM1">
             <shadow type="math_number">
-              <field name="NUM">0</field>
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
             </shadow>
           </value>
         </block>
-        <block type="looks_cleargraphiceffects"></block>
-        <block type="looks_changesizeby">
-          <value name="CHANGE">
+        <block type="operator_multiply">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_divide">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_random">
+          <value name="FROM">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="TO">
             <shadow type="math_number">
               <field name="NUM">10</field>
             </shadow>
           </value>
         </block>
-        <block type="looks_setsizeto">
-          <value name="SIZE">
-            <shadow type="math_number">
-              <field name="NUM">100</field>
+        <block type="operator_lt">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
             </shadow>
           </value>
         </block>
-        <block type="looks_size"></block>
-      </category>
-      <category name="Motion">
+        <block type="operator_equals">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_gt">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_and"></block>
+        <block type="operator_or"></block>
+        <block type="operator_not"></block>
+        <block type="operator_join">
+          <value name="STRING1">
+            <shadow type="text">
+              <field name="TEXT">hello</field>
+            </shadow>
+          </value>
+          <value name="STRING2">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_letter_of">
+          <value name="LETTER">
+            <shadow type="math_whole_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="STRING">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_length">
+          <value name="STRING">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_mod">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_round">
+          <value name="NUM">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_mathop">
+          <value name="OPERATOR">
+            <shadow type="operator_mathop_menu"></shadow>
+          </value>
+          <value name="NUM">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+    </category>
+    <category name="Looks">
+      <block type="looks_sayforsecs">
+        <value name="MESSAGE">
+          <shadow type="text">
+            <field name="TEXT">Hello!</field>
+          </shadow>
+        </value>
+        <value name="SECS">
+          <shadow type="math_number">
+            <field name="NUM">2</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_say">
+        <value name="MESSAGE">
+          <shadow type="text">
+            <field name="TEXT">Hello!</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_thinkforsecs">
+        <value name="MESSAGE">
+          <shadow type="text">
+            <field name="TEXT">Hmm...</field>
+          </shadow>
+        </value>
+        <value name="SECS">
+          <shadow type="math_number">
+            <field name="NUM">2</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_think">
+        <value name="MESSAGE">
+          <shadow type="text">
+            <field name="TEXT">Hmm...</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_show"></block>
+      <block type="looks_hide"></block>
+      <block type="looks_changeeffectby">
+        <value name="EFFECT">
+          <shadow type="looks_effectmenu"></shadow>
+        </value>
+        <value name="CHANGE">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_seteffectto">
+        <value name="EFFECT">
+          <shadow type="looks_effectmenu"></shadow>
+        </value>
+        <value name="VALUE">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_cleargraphiceffects"></block>
+      <block type="looks_changesizeby">
+        <value name="CHANGE">
+          <shadow type="math_number">
+            <field name="NUM">10</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_setsizeto">
+        <value name="SIZE">
+          <shadow type="math_number">
+            <field name="NUM">100</field>
+          </shadow>
+        </value>
+      </block>
+      <block type="looks_size"></block>
+    </category>
+    <category name="Motion">
       <block type="motion_movesteps">
         <value name="STEPS">
           <shadow type="math_number">
@@ -332,6 +375,29 @@
           </shadow>
         </value>
       </block>
+      <block type="motion_goto">
+        <value name="TO">
+          <shadow type="motion_goto_menu">
+          </shadow>
+        </value>
+      </block>
+      <block type="motion_glidesecstoxy">
+        <value name="SECS">
+          <shadow type="math_number">
+            <field name="NUM">1</field>
+          </shadow>
+        </value>
+        <value name="X">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+        <value name="Y">
+          <shadow type="math_number">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </block>
       <block type="motion_changexby">
         <value name="DX">
           <shadow type="math_number">
@@ -360,11 +426,17 @@
           </shadow>
         </value>
       </block>
+      <block type="motion_ifonedgebounce"></block>
+      <block type="motion_setrotationstyle">
+        <value name="STYLE">
+          <shadow type="motion_setrotationstyle_menu"></shadow>
+        </value>
+      </block>
       <block type="motion_xposition"></block>
       <block type="motion_yposition"></block>
       <block type="motion_direction"></block>
     </category>
-    </xml>
+  </xml>
 
     <!-- Syntax highlighter -->
     <script src="../node_modules/highlightjs/highlight.pack.min.js"></script>

From 460760bd06cd5893e1a5f710a555e23316bf9e3e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 13:47:32 -0400
Subject: [PATCH 139/302] Stub "say" and "think" blocks with `console.log`

---
 src/blocks/scratch3_looks.js | 34 ++++++++++++++++++++++++++++++++++
 src/sprites/clone.js         | 14 ++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index b2bad1ef7..33e1ef3bf 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -12,6 +12,10 @@ function Scratch3LooksBlocks(runtime) {
  */
 Scratch3LooksBlocks.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_effectmenu': this.effectMenu,
@@ -24,6 +28,36 @@ Scratch3LooksBlocks.prototype.getPrimitives = function() {
     };
 };
 
+Scratch3LooksBlocks.prototype.say = function (args, util) {
+    util.target.setSay('say', args.MESSAGE);
+};
+
+Scratch3LooksBlocks.prototype.sayforsecs = function (args, util) {
+    util.target.setSay('say', args.MESSAGE);
+    return new Promise(function(resolve) {
+        setTimeout(function() {
+            // Clear say bubble and proceed.
+            util.target.setSay();
+            resolve();
+        }, 1000 * args.SECS);
+    });
+};
+
+Scratch3LooksBlocks.prototype.think = function (args, util) {
+    util.target.setSay('think', args.MESSAGE);
+};
+
+Scratch3LooksBlocks.prototype.thinkforsecs = function (args, util) {
+    util.target.setSay('think', args.MESSAGE);
+    return new Promise(function(resolve) {
+        setTimeout(function() {
+            // Clear say bubble and proceed.
+            util.target.setSay();
+            resolve();
+        }, 1000 * args.SECS);
+    });
+};
+
 Scratch3LooksBlocks.prototype.show = function (args, util) {
     util.target.setVisible(true);
 };
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index a1c8b5c8d..1ffca405b 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -53,6 +53,20 @@ Clone.prototype.setDirection = function (direction) {
     });
 };
 
+/**
+ * Set a say bubble on this clone.
+ * @param {?string} type Type of say bubble: "say", "think", or null.
+ * @param {?string} message Message to put in say bubble.
+ */
+Clone.prototype.setSay = function (type, message) {
+    // @todo: Render to stage.
+    if (!type || !message) {
+        console.log('Clearing say bubble');
+        return;
+    }
+    console.log('Setting say bubble:', type, message);
+};
+
 Clone.prototype.setVisible = function (visible) {
     this.visible = visible;
     // @todo: Until visibility is implemented in the renderer, use a ghost.

From 798368b6c5010426e37f29c4c4002df9c6acccce Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 13:57:58 -0400
Subject: [PATCH 140/302] Add documentation in src/sprites/clone.js

---
 src/sprites/clone.js | 57 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 1ffca405b..ce64fda52 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -9,6 +9,9 @@ function Clone(spriteBlocks) {
 }
 util.inherits(Clone, Target);
 
+/**
+ * Create a clone's drawable with the renderer.
+ */
 Clone.prototype.initDrawable = function () {
     var createPromise = self.renderer.createDrawable();
     var instance = this;
@@ -17,17 +20,41 @@ Clone.prototype.initDrawable = function () {
     });
 };
 
-// Clone-level properties
+// Clone-level properties.
+/**
+ * Scratch X coordinate. Currently should range from -240 to 240.
+ * @type {!number}
+ */
 Clone.prototype.x = 0;
 
+/**
+ * Scratch Y coordinate. Currently should range from -180 to 180.
+ * @type {!number}
+ */
 Clone.prototype.y = 0;
 
+/**
+ * Scratch direction. Currently should range from -179 to 180.
+ * @type {!number}
+ */
 Clone.prototype.direction = 90;
 
+/**
+ * Whether the clone is currently visible.
+ * @type {!boolean}
+ */
 Clone.prototype.visible = true;
 
+/**
+ * Size of clone as a percent of costume size. Ranges from 5% to 535%.
+ * @type {!number}
+ */
 Clone.prototype.size = 100;
 
+/**
+ * Map of current graphic effect values.
+ * @type {!Object.<string, number>}
+ */
 Clone.prototype.effects = {
     'color': 0,
     'fisheye': 0,
@@ -37,7 +64,13 @@ Clone.prototype.effects = {
     'brightness': 0,
     'ghost': 0
 };
+// End clone-level properties.
 
+/**
+ * Set the X and Y coordinates of a clone.
+ * @param {!number} x New X coordinate of clone, in Scratch coordinates.
+ * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
+ */
 Clone.prototype.setXY = function (x, y) {
     this.x = x;
     this.y = y;
@@ -46,7 +79,12 @@ Clone.prototype.setXY = function (x, y) {
     });
 };
 
+/**
+ * Set the direction of a clone.
+ * @param {!number} direction New direction of clone.
+ */
 Clone.prototype.setDirection = function (direction) {
+    // Keep direction between -179 and +180.
     this.direction = MathUtil.wrapClamp(direction, -179, 180);
     self.renderer.updateDrawableProperties(this.drawableID, {
         direction: this.direction
@@ -67,6 +105,10 @@ Clone.prototype.setSay = function (type, message) {
     console.log('Setting say bubble:', type, message);
 };
 
+/**
+ * Set visibility of the clone; i.e., whether it's shown or hidden.
+ * @param {!boolean} visible True if the sprite should be shown.
+ */
 Clone.prototype.setVisible = function (visible) {
     this.visible = visible;
     // @todo: Until visibility is implemented in the renderer, use a ghost.
@@ -77,13 +119,23 @@ Clone.prototype.setVisible = function (visible) {
     }
 };
 
+/**
+ * Set size of the clone, as a percentage of the costume size.
+ * @param {!number} size Size of clone, from 5 to 535.
+ */
 Clone.prototype.setSize = function (size) {
+    // Keep size between 5% and 535%.
     this.size = MathUtil.clamp(size, 5, 535);
     self.renderer.updateDrawableProperties(this.drawableID, {
         scale: this.size
     });
 };
 
+/**
+ * Set a particular graphic effect on this clone.
+ * @param {!string} effectName Name of effect (see `Clone.prototype.effects`).
+ * @param {!number} value Numerical magnitude of effect.
+ */
 Clone.prototype.setEffect = function (effectName, value) {
     this.effects[effectName] = value;
     var props = {};
@@ -91,6 +143,9 @@ Clone.prototype.setEffect = function (effectName, value) {
     self.renderer.updateDrawableProperties(this.drawableID, props);
 };
 
+/**
+ * Clear all graphic effects on this clone.
+ */
 Clone.prototype.clearEffects = function () {
     for (var effectName in this.effects) {
         this.effects[effectName] = 0;

From 2e01caa8a6e5be07ea2354c5ea201b360f98cc28 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 14:04:36 -0400
Subject: [PATCH 141/302] Add documentation for math-util functions.

---
 src/util/math-util.js | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/util/math-util.js b/src/util/math-util.js
index 2dfd62a6e..b53698ef1 100644
--- a/src/util/math-util.js
+++ b/src/util/math-util.js
@@ -1,17 +1,45 @@
 function MathUtil () {}
 
+/**
+ * Convert a value from degrees to radians.
+ * @param {!number} deg Value in degrees.
+ * @return {!number} Equivalent value in radians.
+ */
 MathUtil.degToRad = function (deg) {
     return (Math.PI * (90 - deg)) / 180;
 };
 
+/**
+ * Convert a value from radians to degrees.
+ * @param {!number} rad Value in radians.
+ * @return {!number} Equivalent value in degrees.
+ */
 MathUtil.radToDeg = function (rad) {
     return rad * 180 / Math.PI;
 };
 
+/**
+ * Clamp a number between two limits.
+ * If n < min, return min. If n > max, return max. Else, return n.
+ * @param {!number} n Number to clamp.
+ * @param {!number} min Minimum limit.
+ * @param {!number} max Maximum limit.
+ * @return {!number} Value of n clamped to min and max.
+ */
 MathUtil.clamp = function (n, min, max) {
     return Math.min(Math.max(n, min), max);
 };
 
+/**
+ * Keep a number between two limits, wrapping "extra" into the range.
+ * e.g., wrapClamp(7, 1, 5) == 2
+ * wrapClamp(0, 1, 5) == 5
+ * wrapClamp(-11, -10, 6) == 6, etc.
+ * @param {!number} n Number to wrap.
+ * @param {!number} min Minimum limit.
+ * @param {!number} max Maximum limit.
+ * @return {!number} Value of n wrapped between min and max.
+ */
 MathUtil.wrapClamp = function (n, min, max) {
     var range = (max - min) + 1;
     return n - Math.floor((n - min) / range) * range;

From 7c24bdc612ffca680b2595104d28a75665227a10 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 14:09:06 -0400
Subject: [PATCH 142/302] More documentation in sprite, clone

---
 src/sprites/clone.js  |  5 +++++
 src/sprites/sprite.js | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index ce64fda52..169d72cc7 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -2,6 +2,11 @@ var util = require('util');
 var MathUtil = require('../util/math-util');
 var Target = require('../engine/target');
 
+/**
+ * Clone (instance) of a sprite. 
+ * @param {!Blocks} spriteBlocks Reference to the sprite's blocks.
+ * @constructor
+ */
 function Clone(spriteBlocks) {
     Target.call(this, spriteBlocks);
     this.drawableID = null;
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
index 1ec25b3ba..b4abdbbb5 100644
--- a/src/sprites/sprite.js
+++ b/src/sprites/sprite.js
@@ -1,8 +1,13 @@
 var Clone = require('./clone');
 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.
+ * @constructor
+ */
 function Sprite (blocks) {
-    // Sprites have: shared blocks, shared costumes, shared variables, etc.
     if (!blocks) {
         // Shared set of blocks for all clones.
         blocks = new Blocks();
@@ -11,6 +16,10 @@ function Sprite (blocks) {
     this.clones = [];
 }
 
+/**
+ * Create a clone of this sprite.
+ * @returns {!Clone} Newly created clone.
+ */
 Sprite.prototype.createClone = function () {
     var newClone = new Clone(this.blocks);
     this.clones.push(newClone);

From 30dc285a37b78a2a1a27d92ce3ddbb79387d1b12 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 14:13:03 -0400
Subject: [PATCH 143/302] Add implementations for math_positive_number and
 math_whole_number

---
 src/blocks/scratch3_operators.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index c72adf29c..d3a7f1921 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -15,6 +15,8 @@ function Scratch3OperatorsBlocks(runtime) {
 Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
     return {
         'math_number': this.number,
+        'math_positive_number': this.number,
+        'math_whole_number': this.number,
         'text': this.text,
         'operator_add': this.add,
         'operator_subtract': this.subtract,

From d4353458ff2f44d2423a2483466f147b7b35dc0a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 6 Jul 2016 14:16:44 -0400
Subject: [PATCH 144/302] Don't quit loop when a thread is yielding

---
 src/engine/sequencer.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 342ad8857..175fc68d1 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -62,7 +62,6 @@ Sequencer.prototype.stepThreads = function (threads) {
                        activeThread.status === Thread.STATUS_YIELD_FRAME) {
                 // Yielding thread: do nothing for this step.
                 numYieldingThreads++;
-                continue;
             }
             if (activeThread.stack.length === 0 &&
                 activeThread.status === Thread.STATUS_DONE) {

From 9c6dca8131ec5fe1d40a93ccd75e07277cd22813 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 7 Jul 2016 19:42:38 -0400
Subject: [PATCH 145/302] Add visual reporting of top-level reporter execution

---
 playground/playground.js |  3 +++
 src/engine/execute.js    |  8 ++++++++
 src/engine/runtime.js    | 15 +++++++++++++++
 src/index.js             |  6 ++++++
 4 files changed, 32 insertions(+)

diff --git a/playground/playground.js b/playground/playground.js
index 800894bb9..47631b201 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -78,6 +78,9 @@ window.onload = function() {
     vm.on('BLOCK_GLOW_OFF', function(data) {
         workspace.glowBlock(data.id, false);
     });
+    vm.on('VISUAL_REPORT', function(data) {
+        workspace.reportValue(data.id, data.value);
+    });
 
     // Run threads
     vm.start();
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 529990ca0..db111637d 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -96,6 +96,10 @@ var execute = function (sequencer, thread) {
         primitiveReportedValue.then(function(resolvedValue) {
             // Promise resolved: the primitive reported a value.
             thread.pushReportedValue(resolvedValue);
+            // Report the value visually if necessary.
+            if (thread.peekStack() === thread.topBlock) {
+                runtime.visualReport(thread.peekStack(), resolvedValue);
+            }
             thread.setStatus(Thread.STATUS_RUNNING);
             sequencer.proceedThread(thread);
         }, function(rejectionReason) {
@@ -107,6 +111,10 @@ var execute = function (sequencer, thread) {
         });
     } else if (thread.status === Thread.STATUS_RUNNING) {
         thread.pushReportedValue(primitiveReportedValue);
+        // Report the value visually if necessary.
+        if (thread.peekStack() === thread.topBlock) {
+            runtime.visualReport(thread.peekStack(), primitiveReportedValue);
+        }
     }
 };
 
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index c51be795d..f92a91db7 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -69,6 +69,12 @@ Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
  */
 Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
 
+/**
+ * Event name for visual value report.
+ * @const {string}
+ */
+Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
+
 /**
  * Inherit from EventEmitter
  */
@@ -218,6 +224,15 @@ Runtime.prototype.glowBlock = function (blockId, isGlowing) {
     }
 };
 
+/**
+ * Emit value for reporter to show in the blocks.
+ * @param {string} blockId ID for the block.
+ * @param {string} value Value to show associated with the block.
+ */
+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.
diff --git a/src/index.js b/src/index.js
index 15b218071..965c8cd9a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -53,6 +53,9 @@ function VirtualMachine () {
     instance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
         instance.emit(Runtime.BLOCK_GLOW_OFF, {id: id});
     });
+    instance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
+        instance.emit(Runtime.VISUAL_REPORT, {id: id, value: value});
+    });
 }
 
 /**
@@ -158,6 +161,9 @@ if (ENV_WORKER) {
     self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
         self.postMessage({method: Runtime.BLOCK_GLOW_OFF, id: id});
     });
+    self.vmInstance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
+        self.postMessage({method: Runtime.VISUAL_REPORT, id: id, value: value});
+    });
 }
 
 /**

From 1f19d7a20932d64a08fc8859cc222d022d04b8af Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 7 Jul 2016 19:44:26 -0400
Subject: [PATCH 146/302] Only visually report when an actual value was
 returned

---
 src/engine/execute.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index db111637d..8d750eee3 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -97,7 +97,8 @@ var execute = function (sequencer, thread) {
             // Promise resolved: the primitive reported a value.
             thread.pushReportedValue(resolvedValue);
             // Report the value visually if necessary.
-            if (thread.peekStack() === thread.topBlock) {
+            if (typeof resolvedValue !== 'undefined' &&
+                thread.peekStack() === thread.topBlock) {
                 runtime.visualReport(thread.peekStack(), resolvedValue);
             }
             thread.setStatus(Thread.STATUS_RUNNING);
@@ -112,7 +113,8 @@ var execute = function (sequencer, thread) {
     } else if (thread.status === Thread.STATUS_RUNNING) {
         thread.pushReportedValue(primitiveReportedValue);
         // Report the value visually if necessary.
-        if (thread.peekStack() === thread.topBlock) {
+        if (typeof primitiveReportedValue !== 'undefined' &&
+            thread.peekStack() === thread.topBlock) {
             runtime.visualReport(thread.peekStack(), primitiveReportedValue);
         }
     }

From c650de852081d7ebbcb5597e0885cfb775fb345c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 13 Jul 2016 16:52:46 -0400
Subject: [PATCH 147/302] Real version of `Clone.prototype.setVisible`

---
 src/sprites/clone.js | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 169d72cc7..6a0f22fee 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -3,7 +3,7 @@ var MathUtil = require('../util/math-util');
 var Target = require('../engine/target');
 
 /**
- * Clone (instance) of a sprite. 
+ * Clone (instance) of a sprite.
  * @param {!Blocks} spriteBlocks Reference to the sprite's blocks.
  * @constructor
  */
@@ -116,12 +116,9 @@ Clone.prototype.setSay = function (type, message) {
  */
 Clone.prototype.setVisible = function (visible) {
     this.visible = visible;
-    // @todo: Until visibility is implemented in the renderer, use a ghost.
-    if (this.visible) {
-        this.setEffect('ghost', 0);
-    } else {
-        this.setEffect('ghost', 100);
-    }
+    self.renderer.updateDrawableProperties(this.drawableID, {
+        visible: this.visible
+    });
 };
 
 /**

From 0465ee2076cbbd494d83dc21f23c8e8b50b8811e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 14 Jul 2016 13:22:11 -0400
Subject: [PATCH 148/302] Add --host flag and index redirect for playground

---
 Makefile   | 2 +-
 index.html | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 index.html

diff --git a/Makefile b/Makefile
index 835c16f79..e2a04c2b6 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ watch:
 	$(WEBPACK) --watch
 
 serve:
-	$(WEBPACK_DEV_SERVER) --content-base ./
+	$(WEBPACK_DEV_SERVER) --host 0.0.0.0 --content-base ./
 
 # ------------------------------------------------------------------------------
 
diff --git a/index.html b/index.html
new file mode 100644
index 000000000..42edce430
--- /dev/null
+++ b/index.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta http-equiv="refresh" content="0; URL='/playground'" />
+	<title>Redirect to playground</title>
+</head>
+</html>

From 1098178fc74697de7c663b8e91ff0eb7fc4feac3 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 14 Jul 2016 13:24:39 -0400
Subject: [PATCH 149/302] Add Blockly messages to playground

---
 playground/index.html | 1 +
 1 file changed, 1 insertion(+)

diff --git a/playground/index.html b/playground/index.html
index 8ba16c2c1..28781ebc7 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -445,6 +445,7 @@
     <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
     <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
+    <script src="../node_modules/scratch-blocks/msg/messages.js"></script>
     <!-- Renderer -->
     <script src="../node_modules/scratch-render-webgl/build/render-webgl.js"></script>
     <!-- VM Worker -->

From 30735bc06e8722178ddfe12acb29369d50b875ba Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 14 Jul 2016 13:25:56 -0400
Subject: [PATCH 150/302] Update toolbox XML July 14

---
 playground/index.html | 1094 ++++++++++++++++++++++++++---------------
 1 file changed, 691 insertions(+), 403 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 28781ebc7..e38c10793 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -33,409 +33,697 @@
     <div id="blocks"></div>
 
     <xml id="toolbox" style="display: none">
-    <category name="Events">
-      <block type="event_whenflagclicked"></block>
-      <block type="event_whenkeypressed">
-        <value name="KEY_OPTION">
-          <shadow type="event_keyoptions"></shadow>
-        </value>
-      </block>
-      <block type="event_whenbroadcastreceived">
-        <value name="BROADCAST_OPTION">
-          <shadow type="event_broadcast_menu"></shadow>
-        </value>
-      </block>
-      <block type="event_broadcast">
-        <value name="BROADCAST_OPTION">
-          <shadow type="event_broadcast_menu"></shadow>
-        </value>
-      </block>
-      <block type="event_broadcastandwait">
-        <value name="BROADCAST_OPTION">
-          <shadow type="event_broadcast_menu"></shadow>
-        </value>
-      </block>
-    </category>
-    <category name="Control">
-      <block type="control_wait">
-        <value name="DURATION">
-          <shadow type="math_positive_number">
-            <field name="NUM">1</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="control_repeat">
-        <value name="TIMES">
-          <shadow type="math_whole_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="control_forever"></block>
-      <block type="control_if"></block>
-      <block type="control_if_else"></block>
-      <block type="control_wait_until"></block>
-      <block type="control_repeat_until"></block>
-      <block type="control_stop">
-        <value name="STOP_OPTION">
-          <shadow type="control_stop_menu"></shadow>
-        </value>
-      </block>
-      <block type="control_start_as_clone"></block>
-      <block type="control_create_clone_of">
-        <value name="CLONE_OPTION">
-          <shadow type="control_create_clone_of_menu"></shadow>
-        </value>
-      </block>
-      <block type="control_delete_this_clone"></block>
-    </category>
-    <category name="Operators">
-        <block type="operator_add">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_subtract">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_multiply">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_divide">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_random">
-          <value name="FROM">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="TO">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_lt">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_equals">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_gt">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_and"></block>
-        <block type="operator_or"></block>
-        <block type="operator_not"></block>
-        <block type="operator_join">
-          <value name="STRING1">
-            <shadow type="text">
-              <field name="TEXT">hello</field>
-            </shadow>
-          </value>
-          <value name="STRING2">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_letter_of">
-          <value name="LETTER">
-            <shadow type="math_whole_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="STRING">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_length">
-          <value name="STRING">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_mod">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_round">
-          <value name="NUM">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_mathop">
-          <value name="OPERATOR">
-            <shadow type="operator_mathop_menu"></shadow>
-          </value>
-          <value name="NUM">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-    </category>
-    <category name="Looks">
-      <block type="looks_sayforsecs">
-        <value name="MESSAGE">
-          <shadow type="text">
-            <field name="TEXT">Hello!</field>
-          </shadow>
-        </value>
-        <value name="SECS">
-          <shadow type="math_number">
-            <field name="NUM">2</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_say">
-        <value name="MESSAGE">
-          <shadow type="text">
-            <field name="TEXT">Hello!</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_thinkforsecs">
-        <value name="MESSAGE">
-          <shadow type="text">
-            <field name="TEXT">Hmm...</field>
-          </shadow>
-        </value>
-        <value name="SECS">
-          <shadow type="math_number">
-            <field name="NUM">2</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_think">
-        <value name="MESSAGE">
-          <shadow type="text">
-            <field name="TEXT">Hmm...</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_show"></block>
-      <block type="looks_hide"></block>
-      <block type="looks_changeeffectby">
-        <value name="EFFECT">
-          <shadow type="looks_effectmenu"></shadow>
-        </value>
-        <value name="CHANGE">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_seteffectto">
-        <value name="EFFECT">
-          <shadow type="looks_effectmenu"></shadow>
-        </value>
-        <value name="VALUE">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_cleargraphiceffects"></block>
-      <block type="looks_changesizeby">
-        <value name="CHANGE">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_setsizeto">
-        <value name="SIZE">
-          <shadow type="math_number">
-            <field name="NUM">100</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="looks_size"></block>
-    </category>
-    <category name="Motion">
-      <block type="motion_movesteps">
-        <value name="STEPS">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_turnright">
-        <value name="DEGREES">
-          <shadow type="math_number">
-            <field name="NUM">15</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_turnleft">
-        <value name="DEGREES">
-          <shadow type="math_number">
-            <field name="NUM">15</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_pointindirection">
-        <value name="DIRECTION">
-          <shadow type="math_number">
-            <field name="NUM">90</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_pointtowards">
-        <value name="TOWARDS">
-          <shadow type="motion_pointtowards_menu">
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_gotoxy">
-        <value name="X">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-        <value name="Y">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_goto">
-        <value name="TO">
-          <shadow type="motion_goto_menu">
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_glidesecstoxy">
-        <value name="SECS">
-          <shadow type="math_number">
-            <field name="NUM">1</field>
-          </shadow>
-        </value>
-        <value name="X">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-        <value name="Y">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_changexby">
-        <value name="DX">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_setx">
-        <value name="X">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_changeyby">
-        <value name="DY">
-          <shadow type="math_number">
-            <field name="NUM">10</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_sety">
-        <value name="Y">
-          <shadow type="math_number">
-            <field name="NUM">0</field>
-          </shadow>
-        </value>
-      </block>
-      <block type="motion_ifonedgebounce"></block>
-      <block type="motion_setrotationstyle">
-        <value name="STYLE">
-          <shadow type="motion_setrotationstyle_menu"></shadow>
-        </value>
-      </block>
-      <block type="motion_xposition"></block>
-      <block type="motion_yposition"></block>
-      <block type="motion_direction"></block>
-    </category>
+        <category name="Motion" colour="#4C97FF">
+            <block type="motion_movesteps">
+              <value name="STEPS">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_turnright">
+              <value name="DEGREES">
+                <shadow type="math_number">
+                  <field name="NUM">15</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_turnleft">
+              <value name="DEGREES">
+                <shadow type="math_number">
+                  <field name="NUM">15</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_pointindirection">
+              <value name="DIRECTION">
+                <shadow type="math_angle">
+                  <field name="NUM">90</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_pointtowards">
+              <value name="TOWARDS">
+                <shadow type="motion_pointtowards_menu">
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_gotoxy">
+              <value name="X">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+              <value name="Y">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_goto">
+              <value name="TO">
+                <shadow type="motion_goto_menu">
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_glidesecstoxy">
+              <value name="SECS">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="X">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+              <value name="Y">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_changexby">
+              <value name="DX">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_setx">
+              <value name="X">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_changeyby">
+              <value name="DY">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_sety">
+              <value name="Y">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="motion_ifonedgebounce"></block>
+            <block type="motion_setrotationstyle">
+              <value name="STYLE">
+                <shadow type="motion_setrotationstyle_menu"></shadow>
+              </value>
+            </block>
+            <block type="motion_xposition"></block>
+            <block type="motion_yposition"></block>
+            <block type="motion_direction"></block>
+          </category>
+          <category name="Looks" colour="#9966FF">
+            <block type="looks_sayforsecs">
+              <value name="MESSAGE">
+                <shadow type="text">
+                  <field name="TEXT">Hello!</field>
+                </shadow>
+              </value>
+              <value name="SECS">
+                <shadow type="math_number">
+                  <field name="NUM">2</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_say">
+              <value name="MESSAGE">
+                <shadow type="text">
+                  <field name="TEXT">Hello!</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_thinkforsecs">
+              <value name="MESSAGE">
+                <shadow type="text">
+                  <field name="TEXT">Hmm...</field>
+                </shadow>
+              </value>
+              <value name="SECS">
+                <shadow type="math_number">
+                  <field name="NUM">2</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_think">
+              <value name="MESSAGE">
+                <shadow type="text">
+                  <field name="TEXT">Hmm...</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_show"></block>
+            <block type="looks_hide"></block>
+            <block type="looks_switchcostumeto">
+              <value name="COSTUME">
+                <shadow type="looks_costume"></shadow>
+              </value>
+    		    </block>
+            <block type="looks_nextcostume"></block>
+            <block type="looks_nextbackdrop"></block>
+            <block type="looks_switchbackdropto">
+              <value name="COSTUME">
+                <shadow type="looks_backdrops"></shadow>
+              </value>
+    		    </block>
+            <block type="looks_switchbackdroptoandwait">
+              <value name="COSTUME">
+                <shadow type="looks_backdrops"></shadow>
+              </value>
+    		    </block>
+            <block type="looks_changeeffectby">
+              <value name="EFFECT">
+                <shadow type="looks_effectmenu"></shadow>
+              </value>
+              <value name="CHANGE">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_seteffectto">
+              <value name="EFFECT">
+                <shadow type="looks_effectmenu"></shadow>
+              </value>
+              <value name="VALUE">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_cleargraphiceffects"></block>
+            <block type="looks_changesizeby">
+              <value name="CHANGE">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_setsizeto">
+              <value name="SIZE">
+                <shadow type="math_number">
+                  <field name="NUM">100</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_gotofront"></block>
+            <block type="looks_gobacklayers">
+              <value name="NUM">
+                <shadow type="math_integer">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="looks_costumeorder"></block>
+            <block type="looks_backdroporder"></block>
+            <block type="looks_backdropname"></block>
+            <block type="looks_size"></block>
+          </category>
+          <category name="Sound" colour="#D65CD6">
+            <block type="sound_play">
+              <value name="SOUND_MENU">
+                <shadow type="sound_sounds_option"></shadow>
+              </value>
+            </block>
+            <block type="sound_playuntildone">
+              <value name="SOUND_MENU">
+                <shadow type="sound_sounds_option"></shadow>
+              </value>
+            </block>
+            <block type="sound_stopallsounds"></block>
+            <block type="sound_playdrumforbeats">
+              <value name="DRUMTYPE">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="BEATS">
+                <shadow type="math_number">
+                  <field name="NUM">0.25</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_restforbeats">
+              <value name="BEATS">
+                <shadow type="math_number">
+                  <field name="NUM">0.25</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_playnoteforbeats">
+              <value name="NOTE">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="BEATS">
+                <shadow type="math_number">
+                  <field name="NUM">0.5</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_setinstrumentto">
+              <value name="INSTRUMENT">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_changevolumeby">
+              <value name="VOLUME">
+                <shadow type="math_number">
+                  <field name="NUM">-10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_setvolumeto">
+              <value name="VOLUME">
+                <shadow type="math_number">
+                  <field name="NUM">100</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_volume"></block>
+            <block type="sound_changetempoby">
+              <value name="TEMPO">
+                <shadow type="math_number">
+                  <field name="NUM">20</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_settempotobpm">
+              <value name="TEMPO">
+                <shadow type="math_number">
+                  <field name="NUM">60</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="sound_tempo"></block>
+          </category>
+          <category name="Pen" colour="#00B295">
+            <block type="pen_clear"></block>
+            <block type="pen_stamp"></block>
+            <block type="pen_pendown"></block>
+            <block type="pen_penup"></block>
+            <block type="pen_setpencolortocolor">
+              <value name="COLOR">
+                <shadow type="colour_picker">
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_changepencolorby">
+              <value name="COLOR">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_setpencolortonum">
+              <value name="COLOR">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_changepenshadeby">
+              <value name="SHADE">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_setpenshadeto">
+              <value name="SHADE">
+                <shadow type="math_number">
+                  <field name="NUM">50</field>
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_changepensizeby">
+              <value name="SIZE">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+    		    </block>
+            <block type="pen_setpensizeto">
+              <value name="SIZE">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+    		    </block>
+          </category>
+          <category name="Data" colour="#FF8C1A">
+            <block type="data_variable">
+              <value name="VARIABLE">
+                <shadow type="data_variablemenu"></shadow>
+              </value>
+            </block>
+            <block type="data_setvariableto">
+              <value name="VARIABLE">
+               <shadow type="data_variablemenu"></shadow>
+              </value>
+              <value name="VALUE">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="data_changevariableby">
+              <value name="VARIABLE">
+               <shadow type="data_variablemenu"></shadow>
+              </value>
+              <value name="VALUE">
+                <shadow type="math_number">
+                  <field name="NUM">0</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="data_showvariable">
+              <value name="VARIABLE">
+               <shadow type="data_variablemenu"></shadow>
+              </value>
+            </block>
+            <block type="data_hidevariable">
+              <value name="VARIABLE">
+               <shadow type="data_variablemenu"></shadow>
+              </value>
+            </block>
+          </category>
+          <category name="Events" colour="#FFD500">
+            <block type="event_whenflagclicked"></block>
+            <block type="event_whenkeypressed">
+              <value name="KEY_OPTION">
+                <shadow type="event_keyoptions"></shadow>
+              </value>
+            </block>
+            <block type="event_whenthisspriteclicked"></block>
+            <block type="event_whenbackdropswitchesto">
+              <value name="BACKDROP">
+                <shadow type="event_backdrops"></shadow>
+              </value>
+            </block>
+            <block type="event_whengreaterthan">
+              <value name="WHENGREATERTHANMENU">
+                <shadow type="event_whengreaterthanmenu"></shadow>
+              </value>
+              <value name="VALUE">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="event_whenbroadcastreceived">
+              <value name="BROADCAST_OPTION">
+                <shadow type="event_broadcast_menu"></shadow>
+              </value>
+            </block>
+            <block type="event_broadcast">
+              <value name="BROADCAST_OPTION">
+                <shadow type="event_broadcast_menu"></shadow>
+              </value>
+            </block>
+            <block type="event_broadcastandwait">
+              <value name="BROADCAST_OPTION">
+                <shadow type="event_broadcast_menu"></shadow>
+              </value>
+            </block>
+          </category>
+          <category name="Control" colour="#FFAB19">
+            <block type="control_wait">
+              <value name="DURATION">
+                <shadow type="math_positive_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="control_repeat">
+              <value name="TIMES">
+                <shadow type="math_whole_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="control_forever"></block>
+            <block type="control_if"></block>
+            <block type="control_if_else"></block>
+            <block type="control_wait_until"></block>
+            <block type="control_repeat_until"></block>
+            <block type="control_stop">
+              <value name="STOP_OPTION">
+                <shadow type="control_stop_menu"></shadow>
+              </value>
+            </block>
+            <block type="control_start_as_clone"></block>
+            <block type="control_create_clone_of">
+              <value name="CLONE_OPTION">
+                <shadow type="control_create_clone_of_menu"></shadow>
+              </value>
+            </block>
+            <block type="control_delete_this_clone"></block>
+          </category>
+          <category name="Sensing" colour="#4CBFE6">
+            <block type="sensing_touchingobject">
+              <value name="TOUCHINGOBJECTMENU">
+                <shadow type="sensing_touchingobjectmenu"></shadow>
+              </value>
+            </block>
+            <block type="sensing_touchingcolor">
+              <value name="COLOR">
+                <shadow type="colour_picker"></shadow>
+              </value>
+            </block>
+            <block type="sensing_coloristouchingcolor">
+              <value name="COLOR">
+                <shadow type="colour_picker"></shadow>
+              </value>
+              <value name="COLOR2">
+                <shadow type="colour_picker"></shadow>
+              </value>
+            </block>
+            <block type="sensing_distanceto">
+              <value name="DISTANCETOMENU">
+                <shadow type="sensing_distancetomenu"></shadow>
+              </value>
+            </block>
+            <block type="sensing_askandwait">
+              <value name="QUESTION">
+                <shadow type="text">
+                  <field name="TEXT">What's your name?</field>
+                </shadow>
+              </value>
+            </block>
+      		<block type="sensing_answer"></block>
+    	    <block type="sensing_keypressed">
+              <value name="KEY_OPTIONS">
+                <shadow type="sensing_keyoptions"></shadow>
+              </value>
+          </block>
+      		<block type="sensing_mousedown"></block>
+      		<block type="sensing_mousex"></block>
+      		<block type="sensing_mousey"></block>
+      		<block type="sensing_loudness"></block>
+    	    <block type="sensing_videoon">
+              <value name="VIDEOONMENU1">
+                <shadow type="sensing_videoonmenuone"></shadow>
+              </value>
+              <value name="VIDEOONMENU2">
+                <shadow type="sensing_videoonmenutwo"></shadow>
+              </value>
+          </block>
+    	    <block type="sensing_videotoggle">
+              <value name="VIDEOTOGGLEMENU">
+                <shadow type="sensing_videotogglemenu"></shadow>
+              </value>
+          </block>
+          <block type="sensing_setvideotransparency">
+            <value name="TRANSPARENCY">
+              <shadow type="math_number">
+                <field name="NUM">50</field>
+              </shadow>
+            </value>
+      		</block>
+      		<block type="sensing_timer"></block>
+      		<block type="sensing_resettimer"></block>
+      	    <block type="sensing_current">
+                <value name="CURRENTMENU">
+                  <shadow type="sensing_currentmenu"></shadow>
+                </value>
+              </block>
+      		<block type="sensing_dayssince2000"></block>
+      		<block type="sensing_username"></block>
+    	  </category>
+        <category name="Operators" colour="#40BF4A">
+            <block type="operator_add">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_subtract">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_multiply">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_divide">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_random">
+              <value name="FROM">
+                <shadow type="math_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="TO">
+                <shadow type="math_number">
+                  <field name="NUM">10</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_lt">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_equals">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_gt">
+              <value name="OPERAND1">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+              <value name="OPERAND2">
+                <shadow type="text">
+                  <field name="TEXT"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_and"></block>
+            <block type="operator_or"></block>
+            <block type="operator_not"></block>
+            <block type="operator_join">
+              <value name="STRING1">
+                <shadow type="text">
+                  <field name="TEXT">hello</field>
+                </shadow>
+              </value>
+              <value name="STRING2">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_letter_of">
+              <value name="LETTER">
+                <shadow type="math_whole_number">
+                  <field name="NUM">1</field>
+                </shadow>
+              </value>
+              <value name="STRING">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_length">
+              <value name="STRING">
+                <shadow type="text">
+                  <field name="TEXT">world</field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_mod">
+              <value name="NUM1">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+              <value name="NUM2">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_round">
+              <value name="NUM">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+            <block type="operator_mathop">
+              <value name="OPERATOR">
+                <shadow type="operator_mathop_menu"></shadow>
+              </value>
+              <value name="NUM">
+                <shadow type="math_number">
+                  <field name="NUM"></field>
+                </shadow>
+              </value>
+            </block>
+          </category>
+          <category name="More Blocks" colour="#FF6680"></category>
   </xml>
 
     <!-- Syntax highlighter -->

From b1272abbcd9b94c292791ac1fc24cf0ea2aacf5c Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 8 Aug 2016 13:34:51 -0400
Subject: [PATCH 151/302] Update installation instructions (pending release to
 NPM)

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index b354de29a..6dabf3716 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
 
 ## Installation
 ```bash
-npm install scratch-vm
+npm install https://github.com/LLK/scratch-vm.git
 ```
 
 ## Setup

From 902fa6dfbac47dbb33ef4b35b89661357c04854d Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 8 Aug 2016 13:35:22 -0400
Subject: [PATCH 152/302] Track vm.worker build result

---
 vm.worker.js | 1154 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1154 insertions(+)
 create mode 100644 vm.worker.js

diff --git a/vm.worker.js b/vm.worker.js
new file mode 100644
index 000000000..baf6eaf83
--- /dev/null
+++ b/vm.worker.js
@@ -0,0 +1,1154 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId])
+/******/ 			return installedModules[moduleId].exports;
+
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = true;
+
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+
+
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var EventEmitter = __webpack_require__(1);
+	var util = __webpack_require__(2);
+
+	function VirtualMachine () {
+	    if (!window.Worker) {
+	        console.error('WebWorkers not supported in this environment.' +
+	            ' Please use the non-worker version (vm.js or vm.min.js).');
+	        return;
+	    }
+	    var instance = this;
+	    EventEmitter.call(instance);
+	    instance.vmWorker = new Worker('../vm.js');
+
+	    // onmessage calls are converted into emitted events.
+	    instance.vmWorker.onmessage = function (e) {
+	        instance.emit(e.data.method, e.data);
+	    };
+
+	    instance.blockListener = function (e) {
+	        // Messages from Blockly are not serializable by default.
+	        // Pull out the necessary, serializable components to pass across.
+	        var serializableE = {
+	            blockId: e.blockId,
+	            element: e.element,
+	            type: e.type,
+	            name: e.name,
+	            newValue: e.newValue,
+	            oldParentId: e.oldParentId,
+	            oldInputName: e.oldInputName,
+	            newParentId: e.newParentId,
+	            newInputName: e.newInputName,
+	            xml: {
+	                outerHTML: (e.xml) ? e.xml.outerHTML : null
+	            }
+	        };
+	        instance.vmWorker.postMessage({
+	            method: 'blockListener',
+	            args: serializableE
+	        });
+	    };
+	}
+
+	/**
+	 * Inherit from EventEmitter
+	 */
+	util.inherits(VirtualMachine, EventEmitter);
+
+	// For documentation, please see index.js.
+	// These mirror the functionality provided there, with the worker wrapper.
+	VirtualMachine.prototype.getPlaygroundData = function () {
+	    this.vmWorker.postMessage({method: 'getPlaygroundData'});
+	};
+
+	VirtualMachine.prototype.start = function () {
+	    this.vmWorker.postMessage({method: 'start'});
+	};
+
+	VirtualMachine.prototype.greenFlag = function () {
+	    this.vmWorker.postMessage({method: 'greenFlag'});
+	};
+
+	VirtualMachine.prototype.stopAll = function () {
+	    this.vmWorker.postMessage({method: 'stopAll'});
+	};
+
+	/**
+	 * Export and bind to `window`
+	 */
+	module.exports = VirtualMachine;
+	if (typeof window !== 'undefined') window.VirtualMachine = module.exports;
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports) {
+
+	// Copyright Joyent, Inc. and other Node contributors.
+	//
+	// Permission is hereby granted, free of charge, to any person obtaining a
+	// copy of this software and associated documentation files (the
+	// "Software"), to deal in the Software without restriction, including
+	// without limitation the rights to use, copy, modify, merge, publish,
+	// distribute, sublicense, and/or sell copies of the Software, and to permit
+	// persons to whom the Software is furnished to do so, subject to the
+	// following conditions:
+	//
+	// The above copyright notice and this permission notice shall be included
+	// in all copies or substantial portions of the Software.
+	//
+	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+	// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+	function EventEmitter() {
+	  this._events = this._events || {};
+	  this._maxListeners = this._maxListeners || undefined;
+	}
+	module.exports = EventEmitter;
+
+	// Backwards-compat with node 0.10.x
+	EventEmitter.EventEmitter = EventEmitter;
+
+	EventEmitter.prototype._events = undefined;
+	EventEmitter.prototype._maxListeners = undefined;
+
+	// By default EventEmitters will print a warning if more than 10 listeners are
+	// added to it. This is a useful default which helps finding memory leaks.
+	EventEmitter.defaultMaxListeners = 10;
+
+	// Obviously not all Emitters should be limited to 10. This function allows
+	// that to be increased. Set to zero for unlimited.
+	EventEmitter.prototype.setMaxListeners = function(n) {
+	  if (!isNumber(n) || n < 0 || isNaN(n))
+	    throw TypeError('n must be a positive number');
+	  this._maxListeners = n;
+	  return this;
+	};
+
+	EventEmitter.prototype.emit = function(type) {
+	  var er, handler, len, args, i, listeners;
+
+	  if (!this._events)
+	    this._events = {};
+
+	  // If there is no 'error' event listener then throw.
+	  if (type === 'error') {
+	    if (!this._events.error ||
+	        (isObject(this._events.error) && !this._events.error.length)) {
+	      er = arguments[1];
+	      if (er instanceof Error) {
+	        throw er; // Unhandled 'error' event
+	      }
+	      throw TypeError('Uncaught, unspecified "error" event.');
+	    }
+	  }
+
+	  handler = this._events[type];
+
+	  if (isUndefined(handler))
+	    return false;
+
+	  if (isFunction(handler)) {
+	    switch (arguments.length) {
+	      // fast cases
+	      case 1:
+	        handler.call(this);
+	        break;
+	      case 2:
+	        handler.call(this, arguments[1]);
+	        break;
+	      case 3:
+	        handler.call(this, arguments[1], arguments[2]);
+	        break;
+	      // slower
+	      default:
+	        args = Array.prototype.slice.call(arguments, 1);
+	        handler.apply(this, args);
+	    }
+	  } else if (isObject(handler)) {
+	    args = Array.prototype.slice.call(arguments, 1);
+	    listeners = handler.slice();
+	    len = listeners.length;
+	    for (i = 0; i < len; i++)
+	      listeners[i].apply(this, args);
+	  }
+
+	  return true;
+	};
+
+	EventEmitter.prototype.addListener = function(type, listener) {
+	  var m;
+
+	  if (!isFunction(listener))
+	    throw TypeError('listener must be a function');
+
+	  if (!this._events)
+	    this._events = {};
+
+	  // To avoid recursion in the case that type === "newListener"! Before
+	  // adding it to the listeners, first emit "newListener".
+	  if (this._events.newListener)
+	    this.emit('newListener', type,
+	              isFunction(listener.listener) ?
+	              listener.listener : listener);
+
+	  if (!this._events[type])
+	    // Optimize the case of one listener. Don't need the extra array object.
+	    this._events[type] = listener;
+	  else if (isObject(this._events[type]))
+	    // If we've already got an array, just append.
+	    this._events[type].push(listener);
+	  else
+	    // Adding the second element, need to change to array.
+	    this._events[type] = [this._events[type], listener];
+
+	  // Check for listener leak
+	  if (isObject(this._events[type]) && !this._events[type].warned) {
+	    if (!isUndefined(this._maxListeners)) {
+	      m = this._maxListeners;
+	    } else {
+	      m = EventEmitter.defaultMaxListeners;
+	    }
+
+	    if (m && m > 0 && this._events[type].length > m) {
+	      this._events[type].warned = true;
+	      console.error('(node) warning: possible EventEmitter memory ' +
+	                    'leak detected. %d listeners added. ' +
+	                    'Use emitter.setMaxListeners() to increase limit.',
+	                    this._events[type].length);
+	      if (typeof console.trace === 'function') {
+	        // not supported in IE 10
+	        console.trace();
+	      }
+	    }
+	  }
+
+	  return this;
+	};
+
+	EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+	EventEmitter.prototype.once = function(type, listener) {
+	  if (!isFunction(listener))
+	    throw TypeError('listener must be a function');
+
+	  var fired = false;
+
+	  function g() {
+	    this.removeListener(type, g);
+
+	    if (!fired) {
+	      fired = true;
+	      listener.apply(this, arguments);
+	    }
+	  }
+
+	  g.listener = listener;
+	  this.on(type, g);
+
+	  return this;
+	};
+
+	// emits a 'removeListener' event iff the listener was removed
+	EventEmitter.prototype.removeListener = function(type, listener) {
+	  var list, position, length, i;
+
+	  if (!isFunction(listener))
+	    throw TypeError('listener must be a function');
+
+	  if (!this._events || !this._events[type])
+	    return this;
+
+	  list = this._events[type];
+	  length = list.length;
+	  position = -1;
+
+	  if (list === listener ||
+	      (isFunction(list.listener) && list.listener === listener)) {
+	    delete this._events[type];
+	    if (this._events.removeListener)
+	      this.emit('removeListener', type, listener);
+
+	  } else if (isObject(list)) {
+	    for (i = length; i-- > 0;) {
+	      if (list[i] === listener ||
+	          (list[i].listener && list[i].listener === listener)) {
+	        position = i;
+	        break;
+	      }
+	    }
+
+	    if (position < 0)
+	      return this;
+
+	    if (list.length === 1) {
+	      list.length = 0;
+	      delete this._events[type];
+	    } else {
+	      list.splice(position, 1);
+	    }
+
+	    if (this._events.removeListener)
+	      this.emit('removeListener', type, listener);
+	  }
+
+	  return this;
+	};
+
+	EventEmitter.prototype.removeAllListeners = function(type) {
+	  var key, listeners;
+
+	  if (!this._events)
+	    return this;
+
+	  // not listening for removeListener, no need to emit
+	  if (!this._events.removeListener) {
+	    if (arguments.length === 0)
+	      this._events = {};
+	    else if (this._events[type])
+	      delete this._events[type];
+	    return this;
+	  }
+
+	  // emit removeListener for all listeners on all events
+	  if (arguments.length === 0) {
+	    for (key in this._events) {
+	      if (key === 'removeListener') continue;
+	      this.removeAllListeners(key);
+	    }
+	    this.removeAllListeners('removeListener');
+	    this._events = {};
+	    return this;
+	  }
+
+	  listeners = this._events[type];
+
+	  if (isFunction(listeners)) {
+	    this.removeListener(type, listeners);
+	  } else if (listeners) {
+	    // LIFO order
+	    while (listeners.length)
+	      this.removeListener(type, listeners[listeners.length - 1]);
+	  }
+	  delete this._events[type];
+
+	  return this;
+	};
+
+	EventEmitter.prototype.listeners = function(type) {
+	  var ret;
+	  if (!this._events || !this._events[type])
+	    ret = [];
+	  else if (isFunction(this._events[type]))
+	    ret = [this._events[type]];
+	  else
+	    ret = this._events[type].slice();
+	  return ret;
+	};
+
+	EventEmitter.prototype.listenerCount = function(type) {
+	  if (this._events) {
+	    var evlistener = this._events[type];
+
+	    if (isFunction(evlistener))
+	      return 1;
+	    else if (evlistener)
+	      return evlistener.length;
+	  }
+	  return 0;
+	};
+
+	EventEmitter.listenerCount = function(emitter, type) {
+	  return emitter.listenerCount(type);
+	};
+
+	function isFunction(arg) {
+	  return typeof arg === 'function';
+	}
+
+	function isNumber(arg) {
+	  return typeof arg === 'number';
+	}
+
+	function isObject(arg) {
+	  return typeof arg === 'object' && arg !== null;
+	}
+
+	function isUndefined(arg) {
+	  return arg === void 0;
+	}
+
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+	/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
+	//
+	// Permission is hereby granted, free of charge, to any person obtaining a
+	// copy of this software and associated documentation files (the
+	// "Software"), to deal in the Software without restriction, including
+	// without limitation the rights to use, copy, modify, merge, publish,
+	// distribute, sublicense, and/or sell copies of the Software, and to permit
+	// persons to whom the Software is furnished to do so, subject to the
+	// following conditions:
+	//
+	// The above copyright notice and this permission notice shall be included
+	// in all copies or substantial portions of the Software.
+	//
+	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+	// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+	var formatRegExp = /%[sdj%]/g;
+	exports.format = function(f) {
+	  if (!isString(f)) {
+	    var objects = [];
+	    for (var i = 0; i < arguments.length; i++) {
+	      objects.push(inspect(arguments[i]));
+	    }
+	    return objects.join(' ');
+	  }
+
+	  var i = 1;
+	  var args = arguments;
+	  var len = args.length;
+	  var str = String(f).replace(formatRegExp, function(x) {
+	    if (x === '%%') return '%';
+	    if (i >= len) return x;
+	    switch (x) {
+	      case '%s': return String(args[i++]);
+	      case '%d': return Number(args[i++]);
+	      case '%j':
+	        try {
+	          return JSON.stringify(args[i++]);
+	        } catch (_) {
+	          return '[Circular]';
+	        }
+	      default:
+	        return x;
+	    }
+	  });
+	  for (var x = args[i]; i < len; x = args[++i]) {
+	    if (isNull(x) || !isObject(x)) {
+	      str += ' ' + x;
+	    } else {
+	      str += ' ' + inspect(x);
+	    }
+	  }
+	  return str;
+	};
+
+
+	// Mark that a method should not be used.
+	// Returns a modified function which warns once by default.
+	// If --no-deprecation is set, then it is a no-op.
+	exports.deprecate = function(fn, msg) {
+	  // Allow for deprecating things in the process of starting up.
+	  if (isUndefined(global.process)) {
+	    return function() {
+	      return exports.deprecate(fn, msg).apply(this, arguments);
+	    };
+	  }
+
+	  if (process.noDeprecation === true) {
+	    return fn;
+	  }
+
+	  var warned = false;
+	  function deprecated() {
+	    if (!warned) {
+	      if (process.throwDeprecation) {
+	        throw new Error(msg);
+	      } else if (process.traceDeprecation) {
+	        console.trace(msg);
+	      } else {
+	        console.error(msg);
+	      }
+	      warned = true;
+	    }
+	    return fn.apply(this, arguments);
+	  }
+
+	  return deprecated;
+	};
+
+
+	var debugs = {};
+	var debugEnviron;
+	exports.debuglog = function(set) {
+	  if (isUndefined(debugEnviron))
+	    debugEnviron = process.env.NODE_DEBUG || '';
+	  set = set.toUpperCase();
+	  if (!debugs[set]) {
+	    if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+	      var pid = process.pid;
+	      debugs[set] = function() {
+	        var msg = exports.format.apply(exports, arguments);
+	        console.error('%s %d: %s', set, pid, msg);
+	      };
+	    } else {
+	      debugs[set] = function() {};
+	    }
+	  }
+	  return debugs[set];
+	};
+
+
+	/**
+	 * Echos the value of a value. Trys to print the value out
+	 * in the best way possible given the different types.
+	 *
+	 * @param {Object} obj The object to print out.
+	 * @param {Object} opts Optional options object that alters the output.
+	 */
+	/* legacy: obj, showHidden, depth, colors*/
+	function inspect(obj, opts) {
+	  // default options
+	  var ctx = {
+	    seen: [],
+	    stylize: stylizeNoColor
+	  };
+	  // legacy...
+	  if (arguments.length >= 3) ctx.depth = arguments[2];
+	  if (arguments.length >= 4) ctx.colors = arguments[3];
+	  if (isBoolean(opts)) {
+	    // legacy...
+	    ctx.showHidden = opts;
+	  } else if (opts) {
+	    // got an "options" object
+	    exports._extend(ctx, opts);
+	  }
+	  // set default options
+	  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+	  if (isUndefined(ctx.depth)) ctx.depth = 2;
+	  if (isUndefined(ctx.colors)) ctx.colors = false;
+	  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+	  if (ctx.colors) ctx.stylize = stylizeWithColor;
+	  return formatValue(ctx, obj, ctx.depth);
+	}
+	exports.inspect = inspect;
+
+
+	// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+	inspect.colors = {
+	  'bold' : [1, 22],
+	  'italic' : [3, 23],
+	  'underline' : [4, 24],
+	  'inverse' : [7, 27],
+	  'white' : [37, 39],
+	  'grey' : [90, 39],
+	  'black' : [30, 39],
+	  'blue' : [34, 39],
+	  'cyan' : [36, 39],
+	  'green' : [32, 39],
+	  'magenta' : [35, 39],
+	  'red' : [31, 39],
+	  'yellow' : [33, 39]
+	};
+
+	// Don't use 'blue' not visible on cmd.exe
+	inspect.styles = {
+	  'special': 'cyan',
+	  'number': 'yellow',
+	  'boolean': 'yellow',
+	  'undefined': 'grey',
+	  'null': 'bold',
+	  'string': 'green',
+	  'date': 'magenta',
+	  // "name": intentionally not styling
+	  'regexp': 'red'
+	};
+
+
+	function stylizeWithColor(str, styleType) {
+	  var style = inspect.styles[styleType];
+
+	  if (style) {
+	    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+	           '\u001b[' + inspect.colors[style][1] + 'm';
+	  } else {
+	    return str;
+	  }
+	}
+
+
+	function stylizeNoColor(str, styleType) {
+	  return str;
+	}
+
+
+	function arrayToHash(array) {
+	  var hash = {};
+
+	  array.forEach(function(val, idx) {
+	    hash[val] = true;
+	  });
+
+	  return hash;
+	}
+
+
+	function formatValue(ctx, value, recurseTimes) {
+	  // Provide a hook for user-specified inspect functions.
+	  // Check that value is an object with an inspect function on it
+	  if (ctx.customInspect &&
+	      value &&
+	      isFunction(value.inspect) &&
+	      // Filter out the util module, it's inspect function is special
+	      value.inspect !== exports.inspect &&
+	      // Also filter out any prototype objects using the circular check.
+	      !(value.constructor && value.constructor.prototype === value)) {
+	    var ret = value.inspect(recurseTimes, ctx);
+	    if (!isString(ret)) {
+	      ret = formatValue(ctx, ret, recurseTimes);
+	    }
+	    return ret;
+	  }
+
+	  // Primitive types cannot have properties
+	  var primitive = formatPrimitive(ctx, value);
+	  if (primitive) {
+	    return primitive;
+	  }
+
+	  // Look up the keys of the object.
+	  var keys = Object.keys(value);
+	  var visibleKeys = arrayToHash(keys);
+
+	  if (ctx.showHidden) {
+	    keys = Object.getOwnPropertyNames(value);
+	  }
+
+	  // IE doesn't make error fields non-enumerable
+	  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
+	  if (isError(value)
+	      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+	    return formatError(value);
+	  }
+
+	  // Some type of object without properties can be shortcutted.
+	  if (keys.length === 0) {
+	    if (isFunction(value)) {
+	      var name = value.name ? ': ' + value.name : '';
+	      return ctx.stylize('[Function' + name + ']', 'special');
+	    }
+	    if (isRegExp(value)) {
+	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+	    }
+	    if (isDate(value)) {
+	      return ctx.stylize(Date.prototype.toString.call(value), 'date');
+	    }
+	    if (isError(value)) {
+	      return formatError(value);
+	    }
+	  }
+
+	  var base = '', array = false, braces = ['{', '}'];
+
+	  // Make Array say that they are Array
+	  if (isArray(value)) {
+	    array = true;
+	    braces = ['[', ']'];
+	  }
+
+	  // Make functions say that they are functions
+	  if (isFunction(value)) {
+	    var n = value.name ? ': ' + value.name : '';
+	    base = ' [Function' + n + ']';
+	  }
+
+	  // Make RegExps say that they are RegExps
+	  if (isRegExp(value)) {
+	    base = ' ' + RegExp.prototype.toString.call(value);
+	  }
+
+	  // Make dates with properties first say the date
+	  if (isDate(value)) {
+	    base = ' ' + Date.prototype.toUTCString.call(value);
+	  }
+
+	  // Make error with message first say the error
+	  if (isError(value)) {
+	    base = ' ' + formatError(value);
+	  }
+
+	  if (keys.length === 0 && (!array || value.length == 0)) {
+	    return braces[0] + base + braces[1];
+	  }
+
+	  if (recurseTimes < 0) {
+	    if (isRegExp(value)) {
+	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+	    } else {
+	      return ctx.stylize('[Object]', 'special');
+	    }
+	  }
+
+	  ctx.seen.push(value);
+
+	  var output;
+	  if (array) {
+	    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+	  } else {
+	    output = keys.map(function(key) {
+	      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+	    });
+	  }
+
+	  ctx.seen.pop();
+
+	  return reduceToSingleString(output, base, braces);
+	}
+
+
+	function formatPrimitive(ctx, value) {
+	  if (isUndefined(value))
+	    return ctx.stylize('undefined', 'undefined');
+	  if (isString(value)) {
+	    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+	                                             .replace(/'/g, "\\'")
+	                                             .replace(/\\"/g, '"') + '\'';
+	    return ctx.stylize(simple, 'string');
+	  }
+	  if (isNumber(value))
+	    return ctx.stylize('' + value, 'number');
+	  if (isBoolean(value))
+	    return ctx.stylize('' + value, 'boolean');
+	  // For some reason typeof null is "object", so special case here.
+	  if (isNull(value))
+	    return ctx.stylize('null', 'null');
+	}
+
+
+	function formatError(value) {
+	  return '[' + Error.prototype.toString.call(value) + ']';
+	}
+
+
+	function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+	  var output = [];
+	  for (var i = 0, l = value.length; i < l; ++i) {
+	    if (hasOwnProperty(value, String(i))) {
+	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+	          String(i), true));
+	    } else {
+	      output.push('');
+	    }
+	  }
+	  keys.forEach(function(key) {
+	    if (!key.match(/^\d+$/)) {
+	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+	          key, true));
+	    }
+	  });
+	  return output;
+	}
+
+
+	function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+	  var name, str, desc;
+	  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+	  if (desc.get) {
+	    if (desc.set) {
+	      str = ctx.stylize('[Getter/Setter]', 'special');
+	    } else {
+	      str = ctx.stylize('[Getter]', 'special');
+	    }
+	  } else {
+	    if (desc.set) {
+	      str = ctx.stylize('[Setter]', 'special');
+	    }
+	  }
+	  if (!hasOwnProperty(visibleKeys, key)) {
+	    name = '[' + key + ']';
+	  }
+	  if (!str) {
+	    if (ctx.seen.indexOf(desc.value) < 0) {
+	      if (isNull(recurseTimes)) {
+	        str = formatValue(ctx, desc.value, null);
+	      } else {
+	        str = formatValue(ctx, desc.value, recurseTimes - 1);
+	      }
+	      if (str.indexOf('\n') > -1) {
+	        if (array) {
+	          str = str.split('\n').map(function(line) {
+	            return '  ' + line;
+	          }).join('\n').substr(2);
+	        } else {
+	          str = '\n' + str.split('\n').map(function(line) {
+	            return '   ' + line;
+	          }).join('\n');
+	        }
+	      }
+	    } else {
+	      str = ctx.stylize('[Circular]', 'special');
+	    }
+	  }
+	  if (isUndefined(name)) {
+	    if (array && key.match(/^\d+$/)) {
+	      return str;
+	    }
+	    name = JSON.stringify('' + key);
+	    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+	      name = name.substr(1, name.length - 2);
+	      name = ctx.stylize(name, 'name');
+	    } else {
+	      name = name.replace(/'/g, "\\'")
+	                 .replace(/\\"/g, '"')
+	                 .replace(/(^"|"$)/g, "'");
+	      name = ctx.stylize(name, 'string');
+	    }
+	  }
+
+	  return name + ': ' + str;
+	}
+
+
+	function reduceToSingleString(output, base, braces) {
+	  var numLinesEst = 0;
+	  var length = output.reduce(function(prev, cur) {
+	    numLinesEst++;
+	    if (cur.indexOf('\n') >= 0) numLinesEst++;
+	    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+	  }, 0);
+
+	  if (length > 60) {
+	    return braces[0] +
+	           (base === '' ? '' : base + '\n ') +
+	           ' ' +
+	           output.join(',\n  ') +
+	           ' ' +
+	           braces[1];
+	  }
+
+	  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+	}
+
+
+	// NOTE: These type checking functions intentionally don't use `instanceof`
+	// because it is fragile and can be easily faked with `Object.create()`.
+	function isArray(ar) {
+	  return Array.isArray(ar);
+	}
+	exports.isArray = isArray;
+
+	function isBoolean(arg) {
+	  return typeof arg === 'boolean';
+	}
+	exports.isBoolean = isBoolean;
+
+	function isNull(arg) {
+	  return arg === null;
+	}
+	exports.isNull = isNull;
+
+	function isNullOrUndefined(arg) {
+	  return arg == null;
+	}
+	exports.isNullOrUndefined = isNullOrUndefined;
+
+	function isNumber(arg) {
+	  return typeof arg === 'number';
+	}
+	exports.isNumber = isNumber;
+
+	function isString(arg) {
+	  return typeof arg === 'string';
+	}
+	exports.isString = isString;
+
+	function isSymbol(arg) {
+	  return typeof arg === 'symbol';
+	}
+	exports.isSymbol = isSymbol;
+
+	function isUndefined(arg) {
+	  return arg === void 0;
+	}
+	exports.isUndefined = isUndefined;
+
+	function isRegExp(re) {
+	  return isObject(re) && objectToString(re) === '[object RegExp]';
+	}
+	exports.isRegExp = isRegExp;
+
+	function isObject(arg) {
+	  return typeof arg === 'object' && arg !== null;
+	}
+	exports.isObject = isObject;
+
+	function isDate(d) {
+	  return isObject(d) && objectToString(d) === '[object Date]';
+	}
+	exports.isDate = isDate;
+
+	function isError(e) {
+	  return isObject(e) &&
+	      (objectToString(e) === '[object Error]' || e instanceof Error);
+	}
+	exports.isError = isError;
+
+	function isFunction(arg) {
+	  return typeof arg === 'function';
+	}
+	exports.isFunction = isFunction;
+
+	function isPrimitive(arg) {
+	  return arg === null ||
+	         typeof arg === 'boolean' ||
+	         typeof arg === 'number' ||
+	         typeof arg === 'string' ||
+	         typeof arg === 'symbol' ||  // ES6 symbol
+	         typeof arg === 'undefined';
+	}
+	exports.isPrimitive = isPrimitive;
+
+	exports.isBuffer = __webpack_require__(4);
+
+	function objectToString(o) {
+	  return Object.prototype.toString.call(o);
+	}
+
+
+	function pad(n) {
+	  return n < 10 ? '0' + n.toString(10) : n.toString(10);
+	}
+
+
+	var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+	              'Oct', 'Nov', 'Dec'];
+
+	// 26 Feb 16:19:34
+	function timestamp() {
+	  var d = new Date();
+	  var time = [pad(d.getHours()),
+	              pad(d.getMinutes()),
+	              pad(d.getSeconds())].join(':');
+	  return [d.getDate(), months[d.getMonth()], time].join(' ');
+	}
+
+
+	// log is just a thin wrapper to console.log that prepends a timestamp
+	exports.log = function() {
+	  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+	};
+
+
+	/**
+	 * Inherit the prototype methods from one constructor into another.
+	 *
+	 * The Function.prototype.inherits from lang.js rewritten as a standalone
+	 * function (not on Function.prototype). NOTE: If this file is to be loaded
+	 * during bootstrapping this function needs to be rewritten using some native
+	 * functions as prototype setup using normal JavaScript does not work as
+	 * expected during bootstrapping (see mirror.js in r114903).
+	 *
+	 * @param {function} ctor Constructor function which needs to inherit the
+	 *     prototype.
+	 * @param {function} superCtor Constructor function to inherit prototype from.
+	 */
+	exports.inherits = __webpack_require__(5);
+
+	exports._extend = function(origin, add) {
+	  // Don't do anything if add isn't an object
+	  if (!add || !isObject(add)) return origin;
+
+	  var keys = Object.keys(add);
+	  var i = keys.length;
+	  while (i--) {
+	    origin[keys[i]] = add[keys[i]];
+	  }
+	  return origin;
+	};
+
+	function hasOwnProperty(obj, prop) {
+	  return Object.prototype.hasOwnProperty.call(obj, prop);
+	}
+
+	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(3)))
+
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
+
+	// shim for using process in browser
+
+	var process = module.exports = {};
+	var queue = [];
+	var draining = false;
+	var currentQueue;
+	var queueIndex = -1;
+
+	function cleanUpNextTick() {
+	    draining = false;
+	    if (currentQueue.length) {
+	        queue = currentQueue.concat(queue);
+	    } else {
+	        queueIndex = -1;
+	    }
+	    if (queue.length) {
+	        drainQueue();
+	    }
+	}
+
+	function drainQueue() {
+	    if (draining) {
+	        return;
+	    }
+	    var timeout = setTimeout(cleanUpNextTick);
+	    draining = true;
+
+	    var len = queue.length;
+	    while(len) {
+	        currentQueue = queue;
+	        queue = [];
+	        while (++queueIndex < len) {
+	            if (currentQueue) {
+	                currentQueue[queueIndex].run();
+	            }
+	        }
+	        queueIndex = -1;
+	        len = queue.length;
+	    }
+	    currentQueue = null;
+	    draining = false;
+	    clearTimeout(timeout);
+	}
+
+	process.nextTick = function (fun) {
+	    var args = new Array(arguments.length - 1);
+	    if (arguments.length > 1) {
+	        for (var i = 1; i < arguments.length; i++) {
+	            args[i - 1] = arguments[i];
+	        }
+	    }
+	    queue.push(new Item(fun, args));
+	    if (queue.length === 1 && !draining) {
+	        setTimeout(drainQueue, 0);
+	    }
+	};
+
+	// v8 likes predictible objects
+	function Item(fun, array) {
+	    this.fun = fun;
+	    this.array = array;
+	}
+	Item.prototype.run = function () {
+	    this.fun.apply(null, this.array);
+	};
+	process.title = 'browser';
+	process.browser = true;
+	process.env = {};
+	process.argv = [];
+	process.version = ''; // empty string to avoid regexp issues
+	process.versions = {};
+
+	function noop() {}
+
+	process.on = noop;
+	process.addListener = noop;
+	process.once = noop;
+	process.off = noop;
+	process.removeListener = noop;
+	process.removeAllListeners = noop;
+	process.emit = noop;
+
+	process.binding = function (name) {
+	    throw new Error('process.binding is not supported');
+	};
+
+	process.cwd = function () { return '/' };
+	process.chdir = function (dir) {
+	    throw new Error('process.chdir is not supported');
+	};
+	process.umask = function() { return 0; };
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+	module.exports = function isBuffer(arg) {
+	  return arg && typeof arg === 'object'
+	    && typeof arg.copy === 'function'
+	    && typeof arg.fill === 'function'
+	    && typeof arg.readUInt8 === 'function';
+	}
+
+/***/ },
+/* 5 */
+/***/ 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
+	  }
+	}
+
+
+/***/ }
+/******/ ]);
\ No newline at end of file

From c47a061edb3477ec9d7104ec56ab910174536231 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 8 Aug 2016 15:43:52 -0400
Subject: [PATCH 153/302] Updates for newly released scratch-render repo

---
 Makefile              | 2 +-
 package.json          | 4 ++--
 playground/index.html | 2 +-
 src/index.js          | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index e2a04c2b6..c3614f5ac 100644
--- a/Makefile
+++ b/Makefile
@@ -31,4 +31,4 @@ coverage:
 
 # ------------------------------------------------------------------------------
 
-.PHONY: build lint test coverage benchmark
+.PHONY: build lint test coverage benchmark serve
diff --git a/package.json b/package.json
index 2b6d7335a..9f28cbd83 100644
--- a/package.json
+++ b/package.json
@@ -16,14 +16,14 @@
   "dependencies": {
     "htmlparser2": "3.9.0",
     "memoizee": "0.3.10",
-    "promise": "7.1.1",
-    "scratch-render-webgl": "git+https://github.com/LLK/scratch-render-webgl.git"
+    "promise": "7.1.1"
   },
   "devDependencies": {
     "eslint": "2.7.0",
     "highlightjs": "8.7.0",
     "json-loader": "0.5.4",
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
+    "scratch-render": "git+https://git@github.com/LLK/scratch-render.git",
     "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 e38c10793..bcfb4426f 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -735,7 +735,7 @@
     <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
     <script src="../node_modules/scratch-blocks/msg/messages.js"></script>
     <!-- Renderer -->
-    <script src="../node_modules/scratch-render-webgl/build/render-webgl.js"></script>
+    <script src="../node_modules/scratch-render/render.js"></script>
     <!-- VM Worker -->
     <script src="../vm.worker.js"></script>
     <!-- Playground -->
diff --git a/src/index.js b/src/index.js
index 965c8cd9a..db99f1d15 100644
--- a/src/index.js
+++ b/src/index.js
@@ -108,7 +108,7 @@ VirtualMachine.prototype.animationFrame = function () {
  */
 if (ENV_WORKER) {
     self.importScripts(
-        './node_modules/scratch-render-webgl/build/render-webgl-worker.js'
+        './node_modules/scratch-render/render-worker.js'
     );
     self.renderer = new self.RenderWebGLWorker();
     self.vmInstance = new VirtualMachine();

From 0b826c0dc97fb060c08847c208256ad566ee70b6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 8 Aug 2016 15:44:55 -0400
Subject: [PATCH 154/302] Remove unused Promise in scratch3_operators

---
 src/blocks/scratch3_operators.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index d3a7f1921..6ddae6e9a 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -1,5 +1,3 @@
-var Promise = require('promise');
-
 function Scratch3OperatorsBlocks(runtime) {
     /**
      * The runtime instantiating this block package.

From a6ad34f0029f6c8abde9c482e3f13d7b68790bfc Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 8 Aug 2016 16:44:48 -0400
Subject: [PATCH 155/302] Add primitive for `math_angle`, fixing point in
 direction

---
 src/blocks/scratch3_operators.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 6ddae6e9a..fa43950ae 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -15,6 +15,7 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'math_number': this.number,
         'math_positive_number': this.number,
         'math_whole_number': this.number,
+        'math_angle': this.number,
         'text': this.text,
         'operator_add': this.add,
         'operator_subtract': this.subtract,

From 67c3ceff86623cc56f918f93dc356e4865546970 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 8 Aug 2016 16:47:52 -0400
Subject: [PATCH 156/302] Update clone's scale to match renderer update

---
 src/sprites/clone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 6a0f22fee..aa168291c 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -129,7 +129,7 @@ Clone.prototype.setSize = function (size) {
     // Keep size between 5% and 535%.
     this.size = MathUtil.clamp(size, 5, 535);
     self.renderer.updateDrawableProperties(this.drawableID, {
-        scale: this.size
+        scale: [this.size, this.size]
     });
 };
 

From 32b1d4ec61754fcec4cdd742c10b3462bfc31ccc Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 8 Aug 2016 17:07:50 -0400
Subject: [PATCH 157/302] Remove memoizee dependency and usage in adapter.
 Resolves GH-2

---
 package.json          | 1 -
 src/engine/adapter.js | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/package.json b/package.json
index 9f28cbd83..df9aa470c 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,6 @@
   },
   "dependencies": {
     "htmlparser2": "3.9.0",
-    "memoizee": "0.3.10",
     "promise": "7.1.1"
   },
   "devDependencies": {
diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 9a9023209..388659fe8 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -1,10 +1,4 @@
 var html = require('htmlparser2');
-var memoize = require('memoizee');
-var parseDOM = memoize(html.parseDOM, {
-    length: 1,
-    resolvers: [String],
-    max: 200
-});
 
 /**
  * Adapter between block creation events and block representation which can be
@@ -17,7 +11,7 @@ module.exports = function (e) {
     if (typeof e !== 'object') return;
     if (typeof e.xml !== 'object') return;
 
-    return domToBlocks(parseDOM(e.xml.outerHTML));
+    return domToBlocks(html.parseDOM(e.xml.outerHTML));
 };
 
 /**

From 2c031d87f6a24d54c9b107538f5fdbdcad895d0b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 8 Aug 2016 18:29:44 -0400
Subject: [PATCH 158/302] Make renderer/self nullable in the Clone

Fixes a test issue where renderer is not necessarily defined.
---
 src/sprites/clone.js | 73 +++++++++++++++++++++++++++++++-------------
 1 file changed, 51 insertions(+), 22 deletions(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index aa168291c..8370ac73e 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -9,20 +9,37 @@ var Target = require('../engine/target');
  */
 function Clone(spriteBlocks) {
     Target.call(this, spriteBlocks);
+    /**
+     * Reference to the global renderer for this VM, if one exists.
+     * @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;
+    }
+    /**
+     * ID of the drawable for this clone returned by the renderer, if rendered.
+     * @type {?Number}
+     */
     this.drawableID = null;
+
     this.initDrawable();
 }
 util.inherits(Clone, Target);
 
 /**
- * Create a clone's drawable with the renderer.
+ * Create a clone's drawable with the this.renderer.
  */
 Clone.prototype.initDrawable = function () {
-    var createPromise = self.renderer.createDrawable();
-    var instance = this;
-    createPromise.then(function (id) {
-        instance.drawableID = id;
-    });
+    if (this.renderer) {
+        var createPromise = this.renderer.createDrawable();
+        var instance = this;
+        createPromise.then(function (id) {
+            instance.drawableID = id;
+        });
+    }
 };
 
 // Clone-level properties.
@@ -79,9 +96,11 @@ Clone.prototype.effects = {
 Clone.prototype.setXY = function (x, y) {
     this.x = x;
     this.y = y;
-    self.renderer.updateDrawableProperties(this.drawableID, {
-        position: [this.x, this.y]
-    });
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            position: [this.x, this.y]
+        });
+    }
 };
 
 /**
@@ -91,9 +110,11 @@ Clone.prototype.setXY = function (x, y) {
 Clone.prototype.setDirection = function (direction) {
     // Keep direction between -179 and +180.
     this.direction = MathUtil.wrapClamp(direction, -179, 180);
-    self.renderer.updateDrawableProperties(this.drawableID, {
-        direction: this.direction
-    });
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            direction: this.direction
+        });
+    }
 };
 
 /**
@@ -116,9 +137,11 @@ Clone.prototype.setSay = function (type, message) {
  */
 Clone.prototype.setVisible = function (visible) {
     this.visible = visible;
-    self.renderer.updateDrawableProperties(this.drawableID, {
-        visible: this.visible
-    });
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            visible: this.visible
+        });
+    }
 };
 
 /**
@@ -128,9 +151,11 @@ Clone.prototype.setVisible = function (visible) {
 Clone.prototype.setSize = function (size) {
     // Keep size between 5% and 535%.
     this.size = MathUtil.clamp(size, 5, 535);
-    self.renderer.updateDrawableProperties(this.drawableID, {
-        scale: [this.size, this.size]
-    });
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            scale: [this.size, this.size]
+        });
+    }
 };
 
 /**
@@ -140,9 +165,11 @@ Clone.prototype.setSize = function (size) {
  */
 Clone.prototype.setEffect = function (effectName, value) {
     this.effects[effectName] = value;
-    var props = {};
-    props[effectName] = this.effects[effectName];
-    self.renderer.updateDrawableProperties(this.drawableID, props);
+    if (this.renderer) {
+        var props = {};
+        props[effectName] = this.effects[effectName];
+        this.renderer.updateDrawableProperties(this.drawableID, props);
+    }
 };
 
 /**
@@ -152,7 +179,9 @@ Clone.prototype.clearEffects = function () {
     for (var effectName in this.effects) {
         this.effects[effectName] = 0;
     }
-    self.renderer.updateDrawableProperties(this.drawableID, this.effects);
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, this.effects);
+    }
 };
 
 module.exports = Clone;

From 7780b25c4663088a96f0eee5340cfa6c8b94ade3 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 10 Aug 2016 11:27:21 -0400
Subject: [PATCH 159/302] Project wide rename substack -> branch

---
 src/blocks/scratch3_control.js |   26 +-
 src/engine/blocks.js           |   34 +-
 src/engine/execute.js          |    6 +-
 src/engine/sequencer.js        |   24 +-
 test/fixtures/events.json      |    4 +-
 test/unit/adapter.js           |   52 +-
 test/unit/blocks.js            |   32 +-
 vm.js                          | 5123 ++++++++++++++------------------
 vm.min.js                      |   11 +-
 vm.worker.js                   |    7 +
 10 files changed, 2403 insertions(+), 2916 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index d3cd2fdf6..25221c1c6 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -30,15 +30,15 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
         util.stackFrame.loopCounter = parseInt(args.TIMES);
     }
     // Only execute once per frame.
-    // When the substack finishes, `repeat` will be executed again and
+    // When the branch finishes, `repeat` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
     if (!util.stackFrame.executedInFrame) {
         util.stackFrame.executedInFrame = true;
         // Decrease counter
         util.stackFrame.loopCounter--;
-        // If we still have some left, start the substack
+        // If we still have some left, start the branch.
         if (util.stackFrame.loopCounter >= 0) {
-            util.startSubstack();
+            util.startBranch();
         }
     } else {
         util.stackFrame.executedInFrame = false;
@@ -48,13 +48,13 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
 
 Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
     // Only execute once per frame.
-    // When the substack finishes, `repeat` will be executed again and
+    // When the branch finishes, `repeat` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
     if (!util.stackFrame.executedInFrame) {
         util.stackFrame.executedInFrame = true;
-        // If the condition is true, start the substack.
+        // If the condition is true, start the branch.
         if (!args.CONDITION) {
-            util.startSubstack();
+            util.startBranch();
         }
     } else {
         util.stackFrame.executedInFrame = false;
@@ -64,11 +64,11 @@ Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
 
 Scratch3ControlBlocks.prototype.forever = function(args, util) {
     // Only execute once per frame.
-    // When the substack finishes, `forever` will be executed again and
+    // When the branch finishes, `forever` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
     if (!util.stackFrame.executedInFrame) {
         util.stackFrame.executedInFrame = true;
-        util.startSubstack();
+        util.startBranch();
     } else {
         util.stackFrame.executedInFrame = false;
         util.yieldFrame();
@@ -85,24 +85,24 @@ Scratch3ControlBlocks.prototype.wait = function(args) {
 
 Scratch3ControlBlocks.prototype.if = function(args, util) {
     // Only execute one time. `if` will be returned to
-    // when the substack finishes, but it shouldn't execute again.
+    // when the branch finishes, but it shouldn't execute again.
     if (util.stackFrame.executedInFrame === undefined) {
         util.stackFrame.executedInFrame = true;
         if (args.CONDITION) {
-            util.startSubstack();
+            util.startBranch();
         }
     }
 };
 
 Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
     // Only execute one time. `ifElse` will be returned to
-    // when the substack finishes, but it shouldn't execute again.
+    // when the branch finishes, but it shouldn't execute again.
     if (util.stackFrame.executedInFrame === undefined) {
         util.stackFrame.executedInFrame = true;
         if (args.CONDITION) {
-            util.startSubstack(1);
+            util.startBranch(1);
         } else {
-            util.startSubstack(2);
+            util.startBranch(2);
         }
     }
 };
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 5ee0a7e10..da098df20 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -23,11 +23,11 @@ function Blocks () {
 }
 
 /**
- * Blockly inputs that represent statements/substacks
+ * Blockly inputs that represent statements/branch.
  * are prefixed with this string.
  * @const{string}
  */
-Blocks.SUBSTACK_INPUT_PREFIX = 'SUBSTACK';
+Blocks.BRANCH_INPUT_PREFIX = 'SUBSTACK';
 
 /**
  * Provide an object with metadata for the requested block ID.
@@ -57,19 +57,19 @@ Blocks.prototype.getNextBlock = function (id) {
 };
 
 /**
- * Get the substack for a particular C-shaped block
- * @param {?string} id ID for block to get the substack for
- * @param {?number} substackNum Which substack to select (e.g. for if-else)
- * @return {?string} ID of block in the substack
+ * Get the branch for a particular C-shaped block.
+ * @param {?string} id ID for block to get the branch for.
+ * @param {?number} branchNum Which branch to select (e.g. for if-else).
+ * @return {?string} ID of block in the branch.
  */
-Blocks.prototype.getSubstack = function (id, substackNum) {
+Blocks.prototype.getBranch = function (id, branchNum) {
     var block = this._blocks[id];
     if (typeof block === 'undefined') return null;
-    if (!substackNum) substackNum = 1;
+    if (!branchNum) branchNum = 1;
 
-    var inputName = Blocks.SUBSTACK_INPUT_PREFIX;
-    if (substackNum > 1) {
-        inputName += substackNum;
+    var inputName = Blocks.BRANCH_INPUT_PREFIX;
+    if (branchNum > 1) {
+        inputName += branchNum;
     }
 
     // Empty C-block?
@@ -98,17 +98,17 @@ Blocks.prototype.getFields = function (id) {
 };
 
 /**
- * Get all non-substack inputs for a block.
+ * Get all non-branch inputs for a block.
  * @param {?string} id ID of block to query.
- * @return {!Object} All non-substack inputs and their associated blocks.
+ * @return {!Object} All non-branch inputs and their associated blocks.
  */
 Blocks.prototype.getInputs = function (id) {
     if (typeof this._blocks[id] === 'undefined') return null;
     var inputs = {};
     for (var input in this._blocks[id].inputs) {
-        // Ignore blocks prefixed with substack prefix.
-        if (input.substring(0, Blocks.SUBSTACK_INPUT_PREFIX.length)
-            != Blocks.SUBSTACK_INPUT_PREFIX) {
+        // Ignore blocks prefixed with branch prefix.
+        if (input.substring(0, Blocks.BRANCH_INPUT_PREFIX.length)
+            != Blocks.BRANCH_INPUT_PREFIX) {
             inputs[input] = this._blocks[id].inputs[input];
         }
     }
@@ -266,7 +266,7 @@ Blocks.prototype.deleteBlock = function (e) {
         this.deleteBlock({id: block.next});
     }
 
-    // Delete inputs (including substacks)
+    // Delete inputs (including branches)
     for (var input in block.inputs) {
         // If it's null, the block in this input moved away.
         if (block.inputs[input].block !== null) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 8d750eee3..73b724965 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -58,7 +58,7 @@ var execute = function (sequencer, thread) {
     // If we've gotten this far, all of the input blocks are evaluated,
     // and `argValues` is fully populated. So, execute the block primitive.
     // First, clear `currentStackFrame.reported`, so any subsequent execution
-    // (e.g., on return from a substack) gets fresh inputs.
+    // (e.g., on return from a branch) gets fresh inputs.
     currentStackFrame.reported = {};
 
     var primitiveReportedValue = null;
@@ -74,8 +74,8 @@ var execute = function (sequencer, thread) {
             sequencer.proceedThread(thread);
         },
         stackFrame: currentStackFrame.executionContext,
-        startSubstack: function (substackNum) {
-            sequencer.stepToSubstack(thread, substackNum);
+        startBranch: function (branchNum) {
+            sequencer.stepToBranch(thread, branchNum);
         },
         target: target
     });
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 175fc68d1..73126a227 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -85,7 +85,7 @@ Sequencer.prototype.stepThreads = function (threads) {
 Sequencer.prototype.startThread = function (thread) {
     var currentBlockId = thread.peekStack();
     if (!currentBlockId) {
-        // A "null block" - empty substack.
+        // A "null block" - empty branch.
         // Yield for the frame.
         thread.popStack();
         thread.setStatus(Thread.STATUS_YIELD_FRAME);
@@ -102,22 +102,22 @@ Sequencer.prototype.startThread = function (thread) {
 };
 
 /**
- * Step a thread into a block's substack.
- * @param {!Thread} thread Thread object to step to substack.
- * @param {Number} substackNum Which substack to step to (i.e., 1, 2).
+ * Step a thread into a block's branch.
+ * @param {!Thread} thread Thread object to step to branch.
+ * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
  */
-Sequencer.prototype.stepToSubstack = function (thread, substackNum) {
-    if (!substackNum) {
-        substackNum = 1;
+Sequencer.prototype.stepToBranch = function (thread, branchNum) {
+    if (!branchNum) {
+        branchNum = 1;
     }
     var currentBlockId = thread.peekStack();
-    var substackId = this.runtime.targetForThread(thread).blocks.getSubstack(
+    var branchId = this.runtime.targetForThread(thread).blocks.getBranch(
         currentBlockId,
-        substackNum
+        branchNum
     );
-    if (substackId) {
-        // Push substack ID to the thread's stack.
-        thread.pushStack(substackId);
+    if (branchId) {
+        // Push branch ID to the thread's stack.
+        thread.pushStack(branchId);
     } else {
         // Push null, so we come back to the current block.
         thread.pushStack(null);
diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index f80610d46..c1605cbde 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -12,13 +12,13 @@
             "!6Ahqg4f}Ljl}X5Hws?Z"
         ]
     },
-    "createsubstack": {
+    "createbranch": {
         "name": "block",
         "xml": {
             "outerHTML": "<block type=\"control_forever\" id=\"r9`RpL74T6*SXPKv7}Dq\" x=\"61\" y=\"90\"><statement name=\"SUBSTACK\"><block type=\"control_wait\" id=\"{Rwt[LFtD1-JPAi-qf:.\"><value name=\"DURATION\"><shadow type=\"math_number\" id=\"VMDxt_9SYe5{*eNRe5dZ\"><field name=\"NUM\">1</field></shadow></value></block></statement></block>"
         }
     },
-    "createtwosubstacks": {
+    "createtwobranches": {
         "name": "block",
         "xml": {
             "outerHTML": "<block type=\"control_if_else\" id=\"8W?lmIY!Tgnh)~0!G#9-\" x=\"87\" y=\"159\"><statement name=\"SUBSTACK\"><block type=\"event_broadcast\" id=\"lgU2GGtwlREuasCB02Vr\"></block></statement><statement name=\"SUBSTACK2\"><block type=\"event_broadcast\" id=\"Gb]N,2P;|J%F?pxSwz(2\"></block></statement></block>"
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index c31175a72..63e823453 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -43,8 +43,8 @@ test('create event', function (t) {
     t.end();
 });
 
-test('create with substack', function (t) {
-    var result = adapter(events.createsubstack);
+test('create with branch', function (t) {
+    var result = adapter(events.createbranch);
     // Outer block
     t.type(result[0].id, 'string');
     t.type(result[0].opcode, 'string');
@@ -53,22 +53,22 @@ test('create with substack', function (t) {
     t.type(result[0].inputs['SUBSTACK'], 'object');
     t.type(result[0].topLevel, 'boolean');
     t.equal(result[0].topLevel, true);
-    // In substack
-    var substackBlockId = result[0].inputs['SUBSTACK']['block'];
-    t.type(substackBlockId, 'string');
-    // Find actual substack block
-    var substackBlock = null;
+    // In branch
+    var branchBlockId = result[0].inputs['SUBSTACK']['block'];
+    t.type(branchBlockId, 'string');
+    // Find actual branch block
+    var branchBlock = null;
     for (var i = 0; i < result.length; i++) {
-        if (result[i].id == substackBlockId) {
-            substackBlock = result[i];
+        if (result[i].id == branchBlockId) {
+            branchBlock = result[i];
         }
     }
-    t.type(substackBlock, 'object');
+    t.type(branchBlock, 'object');
     t.end();
 });
 
-test('create with two substacks', function (t) {
-    var result = adapter(events.createtwosubstacks);
+test('create with two branches', function (t) {
+    var result = adapter(events.createtwobranches);
     // Outer block
     t.type(result[0].id, 'string');
     t.type(result[0].opcode, 'string');
@@ -78,24 +78,24 @@ test('create with two substacks', function (t) {
     t.type(result[0].inputs['SUBSTACK2'], 'object');
     t.type(result[0].topLevel, 'boolean');
     t.equal(result[0].topLevel, true);
-    // In substacks
-    var firstSubstackBlockId = result[0].inputs['SUBSTACK']['block'];
-    var secondSubstackBlockId = result[0].inputs['SUBSTACK2']['block'];
-    t.type(firstSubstackBlockId, 'string');
-    t.type(secondSubstackBlockId, 'string');
-    // Find actual substack blocks
-    var firstSubstackBlock = null;
-    var secondSubstackBlock = null;
+    // In branchs
+    var firstBranchBlockId = result[0].inputs['SUBSTACK']['block'];
+    var secondBranchBlockId = result[0].inputs['SUBSTACK2']['block'];
+    t.type(firstBranchBlockId, 'string');
+    t.type(secondBranchBlockId, 'string');
+    // Find actual branch blocks
+    var firstBranchBlock = null;
+    var secondBranchBlock = null;
     for (var i = 0; i < result.length; i++) {
-        if (result[i].id == firstSubstackBlockId) {
-            firstSubstackBlock = result[i];
+        if (result[i].id == firstBranchBlockId) {
+            firstBranchBlock = result[i];
         }
-        if (result[i].id == secondSubstackBlockId) {
-            secondSubstackBlock = result[i];
+        if (result[i].id == secondBranchBlockId) {
+            secondBranchBlock = result[i];
         }
     }
-    t.type(firstSubstackBlock, 'object');
-    t.type(secondSubstackBlock, 'object');
+    t.type(firstBranchBlock, 'object');
+    t.type(secondBranchBlock, 'object');
     t.end();
 });
 
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 518317f59..244c0e03c 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -19,7 +19,7 @@ test('spec', function (t) {
     t.type(b.getBlock, 'function');
     t.type(b.getStacks, 'function');
     t.type(b.getNextBlock, 'function');
-    t.type(b.getSubstack, 'function');
+    t.type(b.getBranch, 'function');
     t.type(b.getOpcode, 'function');
 
 
@@ -119,9 +119,9 @@ test('getNextBlock', function (t) {
     t.end();
 });
 
-test('getSubstack', function (t) {
+test('getBranch', function (t) {
     var b = new Blocks();
-    // Single substack
+    // Single branch
     b.createBlock({
         id: 'foo',
         opcode: 'TEST_BLOCK',
@@ -144,18 +144,18 @@ test('getSubstack', function (t) {
         topLevel: false
     });
 
-    var substack = b.getSubstack('foo');
-    t.equals(substack, 'foo2');
+    var branch = b.getBranch('foo');
+    t.equals(branch, 'foo2');
 
-    var notSubstack = b.getSubstack('?');
-    t.equals(notSubstack, null);
+    var notBranch = b.getBranch('?');
+    t.equals(notBranch, null);
 
     t.end();
 });
 
-test('getSubstack2', function (t) {
+test('getBranch2', function (t) {
     var b = new Blocks();
-    // Second substack
+    // Second branch
     b.createBlock({
         id: 'foo',
         opcode: 'TEST_BLOCK',
@@ -190,15 +190,15 @@ test('getSubstack2', function (t) {
         topLevel: false
     });
 
-    var substack1 = b.getSubstack('foo', 1);
-    var substack2 = b.getSubstack('foo', 2);
-    t.equals(substack1, 'foo2');
-    t.equals(substack2, 'foo3');
+    var branch1 = b.getBranch('foo', 1);
+    var branch2 = b.getBranch('foo', 2);
+    t.equals(branch1, 'foo2');
+    t.equals(branch2, 'foo3');
 
     t.end();
 });
 
-test('getSubstack with none', function (t) {
+test('getBranch with none', function (t) {
     var b = new Blocks();
     b.createBlock({
         id: 'foo',
@@ -208,8 +208,8 @@ test('getSubstack with none', function (t) {
         inputs: {},
         topLevel: true
     });
-    var noSubstack = b.getSubstack('foo');
-    t.equals(noSubstack, null);
+    var noBranch = b.getBranch('foo');
+    t.equals(noBranch, null);
     t.end();
 });
 
diff --git a/vm.js b/vm.js
index 00353aaa0..a31504ded 100644
--- a/vm.js
+++ b/vm.js
@@ -47,8 +47,14 @@
 	var EventEmitter = __webpack_require__(1);
 	var util = __webpack_require__(2);
 
-	var Blocks = __webpack_require__(6);
-	var Runtime = __webpack_require__(118);
+	var Sprite = __webpack_require__(6);
+	var Runtime = __webpack_require__(61);
+
+	/**
+	 * Whether the environment is a WebWorker.
+	 * @const{boolean}
+	 */
+	var ENV_WORKER = typeof importScripts === 'function';
 
 	/**
 	 * Handles connections between blocks, stage, and extensions.
@@ -61,19 +67,41 @@
 	    // Bind event emitter and runtime to VM instance
 	    // @todo Post message (Web Worker) polyfill
 	    EventEmitter.call(instance);
-	    instance.blocks = new Blocks();
-	    instance.runtime = new Runtime(instance.blocks);
+	    // @todo support multiple targets/sprites.
+	    // This is just a demo/example.
+	    var exampleSprite = new Sprite();
+	    exampleSprite.createClone();
+	    var exampleTargets = [exampleSprite.clones[0]];
+	    instance.exampleSprite = exampleSprite;
+	    instance.runtime = new Runtime(exampleTargets);
 
 	    /**
 	     * Event listeners for scratch-blocks.
 	     */
 	    instance.blockListener = (
-	        instance.blocks.generateBlockListener(false, instance.runtime)
+	        exampleSprite.blocks.generateBlockListener(false, instance.runtime)
 	    );
 
 	    instance.flyoutBlockListener = (
-	        instance.blocks.generateBlockListener(true, instance.runtime)
+	        exampleSprite.blocks.generateBlockListener(true, instance.runtime)
 	    );
+
+	    // Runtime emits are passed along as VM emits.
+	    instance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
+	        instance.emit(Runtime.STACK_GLOW_ON, {id: id});
+	    });
+	    instance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
+	        instance.emit(Runtime.STACK_GLOW_OFF, {id: id});
+	    });
+	    instance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
+	        instance.emit(Runtime.BLOCK_GLOW_ON, {id: id});
+	    });
+	    instance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
+	        instance.emit(Runtime.BLOCK_GLOW_OFF, {id: id});
+	    });
+	    instance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
+	        instance.emit(Runtime.VISUAL_REPORT, {id: id, value: value});
+	    });
 	}
 
 	/**
@@ -81,6 +109,109 @@
 	 */
 	util.inherits(VirtualMachine, EventEmitter);
 
+	/**
+	 * Start running the VM - do this before anything else.
+	 */
+	VirtualMachine.prototype.start = function () {
+	    this.runtime.start();
+	};
+
+	/**
+	 * "Green flag" handler - start all threads starting with a green flag.
+	 */
+	VirtualMachine.prototype.greenFlag = function () {
+	    this.runtime.greenFlag();
+	};
+
+	/**
+	 * Stop all threads and running activities.
+	 */
+	VirtualMachine.prototype.stopAll = function () {
+	    this.runtime.stopAll();
+	};
+
+	/**
+	 * Get data for playground. Data comes back in an emitted event.
+	 */
+	VirtualMachine.prototype.getPlaygroundData = function () {
+	    this.emit('playgroundData', {
+	        blocks: this.exampleSprite.blocks,
+	        threads: this.runtime.threads
+	    });
+	};
+
+	/**
+	 * Handle an animation frame.
+	 */
+	VirtualMachine.prototype.animationFrame = function () {
+	    this.runtime.animationFrame();
+	};
+
+	/*
+	 * Worker handlers: for all public methods available above,
+	 * we must also provide a message handler in case the VM is run
+	 * from a worker environment.
+	 */
+	if (ENV_WORKER) {
+	    self.importScripts(
+	        './node_modules/scratch-render/render-worker.js'
+	    );
+	    self.renderer = new self.RenderWebGLWorker();
+	    self.vmInstance = new VirtualMachine();
+	    self.onmessage = function (e) {
+	        var messageData = e.data;
+	        switch (messageData.method) {
+	        case 'start':
+	            self.vmInstance.runtime.start();
+	            break;
+	        case 'greenFlag':
+	            self.vmInstance.runtime.greenFlag();
+	            break;
+	        case 'stopAll':
+	            self.vmInstance.runtime.stopAll();
+	            break;
+	        case 'blockListener':
+	            self.vmInstance.blockListener(messageData.args);
+	            break;
+	        case 'flyoutBlockListener':
+	            self.vmInstance.flyoutBlockListener(messageData.args);
+	            break;
+	        case 'getPlaygroundData':
+	            self.postMessage({
+	                method: 'playgroundData',
+	                blocks: self.vmInstance.exampleSprite.blocks,
+	                threads: self.vmInstance.runtime.threads
+	            });
+	            break;
+	        case 'animationFrame':
+	            self.vmInstance.animationFrame();
+	            break;
+	        default:
+	            if (e.data.id == 'RendererConnected') {
+	                //initRenderWorker();
+	            }
+	            self.renderer.onmessage(e);
+	            break;
+	        }
+	    };
+	    // Bind runtime's emitted events to postmessages.
+	    self.vmInstance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
+	        self.postMessage({method: Runtime.STACK_GLOW_ON, id: id});
+	    });
+	    self.vmInstance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
+	        self.postMessage({method: Runtime.STACK_GLOW_OFF, id: id});
+	    });
+	    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
+	        self.postMessage({method: Runtime.BLOCK_GLOW_ON, id: id});
+	    });
+	    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
+	        self.postMessage({method: Runtime.BLOCK_GLOW_OFF, id: id});
+	    });
+	    self.vmInstance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
+	        self.postMessage({method: Runtime.VISUAL_REPORT, id: id, value: value});
+	    });
+	}
+
 	/**
 	 * Export and bind to `window`
 	 */
@@ -1129,7 +1260,315 @@
 /* 6 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var adapter = __webpack_require__(7);
+	var Clone = __webpack_require__(7);
+	var Blocks = __webpack_require__(10);
+
+	/**
+	 * 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.
+	 * @constructor
+	 */
+	function Sprite (blocks) {
+	    if (!blocks) {
+	        // Shared set of blocks for all clones.
+	        blocks = new Blocks();
+	    }
+	    this.blocks = blocks;
+	    this.clones = [];
+	}
+
+	/**
+	 * Create a clone of this sprite.
+	 * @returns {!Clone} Newly created clone.
+	 */
+	Sprite.prototype.createClone = function () {
+	    var newClone = new Clone(this.blocks);
+	    this.clones.push(newClone);
+	    return newClone;
+	};
+
+	module.exports = Sprite;
+
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var util = __webpack_require__(2);
+	var MathUtil = __webpack_require__(8);
+	var Target = __webpack_require__(9);
+
+	/**
+	 * Clone (instance) of a sprite.
+	 * @param {!Blocks} spriteBlocks Reference to the sprite's blocks.
+	 * @constructor
+	 */
+	function Clone(spriteBlocks) {
+	    Target.call(this, spriteBlocks);
+	    /**
+	     * Reference to the global renderer for this VM, if one exists.
+	     * @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;
+	    }
+	    /**
+	     * ID of the drawable for this clone returned by the renderer, if rendered.
+	     * @type {?Number}
+	     */
+	    this.drawableID = null;
+
+	    this.initDrawable();
+	}
+	util.inherits(Clone, Target);
+
+	/**
+	 * Create a clone's drawable with the this.renderer.
+	 */
+	Clone.prototype.initDrawable = function () {
+	    if (this.renderer) {
+	        var createPromise = this.renderer.createDrawable();
+	        var instance = this;
+	        createPromise.then(function (id) {
+	            instance.drawableID = id;
+	        });
+	    }
+	};
+
+	// Clone-level properties.
+	/**
+	 * Scratch X coordinate. Currently should range from -240 to 240.
+	 * @type {!number}
+	 */
+	Clone.prototype.x = 0;
+
+	/**
+	 * Scratch Y coordinate. Currently should range from -180 to 180.
+	 * @type {!number}
+	 */
+	Clone.prototype.y = 0;
+
+	/**
+	 * Scratch direction. Currently should range from -179 to 180.
+	 * @type {!number}
+	 */
+	Clone.prototype.direction = 90;
+
+	/**
+	 * Whether the clone is currently visible.
+	 * @type {!boolean}
+	 */
+	Clone.prototype.visible = true;
+
+	/**
+	 * Size of clone as a percent of costume size. Ranges from 5% to 535%.
+	 * @type {!number}
+	 */
+	Clone.prototype.size = 100;
+
+	/**
+	 * Map of current graphic effect values.
+	 * @type {!Object.<string, number>}
+	 */
+	Clone.prototype.effects = {
+	    'color': 0,
+	    'fisheye': 0,
+	    'whirl': 0,
+	    'pixelate': 0,
+	    'mosaic': 0,
+	    'brightness': 0,
+	    'ghost': 0
+	};
+	// End clone-level properties.
+
+	/**
+	 * Set the X and Y coordinates of a clone.
+	 * @param {!number} x New X coordinate of clone, in Scratch coordinates.
+	 * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
+	 */
+	Clone.prototype.setXY = function (x, y) {
+	    this.x = x;
+	    this.y = y;
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            position: [this.x, this.y]
+	        });
+	    }
+	};
+
+	/**
+	 * Set the direction of a clone.
+	 * @param {!number} direction New direction of clone.
+	 */
+	Clone.prototype.setDirection = function (direction) {
+	    // Keep direction between -179 and +180.
+	    this.direction = MathUtil.wrapClamp(direction, -179, 180);
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            direction: this.direction
+	        });
+	    }
+	};
+
+	/**
+	 * Set a say bubble on this clone.
+	 * @param {?string} type Type of say bubble: "say", "think", or null.
+	 * @param {?string} message Message to put in say bubble.
+	 */
+	Clone.prototype.setSay = function (type, message) {
+	    // @todo: Render to stage.
+	    if (!type || !message) {
+	        console.log('Clearing say bubble');
+	        return;
+	    }
+	    console.log('Setting say bubble:', type, message);
+	};
+
+	/**
+	 * Set visibility of the clone; i.e., whether it's shown or hidden.
+	 * @param {!boolean} visible True if the sprite should be shown.
+	 */
+	Clone.prototype.setVisible = function (visible) {
+	    this.visible = visible;
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            visible: this.visible
+	        });
+	    }
+	};
+
+	/**
+	 * Set size of the clone, as a percentage of the costume size.
+	 * @param {!number} size Size of clone, from 5 to 535.
+	 */
+	Clone.prototype.setSize = function (size) {
+	    // Keep size between 5% and 535%.
+	    this.size = MathUtil.clamp(size, 5, 535);
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            scale: [this.size, this.size]
+	        });
+	    }
+	};
+
+	/**
+	 * Set a particular graphic effect on this clone.
+	 * @param {!string} effectName Name of effect (see `Clone.prototype.effects`).
+	 * @param {!number} value Numerical magnitude of effect.
+	 */
+	Clone.prototype.setEffect = function (effectName, value) {
+	    this.effects[effectName] = value;
+	    if (this.renderer) {
+	        var props = {};
+	        props[effectName] = this.effects[effectName];
+	        this.renderer.updateDrawableProperties(this.drawableID, props);
+	    }
+	};
+
+	/**
+	 * Clear all graphic effects on this clone.
+	 */
+	Clone.prototype.clearEffects = function () {
+	    for (var effectName in this.effects) {
+	        this.effects[effectName] = 0;
+	    }
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, this.effects);
+	    }
+	};
+
+	module.exports = Clone;
+
+
+/***/ },
+/* 8 */
+/***/ function(module, exports) {
+
+	function MathUtil () {}
+
+	/**
+	 * Convert a value from degrees to radians.
+	 * @param {!number} deg Value in degrees.
+	 * @return {!number} Equivalent value in radians.
+	 */
+	MathUtil.degToRad = function (deg) {
+	    return (Math.PI * (90 - deg)) / 180;
+	};
+
+	/**
+	 * Convert a value from radians to degrees.
+	 * @param {!number} rad Value in radians.
+	 * @return {!number} Equivalent value in degrees.
+	 */
+	MathUtil.radToDeg = function (rad) {
+	    return rad * 180 / Math.PI;
+	};
+
+	/**
+	 * Clamp a number between two limits.
+	 * If n < min, return min. If n > max, return max. Else, return n.
+	 * @param {!number} n Number to clamp.
+	 * @param {!number} min Minimum limit.
+	 * @param {!number} max Maximum limit.
+	 * @return {!number} Value of n clamped to min and max.
+	 */
+	MathUtil.clamp = function (n, min, max) {
+	    return Math.min(Math.max(n, min), max);
+	};
+
+	/**
+	 * Keep a number between two limits, wrapping "extra" into the range.
+	 * e.g., wrapClamp(7, 1, 5) == 2
+	 * wrapClamp(0, 1, 5) == 5
+	 * wrapClamp(-11, -10, 6) == 6, etc.
+	 * @param {!number} n Number to wrap.
+	 * @param {!number} min Minimum limit.
+	 * @param {!number} max Maximum limit.
+	 * @return {!number} Value of n wrapped between min and max.
+	 */
+	MathUtil.wrapClamp = function (n, min, max) {
+	    var range = (max - min) + 1;
+	    return n - Math.floor((n - min) / range) * range;
+	};
+
+	module.exports = MathUtil;
+
+
+/***/ },
+/* 9 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Blocks = __webpack_require__(10);
+
+	/**
+	 * @fileoverview
+	 * A Target is an abstract "code-running" object for the Scratch VM.
+	 * Examples include sprites/clones or potentially physical-world devices.
+	 */
+
+	/**
+	 * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
+	 * @constructor
+	 */
+	function Target (blocks) {
+	    if (!blocks) {
+	        blocks = new Blocks(this);
+	    }
+	    this.blocks = blocks;
+	}
+
+	module.exports = Target;
+
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var adapter = __webpack_require__(11);
 
 	/**
 	 * @fileoverview
@@ -1153,6 +1592,13 @@
 	    this._stacks = [];
 	}
 
+	/**
+	 * Blockly inputs that represent statements/branch.
+	 * are prefixed with this string.
+	 * @const{string}
+	 */
+	Blocks.BRANCH_INPUT_PREFIX = 'SUBSTACK';
+
 	/**
 	 * Provide an object with metadata for the requested block ID.
 	 * @param {!string} blockId ID of block we have stored.
@@ -1181,19 +1627,19 @@
 	};
 
 	/**
-	 * Get the substack for a particular C-shaped block
-	 * @param {?string} id ID for block to get the substack for
-	 * @param {?number} substackNum Which substack to select (e.g. for if-else)
-	 * @return {?string} ID of block in the substack
+	 * Get the branch for a particular C-shaped block.
+	 * @param {?string} id ID for block to get the branch for.
+	 * @param {?number} branchNum Which branch to select (e.g. for if-else).
+	 * @return {?string} ID of block in the branch.
 	 */
-	Blocks.prototype.getSubstack = function (id, substackNum) {
+	Blocks.prototype.getBranch = function (id, branchNum) {
 	    var block = this._blocks[id];
 	    if (typeof block === 'undefined') return null;
-	    if (!substackNum) substackNum = 1;
+	    if (!branchNum) branchNum = 1;
 
-	    var inputName = 'SUBSTACK';
-	    if (substackNum > 1) {
-	        inputName += substackNum;
+	    var inputName = Blocks.BRANCH_INPUT_PREFIX;
+	    if (branchNum > 1) {
+	        inputName += branchNum;
 	    }
 
 	    // Empty C-block?
@@ -1211,6 +1657,34 @@
 	    return this._blocks[id].opcode;
 	};
 
+	/**
+	 * Get all fields and their values for a block.
+	 * @param {?string} id ID of block to query.
+	 * @return {!Object} All fields and their values.
+	 */
+	Blocks.prototype.getFields = function (id) {
+	    if (typeof this._blocks[id] === 'undefined') return null;
+	    return this._blocks[id].fields;
+	};
+
+	/**
+	 * Get all non-branch inputs for a block.
+	 * @param {?string} id ID of block to query.
+	 * @return {!Object} All non-branch inputs and their associated blocks.
+	 */
+	Blocks.prototype.getInputs = function (id) {
+	    if (typeof this._blocks[id] === 'undefined') return null;
+	    var inputs = {};
+	    for (var input in this._blocks[id].inputs) {
+	        // Ignore blocks prefixed with branch prefix.
+	        if (input.substring(0, Blocks.BRANCH_INPUT_PREFIX.length)
+	            != Blocks.BRANCH_INPUT_PREFIX) {
+	            inputs[input] = this._blocks[id].inputs[input];
+	        }
+	    }
+	    return inputs;
+	};
+
 	// ---------------------------------------------------------------------
 
 	/**
@@ -1362,7 +1836,7 @@
 	        this.deleteBlock({id: block.next});
 	    }
 
-	    // Delete inputs (including substacks)
+	    // Delete inputs (including branches)
 	    for (var input in block.inputs) {
 	        // If it's null, the block in this input moved away.
 	        if (block.inputs[input].block !== null) {
@@ -1406,16 +1880,10 @@
 
 
 /***/ },
-/* 7 */
+/* 11 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var html = __webpack_require__(8);
-	var memoize = __webpack_require__(57);
-	var parseDOM = memoize(html.parseDOM, {
-	    length: 1,
-	    resolvers: [String],
-	    max: 200
-	});
+	var html = __webpack_require__(12);
 
 	/**
 	 * Adapter between block creation events and block representation which can be
@@ -1428,7 +1896,7 @@
 	    if (typeof e !== 'object') return;
 	    if (typeof e.xml !== 'object') return;
 
-	    return domToBlocks(parseDOM(e.xml.outerHTML));
+	    return domToBlocks(html.parseDOM(e.xml.outerHTML));
 	};
 
 	/**
@@ -1511,9 +1979,17 @@
 	        case 'field':
 	            // Add the field to this block.
 	            var fieldName = xmlChild.attribs.name;
+	            var fieldData = '';
+	            if (xmlChild.children.length > 0 && xmlChild.children[0].data) {
+	                fieldData = xmlChild.children[0].data;
+	            } else {
+	                // If the child of the field with a data property
+	                // doesn't exist, set the data to an empty string.
+	                fieldData = '';
+	            }
 	            block.fields[fieldName] = {
 	                name: fieldName,
-	                value: xmlChild.children[0].data
+	                value: fieldData
 	            };
 	            break;
 	        case 'value':
@@ -1543,11 +2019,11 @@
 
 
 /***/ },
-/* 8 */
+/* 12 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Parser = __webpack_require__(9),
-	    DomHandler = __webpack_require__(16);
+	var Parser = __webpack_require__(13),
+	    DomHandler = __webpack_require__(20);
 
 	function defineProp(name, value){
 		delete module.exports[name];
@@ -1557,26 +2033,26 @@
 
 	module.exports = {
 		Parser: Parser,
-		Tokenizer: __webpack_require__(10),
-		ElementType: __webpack_require__(17),
+		Tokenizer: __webpack_require__(14),
+		ElementType: __webpack_require__(21),
 		DomHandler: DomHandler,
 		get FeedHandler(){
-			return defineProp("FeedHandler", __webpack_require__(20));
+			return defineProp("FeedHandler", __webpack_require__(24));
 		},
 		get Stream(){
-			return defineProp("Stream", __webpack_require__(21));
+			return defineProp("Stream", __webpack_require__(25));
 		},
 		get WritableStream(){
-			return defineProp("WritableStream", __webpack_require__(22));
+			return defineProp("WritableStream", __webpack_require__(26));
 		},
 		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(43));
+			return defineProp("ProxyHandler", __webpack_require__(47));
 		},
 		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(44));
+			return defineProp("DomUtils", __webpack_require__(48));
 		},
 		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(56));
+			return defineProp("CollectingHandler", __webpack_require__(60));
 		},
 		// For legacy support
 		DefaultHandler: DomHandler,
@@ -1617,10 +2093,10 @@
 
 
 /***/ },
-/* 9 */
+/* 13 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Tokenizer = __webpack_require__(10);
+	var Tokenizer = __webpack_require__(14);
 
 	/*
 		Options:
@@ -1975,15 +2451,15 @@
 
 
 /***/ },
-/* 10 */
+/* 14 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Tokenizer;
 
-	var decodeCodePoint = __webpack_require__(11),
-	    entityMap = __webpack_require__(13),
-	    legacyMap = __webpack_require__(14),
-	    xmlMap    = __webpack_require__(15),
+	var decodeCodePoint = __webpack_require__(15),
+	    entityMap = __webpack_require__(17),
+	    legacyMap = __webpack_require__(18),
+	    xmlMap    = __webpack_require__(19),
 
 	    i = 0,
 
@@ -2887,10 +3363,10 @@
 
 
 /***/ },
-/* 11 */
+/* 15 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var decodeMap = __webpack_require__(12);
+	var decodeMap = __webpack_require__(16);
 
 	module.exports = decodeCodePoint;
 
@@ -2919,7 +3395,7 @@
 
 
 /***/ },
-/* 12 */
+/* 16 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -2954,7 +3430,7 @@
 	};
 
 /***/ },
-/* 13 */
+/* 17 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5086,7 +5562,7 @@
 	};
 
 /***/ },
-/* 14 */
+/* 18 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5199,7 +5675,7 @@
 	};
 
 /***/ },
-/* 15 */
+/* 19 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5211,14 +5687,14 @@
 	};
 
 /***/ },
-/* 16 */
+/* 20 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(17);
+	var ElementType = __webpack_require__(21);
 
 	var re_whitespace = /\s+/g;
-	var NodePrototype = __webpack_require__(18);
-	var ElementPrototype = __webpack_require__(19);
+	var NodePrototype = __webpack_require__(22);
+	var ElementPrototype = __webpack_require__(23);
 
 	function DomHandler(callback, options, elementCB){
 		if(typeof callback === "object"){
@@ -5399,7 +5875,7 @@
 
 
 /***/ },
-/* 17 */
+/* 21 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -5420,7 +5896,7 @@
 
 
 /***/ },
-/* 18 */
+/* 22 */
 /***/ function(module, exports) {
 
 	// This object will be used as the prototype for Nodes when creating a
@@ -5470,11 +5946,11 @@
 
 
 /***/ },
-/* 19 */
+/* 23 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// DOM-Level-1-compliant structure
-	var NodePrototype = __webpack_require__(18);
+	var NodePrototype = __webpack_require__(22);
 	var ElementPrototype = module.exports = Object.create(NodePrototype);
 
 	var domLvl1 = {
@@ -5496,10 +5972,10 @@
 
 
 /***/ },
-/* 20 */
+/* 24 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var index = __webpack_require__(8),
+	var index = __webpack_require__(12),
 	    DomHandler = index.DomHandler,
 		DomUtils = index.DomUtils;
 
@@ -5597,12 +6073,12 @@
 
 
 /***/ },
-/* 21 */
+/* 25 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(22);
+	var Parser = __webpack_require__(26);
 
 	function Stream(options){
 		Parser.call(this, new Cbs(this), options);
@@ -5616,7 +6092,7 @@
 		this.scope = scope;
 	}
 
-	var EVENTS = __webpack_require__(8).EVENTS;
+	var EVENTS = __webpack_require__(12).EVENTS;
 
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
@@ -5637,13 +6113,13 @@
 	});
 
 /***/ },
-/* 22 */
+/* 26 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(9),
-	    WritableStream = __webpack_require__(23).Writable || __webpack_require__(42).Writable;
+	var Parser = __webpack_require__(13),
+	    WritableStream = __webpack_require__(27).Writable || __webpack_require__(46).Writable;
 
 	function Stream(cbs, options){
 		var parser = this._parser = new Parser(cbs, options);
@@ -5663,7 +6139,7 @@
 	};
 
 /***/ },
-/* 23 */
+/* 27 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -5693,11 +6169,11 @@
 	var inherits = __webpack_require__(5);
 
 	inherits(Stream, EE);
-	Stream.Readable = __webpack_require__(24);
-	Stream.Writable = __webpack_require__(38);
-	Stream.Duplex = __webpack_require__(39);
-	Stream.Transform = __webpack_require__(40);
-	Stream.PassThrough = __webpack_require__(41);
+	Stream.Readable = __webpack_require__(28);
+	Stream.Writable = __webpack_require__(42);
+	Stream.Duplex = __webpack_require__(43);
+	Stream.Transform = __webpack_require__(44);
+	Stream.PassThrough = __webpack_require__(45);
 
 	// Backwards-compat with node 0.4.x
 	Stream.Stream = Stream;
@@ -5796,24 +6272,24 @@
 
 
 /***/ },
-/* 24 */
+/* 28 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(25);
-	exports.Stream = __webpack_require__(23);
+	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(29);
+	exports.Stream = __webpack_require__(27);
 	exports.Readable = exports;
-	exports.Writable = __webpack_require__(34);
-	exports.Duplex = __webpack_require__(33);
-	exports.Transform = __webpack_require__(36);
-	exports.PassThrough = __webpack_require__(37);
+	exports.Writable = __webpack_require__(38);
+	exports.Duplex = __webpack_require__(37);
+	exports.Transform = __webpack_require__(40);
+	exports.PassThrough = __webpack_require__(41);
 	if (!process.browser && process.env.READABLE_STREAM === 'disable') {
-	  module.exports = __webpack_require__(23);
+	  module.exports = __webpack_require__(27);
 	}
 
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 25 */
+/* 29 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -5840,12 +6316,12 @@
 	module.exports = Readable;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(26);
+	var isArray = __webpack_require__(30);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(27).Buffer;
+	var Buffer = __webpack_require__(31).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
@@ -5858,10 +6334,10 @@
 	};
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(23);
+	var Stream = __webpack_require__(27);
 
 	/*<replacement>*/
-	var util = __webpack_require__(31);
+	var util = __webpack_require__(35);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -5869,7 +6345,7 @@
 
 
 	/*<replacement>*/
-	var debug = __webpack_require__(32);
+	var debug = __webpack_require__(36);
 	if (debug && debug.debuglog) {
 	  debug = debug.debuglog('stream');
 	} else {
@@ -5881,7 +6357,7 @@
 	util.inherits(Readable, Stream);
 
 	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(33);
+	  var Duplex = __webpack_require__(37);
 
 	  options = options || {};
 
@@ -5942,14 +6418,14 @@
 	  this.encoding = null;
 	  if (options.encoding) {
 	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(35).StringDecoder;
+	      StringDecoder = __webpack_require__(39).StringDecoder;
 	    this.decoder = new StringDecoder(options.encoding);
 	    this.encoding = options.encoding;
 	  }
 	}
 
 	function Readable(options) {
-	  var Duplex = __webpack_require__(33);
+	  var Duplex = __webpack_require__(37);
 
 	  if (!(this instanceof Readable))
 	    return new Readable(options);
@@ -6052,7 +6528,7 @@
 	// backwards compatibility.
 	Readable.prototype.setEncoding = function(enc) {
 	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(35).StringDecoder;
+	    StringDecoder = __webpack_require__(39).StringDecoder;
 	  this._readableState.decoder = new StringDecoder(enc);
 	  this._readableState.encoding = enc;
 	  return this;
@@ -6771,7 +7247,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 26 */
+/* 30 */
 /***/ function(module, exports) {
 
 	module.exports = Array.isArray || function (arr) {
@@ -6780,7 +7256,7 @@
 
 
 /***/ },
-/* 27 */
+/* 31 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
@@ -6793,9 +7269,9 @@
 
 	'use strict'
 
-	var base64 = __webpack_require__(28)
-	var ieee754 = __webpack_require__(29)
-	var isArray = __webpack_require__(30)
+	var base64 = __webpack_require__(32)
+	var ieee754 = __webpack_require__(33)
+	var isArray = __webpack_require__(34)
 
 	exports.Buffer = Buffer
 	exports.SlowBuffer = SlowBuffer
@@ -8332,10 +8808,10 @@
 	  return i
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27).Buffer, (function() { return this; }())))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31).Buffer, (function() { return this; }())))
 
 /***/ },
-/* 28 */
+/* 32 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -8465,7 +8941,7 @@
 
 
 /***/ },
-/* 29 */
+/* 33 */
 /***/ function(module, exports) {
 
 	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -8555,7 +9031,7 @@
 
 
 /***/ },
-/* 30 */
+/* 34 */
 /***/ function(module, exports) {
 
 	var toString = {}.toString;
@@ -8566,7 +9042,7 @@
 
 
 /***/ },
-/* 31 */
+/* 35 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
@@ -8677,16 +9153,16 @@
 	  return Object.prototype.toString.call(o);
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27).Buffer))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31).Buffer))
 
 /***/ },
-/* 32 */
+/* 36 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 33 */
+/* 37 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -8727,12 +9203,12 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(31);
+	var util = __webpack_require__(35);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Readable = __webpack_require__(25);
-	var Writable = __webpack_require__(34);
+	var Readable = __webpack_require__(29);
+	var Writable = __webpack_require__(38);
 
 	util.inherits(Duplex, Readable);
 
@@ -8782,7 +9258,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 34 */
+/* 38 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -8813,18 +9289,18 @@
 	module.exports = Writable;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(27).Buffer;
+	var Buffer = __webpack_require__(31).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(31);
+	var util = __webpack_require__(35);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(23);
+	var Stream = __webpack_require__(27);
 
 	util.inherits(Writable, Stream);
 
@@ -8835,7 +9311,7 @@
 	}
 
 	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(33);
+	  var Duplex = __webpack_require__(37);
 
 	  options = options || {};
 
@@ -8923,7 +9399,7 @@
 	}
 
 	function Writable(options) {
-	  var Duplex = __webpack_require__(33);
+	  var Duplex = __webpack_require__(37);
 
 	  // Writable ctor is applied to Duplexes, though they're not
 	  // instanceof Writable, they're instanceof Readable.
@@ -9266,7 +9742,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 35 */
+/* 39 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -9290,7 +9766,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__(27).Buffer;
+	var Buffer = __webpack_require__(31).Buffer;
 
 	var isBufferEncoding = Buffer.isEncoding
 	  || function(encoding) {
@@ -9493,7 +9969,7 @@
 
 
 /***/ },
-/* 36 */
+/* 40 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -9562,10 +10038,10 @@
 
 	module.exports = Transform;
 
-	var Duplex = __webpack_require__(33);
+	var Duplex = __webpack_require__(37);
 
 	/*<replacement>*/
-	var util = __webpack_require__(31);
+	var util = __webpack_require__(35);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -9708,7 +10184,7 @@
 
 
 /***/ },
-/* 37 */
+/* 41 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -9738,10 +10214,10 @@
 
 	module.exports = PassThrough;
 
-	var Transform = __webpack_require__(36);
+	var Transform = __webpack_require__(40);
 
 	/*<replacement>*/
-	var util = __webpack_require__(31);
+	var util = __webpack_require__(35);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -9760,41 +10236,41 @@
 
 
 /***/ },
-/* 38 */
+/* 42 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(34)
+	module.exports = __webpack_require__(38)
 
 
 /***/ },
-/* 39 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(33)
-
-
-/***/ },
-/* 40 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(36)
-
-
-/***/ },
-/* 41 */
+/* 43 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = __webpack_require__(37)
 
 
 /***/ },
-/* 42 */
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+	module.exports = __webpack_require__(40)
+
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+	module.exports = __webpack_require__(41)
+
+
+/***/ },
+/* 46 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 43 */
+/* 47 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = ProxyHandler;
@@ -9803,7 +10279,7 @@
 		this._cbs = cbs || {};
 	}
 
-	var EVENTS = __webpack_require__(8).EVENTS;
+	var EVENTS = __webpack_require__(12).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -9826,18 +10302,18 @@
 	});
 
 /***/ },
-/* 44 */
+/* 48 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var DomUtils = module.exports;
 
 	[
-		__webpack_require__(45),
-		__webpack_require__(51),
-		__webpack_require__(52),
-		__webpack_require__(53),
-		__webpack_require__(54),
-		__webpack_require__(55)
+		__webpack_require__(49),
+		__webpack_require__(55),
+		__webpack_require__(56),
+		__webpack_require__(57),
+		__webpack_require__(58),
+		__webpack_require__(59)
 	].forEach(function(ext){
 		Object.keys(ext).forEach(function(key){
 			DomUtils[key] = ext[key].bind(DomUtils);
@@ -9846,11 +10322,11 @@
 
 
 /***/ },
-/* 45 */
+/* 49 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(17),
-	    getOuterHTML = __webpack_require__(46),
+	var ElementType = __webpack_require__(21),
+	    getOuterHTML = __webpack_require__(50),
 	    isTag = ElementType.isTag;
 
 	module.exports = {
@@ -9874,14 +10350,14 @@
 
 
 /***/ },
-/* 46 */
+/* 50 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/*
 	  Module dependencies
 	*/
-	var ElementType = __webpack_require__(47);
-	var entities = __webpack_require__(48);
+	var ElementType = __webpack_require__(51);
+	var entities = __webpack_require__(52);
 
 	/*
 	  Boolean Attributes
@@ -10058,7 +10534,7 @@
 
 
 /***/ },
-/* 47 */
+/* 51 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -10077,11 +10553,11 @@
 	};
 
 /***/ },
-/* 48 */
+/* 52 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var encode = __webpack_require__(49),
-	    decode = __webpack_require__(50);
+	var encode = __webpack_require__(53),
+	    decode = __webpack_require__(54);
 
 	exports.decode = function(data, level){
 		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
@@ -10116,15 +10592,15 @@
 
 
 /***/ },
-/* 49 */
+/* 53 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var inverseXML = getInverseObj(__webpack_require__(15)),
+	var inverseXML = getInverseObj(__webpack_require__(19)),
 	    xmlReplacer = getInverseReplacer(inverseXML);
 
 	exports.XML = getInverse(inverseXML, xmlReplacer);
 
-	var inverseHTML = getInverseObj(__webpack_require__(13)),
+	var inverseHTML = getInverseObj(__webpack_require__(17)),
 	    htmlReplacer = getInverseReplacer(inverseHTML);
 
 	exports.HTML = getInverse(inverseHTML, htmlReplacer);
@@ -10195,13 +10671,13 @@
 
 
 /***/ },
-/* 50 */
+/* 54 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var entityMap = __webpack_require__(13),
-	    legacyMap = __webpack_require__(14),
-	    xmlMap    = __webpack_require__(15),
-	    decodeCodePoint = __webpack_require__(11);
+	var entityMap = __webpack_require__(17),
+	    legacyMap = __webpack_require__(18),
+	    xmlMap    = __webpack_require__(19),
+	    decodeCodePoint = __webpack_require__(15);
 
 	var decodeXMLStrict  = getStrictDecoder(xmlMap),
 	    decodeHTMLStrict = getStrictDecoder(entityMap);
@@ -10272,7 +10748,7 @@
 	};
 
 /***/ },
-/* 51 */
+/* 55 */
 /***/ function(module, exports) {
 
 	var getChildren = exports.getChildren = function(elem){
@@ -10302,7 +10778,7 @@
 
 
 /***/ },
-/* 52 */
+/* 56 */
 /***/ function(module, exports) {
 
 	exports.removeElement = function(elem){
@@ -10385,10 +10861,10 @@
 
 
 /***/ },
-/* 53 */
+/* 57 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var isTag = __webpack_require__(17).isTag;
+	var isTag = __webpack_require__(21).isTag;
 
 	module.exports = {
 		filter: filter,
@@ -10485,10 +10961,10 @@
 
 
 /***/ },
-/* 54 */
+/* 58 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(17);
+	var ElementType = __webpack_require__(21);
 	var isTag = exports.isTag = ElementType.isTag;
 
 	exports.testElement = function(options, element){
@@ -10578,7 +11054,7 @@
 
 
 /***/ },
-/* 55 */
+/* 59 */
 /***/ function(module, exports) {
 
 	// removeSubsets
@@ -10725,7 +11201,7 @@
 
 
 /***/ },
-/* 56 */
+/* 60 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = CollectingHandler;
@@ -10735,7 +11211,7 @@
 		this.events = [];
 	}
 
-	var EVENTS = __webpack_require__(8).EVENTS;
+	var EVENTS = __webpack_require__(12).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -10785,2173 +11261,37 @@
 	};
 
 
-/***/ },
-/* 57 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var normalizeOpts = __webpack_require__(58)
-	  , resolveLength = __webpack_require__(59)
-	  , plain         = __webpack_require__(65);
-
-	module.exports = function (fn/*, options*/) {
-		var options = normalizeOpts(arguments[1]), length;
-
-		if (!options.normalizer) {
-			length = options.length = resolveLength(options.length, fn.length, options.async);
-			if (length !== 0) {
-				if (options.primitive) {
-					if (length === false) {
-						options.normalizer = __webpack_require__(102);
-					} else if (length > 1) {
-						options.normalizer = __webpack_require__(103)(length);
-					}
-				} else {
-					if (length === false) options.normalizer = __webpack_require__(104)();
-					else if (length === 1) options.normalizer = __webpack_require__(106)();
-					else options.normalizer = __webpack_require__(107)(length);
-				}
-			}
-		}
-
-		// Assure extensions
-		if (options.async) __webpack_require__(108);
-		if (options.dispose) __webpack_require__(111);
-		if (options.maxAge) __webpack_require__(112);
-		if (options.max) __webpack_require__(115);
-		if (options.refCounter) __webpack_require__(117);
-
-		return plain(fn, options);
-	};
-
-
-/***/ },
-/* 58 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var forEach = Array.prototype.forEach, create = Object.create;
-
-	var process = function (src, obj) {
-		var key;
-		for (key in src) obj[key] = src[key];
-	};
-
-	module.exports = function (options/*, …options*/) {
-		var result = create(null);
-		forEach.call(arguments, function (options) {
-			if (options == null) return;
-			process(Object(options), result);
-		});
-		return result;
-	};
-
-
-/***/ },
-/* 59 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toPosInt = __webpack_require__(60);
-
-	module.exports = function (optsLength, fnLength, isAsync) {
-		var length;
-		if (isNaN(optsLength)) {
-			length = fnLength;
-			if (!(length >= 0)) return 1;
-			if (isAsync && length) return length - 1;
-			return length;
-		}
-		if (optsLength === false) return false;
-		return toPosInt(optsLength);
-	};
-
-
-/***/ },
-/* 60 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toInteger = __webpack_require__(61)
-
-	  , max = Math.max;
-
-	module.exports = function (value) { return max(0, toInteger(value)); };
-
-
 /***/ },
 /* 61 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var sign = __webpack_require__(62)
-
-	  , abs = Math.abs, floor = Math.floor;
-
-	module.exports = function (value) {
-		if (isNaN(value)) return 0;
-		value = Number(value);
-		if ((value === 0) || !isFinite(value)) return value;
-		return sign(value) * floor(abs(value));
-	};
-
-
-/***/ },
-/* 62 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(63)()
-		? Math.sign
-		: __webpack_require__(64);
-
-
-/***/ },
-/* 63 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {
-		var sign = Math.sign;
-		if (typeof sign !== 'function') return false;
-		return ((sign(10) === 1) && (sign(-20) === -1));
-	};
-
-
-/***/ },
-/* 64 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (value) {
-		value = Number(value);
-		if (isNaN(value) || (value === 0)) return value;
-		return (value > 0) ? 1 : -1;
-	};
-
-
-/***/ },
-/* 65 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var callable      = __webpack_require__(66)
-	  , forEach       = __webpack_require__(67)
-	  , extensions    = __webpack_require__(70)
-	  , configure     = __webpack_require__(71)
-	  , resolveLength = __webpack_require__(59)
-
-	  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-	module.exports = function self(fn/*, options */) {
-		var options, length, conf;
-
-		callable(fn);
-		options = Object(arguments[1]);
-
-		// Do not memoize already memoized function
-		if (hasOwnProperty.call(fn, '__memoized__') && !options.force) return fn;
-
-		// Resolve length;
-		length = resolveLength(options.length, fn.length, options.async && extensions.async);
-
-		// Configure cache map
-		conf = configure(fn, length, options);
-
-		// Bind eventual extensions
-		forEach(extensions, function (fn, name) {
-			if (options[name]) fn(options[name], conf, options);
-		});
-
-		if (self.__profiler__) self.__profiler__(conf);
-
-		conf.updateEnv();
-		return conf.memoized;
-	};
-
-
-/***/ },
-/* 66 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (fn) {
-		if (typeof fn !== 'function') throw new TypeError(fn + " is not a function");
-		return fn;
-	};
-
-
-/***/ },
-/* 67 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(68)('forEach');
-
-
-/***/ },
-/* 68 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Internal method, used by iteration functions.
-	// Calls a function for each key-value pair found in object
-	// Optionally takes compareFn to iterate object in specific order
-
-	'use strict';
-
-	var callable = __webpack_require__(66)
-	  , value    = __webpack_require__(69)
-
-	  , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
-	  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-	module.exports = function (method, defVal) {
-		return function (obj, cb/*, thisArg, compareFn*/) {
-			var list, thisArg = arguments[2], compareFn = arguments[3];
-			obj = Object(value(obj));
-			callable(cb);
-
-			list = keys(obj);
-			if (compareFn) {
-				list.sort((typeof compareFn === 'function') ? bind.call(compareFn, obj) : undefined);
-			}
-			if (typeof method !== 'function') method = list[method];
-			return call.call(method, list, function (key, index) {
-				if (!propertyIsEnumerable.call(obj, key)) return defVal;
-				return call.call(cb, thisArg, obj[key], key, obj, index);
-			});
-		};
-	};
-
-
-/***/ },
-/* 69 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (value) {
-		if (value == null) throw new TypeError("Cannot use null or undefined");
-		return value;
-	};
-
-
-/***/ },
-/* 70 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-
-/***/ },
-/* 71 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var customError      = __webpack_require__(72)
-	  , defineLength     = __webpack_require__(79)
-	  , d                = __webpack_require__(81)
-	  , ee               = __webpack_require__(86).methods
-	  , resolveResolve   = __webpack_require__(87)
-	  , resolveNormalize = __webpack_require__(101)
-
-	  , apply = Function.prototype.apply, call = Function.prototype.call
-	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty
-	  , defineProperties = Object.defineProperties
-	  , on = ee.on, emit = ee.emit;
-
-	module.exports = function (original, length, options) {
-		var cache = create(null), conf, memLength, get, set, del, clear, extDel, normalizer
-		  , getListeners, setListeners, deleteListeners, memoized, resolve;
-		if (length !== false) memLength = length;
-		else if (isNaN(original.length)) memLength = 1;
-		else memLength = original.length;
-
-		if (options.normalizer) {
-			normalizer = resolveNormalize(options.normalizer);
-			get = normalizer.get;
-			set = normalizer.set;
-			del = normalizer.delete;
-			clear = normalizer.clear;
-		}
-		if (options.resolvers != null) resolve = resolveResolve(options.resolvers);
-
-		if (get) {
-			memoized = defineLength(function (arg) {
-				var id, result, args = arguments;
-				if (resolve) args = resolve(args);
-				id = get(args);
-				if (id !== null) {
-					if (hasOwnProperty.call(cache, id)) {
-						if (getListeners) conf.emit('get', id, args, this);
-						return cache[id];
-					}
-				}
-				if (args.length === 1) result = call.call(original, this, args[0]);
-				else result = apply.call(original, this, args);
-				if (id === null) {
-					id = get(args);
-					if (id !== null) throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
-					id = set(args);
-				} else if (hasOwnProperty.call(cache, id)) {
-					throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
-				}
-				cache[id] = result;
-				if (setListeners) conf.emit('set', id);
-				return result;
-			}, memLength);
-		} else if (length === 0) {
-			memoized = function () {
-				var result;
-				if (hasOwnProperty.call(cache, 'data')) {
-					if (getListeners) conf.emit('get', 'data', arguments, this);
-					return cache.data;
-				}
-				if (!arguments.length) result = call.call(original, this);
-				else result = apply.call(original, this, arguments);
-				if (hasOwnProperty.call(cache, 'data')) {
-					throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
-				}
-				cache.data = result;
-				if (setListeners) conf.emit('set', 'data');
-				return result;
-			};
-		} else {
-			memoized = function (arg) {
-				var result, args = arguments, id;
-				if (resolve) args = resolve(arguments);
-				id = String(args[0]);
-				if (hasOwnProperty.call(cache, id)) {
-					if (getListeners) conf.emit('get', id, args, this);
-					return cache[id];
-				}
-				if (args.length === 1) result = call.call(original, this, args[0]);
-				else result = apply.call(original, this, args);
-				if (hasOwnProperty.call(cache, id)) {
-					throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
-				}
-				cache[id] = result;
-				if (setListeners) conf.emit('set', id);
-				return result;
-			};
-		}
-		conf = {
-			original: original,
-			memoized: memoized,
-			get: function (args) {
-				if (resolve) args = resolve(args);
-				if (get) return get(args);
-				return String(args[0]);
-			},
-			has: function (id) { return hasOwnProperty.call(cache, id); },
-			delete: function (id) {
-				var result;
-				if (!hasOwnProperty.call(cache, id)) return;
-				if (del) del(id);
-				result = cache[id];
-				delete cache[id];
-				if (deleteListeners) conf.emit('delete', id, result);
-			},
-			clear: function () {
-				var oldCache = cache;
-				if (clear) clear();
-				cache = create(null);
-				conf.emit('clear', oldCache);
-			},
-			on: function (type, listener) {
-				if (type === 'get') getListeners = true;
-				else if (type === 'set') setListeners = true;
-				else if (type === 'delete') deleteListeners = true;
-				return on.call(this, type, listener);
-			},
-			emit: emit,
-			updateEnv: function () { original = conf.original; }
-		};
-		if (get) {
-			extDel = defineLength(function (arg) {
-				var id, args = arguments;
-				if (resolve) args = resolve(args);
-				id = get(args);
-				if (id === null) return;
-				conf.delete(id);
-			}, memLength);
-		} else if (length === 0) {
-			extDel = function () { return conf.delete('data'); };
-		} else {
-			extDel = function (arg) {
-				if (resolve) arg = resolve(arguments)[0];
-				return conf.delete(arg);
-			};
-		}
-		defineProperties(memoized, {
-			__memoized__: d(true),
-			delete: d(extDel),
-			clear: d(conf.clear)
-		});
-		return conf;
-	};
-
-
-/***/ },
-/* 72 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var assign = __webpack_require__(73)
-
-	  , captureStackTrace = Error.captureStackTrace;
-
-	exports = module.exports = function (message/*, code, ext*/) {
-		var err = new Error(), code = arguments[1], ext = arguments[2];
-		if (ext == null) {
-			if (code && (typeof code === 'object')) {
-				ext = code;
-				code = null;
-			}
-		}
-		if (ext != null) assign(err, ext);
-		err.message = String(message);
-		if (code != null) err.code = String(code);
-		if (captureStackTrace) captureStackTrace(err, exports);
-		return err;
-	};
-
-
-/***/ },
-/* 73 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(74)()
-		? Object.assign
-		: __webpack_require__(75);
-
-
-/***/ },
-/* 74 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {
-		var assign = Object.assign, obj;
-		if (typeof assign !== 'function') return false;
-		obj = { foo: 'raz' };
-		assign(obj, { bar: 'dwa' }, { trzy: 'trzy' });
-		return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy';
-	};
-
-
-/***/ },
-/* 75 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var keys  = __webpack_require__(76)
-	  , value = __webpack_require__(69)
-
-	  , max = Math.max;
-
-	module.exports = function (dest, src/*, …srcn*/) {
-		var error, i, l = max(arguments.length, 2), assign;
-		dest = Object(value(dest));
-		assign = function (key) {
-			try { dest[key] = src[key]; } catch (e) {
-				if (!error) error = e;
-			}
-		};
-		for (i = 1; i < l; ++i) {
-			src = arguments[i];
-			keys(src).forEach(assign);
-		}
-		if (error !== undefined) throw error;
-		return dest;
-	};
-
-
-/***/ },
-/* 76 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(77)()
-		? Object.keys
-		: __webpack_require__(78);
-
-
-/***/ },
-/* 77 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {
-		try {
-			Object.keys('primitive');
-			return true;
-		} catch (e) { return false; }
-	};
-
-
-/***/ },
-/* 78 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var keys = Object.keys;
-
-	module.exports = function (object) {
-		return keys(object == null ? object : Object(object));
-	};
-
-
-/***/ },
-/* 79 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toPosInt = __webpack_require__(60)
-
-	  , test = function (a, b) {}, desc, defineProperty
-	  , generate, mixin;
-
-	try {
-		Object.defineProperty(test, 'length', { configurable: true, writable: false,
-			enumerable: false, value: 1 });
-	} catch (ignore) {}
-
-	if (test.length === 1) {
-		// ES6
-		desc = { configurable: true, writable: false, enumerable: false };
-		defineProperty = Object.defineProperty;
-		module.exports = function (fn, length) {
-			length = toPosInt(length);
-			if (fn.length === length) return fn;
-			desc.value = length;
-			return defineProperty(fn, 'length', desc);
-		};
-	} else {
-		mixin = __webpack_require__(80);
-		generate = (function () {
-			var cache = [];
-			return function (l) {
-				var args, i = 0;
-				if (cache[l]) return cache[l];
-				args = [];
-				while (l--) args.push('a' + (++i).toString(36));
-				return new Function('fn', 'return function (' + args.join(', ') +
-					') { return fn.apply(this, arguments); };');
-			};
-		}());
-		module.exports = function (src, length) {
-			var target;
-			length = toPosInt(length);
-			if (src.length === length) return src;
-			target = generate(length)(src);
-			try { mixin(target, src); } catch (ignore) {}
-			return target;
-		};
-	}
-
-
-/***/ },
-/* 80 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var value = __webpack_require__(69)
-
-	  , defineProperty = Object.defineProperty
-	  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
-	  , getOwnPropertyNames = Object.getOwnPropertyNames;
-
-	module.exports = function (target, source) {
-		var error;
-		target = Object(value(target));
-		getOwnPropertyNames(Object(value(source))).forEach(function (name) {
-			try {
-				defineProperty(target, name, getOwnPropertyDescriptor(source, name));
-			} catch (e) { error = e; }
-		});
-		if (error !== undefined) throw error;
-		return target;
-	};
-
-
-/***/ },
-/* 81 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var assign        = __webpack_require__(73)
-	  , normalizeOpts = __webpack_require__(58)
-	  , isCallable    = __webpack_require__(82)
-	  , contains      = __webpack_require__(83)
-
-	  , d;
-
-	d = module.exports = function (dscr, value/*, options*/) {
-		var c, e, w, options, desc;
-		if ((arguments.length < 2) || (typeof dscr !== 'string')) {
-			options = value;
-			value = dscr;
-			dscr = null;
-		} else {
-			options = arguments[2];
-		}
-		if (dscr == null) {
-			c = w = true;
-			e = false;
-		} else {
-			c = contains.call(dscr, 'c');
-			e = contains.call(dscr, 'e');
-			w = contains.call(dscr, 'w');
-		}
-
-		desc = { value: value, configurable: c, enumerable: e, writable: w };
-		return !options ? desc : assign(normalizeOpts(options), desc);
-	};
-
-	d.gs = function (dscr, get, set/*, options*/) {
-		var c, e, options, desc;
-		if (typeof dscr !== 'string') {
-			options = set;
-			set = get;
-			get = dscr;
-			dscr = null;
-		} else {
-			options = arguments[3];
-		}
-		if (get == null) {
-			get = undefined;
-		} else if (!isCallable(get)) {
-			options = get;
-			get = set = undefined;
-		} else if (set == null) {
-			set = undefined;
-		} else if (!isCallable(set)) {
-			options = set;
-			set = undefined;
-		}
-		if (dscr == null) {
-			c = true;
-			e = false;
-		} else {
-			c = contains.call(dscr, 'c');
-			e = contains.call(dscr, 'e');
-		}
-
-		desc = { get: get, set: set, configurable: c, enumerable: e };
-		return !options ? desc : assign(normalizeOpts(options), desc);
-	};
-
-
-/***/ },
-/* 82 */
-/***/ function(module, exports) {
-
-	// Deprecated
-
-	'use strict';
-
-	module.exports = function (obj) { return typeof obj === 'function'; };
-
-
-/***/ },
-/* 83 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(84)()
-		? String.prototype.contains
-		: __webpack_require__(85);
-
-
-/***/ },
-/* 84 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var str = 'razdwatrzy';
-
-	module.exports = function () {
-		if (typeof str.contains !== 'function') return false;
-		return ((str.contains('dwa') === true) && (str.contains('foo') === false));
-	};
-
-
-/***/ },
-/* 85 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var indexOf = String.prototype.indexOf;
-
-	module.exports = function (searchString/*, position*/) {
-		return indexOf.call(this, searchString, arguments[1]) > -1;
-	};
-
-
-/***/ },
-/* 86 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var d        = __webpack_require__(81)
-	  , callable = __webpack_require__(66)
-
-	  , apply = Function.prototype.apply, call = Function.prototype.call
-	  , create = Object.create, defineProperty = Object.defineProperty
-	  , defineProperties = Object.defineProperties
-	  , hasOwnProperty = Object.prototype.hasOwnProperty
-	  , descriptor = { configurable: true, enumerable: false, writable: true }
-
-	  , on, once, off, emit, methods, descriptors, base;
-
-	on = function (type, listener) {
-		var data;
-
-		callable(listener);
-
-		if (!hasOwnProperty.call(this, '__ee__')) {
-			data = descriptor.value = create(null);
-			defineProperty(this, '__ee__', descriptor);
-			descriptor.value = null;
-		} else {
-			data = this.__ee__;
-		}
-		if (!data[type]) data[type] = listener;
-		else if (typeof data[type] === 'object') data[type].push(listener);
-		else data[type] = [data[type], listener];
-
-		return this;
-	};
-
-	once = function (type, listener) {
-		var once, self;
-
-		callable(listener);
-		self = this;
-		on.call(this, type, once = function () {
-			off.call(self, type, once);
-			apply.call(listener, this, arguments);
-		});
-
-		once.__eeOnceListener__ = listener;
-		return this;
-	};
-
-	off = function (type, listener) {
-		var data, listeners, candidate, i;
-
-		callable(listener);
-
-		if (!hasOwnProperty.call(this, '__ee__')) return this;
-		data = this.__ee__;
-		if (!data[type]) return this;
-		listeners = data[type];
-
-		if (typeof listeners === 'object') {
-			for (i = 0; (candidate = listeners[i]); ++i) {
-				if ((candidate === listener) ||
-						(candidate.__eeOnceListener__ === listener)) {
-					if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
-					else listeners.splice(i, 1);
-				}
-			}
-		} else {
-			if ((listeners === listener) ||
-					(listeners.__eeOnceListener__ === listener)) {
-				delete data[type];
-			}
-		}
-
-		return this;
-	};
-
-	emit = function (type) {
-		var i, l, listener, listeners, args;
-
-		if (!hasOwnProperty.call(this, '__ee__')) return;
-		listeners = this.__ee__[type];
-		if (!listeners) return;
-
-		if (typeof listeners === 'object') {
-			l = arguments.length;
-			args = new Array(l - 1);
-			for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
-
-			listeners = listeners.slice();
-			for (i = 0; (listener = listeners[i]); ++i) {
-				apply.call(listener, this, args);
-			}
-		} else {
-			switch (arguments.length) {
-			case 1:
-				call.call(listeners, this);
-				break;
-			case 2:
-				call.call(listeners, this, arguments[1]);
-				break;
-			case 3:
-				call.call(listeners, this, arguments[1], arguments[2]);
-				break;
-			default:
-				l = arguments.length;
-				args = new Array(l - 1);
-				for (i = 1; i < l; ++i) {
-					args[i - 1] = arguments[i];
-				}
-				apply.call(listeners, this, args);
-			}
-		}
-	};
-
-	methods = {
-		on: on,
-		once: once,
-		off: off,
-		emit: emit
-	};
-
-	descriptors = {
-		on: d(on),
-		once: d(once),
-		off: d(off),
-		emit: d(emit)
-	};
-
-	base = defineProperties({}, descriptors);
-
-	module.exports = exports = function (o) {
-		return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
-	};
-	exports.methods = methods;
-
-
-/***/ },
-/* 87 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toArray  = __webpack_require__(88)
-	  , callable = __webpack_require__(66)
-
-	  , slice = Array.prototype.slice
-	  , resolveArgs;
-
-	resolveArgs = function (args) {
-		return this.map(function (r, i) {
-			return r ? r(args[i]) : args[i];
-		}).concat(slice.call(args, this.length));
-	};
-
-	module.exports = function (resolvers) {
-		resolvers = toArray(resolvers);
-		resolvers.forEach(function (r) {
-			if (r != null) callable(r);
-		});
-		return resolveArgs.bind(resolvers);
-	};
-
-
-/***/ },
-/* 88 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var from = __webpack_require__(89)
-
-	  , isArray = Array.isArray;
-
-	module.exports = function (arrayLike) {
-		return isArray(arrayLike) ? arrayLike : from(arrayLike);
-	};
-
-
-/***/ },
-/* 89 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(90)()
-		? Array.from
-		: __webpack_require__(91);
-
-
-/***/ },
-/* 90 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {
-		var from = Array.from, arr, result;
-		if (typeof from !== 'function') return false;
-		arr = ['raz', 'dwa'];
-		result = from(arr);
-		return Boolean(result && (result !== arr) && (result[1] === 'dwa'));
-	};
-
-
-/***/ },
-/* 91 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var iteratorSymbol = __webpack_require__(92).iterator
-	  , isArguments    = __webpack_require__(97)
-	  , isFunction     = __webpack_require__(98)
-	  , toPosInt       = __webpack_require__(60)
-	  , callable       = __webpack_require__(66)
-	  , validValue     = __webpack_require__(69)
-	  , isString       = __webpack_require__(100)
-
-	  , isArray = Array.isArray, call = Function.prototype.call
-	  , desc = { configurable: true, enumerable: true, writable: true, value: null }
-	  , defineProperty = Object.defineProperty;
-
-	module.exports = function (arrayLike/*, mapFn, thisArg*/) {
-		var mapFn = arguments[1], thisArg = arguments[2], Constructor, i, j, arr, l, code, iterator
-		  , result, getIterator, value;
-
-		arrayLike = Object(validValue(arrayLike));
-
-		if (mapFn != null) callable(mapFn);
-		if (!this || (this === Array) || !isFunction(this)) {
-			// Result: Plain array
-			if (!mapFn) {
-				if (isArguments(arrayLike)) {
-					// Source: Arguments
-					l = arrayLike.length;
-					if (l !== 1) return Array.apply(null, arrayLike);
-					arr = new Array(1);
-					arr[0] = arrayLike[0];
-					return arr;
-				}
-				if (isArray(arrayLike)) {
-					// Source: Array
-					arr = new Array(l = arrayLike.length);
-					for (i = 0; i < l; ++i) arr[i] = arrayLike[i];
-					return arr;
-				}
-			}
-			arr = [];
-		} else {
-			// Result: Non plain array
-			Constructor = this;
-		}
-
-		if (!isArray(arrayLike)) {
-			if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
-				// Source: Iterator
-				iterator = callable(getIterator).call(arrayLike);
-				if (Constructor) arr = new Constructor();
-				result = iterator.next();
-				i = 0;
-				while (!result.done) {
-					value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
-					if (!Constructor) {
-						arr[i] = value;
-					} else {
-						desc.value = value;
-						defineProperty(arr, i, desc);
-					}
-					result = iterator.next();
-					++i;
-				}
-				l = i;
-			} else if (isString(arrayLike)) {
-				// Source: String
-				l = arrayLike.length;
-				if (Constructor) arr = new Constructor();
-				for (i = 0, j = 0; i < l; ++i) {
-					value = arrayLike[i];
-					if ((i + 1) < l) {
-						code = value.charCodeAt(0);
-						if ((code >= 0xD800) && (code <= 0xDBFF)) value += arrayLike[++i];
-					}
-					value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
-					if (!Constructor) {
-						arr[j] = value;
-					} else {
-						desc.value = value;
-						defineProperty(arr, j, desc);
-					}
-					++j;
-				}
-				l = j;
-			}
-		}
-		if (l === undefined) {
-			// Source: array or array-like
-			l = toPosInt(arrayLike.length);
-			if (Constructor) arr = new Constructor(l);
-			for (i = 0; i < l; ++i) {
-				value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
-				if (!Constructor) {
-					arr[i] = value;
-				} else {
-					desc.value = value;
-					defineProperty(arr, i, desc);
-				}
-			}
-		}
-		if (Constructor) {
-			desc.value = null;
-			arr.length = l;
-		}
-		return arr;
-	};
-
-
-/***/ },
-/* 92 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(93)() ? Symbol : __webpack_require__(94);
-
-
-/***/ },
-/* 93 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {
-		var symbol;
-		if (typeof Symbol !== 'function') return false;
-		symbol = Symbol('test symbol');
-		try { String(symbol); } catch (e) { return false; }
-		if (typeof Symbol.iterator === 'symbol') return true;
-
-		// Return 'true' for polyfills
-		if (typeof Symbol.isConcatSpreadable !== 'object') return false;
-		if (typeof Symbol.iterator !== 'object') return false;
-		if (typeof Symbol.toPrimitive !== 'object') return false;
-		if (typeof Symbol.toStringTag !== 'object') return false;
-		if (typeof Symbol.unscopables !== 'object') return false;
-
-		return true;
-	};
-
-
-/***/ },
-/* 94 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
-
-	'use strict';
-
-	var d              = __webpack_require__(81)
-	  , validateSymbol = __webpack_require__(95)
-
-	  , create = Object.create, defineProperties = Object.defineProperties
-	  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
-	  , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null);
-
-	if (typeof Symbol === 'function') NativeSymbol = Symbol;
-
-	var generateName = (function () {
-		var created = create(null);
-		return function (desc) {
-			var postfix = 0, name, ie11BugWorkaround;
-			while (created[desc + (postfix || '')]) ++postfix;
-			desc += (postfix || '');
-			created[desc] = true;
-			name = '@@' + desc;
-			defineProperty(objPrototype, name, d.gs(null, function (value) {
-				// For IE11 issue see:
-				// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
-				//    ie11-broken-getters-on-dom-objects
-				// https://github.com/medikoo/es6-symbol/issues/12
-				if (ie11BugWorkaround) return;
-				ie11BugWorkaround = true;
-				defineProperty(this, name, d(value));
-				ie11BugWorkaround = false;
-			}));
-			return name;
-		};
-	}());
-
-	// Internal constructor (not one exposed) for creating Symbol instances.
-	// This one is used to ensure that `someSymbol instanceof Symbol` always return false
-	HiddenSymbol = function Symbol(description) {
-		if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
-		return SymbolPolyfill(description);
-	};
-
-	// Exposed `Symbol` constructor
-	// (returns instances of HiddenSymbol)
-	module.exports = SymbolPolyfill = function Symbol(description) {
-		var symbol;
-		if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
-		symbol = create(HiddenSymbol.prototype);
-		description = (description === undefined ? '' : String(description));
-		return defineProperties(symbol, {
-			__description__: d('', description),
-			__name__: d('', generateName(description))
-		});
-	};
-	defineProperties(SymbolPolyfill, {
-		for: d(function (key) {
-			if (globalSymbols[key]) return globalSymbols[key];
-			return (globalSymbols[key] = SymbolPolyfill(String(key)));
-		}),
-		keyFor: d(function (s) {
-			var key;
-			validateSymbol(s);
-			for (key in globalSymbols) if (globalSymbols[key] === s) return key;
-		}),
-
-		// If there's native implementation of given symbol, let's fallback to it
-		// to ensure proper interoperability with other native functions e.g. Array.from
-		hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
-		isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
-			SymbolPolyfill('isConcatSpreadable')),
-		iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
-		match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
-		replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
-		search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
-		species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
-		split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
-		toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
-		toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
-		unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
-	});
-
-	// Internal tweaks for real symbol producer
-	defineProperties(HiddenSymbol.prototype, {
-		constructor: d(SymbolPolyfill),
-		toString: d('', function () { return this.__name__; })
-	});
-
-	// Proper implementation of methods exposed on Symbol.prototype
-	// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
-	defineProperties(SymbolPolyfill.prototype, {
-		toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
-		valueOf: d(function () { return validateSymbol(this); })
-	});
-	defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('',
-		function () { return validateSymbol(this); }));
-	defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
-
-	// Proper implementaton of toPrimitive and toStringTag for returned symbol instances
-	defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
-		d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
-
-	// Note: It's important to define `toPrimitive` as last one, as some implementations
-	// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
-	// And that may invoke error in definition flow:
-	// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
-	defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
-		d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
-
-
-/***/ },
-/* 95 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var isSymbol = __webpack_require__(96);
-
-	module.exports = function (value) {
-		if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
-		return value;
-	};
-
-
-/***/ },
-/* 96 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (x) {
-		return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false;
-	};
-
-
-/***/ },
-/* 97 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var toString = Object.prototype.toString
-
-	  , id = toString.call((function () { return arguments; }()));
-
-	module.exports = function (x) { return (toString.call(x) === id); };
-
-
-/***/ },
-/* 98 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toString = Object.prototype.toString
-
-	  , id = toString.call(__webpack_require__(99));
-
-	module.exports = function (f) {
-		return (typeof f === "function") && (toString.call(f) === id);
-	};
-
-
-/***/ },
-/* 99 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function () {};
-
-
-/***/ },
-/* 100 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	var toString = Object.prototype.toString
-
-	  , id = toString.call('');
-
-	module.exports = function (x) {
-		return (typeof x === 'string') || (x && (typeof x === 'object') &&
-			((x instanceof String) || (toString.call(x) === id))) || false;
-	};
-
-
-/***/ },
-/* 101 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var callable = __webpack_require__(66);
-
-	module.exports = function (userNormalizer) {
-		var normalizer;
-		if (typeof userNormalizer === 'function') return { set: userNormalizer, get: userNormalizer };
-		normalizer = { get: callable(userNormalizer.get) };
-		if (userNormalizer.set !== undefined) {
-			normalizer.set = callable(userNormalizer.set);
-			normalizer.delete = callable(userNormalizer.delete);
-			normalizer.clear = callable(userNormalizer.clear);
-			return normalizer;
-		}
-		normalizer.set = normalizer.get;
-		return normalizer;
-	};
-
-
-/***/ },
-/* 102 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (args) {
-		var id, i, length = args.length;
-		if (!length) return '\u0002';
-		id = String(args[i = 0]);
-		while (--length) id += '\u0001' + args[++i];
-		return id;
-	};
-
-
-/***/ },
-/* 103 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = function (length) {
-		if (!length) {
-			return function () { return ''; };
-		}
-		return function (args) {
-			var id = String(args[0]), i = 0, l = length;
-			while (--l) { id += '\u0001' + args[++i]; }
-			return id;
-		};
-	};
-
-
-/***/ },
-/* 104 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var indexOf = __webpack_require__(105)
-	  , create = Object.create;
-
-	module.exports = function () {
-		var lastId = 0, map = [], cache = create(null);
-		return {
-			get: function (args) {
-				var index = 0, set = map, i, length = args.length;
-				if (length === 0) return set[length] || null;
-				if ((set = set[length])) {
-					while (index < (length - 1)) {
-						i = indexOf.call(set[0], args[index]);
-						if (i === -1) return null;
-						set = set[1][i];
-						++index;
-					}
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) return null;
-					return set[1][i] || null;
-				}
-				return null;
-			},
-			set: function (args) {
-				var index = 0, set = map, i, length = args.length;
-				if (length === 0) {
-					set[length] = ++lastId;
-				} else {
-					if (!set[length]) {
-						set[length] = [[], []];
-					}
-					set = set[length];
-					while (index < (length - 1)) {
-						i = indexOf.call(set[0], args[index]);
-						if (i === -1) {
-							i = set[0].push(args[index]) - 1;
-							set[1].push([[], []]);
-						}
-						set = set[1][i];
-						++index;
-					}
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) {
-						i = set[0].push(args[index]) - 1;
-					}
-					set[1][i] = ++lastId;
-				}
-				cache[lastId] = args;
-				return lastId;
-			},
-			delete: function (id) {
-				var index = 0, set = map, i, args = cache[id], length = args.length
-				  , path = [];
-				if (length === 0) {
-					delete set[length];
-				} else if ((set = set[length])) {
-					while (index < (length - 1)) {
-						i = indexOf.call(set[0], args[index]);
-						if (i === -1) {
-							return;
-						}
-						path.push(set, i);
-						set = set[1][i];
-						++index;
-					}
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) {
-						return;
-					}
-					id = set[1][i];
-					set[0].splice(i, 1);
-					set[1].splice(i, 1);
-					while (!set[0].length && path.length) {
-						i = path.pop();
-						set = path.pop();
-						set[0].splice(i, 1);
-						set[1].splice(i, 1);
-					}
-				}
-				delete cache[id];
-			},
-			clear: function () {
-				map = [];
-				cache = create(null);
-			}
-		};
-	};
-
-
-/***/ },
-/* 105 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toPosInt = __webpack_require__(60)
-	  , value    = __webpack_require__(69)
-
-	  , indexOf = Array.prototype.indexOf
-	  , hasOwnProperty = Object.prototype.hasOwnProperty
-	  , abs = Math.abs, floor = Math.floor;
-
-	module.exports = function (searchElement/*, fromIndex*/) {
-		var i, l, fromIndex, val;
-		if (searchElement === searchElement) { //jslint: ignore
-			return indexOf.apply(this, arguments);
-		}
-
-		l = toPosInt(value(this).length);
-		fromIndex = arguments[1];
-		if (isNaN(fromIndex)) fromIndex = 0;
-		else if (fromIndex >= 0) fromIndex = floor(fromIndex);
-		else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
-
-		for (i = fromIndex; i < l; ++i) {
-			if (hasOwnProperty.call(this, i)) {
-				val = this[i];
-				if (val !== val) return i; //jslint: ignore
-			}
-		}
-		return -1;
-	};
-
-
-/***/ },
-/* 106 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var indexOf = __webpack_require__(105);
-
-	module.exports = function () {
-		var lastId = 0, argsMap = [], cache = [];
-		return {
-			get: function (args) {
-				var index = indexOf.call(argsMap, args[0]);
-				return (index === -1) ? null : cache[index];
-			},
-			set: function (args) {
-				argsMap.push(args[0]);
-				cache.push(++lastId);
-				return lastId;
-			},
-			delete: function (id) {
-				var index = indexOf.call(cache, id);
-				if (index !== -1) {
-					argsMap.splice(index, 1);
-					cache.splice(index, 1);
-				}
-			},
-			clear: function () {
-				argsMap = [];
-				cache = [];
-			}
-		};
-	};
-
-
-/***/ },
-/* 107 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var indexOf = __webpack_require__(105)
-	  , create = Object.create;
-
-	module.exports = function (length) {
-		var lastId = 0, map = [[], []], cache = create(null);
-		return {
-			get: function (args) {
-				var index = 0, set = map, i;
-				while (index < (length - 1)) {
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) return null;
-					set = set[1][i];
-					++index;
-				}
-				i = indexOf.call(set[0], args[index]);
-				if (i === -1) return null;
-				return set[1][i] || null;
-			},
-			set: function (args) {
-				var index = 0, set = map, i;
-				while (index < (length - 1)) {
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) {
-						i = set[0].push(args[index]) - 1;
-						set[1].push([[], []]);
-					}
-					set = set[1][i];
-					++index;
-				}
-				i = indexOf.call(set[0], args[index]);
-				if (i === -1) {
-					i = set[0].push(args[index]) - 1;
-				}
-				set[1][i] = ++lastId;
-				cache[lastId] = args;
-				return lastId;
-			},
-			delete: function (id) {
-				var index = 0, set = map, i, path = [], args = cache[id];
-				while (index < (length - 1)) {
-					i = indexOf.call(set[0], args[index]);
-					if (i === -1) {
-						return;
-					}
-					path.push(set, i);
-					set = set[1][i];
-					++index;
-				}
-				i = indexOf.call(set[0], args[index]);
-				if (i === -1) {
-					return;
-				}
-				id = set[1][i];
-				set[0].splice(i, 1);
-				set[1].splice(i, 1);
-				while (!set[0].length && path.length) {
-					i = path.pop();
-					set = path.pop();
-					set[0].splice(i, 1);
-					set[1].splice(i, 1);
-				}
-				delete cache[id];
-			},
-			clear: function () {
-				map = [[], []];
-				cache = create(null);
-			}
-		};
-	};
-
-
-/***/ },
-/* 108 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Support for asynchronous functions
-
-	'use strict';
-
-	var aFrom        = __webpack_require__(89)
-	  , mixin        = __webpack_require__(80)
-	  , defineLength = __webpack_require__(79)
-	  , nextTick     = __webpack_require__(109)
-
-	  , slice = Array.prototype.slice
-	  , apply = Function.prototype.apply, create = Object.create
-	  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-	__webpack_require__(70).async = function (tbi, conf) {
-		var waiting = create(null), cache = create(null)
-		  , base = conf.memoized, original = conf.original
-		  , currentCallback, currentContext, currentArgs;
-
-		// Initial
-		conf.memoized = defineLength(function (arg) {
-			var args = arguments, last = args[args.length - 1];
-			if (typeof last === 'function') {
-				currentCallback = last;
-				args = slice.call(args, 0, -1);
-			}
-			return base.apply(currentContext = this, currentArgs = args);
-		}, base);
-		try { mixin(conf.memoized, base); } catch (ignore) {}
-
-		// From cache (sync)
-		conf.on('get', function (id) {
-			var cb, context, args;
-			if (!currentCallback) return;
-
-			// Unresolved
-			if (waiting[id]) {
-				if (typeof waiting[id] === 'function') waiting[id] = [waiting[id], currentCallback];
-				else waiting[id].push(currentCallback);
-				currentCallback = null;
-				return;
-			}
-
-			// Resolved, assure next tick invocation
-			cb = currentCallback;
-			context = currentContext;
-			args = currentArgs;
-			currentCallback = currentContext = currentArgs = null;
-			nextTick(function () {
-				var data;
-				if (hasOwnProperty.call(cache, id)) {
-					data = cache[id];
-					conf.emit('getasync', id, args, context);
-					apply.call(cb, data.context, data.args);
-				} else {
-					// Purged in a meantime, we shouldn't rely on cached value, recall
-					currentCallback = cb;
-					currentContext = context;
-					currentArgs = args;
-					base.apply(context, args);
-				}
-			});
-		});
-
-		// Not from cache
-		conf.original = function () {
-			var args, cb, origCb, result;
-			if (!currentCallback) return apply.call(original, this, arguments);
-			args = aFrom(arguments);
-			cb = function self(err) {
-				var cb, args, id = self.id;
-				if (id == null) {
-					// Shouldn't happen, means async callback was called sync way
-					nextTick(apply.bind(self, this, arguments));
-					return;
-				}
-				delete self.id;
-				cb = waiting[id];
-				delete waiting[id];
-				if (!cb) {
-					// Already processed,
-					// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)
-					return;
-				}
-				args = aFrom(arguments);
-				if (conf.has(id)) {
-					if (err) {
-						conf.delete(id);
-					} else {
-						cache[id] = { context: this, args: args };
-						conf.emit('setasync', id, (typeof cb === 'function') ? 1 : cb.length);
-					}
-				}
-				if (typeof cb === 'function') {
-					result = apply.call(cb, this, args);
-				} else {
-					cb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);
-				}
-				return result;
-			};
-			origCb = currentCallback;
-			currentCallback = currentContext = currentArgs = null;
-			args.push(cb);
-			result = apply.call(original, this, args);
-			cb.cb = origCb;
-			currentCallback = cb;
-			return result;
-		};
-
-		// After not from cache call
-		conf.on('set', function (id) {
-			if (!currentCallback) {
-				conf.delete(id);
-				return;
-			}
-			if (waiting[id]) {
-				// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)
-				if (typeof waiting[id] === 'function') waiting[id] = [waiting[id], currentCallback.cb];
-				else waiting[id].push(currentCallback.cb);
-			} else {
-				waiting[id] = currentCallback.cb;
-			}
-			delete currentCallback.cb;
-			currentCallback.id = id;
-			currentCallback = null;
-		});
-
-		// On delete
-		conf.on('delete', function (id) {
-			var result;
-			// If false, we don't have value yet, so we assume that intention is not
-			// to memoize this call. After value is obtained we don't cache it but
-			// gracefully pass to callback
-			if (hasOwnProperty.call(waiting, id)) return;
-			if (!cache[id]) return;
-			result = cache[id];
-			delete cache[id];
-			conf.emit('deleteasync', id, result);
-		});
-
-		// On clear
-		conf.on('clear', function () {
-			var oldCache = cache;
-			cache = create(null);
-			conf.emit('clearasync', oldCache);
-		});
-	};
-
-
-/***/ },
-/* 109 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(process, setImmediate) {'use strict';
-
-	var callable, byObserver;
-
-	callable = function (fn) {
-		if (typeof fn !== 'function') throw new TypeError(fn + " is not a function");
-		return fn;
-	};
-
-	byObserver = function (Observer) {
-		var node = document.createTextNode(''), queue, i = 0;
-		new Observer(function () {
-			var data;
-			if (!queue) return;
-			data = queue;
-			queue = null;
-			if (typeof data === 'function') {
-				data();
-				return;
-			}
-			data.forEach(function (fn) { fn(); });
-		}).observe(node, { characterData: true });
-		return function (fn) {
-			callable(fn);
-			if (queue) {
-				if (typeof queue === 'function') queue = [queue, fn];
-				else queue.push(fn);
-				return;
-			}
-			queue = fn;
-			node.data = (i = ++i % 2);
-		};
-	};
-
-	module.exports = (function () {
-		// Node.js
-		if ((typeof process !== 'undefined') && process &&
-				(typeof process.nextTick === 'function')) {
-			return process.nextTick;
-		}
-
-		// MutationObserver=
-		if ((typeof document === 'object') && document) {
-			if (typeof MutationObserver === 'function') {
-				return byObserver(MutationObserver);
-			}
-			if (typeof WebKitMutationObserver === 'function') {
-				return byObserver(WebKitMutationObserver);
-			}
-		}
-
-		// W3C Draft
-		// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html
-		if (typeof setImmediate === 'function') {
-			return function (cb) { setImmediate(callable(cb)); };
-		}
-
-		// Wide available standard
-		if (typeof setTimeout === 'function') {
-			return function (cb) { setTimeout(callable(cb), 0); };
-		}
-
-		return null;
-	}());
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(110).setImmediate))
-
-/***/ },
-/* 110 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(3).nextTick;
-	var apply = Function.prototype.apply;
-	var slice = Array.prototype.slice;
-	var immediateIds = {};
-	var nextImmediateId = 0;
-
-	// DOM APIs, for completeness
-
-	exports.setTimeout = function() {
-	  return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
-	};
-	exports.setInterval = function() {
-	  return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
-	};
-	exports.clearTimeout =
-	exports.clearInterval = function(timeout) { timeout.close(); };
-
-	function Timeout(id, clearFn) {
-	  this._id = id;
-	  this._clearFn = clearFn;
-	}
-	Timeout.prototype.unref = Timeout.prototype.ref = function() {};
-	Timeout.prototype.close = function() {
-	  this._clearFn.call(window, this._id);
-	};
-
-	// Does not start the time, just sets up the members needed.
-	exports.enroll = function(item, msecs) {
-	  clearTimeout(item._idleTimeoutId);
-	  item._idleTimeout = msecs;
-	};
-
-	exports.unenroll = function(item) {
-	  clearTimeout(item._idleTimeoutId);
-	  item._idleTimeout = -1;
-	};
-
-	exports._unrefActive = exports.active = function(item) {
-	  clearTimeout(item._idleTimeoutId);
-
-	  var msecs = item._idleTimeout;
-	  if (msecs >= 0) {
-	    item._idleTimeoutId = setTimeout(function onTimeout() {
-	      if (item._onTimeout)
-	        item._onTimeout();
-	    }, msecs);
-	  }
-	};
-
-	// That's not how node.js implements it but the exposed api is the same.
-	exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) {
-	  var id = nextImmediateId++;
-	  var args = arguments.length < 2 ? false : slice.call(arguments, 1);
-
-	  immediateIds[id] = true;
-
-	  nextTick(function onNextTick() {
-	    if (immediateIds[id]) {
-	      // fn.call() is faster so we optimize for the common use-case
-	      // @see http://jsperf.com/call-apply-segu
-	      if (args) {
-	        fn.apply(null, args);
-	      } else {
-	        fn.call(null);
-	      }
-	      // Prevent ids from leaking
-	      exports.clearImmediate(id);
-	    }
-	  });
-
-	  return id;
-	};
-
-	exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
-	  delete immediateIds[id];
-	};
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(110).setImmediate, __webpack_require__(110).clearImmediate))
-
-/***/ },
-/* 111 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Call dispose callback on each cache purge
-
-	'use strict';
-
-	var callable   = __webpack_require__(66)
-	  , forEach    = __webpack_require__(67)
-	  , extensions = __webpack_require__(70)
-
-	  , slice = Array.prototype.slice, apply = Function.prototype.apply;
-
-	extensions.dispose = function (dispose, conf, options) {
-		var del;
-		callable(dispose);
-		if (options.async && extensions.async) {
-			conf.on('deleteasync', del = function (id, result) {
-				apply.call(dispose, null, slice.call(result.args, 1));
-			});
-			conf.on('clearasync', function (cache) {
-				forEach(cache, function (result, id) { del(id, result); });
-			});
-			return;
-		}
-		conf.on('delete', del = function (id, result) { dispose(result); });
-		conf.on('clear', function (cache) {
-			forEach(cache, function (result, id) { del(id, result); });
-		});
-	};
-
-
-/***/ },
-/* 112 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Timeout cached values
-
-	'use strict';
-
-	var aFrom      = __webpack_require__(89)
-	  , noop       = __webpack_require__(99)
-	  , forEach    = __webpack_require__(67)
-	  , timeout    = __webpack_require__(113)
-	  , extensions = __webpack_require__(70)
-
-	  , max = Math.max, min = Math.min, create = Object.create;
-
-	extensions.maxAge = function (maxAge, conf, options) {
-		var timeouts, postfix, preFetchAge, preFetchTimeouts;
-
-		maxAge = timeout(maxAge);
-		if (!maxAge) return;
-
-		timeouts = create(null);
-		postfix = (options.async && extensions.async) ? 'async' : '';
-		conf.on('set' + postfix, function (id) {
-			timeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);
-			if (!preFetchTimeouts) return;
-			if (preFetchTimeouts[id]) clearTimeout(preFetchTimeouts[id]);
-			preFetchTimeouts[id] = setTimeout(function () {
-				delete preFetchTimeouts[id];
-			}, preFetchAge);
-		});
-		conf.on('delete' + postfix, function (id) {
-			clearTimeout(timeouts[id]);
-			delete timeouts[id];
-			if (!preFetchTimeouts) return;
-			clearTimeout(preFetchTimeouts[id]);
-			delete preFetchTimeouts[id];
-		});
-
-		if (options.preFetch) {
-			if ((options.preFetch === true) || isNaN(options.preFetch)) {
-				preFetchAge = 0.333;
-			} else {
-				preFetchAge = max(min(Number(options.preFetch), 1), 0);
-			}
-			if (preFetchAge) {
-				preFetchTimeouts = {};
-				preFetchAge = (1 - preFetchAge) * maxAge;
-				conf.on('get' + postfix, function (id, args, context) {
-					if (!preFetchTimeouts[id]) {
-						preFetchTimeouts[id] =  setTimeout(function () {
-							delete preFetchTimeouts[id];
-							conf.delete(id);
-							if (options.async) {
-								args = aFrom(args);
-								args.push(noop);
-							}
-							conf.memoized.apply(context, args);
-						}, 0);
-					}
-				});
-			}
-		}
-
-		conf.on('clear' + postfix, function () {
-			forEach(timeouts, function (id) { clearTimeout(id); });
-			timeouts = {};
-			if (preFetchTimeouts) {
-				forEach(preFetchTimeouts, function (id) { clearTimeout(id); });
-				preFetchTimeouts = {};
-			}
-		});
-	};
-
-
-/***/ },
-/* 113 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toPosInt   = __webpack_require__(60)
-	  , maxTimeout = __webpack_require__(114);
-
-	module.exports = function (value) {
-		value = toPosInt(value);
-		if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout");
-		return value;
-	};
-
-
-/***/ },
-/* 114 */
-/***/ function(module, exports) {
-
-	'use strict';
-
-	module.exports = 2147483647;
-
-
-/***/ },
-/* 115 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Limit cache size, LRU (least recently used) algorithm.
-
-	'use strict';
-
-	var toPosInteger = __webpack_require__(60)
-	  , lruQueue     = __webpack_require__(116)
-	  , extensions   = __webpack_require__(70);
-
-	extensions.max = function (max, conf, options) {
-		var postfix, queue, hit;
-
-		max = toPosInteger(max);
-		if (!max) return;
-
-		queue = lruQueue(max);
-		postfix = (options.async && extensions.async) ? 'async' : '';
-
-		conf.on('set' + postfix, hit = function (id) {
-			id = queue.hit(id);
-			if (id === undefined) return;
-			conf.delete(id);
-		});
-		conf.on('get' + postfix, hit);
-		conf.on('delete' + postfix, queue.delete);
-		conf.on('clear' + postfix, queue.clear);
-	};
-
-
-/***/ },
-/* 116 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var toPosInt = __webpack_require__(60)
-
-	  , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;
-
-	module.exports = function (limit) {
-		var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;
-		limit = toPosInt(limit);
-		return {
-			hit: function (id) {
-				var oldIndex = map[id], nuIndex = ++index;
-				queue[nuIndex] = id;
-				map[id] = nuIndex;
-				if (!oldIndex) {
-					++size;
-					if (size <= limit) return;
-					id = queue[base];
-					del(id);
-					return id;
-				}
-				delete queue[oldIndex];
-				if (base !== oldIndex) return;
-				while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip
-			},
-			delete: del = function (id) {
-				var oldIndex = map[id];
-				if (!oldIndex) return;
-				delete queue[oldIndex];
-				delete map[id];
-				--size;
-				if (base !== oldIndex) return;
-				if (!size) {
-					index = 0;
-					base = 1;
-					return;
-				}
-				while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip
-			},
-			clear: function () {
-				size = 0;
-				base = 1;
-				queue = create(null);
-				map = create(null);
-				index = 0;
-			}
-		};
-	};
-
-
-/***/ },
-/* 117 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Reference counter, useful for garbage collector like functionality
-
-	'use strict';
-
-	var d          = __webpack_require__(81)
-	  , extensions = __webpack_require__(70)
-
-	  , create = Object.create, defineProperties = Object.defineProperties;
-
-	extensions.refCounter = function (ignore, conf, options) {
-		var cache, postfix;
-
-		cache = create(null);
-		postfix = (options.async && extensions.async) ? 'async' : '';
-
-		conf.on('set' + postfix, function (id, length) { cache[id] = length || 1; });
-		conf.on('get' + postfix, function (id) { ++cache[id]; });
-		conf.on('delete' + postfix, function (id) { delete cache[id]; });
-		conf.on('clear' + postfix, function () { cache = {}; });
-
-		defineProperties(conf.memoized, {
-			deleteRef: d(function () {
-				var id = conf.get(arguments);
-				if (id === null) return null;
-				if (!cache[id]) return null;
-				if (!--cache[id]) {
-					conf.delete(id);
-					return true;
-				}
-				return false;
-			}),
-			getRefCount: d(function () {
-				var id = conf.get(arguments);
-				if (id === null) return 0;
-				if (!cache[id]) return 0;
-				return cache[id];
-			})
-		});
-	};
-
-
-/***/ },
-/* 118 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var EventEmitter = __webpack_require__(1);
-	var Sequencer = __webpack_require__(119);
-	var Thread = __webpack_require__(121);
+	var Sequencer = __webpack_require__(62);
+	var Thread = __webpack_require__(64);
 	var util = __webpack_require__(2);
 
 	var defaultBlockPackages = {
-	    'scratch3': __webpack_require__(123),
-	    'wedo2': __webpack_require__(124)
+	    'scratch3_control': __webpack_require__(66),
+	    'scratch3_event': __webpack_require__(77),
+	    'scratch3_looks': __webpack_require__(78),
+	    'scratch3_motion': __webpack_require__(79),
+	    'scratch3_operators': __webpack_require__(80)
 	};
 
 	/**
-	 * Manages blocks, stacks, and the sequencer.
-	 * @param {!Blocks} blocks Blocks instance for this runtime.
+	 * Manages targets, stacks, and the sequencer.
+	 * @param {!Array.<Target>} targets List of targets for this runtime.
 	 */
-	function Runtime (blocks) {
+	function Runtime (targets) {
 	    // Bind event emitter
 	    EventEmitter.call(this);
 
 	    // State for the runtime
 
 	    /**
-	     * Block management and storage
+	     * Target management and storage.
 	     */
-	    this.blocks = blocks;
+	    this.targets = targets;
 
 	    /**
 	     * A list of threads that are currently running in the VM.
@@ -12996,6 +11336,12 @@
 	 */
 	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
 
+	/**
+	 * Event name for visual value report.
+	 * @const {string}
+	 */
+	Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
+
 	/**
 	 * Inherit from EventEmitter
 	 */
@@ -13004,7 +11350,7 @@
 	/**
 	 * How rapidly we try to step threads, in ms.
 	 */
-	Runtime.THREAD_STEP_INTERVAL = 1000 / 30;
+	Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
 
 
 	// -----------------------------------------------------------------------------
@@ -13050,6 +11396,7 @@
 	Runtime.prototype._pushThread = function (id) {
 	    this.emit(Runtime.STACK_GLOW_ON, id);
 	    var thread = new Thread(id);
+	    thread.pushStack(id);
 	    this.threads.push(thread);
 	};
 
@@ -13091,32 +11438,13 @@
 	        this._removeThread(this.threads[i]);
 	    }
 	    // Add all top stacks with green flag
-	    var stacks = this.blocks.getStacks();
-	    for (var j = 0; j < stacks.length; j++) {
-	        var topBlock = stacks[j];
-	        if (this.blocks.getBlock(topBlock).opcode === 'event_whenflagclicked') {
-	            this._pushThread(stacks[j]);
-	        }
-	    }
-	};
-
-	/**
-	 * Distance sensor hack
-	 */
-	Runtime.prototype.startDistanceSensors = function () {
-	    // Add all top stacks with distance sensor
-	    var stacks = this.blocks.getStacks();
-	    for (var j = 0; j < stacks.length; j++) {
-	        var topBlock = stacks[j];
-	        if (this.blocks.getBlock(topBlock).opcode ===
-	            'wedo_whendistanceclose') {
-	            var alreadyRunning = false;
-	            for (var k = 0; k < this.threads.length; k++) {
-	                if (this.threads[k].topBlock === topBlock) {
-	                    alreadyRunning = true;
-	                }
-	            }
-	            if (!alreadyRunning) {
+	    for (var t = 0; t < this.targets.length; t++) {
+	        var target = this.targets[t];
+	        var stacks = target.blocks.getStacks();
+	        for (var j = 0; j < stacks.length; j++) {
+	            var topBlock = stacks[j];
+	            if (target.blocks.getBlock(topBlock).opcode ===
+	                'event_whenflagclicked') {
 	                this._pushThread(stacks[j]);
 	            }
 	        }
@@ -13137,10 +11465,6 @@
 	        // Actually remove the thread.
 	        this._removeThread(poppedThread);
 	    }
-	    // @todo call stop function in all extensions/packages/WeDo stub
-	    if (window.native) {
-	        window.native.motorStop();
-	    }
 	};
 
 	/**
@@ -13167,12 +11491,46 @@
 	    }
 	};
 
+	/**
+	 * Emit value for reporter to show in the blocks.
+	 * @param {string} blockId ID for the block.
+	 * @param {string} value Value to show associated with the block.
+	 */
+	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;
+	        }
+	    }
+	};
+
+	/**
+	 * Handle an animation frame from the main thread.
+	 */
+	Runtime.prototype.animationFrame = function () {
+	    if (self.renderer) {
+	        self.renderer.draw();
+	    }
+	};
+
 	/**
 	 * Set up timers to repeatedly step in a browser
 	 */
 	Runtime.prototype.start = function () {
-	    if (!window.setInterval) return;
-	    window.setInterval(function() {
+	    self.setInterval(function() {
 	        this._step();
 	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
 	};
@@ -13181,12 +11539,12 @@
 
 
 /***/ },
-/* 119 */
+/* 62 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Timer = __webpack_require__(120);
-	var Thread = __webpack_require__(121);
-	var YieldTimers = __webpack_require__(122);
+	var Timer = __webpack_require__(63);
+	var Thread = __webpack_require__(64);
+	var execute = __webpack_require__(65);
 
 	function Sequencer (runtime) {
 	    /**
@@ -13210,12 +11568,6 @@
 	 */
 	Sequencer.WORK_TIME = 10;
 
-	/**
-	 * If set, block calls, args, and return values will be logged to the console.
-	 * @const {boolean}
-	 */
-	Sequencer.DEBUG_BLOCK_CALLS = true;
-
 	/**
 	 * Step through all threads in `this.threads`, running them in order.
 	 * @param {Array.<Thread>} threads List of which threads to step.
@@ -13228,6 +11580,13 @@
 	    var inactiveThreads = [];
 	    // If all of the threads are yielding, we should yield.
 	    var numYieldingThreads = 0;
+	    // Clear all yield statuses that were for the previous frame.
+	    for (var t = 0; t < threads.length; t++) {
+	        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
+	            threads[t].setStatus(Thread.STATUS_RUNNING);
+	        }
+	    }
+
 	    // While there are still threads to run and we are within WORK_TIME,
 	    // continue executing threads.
 	    while (threads.length > 0 &&
@@ -13235,33 +11594,20 @@
 	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
 	        // New threads at the end of the iteration.
 	        var newThreads = [];
+	        // Reset yielding thread count.
+	        numYieldingThreads = 0;
 	        // Attempt to run each thread one time
 	        for (var i = 0; i < threads.length; i++) {
 	            var activeThread = threads[i];
 	            if (activeThread.status === Thread.STATUS_RUNNING) {
 	                // Normal-mode thread: step.
-	                this.stepThread(activeThread);
-	            } else if (activeThread.status === Thread.STATUS_YIELD) {
-	                // Yield-mode thread: check if the time has passed.
-	                YieldTimers.resolve(activeThread.yieldTimerId);
+	                this.startThread(activeThread);
+	            } else if (activeThread.status === Thread.STATUS_YIELD ||
+	                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
+	                // Yielding thread: do nothing for this step.
 	                numYieldingThreads++;
-	            } else if (activeThread.status === Thread.STATUS_DONE) {
-	                // Moved to a done state - finish up
-	                activeThread.status = Thread.STATUS_RUNNING;
-	                // @todo Deal with the return value
 	            }
-	            // First attempt to pop from the stack
-	            if (activeThread.stack.length > 0 &&
-	                activeThread.nextBlock === null &&
-	                activeThread.status === Thread.STATUS_DONE) {
-	                activeThread.nextBlock = activeThread.stack.pop();
-	                // Don't pop stack frame - we need the data.
-	                // A new one won't be created when we execute.
-	                if (activeThread.nextBlock !== null) {
-	                    activeThread.status === Thread.STATUS_RUNNING;
-	                }
-	            }
-	            if (activeThread.nextBlock === null &&
+	            if (activeThread.stack.length === 0 &&
 	                activeThread.status === Thread.STATUS_DONE) {
 	                // Finished with this thread - tell runtime to clean it up.
 	                inactiveThreads.push(activeThread);
@@ -13280,182 +11626,95 @@
 	 * Step the requested thread
 	 * @param {!Thread} thread Thread object to step
 	 */
-	Sequencer.prototype.stepThread = function (thread) {
-	    // Save the yield timer ID, in case a primitive makes a new one
-	    // @todo hack - perhaps patch this to allow more than one timer per
-	    // primitive, for example...
-	    var oldYieldTimerId = YieldTimers.timerId;
-
-	    // Save the current block and set the nextBlock.
-	    // If the primitive would like to do control flow,
-	    // it can overwrite nextBlock.
-	    var currentBlock = thread.nextBlock;
-	    if (!currentBlock || !this.runtime.blocks.getBlock(currentBlock)) {
-	        thread.status = Thread.STATUS_DONE;
+	Sequencer.prototype.startThread = function (thread) {
+	    var currentBlockId = thread.peekStack();
+	    if (!currentBlockId) {
+	        // A "null block" - empty branch.
+	        // Yield for the frame.
+	        thread.popStack();
+	        thread.setStatus(Thread.STATUS_YIELD_FRAME);
 	        return;
 	    }
-	    thread.nextBlock = this.runtime.blocks.getNextBlock(currentBlock);
-
-	    var opcode = this.runtime.blocks.getOpcode(currentBlock);
-
-	    // Push the current block to the stack
-	    thread.stack.push(currentBlock);
-	    // Push an empty stack frame, if we need one.
-	    // Might not, if we just popped the stack.
-	    if (thread.stack.length > thread.stackFrames.length) {
-	        thread.stackFrames.push({});
+	    // Execute the current block
+	    execute(this, thread);
+	    // If the block executed without yielding and without doing control flow,
+	    // move to done.
+	    if (thread.status === Thread.STATUS_RUNNING &&
+	        thread.peekStack() === currentBlockId) {
+	        this.proceedThread(thread);
 	    }
-	    var currentStackFrame = thread.stackFrames[thread.stackFrames.length - 1];
+	};
 
-	    /**
-	     * A callback for the primitive to indicate its thread should yield.
-	     * @type {Function}
-	     */
-	    var threadYieldCallback = function () {
-	        thread.status = Thread.STATUS_YIELD;
-	    };
-
-	    /**
-	     * A callback for the primitive to indicate its thread is finished
-	     * @type {Function}
-	     */
-	    var instance = this;
-	    var threadDoneCallback = function () {
-	        thread.status = Thread.STATUS_DONE;
-	        // Refresh nextBlock in case it has changed during a yield.
-	        thread.nextBlock = instance.runtime.blocks.getNextBlock(currentBlock);
-	        // Pop the stack and stack frame
-	        thread.stack.pop();
-	        thread.stackFrames.pop();
-	        // Stop showing run feedback in the editor.
-	        instance.runtime.glowBlock(currentBlock, false);
-	    };
-
-	    /**
-	     * A callback for the primitive to start hats.
-	     * @todo very hacked...
-	     * Provide a callback that is passed in a block and returns true
-	     * if it is a hat that should be triggered.
-	     * @param {Function} callback Provided callback.
-	     */
-	    var startHats = function(callback) {
-	        var stacks = instance.runtime.blocks.getStacks();
-	        for (var i = 0; i < stacks.length; i++) {
-	            var stack = stacks[i];
-	            var stackBlock = instance.runtime.blocks.getBlock(stack);
-	            var result = callback(stackBlock);
-	            if (result) {
-	                // Check if the stack is already running
-	                var stackRunning = false;
-
-	                for (var j = 0; j < instance.runtime.threads.length; j++) {
-	                    if (instance.runtime.threads[j].topBlock == stack) {
-	                        stackRunning = true;
-	                        break;
-	                    }
-	                }
-	                if (!stackRunning) {
-	                    instance.runtime._pushThread(stack);
-	                }
-	            }
-	        }
-	    };
-
-	    /**
-	     * Record whether we have switched stack,
-	     * to avoid proceeding the thread automatically.
-	     * @type {boolean}
-	     */
-	    var switchedStack = false;
-	    /**
-	     * A callback for a primitive to start a substack.
-	     * @type {Function}
-	     */
-	    var threadStartSubstack = function () {
-	        // Set nextBlock to the start of the substack
-	        var substack = instance.runtime.blocks.getSubstack(currentBlock);
-	        if (substack && substack.value) {
-	            thread.nextBlock = substack.value;
-	        } else {
-	            thread.nextBlock = null;
-	        }
-	        switchedStack = true;
-	    };
-
-	    // @todo extreme hack to get the single argument value for prototype
-	    var argValues = [];
-	    var blockInputs = this.runtime.blocks.getBlock(currentBlock).fields;
-	    for (var bi in blockInputs) {
-	        var outer = blockInputs[bi];
-	        for (var b in outer.blocks) {
-	            var block = outer.blocks[b];
-	            var fields = block.fields;
-	            for (var f in fields) {
-	                var field = fields[f];
-	                argValues.push(field.value);
-	            }
-	        }
+	/**
+	 * Step a thread into a block's branch.
+	 * @param {!Thread} thread Thread object to step to branch.
+	 * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
+	 */
+	Sequencer.prototype.stepToBranch = function (thread, branchNum) {
+	    if (!branchNum) {
+	        branchNum = 1;
 	    }
-
-	    // Start showing run feedback in the editor.
-	    this.runtime.glowBlock(currentBlock, true);
-
-	    if (!opcode) {
-	        console.warn('Could not get opcode for block: ' + currentBlock);
-	    }
-	    else {
-	        var blockFunction = this.runtime.getOpcodeFunction(opcode);
-	        if (!blockFunction) {
-	            console.warn('Could not get implementation for opcode: ' + opcode);
-	        }
-	        else {
-	            if (Sequencer.DEBUG_BLOCK_CALLS) {
-	                console.groupCollapsed('Executing: ' + opcode);
-	                console.log('with arguments: ', argValues);
-	                console.log('and stack frame: ', currentStackFrame);
-	            }
-	            var blockFunctionReturnValue = null;
-	            try {
-	                // @todo deal with the return value
-	                blockFunctionReturnValue = blockFunction(argValues, {
-	                    yield: threadYieldCallback,
-	                    done: threadDoneCallback,
-	                    timeout: YieldTimers.timeout,
-	                    stackFrame: currentStackFrame,
-	                    startSubstack: threadStartSubstack,
-	                    startHats: startHats
-	                });
-	            }
-	            catch(e) {
-	                console.error(
-	                    'Exception calling block function for opcode: ' +
-	                    opcode + '\n' + e);
-	            } finally {
-	                // Update if the thread has set a yield timer ID
-	                // @todo hack
-	                if (YieldTimers.timerId > oldYieldTimerId) {
-	                    thread.yieldTimerId = YieldTimers.timerId;
-	                }
-	                if (thread.status === Thread.STATUS_RUNNING && !switchedStack) {
-	                    // Thread executed without yielding - move to done
-	                    threadDoneCallback();
-	                }
-	                if (Sequencer.DEBUG_BLOCK_CALLS) {
-	                    console.log('ending stack frame: ', currentStackFrame);
-	                    console.log('returned: ', blockFunctionReturnValue);
-	                    console.groupEnd();
-	                }
-	            }
-	        }
+	    var currentBlockId = thread.peekStack();
+	    var branchId = this.runtime.targetForThread(thread).blocks.getBranch(
+	        currentBlockId,
+	        branchNum
+	    );
+	    if (branchId) {
+	        // Push branch ID to the thread's stack.
+	        thread.pushStack(branchId);
+	    } else {
+	        // Push null, so we come back to the current block.
+	        thread.pushStack(null);
 	    }
+	};
 
+	/**
+	 * Step a thread into an input reporter, and manage its status appropriately.
+	 * @param {!Thread} thread Thread object to step to reporter.
+	 * @param {!string} blockId ID of reporter block.
+	 * @param {!string} inputName Name of input on parent block.
+	 * @return {boolean} True if yielded, false if it finished immediately.
+	 */
+	Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
+	    var currentStackFrame = thread.peekStackFrame();
+	    // Push to the stack to evaluate the reporter block.
+	    thread.pushStack(blockId);
+	    // Save name of input for `Thread.pushReportedValue`.
+	    currentStackFrame.waitingReporter = inputName;
+	    // Actually execute the block.
+	    this.startThread(thread);
+	    // If a reporter yielded, caller must wait for it to unyield.
+	    // The value will be populated once the reporter unyields,
+	    // and passed up to the currentStackFrame on next execution.
+	    return thread.status === Thread.STATUS_YIELD;
+	};
+
+	/**
+	 * Finish stepping a thread and proceed it to the next block.
+	 * @param {!Thread} thread Thread object to proceed.
+	 */
+	Sequencer.prototype.proceedThread = function (thread) {
+	    var currentBlockId = thread.peekStack();
+	    // Mark the status as done and proceed to the next block.
+	    // 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));
+	    if (nextBlockId) {
+	        thread.pushStack(nextBlockId);
+	    }
+	    // If we can't find a next block to run, mark the thread as done.
+	    if (!thread.peekStack()) {
+	        thread.setStatus(Thread.STATUS_DONE);
+	    }
 	};
 
 	module.exports = Sequencer;
 
 
 /***/ },
-/* 120 */
+/* 63 */
 /***/ function(module, exports) {
 
 	/**
@@ -13481,7 +11740,7 @@
 
 
 /***/ },
-/* 121 */
+/* 64 */
 /***/ function(module, exports) {
 
 	/**
@@ -13495,11 +11754,7 @@
 	     * @type {!string}
 	     */
 	    this.topBlock = firstBlock;
-	    /**
-	     * ID of next block that the thread will execute, or null if none.
-	     * @type {?string}
-	     */
-	    this.nextBlock = firstBlock;
+
 	    /**
 	     * Stack for the thread. When the sequencer enters a control structure,
 	     * the block is pushed onto the stack so we know where to exit.
@@ -13518,140 +11773,248 @@
 	     * @type {number}
 	     */
 	    this.status = 0; /* Thread.STATUS_RUNNING */
-
-	    /**
-	     * Yield timer ID (for checking when the thread should unyield).
-	     * @type {number}
-	     */
-	    this.yieldTimerId = -1;
 	}
 
 	/**
 	 * Thread status for initialized or running thread.
-	 * Threads are in this state when the primitive is called for the first time.
+	 * This is the default state for a thread - execution should run normally,
+	 * stepping from block to block.
 	 * @const
 	 */
 	Thread.STATUS_RUNNING = 0;
 
 	/**
 	 * Thread status for a yielded thread.
-	 * Threads are in this state when a primitive has yielded.
+	 * Threads are in this state when a primitive has yielded; execution is paused
+	 * until the relevant primitive unyields.
 	 * @const
 	 */
 	Thread.STATUS_YIELD = 1;
 
 	/**
-	 * Thread status for a finished/done thread.
-	 * Thread is moved to this state when the interpreter
-	 * can proceed with execution.
+	 * Thread status for a single-frame yield.
 	 * @const
 	 */
-	Thread.STATUS_DONE = 2;
+	Thread.STATUS_YIELD_FRAME = 2;
+
+	/**
+	 * Thread status for a finished/done thread.
+	 * Thread is in this state when there are no more blocks to execute.
+	 * @const
+	 */
+	Thread.STATUS_DONE = 3;
+
+	/**
+	 * Push stack and update stack frames appropriately.
+	 * @param {string} blockId Block ID to push to stack.
+	 */
+	Thread.prototype.pushStack = function (blockId) {
+	    this.stack.push(blockId);
+	    // Push an empty stack frame, if we need one.
+	    // Might not, if we just popped the stack.
+	    if (this.stack.length > this.stackFrames.length) {
+	        this.stackFrames.push({
+	            reported: {}, // Collects reported input values.
+	            waitingReporter: null, // Name of waiting reporter.
+	            executionContext: {} // A context passed to block implementations.
+	        });
+	    }
+	};
+
+	/**
+	 * Pop last block on the stack and its stack frame.
+	 * @return {string} Block ID popped from the stack.
+	 */
+	Thread.prototype.popStack = function () {
+	    this.stackFrames.pop();
+	    return this.stack.pop();
+	};
+
+	/**
+	 * Get top stack item.
+	 * @return {?string} Block ID on top of stack.
+	 */
+	Thread.prototype.peekStack = function () {
+	    return this.stack[this.stack.length - 1];
+	};
+
+
+	/**
+	 * Get top stack frame.
+	 * @return {?Object} Last stack frame stored on this thread.
+	 */
+	Thread.prototype.peekStackFrame = function () {
+	    return this.stackFrames[this.stackFrames.length - 1];
+	};
+
+	/**
+	 * Get stack frame above the current top.
+	 * @return {?Object} Second to last stack frame stored on this thread.
+	 */
+	Thread.prototype.peekParentStackFrame = function () {
+	    return this.stackFrames[this.stackFrames.length - 2];
+	};
+
+	/**
+	 * Push a reported value to the parent of the current stack frame.
+	 * @param {!Any} value Reported value to push.
+	 */
+	Thread.prototype.pushReportedValue = function (value) {
+	    var parentStackFrame = this.peekParentStackFrame();
+	    if (parentStackFrame) {
+	        var waitingReporter = parentStackFrame.waitingReporter;
+	        parentStackFrame.reported[waitingReporter] = value;
+	        parentStackFrame.waitingReporter = null;
+	    }
+	};
+
+	/**
+	 * Set thread status.
+	 * @param {number} status Enum representing thread status.
+	 */
+	Thread.prototype.setStatus = function (status) {
+	    this.status = status;
+	};
 
 	module.exports = Thread;
 
 
 /***/ },
-/* 122 */
+/* 65 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/**
-	 * @fileoverview Timers that are synchronized with the Scratch sequencer.
-	 */
-	var Timer = __webpack_require__(120);
-
-	function YieldTimers () {}
+	var Thread = __webpack_require__(64);
 
 	/**
-	 * Shared collection of timers.
-	 * Each timer is a [Function, number] with the callback
-	 * and absolute time for it to run.
-	 * @type {Object.<number,Array>}
+	 * Execute a block.
+	 * @param {!Sequencer} sequencer Which sequencer is executing.
+	 * @param {!Thread} thread Thread which to read and execute.
 	 */
-	YieldTimers.timers = {};
+	var execute = function (sequencer, thread) {
+	    var runtime = sequencer.runtime;
+	    var target = runtime.targetForThread(thread);
 
-	/**
-	 * Monotonically increasing timer ID.
-	 * @type {number}
-	 */
-	YieldTimers.timerId = 0;
+	    // Current block to execute is the one on the top of the stack.
+	    var currentBlockId = thread.peekStack();
+	    var currentStackFrame = thread.peekStackFrame();
 
-	/**
-	 * Utility for measuring time.
-	 * @type {!Timer}
-	 */
-	YieldTimers.globalTimer = new Timer();
+	    var opcode = target.blocks.getOpcode(currentBlockId);
 
-	/**
-	 * The timeout function is passed to primitives and is intended
-	 * as a convenient replacement for window.setTimeout.
-	 * The sequencer will attempt to resolve the timer every time
-	 * the yielded thread would have been stepped.
-	 * @param {!Function} callback To be called when the timer is done.
-	 * @param {number} timeDelta Time to wait, in ms.
-	 * @return {number} Timer ID to be used with other methods.
-	 */
-	YieldTimers.timeout = function (callback, timeDelta) {
-	    var id = ++YieldTimers.timerId;
-	    YieldTimers.timers[id] = [
-	        callback,
-	        YieldTimers.globalTimer.time() + timeDelta
-	    ];
-	    return id;
-	};
-
-	/**
-	 * Attempt to resolve a timeout.
-	 * If the time has passed, call the callback.
-	 * Otherwise, do nothing.
-	 * @param {number} id Timer ID to resolve.
-	 * @return {boolean} True if the timer has resolved.
-	 */
-	YieldTimers.resolve = function (id) {
-	    var timer = YieldTimers.timers[id];
-	    if (!timer) {
-	        // No such timer.
-	        return false;
+	    if (!opcode) {
+	        console.warn('Could not get opcode for block: ' + currentBlockId);
+	        return;
 	    }
-	    var callback = timer[0];
-	    var time = timer[1];
-	    if (YieldTimers.globalTimer.time() < time) {
-	        // Not done yet.
-	        return false;
-	    }
-	    // Execute the callback and remove the timer.
-	    callback();
-	    delete YieldTimers.timers[id];
-	    return true;
-	};
 
-	/**
-	 * Reject a timer so the callback never executes.
-	 * @param {number} id Timer ID to reject.
-	 */
-	YieldTimers.reject = function (id) {
-	    if (YieldTimers.timers[id]) {
-	        delete YieldTimers.timers[id];
+	    var blockFunction = runtime.getOpcodeFunction(opcode);
+	    if (!blockFunction) {
+	        console.warn('Could not get implementation for opcode: ' + opcode);
+	        return;
+	    }
+
+	    // Generate values for arguments (inputs).
+	    var argValues = {};
+
+	    // Add all fields on this block to the argValues.
+	    var fields = target.blocks.getFields(currentBlockId);
+	    for (var fieldName in fields) {
+	        argValues[fieldName] = fields[fieldName].value;
+	    }
+
+	    // Recursively evaluate input blocks.
+	    var inputs = target.blocks.getInputs(currentBlockId);
+	    for (var inputName in inputs) {
+	        var input = inputs[inputName];
+	        var inputBlockId = input.block;
+	        // Is there no value for this input waiting in the stack frame?
+	        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
+	            // If there's not, we need to evaluate the block.
+	            var reporterYielded = (
+	                sequencer.stepToReporter(thread, inputBlockId, inputName)
+	            );
+	            // If the reporter yielded, return immediately;
+	            // it needs time to finish and report its value.
+	            if (reporterYielded) {
+	                return;
+	            }
+	        }
+	        argValues[inputName] = currentStackFrame.reported[inputName];
+	    }
+
+	    // If we've gotten this far, all of the input blocks are evaluated,
+	    // and `argValues` is fully populated. So, execute the block primitive.
+	    // First, clear `currentStackFrame.reported`, so any subsequent execution
+	    // (e.g., on return from a branch) gets fresh inputs.
+	    currentStackFrame.reported = {};
+
+	    var primitiveReportedValue = null;
+	    primitiveReportedValue = blockFunction(argValues, {
+	        yield: function() {
+	            thread.setStatus(Thread.STATUS_YIELD);
+	        },
+	        yieldFrame: function() {
+	            thread.setStatus(Thread.STATUS_YIELD_FRAME);
+	        },
+	        done: function() {
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	            sequencer.proceedThread(thread);
+	        },
+	        stackFrame: currentStackFrame.executionContext,
+	        startBranch: function (branchNum) {
+	            sequencer.stepToBranch(thread, branchNum);
+	        },
+	        target: target
+	    });
+
+	    // Deal with any reported value.
+	    // If it's a promise, wait until promise resolves.
+	    var isPromise = (
+	        primitiveReportedValue &&
+	        primitiveReportedValue.then &&
+	        typeof primitiveReportedValue.then === 'function'
+	    );
+	    if (isPromise) {
+	        if (thread.status === Thread.STATUS_RUNNING) {
+	            // Primitive returned a promise; automatically yield thread.
+	            thread.setStatus(Thread.STATUS_YIELD);
+	        }
+	        // Promise handlers
+	        primitiveReportedValue.then(function(resolvedValue) {
+	            // Promise resolved: the primitive reported a value.
+	            thread.pushReportedValue(resolvedValue);
+	            // Report the value visually if necessary.
+	            if (typeof resolvedValue !== 'undefined' &&
+	                thread.peekStack() === thread.topBlock) {
+	                runtime.visualReport(thread.peekStack(), resolvedValue);
+	            }
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	            sequencer.proceedThread(thread);
+	        }, function(rejectionReason) {
+	            // Promise rejected: the primitive had some error.
+	            // Log it and proceed.
+	            console.warn('Primitive rejected promise: ', rejectionReason);
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	            sequencer.proceedThread(thread);
+	        });
+	    } else if (thread.status === Thread.STATUS_RUNNING) {
+	        thread.pushReportedValue(primitiveReportedValue);
+	        // Report the value visually if necessary.
+	        if (typeof primitiveReportedValue !== 'undefined' &&
+	            thread.peekStack() === thread.topBlock) {
+	            runtime.visualReport(thread.peekStack(), primitiveReportedValue);
+	        }
 	    }
 	};
 
-	/**
-	 * Reject all timers currently stored.
-	 * Especially useful for a Scratch "stop."
-	 */
-	YieldTimers.rejectAll = function () {
-	    YieldTimers.timers = {};
-	    YieldTimers.timerId = 0;
-	};
-
-	module.exports = YieldTimers;
+	module.exports = execute;
 
 
 /***/ },
-/* 123 */
-/***/ function(module, exports) {
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
 
-	function Scratch3Blocks(runtime) {
+	var Promise = __webpack_require__(67);
+
+	function Scratch3ControlBlocks(runtime) {
 	    /**
 	     * The runtime instantiating this block package.
 	     * @type {Runtime}
@@ -13663,227 +12026,1345 @@
 	 * Retrieve the block primitives implemented by this package.
 	 * @return {Object.<string, Function>} Mapping of opcode to Function.
 	 */
-	Scratch3Blocks.prototype.getPrimitives = function() {
+	Scratch3ControlBlocks.prototype.getPrimitives = function() {
 	    return {
 	        'control_repeat': this.repeat,
+	        'control_repeat_until': this.repeatUntil,
 	        'control_forever': this.forever,
 	        'control_wait': this.wait,
-	        'control_stop': this.stop,
+	        'control_if': this.if,
+	        'control_if_else': this.ifElse,
+	        'control_stop': this.stop
+	    };
+	};
+
+	Scratch3ControlBlocks.prototype.repeat = function(args, util) {
+	    // Initialize loop
+	    if (util.stackFrame.loopCounter === undefined) {
+	        util.stackFrame.loopCounter = parseInt(args.TIMES);
+	    }
+	    // Only execute once per frame.
+	    // When the branch finishes, `repeat` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        // Decrease counter
+	        util.stackFrame.loopCounter--;
+	        // If we still have some left, start the branch.
+	        if (util.stackFrame.loopCounter >= 0) {
+	            util.startBranch();
+	        }
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
+	    // Only execute once per frame.
+	    // When the branch finishes, `repeat` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        // If the condition is true, start the branch.
+	        if (!args.CONDITION) {
+	            util.startBranch();
+	        }
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.forever = function(args, util) {
+	    // Only execute once per frame.
+	    // When the branch finishes, `forever` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        util.startBranch();
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.wait = function(args) {
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            resolve();
+	        }, 1000 * args.DURATION);
+	    });
+	};
+
+	Scratch3ControlBlocks.prototype.if = function(args, util) {
+	    // Only execute one time. `if` will be returned to
+	    // when the branch finishes, but it shouldn't execute again.
+	    if (util.stackFrame.executedInFrame === undefined) {
+	        util.stackFrame.executedInFrame = true;
+	        if (args.CONDITION) {
+	            util.startBranch();
+	        }
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
+	    // Only execute one time. `ifElse` will be returned to
+	    // when the branch finishes, but it shouldn't execute again.
+	    if (util.stackFrame.executedInFrame === undefined) {
+	        util.stackFrame.executedInFrame = true;
+	        if (args.CONDITION) {
+	            util.startBranch(1);
+	        } else {
+	            util.startBranch(2);
+	        }
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.stop = function() {
+	    // @todo - don't use this.runtime
+	    this.runtime.stopAll();
+	};
+
+	module.exports = Scratch3ControlBlocks;
+
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	module.exports = __webpack_require__(68)
+
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	module.exports = __webpack_require__(69);
+	__webpack_require__(71);
+	__webpack_require__(72);
+	__webpack_require__(73);
+	__webpack_require__(74);
+	__webpack_require__(76);
+
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var asap = __webpack_require__(70);
+
+	function noop() {}
+
+	// States:
+	//
+	// 0 - pending
+	// 1 - fulfilled with _value
+	// 2 - rejected with _value
+	// 3 - adopted the state of another promise, _value
+	//
+	// once the state is no longer pending (0) it is immutable
+
+	// All `_` prefixed properties will be reduced to `_{random number}`
+	// at build time to obfuscate them and discourage their use.
+	// We don't use symbols or Object.defineProperty to fully hide them
+	// because the performance isn't good enough.
+
+
+	// to avoid using try/catch inside critical functions, we
+	// extract them to here.
+	var LAST_ERROR = null;
+	var IS_ERROR = {};
+	function getThen(obj) {
+	  try {
+	    return obj.then;
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+
+	function tryCallOne(fn, a) {
+	  try {
+	    return fn(a);
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+	function tryCallTwo(fn, a, b) {
+	  try {
+	    fn(a, b);
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+
+	module.exports = Promise;
+
+	function Promise(fn) {
+	  if (typeof this !== 'object') {
+	    throw new TypeError('Promises must be constructed via new');
+	  }
+	  if (typeof fn !== 'function') {
+	    throw new TypeError('not a function');
+	  }
+	  this._45 = 0;
+	  this._81 = 0;
+	  this._65 = null;
+	  this._54 = null;
+	  if (fn === noop) return;
+	  doResolve(fn, this);
+	}
+	Promise._10 = null;
+	Promise._97 = null;
+	Promise._61 = noop;
+
+	Promise.prototype.then = function(onFulfilled, onRejected) {
+	  if (this.constructor !== Promise) {
+	    return safeThen(this, onFulfilled, onRejected);
+	  }
+	  var res = new Promise(noop);
+	  handle(this, new Handler(onFulfilled, onRejected, res));
+	  return res;
+	};
+
+	function safeThen(self, onFulfilled, onRejected) {
+	  return new self.constructor(function (resolve, reject) {
+	    var res = new Promise(noop);
+	    res.then(resolve, reject);
+	    handle(self, new Handler(onFulfilled, onRejected, res));
+	  });
+	};
+	function handle(self, deferred) {
+	  while (self._81 === 3) {
+	    self = self._65;
+	  }
+	  if (Promise._10) {
+	    Promise._10(self);
+	  }
+	  if (self._81 === 0) {
+	    if (self._45 === 0) {
+	      self._45 = 1;
+	      self._54 = deferred;
+	      return;
+	    }
+	    if (self._45 === 1) {
+	      self._45 = 2;
+	      self._54 = [self._54, deferred];
+	      return;
+	    }
+	    self._54.push(deferred);
+	    return;
+	  }
+	  handleResolved(self, deferred);
+	}
+
+	function handleResolved(self, deferred) {
+	  asap(function() {
+	    var cb = self._81 === 1 ? deferred.onFulfilled : deferred.onRejected;
+	    if (cb === null) {
+	      if (self._81 === 1) {
+	        resolve(deferred.promise, self._65);
+	      } else {
+	        reject(deferred.promise, self._65);
+	      }
+	      return;
+	    }
+	    var ret = tryCallOne(cb, self._65);
+	    if (ret === IS_ERROR) {
+	      reject(deferred.promise, LAST_ERROR);
+	    } else {
+	      resolve(deferred.promise, ret);
+	    }
+	  });
+	}
+	function resolve(self, newValue) {
+	  // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
+	  if (newValue === self) {
+	    return reject(
+	      self,
+	      new TypeError('A promise cannot be resolved with itself.')
+	    );
+	  }
+	  if (
+	    newValue &&
+	    (typeof newValue === 'object' || typeof newValue === 'function')
+	  ) {
+	    var then = getThen(newValue);
+	    if (then === IS_ERROR) {
+	      return reject(self, LAST_ERROR);
+	    }
+	    if (
+	      then === self.then &&
+	      newValue instanceof Promise
+	    ) {
+	      self._81 = 3;
+	      self._65 = newValue;
+	      finale(self);
+	      return;
+	    } else if (typeof then === 'function') {
+	      doResolve(then.bind(newValue), self);
+	      return;
+	    }
+	  }
+	  self._81 = 1;
+	  self._65 = newValue;
+	  finale(self);
+	}
+
+	function reject(self, newValue) {
+	  self._81 = 2;
+	  self._65 = newValue;
+	  if (Promise._97) {
+	    Promise._97(self, newValue);
+	  }
+	  finale(self);
+	}
+	function finale(self) {
+	  if (self._45 === 1) {
+	    handle(self, self._54);
+	    self._54 = null;
+	  }
+	  if (self._45 === 2) {
+	    for (var i = 0; i < self._54.length; i++) {
+	      handle(self, self._54[i]);
+	    }
+	    self._54 = null;
+	  }
+	}
+
+	function Handler(onFulfilled, onRejected, promise){
+	  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+	  this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+	  this.promise = promise;
+	}
+
+	/**
+	 * Take a potentially misbehaving resolver function and make sure
+	 * onFulfilled and onRejected are only called once.
+	 *
+	 * Makes no guarantees about asynchrony.
+	 */
+	function doResolve(fn, promise) {
+	  var done = false;
+	  var res = tryCallTwo(fn, function (value) {
+	    if (done) return;
+	    done = true;
+	    resolve(promise, value);
+	  }, function (reason) {
+	    if (done) return;
+	    done = true;
+	    reject(promise, reason);
+	  })
+	  if (!done && res === IS_ERROR) {
+	    done = true;
+	    reject(promise, LAST_ERROR);
+	  }
+	}
+
+
+/***/ },
+/* 70 */
+/***/ function(module, exports) {
+
+	/* WEBPACK VAR INJECTION */(function(global) {"use strict";
+
+	// Use the fastest means possible to execute a task in its own turn, with
+	// priority over other events including IO, animation, reflow, and redraw
+	// events in browsers.
+	//
+	// An exception thrown by a task will permanently interrupt the processing of
+	// subsequent tasks. The higher level `asap` function ensures that if an
+	// exception is thrown by a task, that the task queue will continue flushing as
+	// soon as possible, but if you use `rawAsap` directly, you are responsible to
+	// either ensure that no exceptions are thrown from your task, or to manually
+	// call `rawAsap.requestFlush` if an exception is thrown.
+	module.exports = rawAsap;
+	function rawAsap(task) {
+	    if (!queue.length) {
+	        requestFlush();
+	        flushing = true;
+	    }
+	    // Equivalent to push, but avoids a function call.
+	    queue[queue.length] = task;
+	}
+
+	var queue = [];
+	// Once a flush has been requested, no further calls to `requestFlush` are
+	// necessary until the next `flush` completes.
+	var flushing = false;
+	// `requestFlush` is an implementation-specific method that attempts to kick
+	// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
+	// the event queue before yielding to the browser's own event loop.
+	var requestFlush;
+	// The position of the next task to execute in the task queue. This is
+	// preserved between calls to `flush` so that it can be resumed if
+	// a task throws an exception.
+	var index = 0;
+	// If a task schedules additional tasks recursively, the task queue can grow
+	// unbounded. To prevent memory exhaustion, the task queue will periodically
+	// truncate already-completed tasks.
+	var capacity = 1024;
+
+	// The flush function processes all tasks that have been scheduled with
+	// `rawAsap` unless and until one of those tasks throws an exception.
+	// If a task throws an exception, `flush` ensures that its state will remain
+	// consistent and will resume where it left off when called again.
+	// However, `flush` does not make any arrangements to be called again if an
+	// exception is thrown.
+	function flush() {
+	    while (index < queue.length) {
+	        var currentIndex = index;
+	        // Advance the index before calling the task. This ensures that we will
+	        // begin flushing on the next task the task throws an error.
+	        index = index + 1;
+	        queue[currentIndex].call();
+	        // Prevent leaking memory for long chains of recursive calls to `asap`.
+	        // If we call `asap` within tasks scheduled by `asap`, the queue will
+	        // grow, but to avoid an O(n) walk for every task we execute, we don't
+	        // shift tasks off the queue after they have been executed.
+	        // Instead, we periodically shift 1024 tasks off the queue.
+	        if (index > capacity) {
+	            // Manually shift all values starting at the index back to the
+	            // beginning of the queue.
+	            for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
+	                queue[scan] = queue[scan + index];
+	            }
+	            queue.length -= index;
+	            index = 0;
+	        }
+	    }
+	    queue.length = 0;
+	    index = 0;
+	    flushing = false;
+	}
+
+	// `requestFlush` is implemented using a strategy based on data collected from
+	// every available SauceLabs Selenium web driver worker at time of writing.
+	// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
+
+	// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
+	// have WebKitMutationObserver but not un-prefixed MutationObserver.
+	// Must use `global` instead of `window` to work in both frames and web
+	// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
+	var BrowserMutationObserver = global.MutationObserver || global.WebKitMutationObserver;
+
+	// MutationObservers are desirable because they have high priority and work
+	// reliably everywhere they are implemented.
+	// They are implemented in all modern browsers.
+	//
+	// - Android 4-4.3
+	// - Chrome 26-34
+	// - Firefox 14-29
+	// - Internet Explorer 11
+	// - iPad Safari 6-7.1
+	// - iPhone Safari 7-7.1
+	// - Safari 6-7
+	if (typeof BrowserMutationObserver === "function") {
+	    requestFlush = makeRequestCallFromMutationObserver(flush);
+
+	// MessageChannels are desirable because they give direct access to the HTML
+	// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
+	// 11-12, and in web workers in many engines.
+	// Although message channels yield to any queued rendering and IO tasks, they
+	// would be better than imposing the 4ms delay of timers.
+	// However, they do not work reliably in Internet Explorer or Safari.
+
+	// Internet Explorer 10 is the only browser that has setImmediate but does
+	// not have MutationObservers.
+	// Although setImmediate yields to the browser's renderer, it would be
+	// preferrable to falling back to setTimeout since it does not have
+	// the minimum 4ms penalty.
+	// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
+	// Desktop to a lesser extent) that renders both setImmediate and
+	// MessageChannel useless for the purposes of ASAP.
+	// https://github.com/kriskowal/q/issues/396
+
+	// Timers are implemented universally.
+	// We fall back to timers in workers in most engines, and in foreground
+	// contexts in the following browsers.
+	// However, note that even this simple case requires nuances to operate in a
+	// broad spectrum of browsers.
+	//
+	// - Firefox 3-13
+	// - Internet Explorer 6-9
+	// - iPad Safari 4.3
+	// - Lynx 2.8.7
+	} else {
+	    requestFlush = makeRequestCallFromTimer(flush);
+	}
+
+	// `requestFlush` requests that the high priority event queue be flushed as
+	// soon as possible.
+	// This is useful to prevent an error thrown in a task from stalling the event
+	// queue if the exception handled by Node.js’s
+	// `process.on("uncaughtException")` or by a domain.
+	rawAsap.requestFlush = requestFlush;
+
+	// To request a high priority event, we induce a mutation observer by toggling
+	// the text of a text node between "1" and "-1".
+	function makeRequestCallFromMutationObserver(callback) {
+	    var toggle = 1;
+	    var observer = new BrowserMutationObserver(callback);
+	    var node = document.createTextNode("");
+	    observer.observe(node, {characterData: true});
+	    return function requestCall() {
+	        toggle = -toggle;
+	        node.data = toggle;
+	    };
+	}
+
+	// The message channel technique was discovered by Malte Ubl and was the
+	// original foundation for this library.
+	// http://www.nonblocking.io/2011/06/windownexttick.html
+
+	// Safari 6.0.5 (at least) intermittently fails to create message ports on a
+	// page's first load. Thankfully, this version of Safari supports
+	// MutationObservers, so we don't need to fall back in that case.
+
+	// function makeRequestCallFromMessageChannel(callback) {
+	//     var channel = new MessageChannel();
+	//     channel.port1.onmessage = callback;
+	//     return function requestCall() {
+	//         channel.port2.postMessage(0);
+	//     };
+	// }
+
+	// For reasons explained above, we are also unable to use `setImmediate`
+	// under any circumstances.
+	// Even if we were, there is another bug in Internet Explorer 10.
+	// It is not sufficient to assign `setImmediate` to `requestFlush` because
+	// `setImmediate` must be called *by name* and therefore must be wrapped in a
+	// closure.
+	// Never forget.
+
+	// function makeRequestCallFromSetImmediate(callback) {
+	//     return function requestCall() {
+	//         setImmediate(callback);
+	//     };
+	// }
+
+	// Safari 6.0 has a problem where timers will get lost while the user is
+	// scrolling. This problem does not impact ASAP because Safari 6.0 supports
+	// mutation observers, so that implementation is used instead.
+	// However, if we ever elect to use timers in Safari, the prevalent work-around
+	// is to add a scroll event listener that calls for a flush.
+
+	// `setTimeout` does not call the passed callback if the delay is less than
+	// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
+	// even then.
+
+	function makeRequestCallFromTimer(callback) {
+	    return function requestCall() {
+	        // We dispatch a timeout with a specified delay of 0 for engines that
+	        // can reliably accommodate that request. This will usually be snapped
+	        // to a 4 milisecond delay, but once we're flushing, there's no delay
+	        // between events.
+	        var timeoutHandle = setTimeout(handleTimer, 0);
+	        // However, since this timer gets frequently dropped in Firefox
+	        // workers, we enlist an interval handle that will try to fire
+	        // an event 20 times per second until it succeeds.
+	        var intervalHandle = setInterval(handleTimer, 50);
+
+	        function handleTimer() {
+	            // Whichever timer succeeds will cancel both timers and
+	            // execute the callback.
+	            clearTimeout(timeoutHandle);
+	            clearInterval(intervalHandle);
+	            callback();
+	        }
+	    };
+	}
+
+	// This is for `asap.js` only.
+	// Its name will be periodically randomized to break any code that depends on
+	// its existence.
+	rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
+
+	// ASAP was originally a nextTick shim included in Q. This was factored out
+	// into this ASAP package. It was later adapted to RSVP which made further
+	// amendments. These decisions, particularly to marginalize MessageChannel and
+	// to capture the MutationObserver implementation in a closure, were integrated
+	// back into ASAP proper.
+	// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
+
+	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 71 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(69);
+
+	module.exports = Promise;
+	Promise.prototype.done = function (onFulfilled, onRejected) {
+	  var self = arguments.length ? this.then.apply(this, arguments) : this;
+	  self.then(null, function (err) {
+	    setTimeout(function () {
+	      throw err;
+	    }, 0);
+	  });
+	};
+
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(69);
+
+	module.exports = Promise;
+	Promise.prototype['finally'] = function (f) {
+	  return this.then(function (value) {
+	    return Promise.resolve(f()).then(function () {
+	      return value;
+	    });
+	  }, function (err) {
+	    return Promise.resolve(f()).then(function () {
+	      throw err;
+	    });
+	  });
+	};
+
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	//This file contains the ES6 extensions to the core Promises/A+ API
+
+	var Promise = __webpack_require__(69);
+
+	module.exports = Promise;
+
+	/* Static Functions */
+
+	var TRUE = valuePromise(true);
+	var FALSE = valuePromise(false);
+	var NULL = valuePromise(null);
+	var UNDEFINED = valuePromise(undefined);
+	var ZERO = valuePromise(0);
+	var EMPTYSTRING = valuePromise('');
+
+	function valuePromise(value) {
+	  var p = new Promise(Promise._61);
+	  p._81 = 1;
+	  p._65 = value;
+	  return p;
+	}
+	Promise.resolve = function (value) {
+	  if (value instanceof Promise) return value;
+
+	  if (value === null) return NULL;
+	  if (value === undefined) return UNDEFINED;
+	  if (value === true) return TRUE;
+	  if (value === false) return FALSE;
+	  if (value === 0) return ZERO;
+	  if (value === '') return EMPTYSTRING;
+
+	  if (typeof value === 'object' || typeof value === 'function') {
+	    try {
+	      var then = value.then;
+	      if (typeof then === 'function') {
+	        return new Promise(then.bind(value));
+	      }
+	    } catch (ex) {
+	      return new Promise(function (resolve, reject) {
+	        reject(ex);
+	      });
+	    }
+	  }
+	  return valuePromise(value);
+	};
+
+	Promise.all = function (arr) {
+	  var args = Array.prototype.slice.call(arr);
+
+	  return new Promise(function (resolve, reject) {
+	    if (args.length === 0) return resolve([]);
+	    var remaining = args.length;
+	    function res(i, val) {
+	      if (val && (typeof val === 'object' || typeof val === 'function')) {
+	        if (val instanceof Promise && val.then === Promise.prototype.then) {
+	          while (val._81 === 3) {
+	            val = val._65;
+	          }
+	          if (val._81 === 1) return res(i, val._65);
+	          if (val._81 === 2) reject(val._65);
+	          val.then(function (val) {
+	            res(i, val);
+	          }, reject);
+	          return;
+	        } else {
+	          var then = val.then;
+	          if (typeof then === 'function') {
+	            var p = new Promise(then.bind(val));
+	            p.then(function (val) {
+	              res(i, val);
+	            }, reject);
+	            return;
+	          }
+	        }
+	      }
+	      args[i] = val;
+	      if (--remaining === 0) {
+	        resolve(args);
+	      }
+	    }
+	    for (var i = 0; i < args.length; i++) {
+	      res(i, args[i]);
+	    }
+	  });
+	};
+
+	Promise.reject = function (value) {
+	  return new Promise(function (resolve, reject) {
+	    reject(value);
+	  });
+	};
+
+	Promise.race = function (values) {
+	  return new Promise(function (resolve, reject) {
+	    values.forEach(function(value){
+	      Promise.resolve(value).then(resolve, reject);
+	    });
+	  });
+	};
+
+	/* Prototype Methods */
+
+	Promise.prototype['catch'] = function (onRejected) {
+	  return this.then(null, onRejected);
+	};
+
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	// This file contains then/promise specific extensions that are only useful
+	// for node.js interop
+
+	var Promise = __webpack_require__(69);
+	var asap = __webpack_require__(75);
+
+	module.exports = Promise;
+
+	/* Static Functions */
+
+	Promise.denodeify = function (fn, argumentCount) {
+	  if (
+	    typeof argumentCount === 'number' && argumentCount !== Infinity
+	  ) {
+	    return denodeifyWithCount(fn, argumentCount);
+	  } else {
+	    return denodeifyWithoutCount(fn);
+	  }
+	}
+
+	var callbackFn = (
+	  'function (err, res) {' +
+	  'if (err) { rj(err); } else { rs(res); }' +
+	  '}'
+	);
+	function denodeifyWithCount(fn, argumentCount) {
+	  var args = [];
+	  for (var i = 0; i < argumentCount; i++) {
+	    args.push('a' + i);
+	  }
+	  var body = [
+	    'return function (' + args.join(',') + ') {',
+	    'var self = this;',
+	    'return new Promise(function (rs, rj) {',
+	    'var res = fn.call(',
+	    ['self'].concat(args).concat([callbackFn]).join(','),
+	    ');',
+	    'if (res &&',
+	    '(typeof res === "object" || typeof res === "function") &&',
+	    'typeof res.then === "function"',
+	    ') {rs(res);}',
+	    '});',
+	    '};'
+	  ].join('');
+	  return Function(['Promise', 'fn'], body)(Promise, fn);
+	}
+	function denodeifyWithoutCount(fn) {
+	  var fnLength = Math.max(fn.length - 1, 3);
+	  var args = [];
+	  for (var i = 0; i < fnLength; i++) {
+	    args.push('a' + i);
+	  }
+	  var body = [
+	    'return function (' + args.join(',') + ') {',
+	    'var self = this;',
+	    'var args;',
+	    'var argLength = arguments.length;',
+	    'if (arguments.length > ' + fnLength + ') {',
+	    '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 = ' + callbackFn + ';',
+	    'var res;',
+	    'switch (argLength) {',
+	    args.concat(['extra']).map(function (_, index) {
+	      return (
+	        'case ' + (index) + ':' +
+	        'res = fn.call(' + ['self'].concat(args.slice(0, index)).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'],
+	    body
+	  )(Promise, fn);
+	}
+
+	Promise.nodeify = function (fn) {
+	  return function () {
+	    var args = Array.prototype.slice.call(arguments);
+	    var callback =
+	      typeof args[args.length - 1] === 'function' ? args.pop() : null;
+	    var ctx = this;
+	    try {
+	      return fn.apply(this, arguments).nodeify(callback, ctx);
+	    } catch (ex) {
+	      if (callback === null || typeof callback == 'undefined') {
+	        return new Promise(function (resolve, reject) {
+	          reject(ex);
+	        });
+	      } else {
+	        asap(function () {
+	          callback.call(ctx, ex);
+	        })
+	      }
+	    }
+	  }
+	}
+
+	Promise.prototype.nodeify = function (callback, ctx) {
+	  if (typeof callback != 'function') return this;
+
+	  this.then(function (value) {
+	    asap(function () {
+	      callback.call(ctx, null, value);
+	    });
+	  }, function (err) {
+	    asap(function () {
+	      callback.call(ctx, err);
+	    });
+	  });
+	}
+
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+
+	// rawAsap provides everything we need except exception management.
+	var rawAsap = __webpack_require__(70);
+	// RawTasks are recycled to reduce GC churn.
+	var freeTasks = [];
+	// We queue errors to ensure they are thrown in right order (FIFO).
+	// Array-as-queue is good enough here, since we are just dealing with exceptions.
+	var pendingErrors = [];
+	var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
+
+	function throwFirstError() {
+	    if (pendingErrors.length) {
+	        throw pendingErrors.shift();
+	    }
+	}
+
+	/**
+	 * Calls a task as soon as possible after returning, in its own event, with priority
+	 * over other events like animation, reflow, and repaint. An error thrown from an
+	 * event will not interrupt, nor even substantially slow down the processing of
+	 * other events, but will be rather postponed to a lower priority event.
+	 * @param {{call}} task A callable object, typically a function that takes no
+	 * arguments.
+	 */
+	module.exports = asap;
+	function asap(task) {
+	    var rawTask;
+	    if (freeTasks.length) {
+	        rawTask = freeTasks.pop();
+	    } else {
+	        rawTask = new RawTask();
+	    }
+	    rawTask.task = task;
+	    rawAsap(rawTask);
+	}
+
+	// We wrap tasks with recyclable task objects.  A task object implements
+	// `call`, just like a function.
+	function RawTask() {
+	    this.task = null;
+	}
+
+	// The sole purpose of wrapping the task is to catch the exception and recycle
+	// the task object after its single use.
+	RawTask.prototype.call = function () {
+	    try {
+	        this.task.call();
+	    } catch (error) {
+	        if (asap.onerror) {
+	            // This hook exists purely for testing purposes.
+	            // Its name will be periodically randomized to break any code that
+	            // depends on its existence.
+	            asap.onerror(error);
+	        } else {
+	            // In a web browser, exceptions are not fatal. However, to avoid
+	            // slowing down the queue of pending tasks, we rethrow the error in a
+	            // lower priority turn.
+	            pendingErrors.push(error);
+	            requestErrorThrow();
+	        }
+	    } finally {
+	        this.task = null;
+	        freeTasks[freeTasks.length] = this;
+	    }
+	};
+
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(69);
+
+	module.exports = Promise;
+	Promise.enableSynchronous = function () {
+	  Promise.prototype.isPending = function() {
+	    return this.getState() == 0;
+	  };
+
+	  Promise.prototype.isFulfilled = function() {
+	    return this.getState() == 1;
+	  };
+
+	  Promise.prototype.isRejected = function() {
+	    return this.getState() == 2;
+	  };
+
+	  Promise.prototype.getValue = function () {
+	    if (this._81 === 3) {
+	      return this._65.getValue();
+	    }
+
+	    if (!this.isFulfilled()) {
+	      throw new Error('Cannot get a value of an unfulfilled promise.');
+	    }
+
+	    return this._65;
+	  };
+
+	  Promise.prototype.getReason = function () {
+	    if (this._81 === 3) {
+	      return this._65.getReason();
+	    }
+
+	    if (!this.isRejected()) {
+	      throw new Error('Cannot get a rejection reason of a non-rejected promise.');
+	    }
+
+	    return this._65;
+	  };
+
+	  Promise.prototype.getState = function () {
+	    if (this._81 === 3) {
+	      return this._65.getState();
+	    }
+	    if (this._81 === -1 || this._81 === -2) {
+	      return 0;
+	    }
+
+	    return this._81;
+	  };
+	};
+
+	Promise.disableSynchronous = function() {
+	  Promise.prototype.isPending = undefined;
+	  Promise.prototype.isFulfilled = undefined;
+	  Promise.prototype.isRejected = undefined;
+	  Promise.prototype.getValue = undefined;
+	  Promise.prototype.getReason = undefined;
+	  Promise.prototype.getState = undefined;
+	};
+
+
+/***/ },
+/* 77 */
+/***/ function(module, exports) {
+
+	function Scratch3EventBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3EventBlocks.prototype.getPrimitives = function() {
+	    return {
 	        'event_whenflagclicked': this.whenFlagClicked,
 	        'event_whenbroadcastreceived': this.whenBroadcastReceived,
 	        'event_broadcast': this.broadcast
 	    };
 	};
 
-	Scratch3Blocks.prototype.repeat = function(argValues, util) {
-	    // Initialize loop
-	    if (util.stackFrame.loopCounter === undefined) {
-	        util.stackFrame.loopCounter = parseInt(argValues[0]); // @todo arg
-	    }
-	    // Decrease counter
-	    util.stackFrame.loopCounter--;
-	    // If we still have some left, start the substack
-	    if (util.stackFrame.loopCounter >= 0) {
-	        util.startSubstack();
-	    }
-	};
 
-	Scratch3Blocks.prototype.forever = function(argValues, util) {
-	    util.startSubstack();
-	};
-
-	Scratch3Blocks.prototype.wait = function(argValues, util) {
-	    util.yield();
-	    util.timeout(function() {
-	        util.done();
-	    }, 1000 * parseFloat(argValues[0]));
-	};
-
-	Scratch3Blocks.prototype.stop = function() {
-	    // @todo - don't use this.runtime
-	    this.runtime.stopAll();
-	};
-
-	Scratch3Blocks.prototype.whenFlagClicked = function() {
+	Scratch3EventBlocks.prototype.whenFlagClicked = function() {
 	    // No-op
 	};
 
-	Scratch3Blocks.prototype.whenBroadcastReceived = function() {
+	Scratch3EventBlocks.prototype.whenBroadcastReceived = function() {
 	    // No-op
 	};
 
-	Scratch3Blocks.prototype.broadcast = function(argValues, util) {
-	    util.startHats(function(hat) {
-	        if (hat.opcode === 'event_whenbroadcastreceived') {
-	            var shadows = hat.fields.CHOICE.blocks;
-	            for (var sb in shadows) {
-	                var shadowblock = shadows[sb];
-	                return shadowblock.fields.CHOICE.value === argValues[0];
-	            }
-	        }
-	        return false;
-	    });
+	Scratch3EventBlocks.prototype.broadcast = function() {
+	    // @todo
 	};
 
-	module.exports = Scratch3Blocks;
+	module.exports = Scratch3EventBlocks;
 
 
 /***/ },
-/* 124 */
-/***/ function(module, exports, __webpack_require__) {
+/* 78 */
+/***/ function(module, exports) {
 
-	
-	var YieldTimers = __webpack_require__(122);
-
-	function WeDo2Blocks(runtime) {
+	function Scratch3LooksBlocks(runtime) {
 	    /**
 	     * The runtime instantiating this block package.
 	     * @type {Runtime}
 	     */
 	    this.runtime = runtime;
-
-	    /**
-	     * Current motor speed, as a percentage (100 = full speed).
-	     * @type {number}
-	     * @private
-	     */
-	    this._motorSpeed = 100;
-
-	    /**
-	     * The timeout ID for a pending motor action.
-	     * @type {?int}
-	     * @private
-	     */
-	    this._motorTimeout = null;
 	}
 
 	/**
 	 * Retrieve the block primitives implemented by this package.
 	 * @return {Object.<string, Function>} Mapping of opcode to Function.
 	 */
-	WeDo2Blocks.prototype.getPrimitives = function() {
+	Scratch3LooksBlocks.prototype.getPrimitives = function() {
 	    return {
-	        'wedo_motorclockwise': this.motorClockwise,
-	        'wedo_motorcounterclockwise': this.motorCounterClockwise,
-	        'wedo_motorspeed': this.motorSpeed,
-	        'wedo_setcolor': this.setColor,
-	        'wedo_whendistanceclose': this.whenDistanceClose,
-	        'wedo_whentilt': this.whenTilt
+	        '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_effectmenu': this.effectMenu,
+	        'looks_changeeffectby': this.changeEffect,
+	        'looks_seteffectto': this.setEffect,
+	        'looks_cleargraphiceffects': this.clearEffects,
+	        'looks_changesizeby': this.changeSize,
+	        'looks_setsizeto': this.setSize,
+	        'looks_size': this.getSize
 	    };
 	};
 
-	/**
-	 * Clamp a value between a minimum and maximum value.
-	 * @todo move this to a common utility class.
-	 * @param {number} val The value to clamp.
-	 * @param {number} min The minimum return value.
-	 * @param {number} max The maximum return value.
-	 * @returns {number} The clamped value.
-	 * @private
-	 */
-	WeDo2Blocks.prototype._clamp = function(val, min, max) {
-	    return Math.max(min, Math.min(val, max));
+	Scratch3LooksBlocks.prototype.say = function (args, util) {
+	    util.target.setSay('say', args.MESSAGE);
 	};
 
+	Scratch3LooksBlocks.prototype.sayforsecs = function (args, util) {
+	    util.target.setSay('say', args.MESSAGE);
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            // Clear say bubble and proceed.
+	            util.target.setSay();
+	            resolve();
+	        }, 1000 * args.SECS);
+	    });
+	};
+
+	Scratch3LooksBlocks.prototype.think = function (args, util) {
+	    util.target.setSay('think', args.MESSAGE);
+	};
+
+	Scratch3LooksBlocks.prototype.thinkforsecs = function (args, util) {
+	    util.target.setSay('think', args.MESSAGE);
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            // Clear say bubble and proceed.
+	            util.target.setSay();
+	            resolve();
+	        }, 1000 * args.SECS);
+	    });
+	};
+
+	Scratch3LooksBlocks.prototype.show = function (args, util) {
+	    util.target.setVisible(true);
+	};
+
+	Scratch3LooksBlocks.prototype.hide = function (args, util) {
+	    util.target.setVisible(false);
+	};
+
+	Scratch3LooksBlocks.prototype.effectMenu = function (args) {
+	    return args.EFFECT.toLowerCase();
+	};
+
+	Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
+	    var newValue = args.CHANGE + util.target.effects[args.EFFECT];
+	    util.target.setEffect(args.EFFECT, newValue);
+	};
+
+	Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
+	    util.target.setEffect(args.EFFECT, args.VALUE);
+	};
+
+	Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
+	    util.target.clearEffects();
+	};
+
+	Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
+	    util.target.setSize(util.target.size + args.CHANGE);
+	};
+
+	Scratch3LooksBlocks.prototype.setSize = function (args, util) {
+	    util.target.setSize(args.SIZE);
+	};
+
+	Scratch3LooksBlocks.prototype.getSize = function (args, util) {
+	    return util.target.size;
+	};
+
+	module.exports = Scratch3LooksBlocks;
+
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var MathUtil = __webpack_require__(8);
+
+	function Scratch3MotionBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
 	/**
-	 * Common implementation for motor blocks.
-	 * @param {string} direction The direction to turn ('left' or 'right').
-	 * @param {number} durationSeconds The number of seconds to run.
-	 * @param {Object} util The util instance to use for yielding and finishing.
-	 * @private
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
 	 */
-	WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
-	    if (this._motorTimeout > 0) {
-	        // @todo maybe this should go through util
-	        YieldTimers.resolve(this._motorTimeout);
-	        this._motorTimeout = null;
-	    }
-	    if (window.native) {
-	        window.native.motorRun(direction, this._motorSpeed);
-	    }
-
-	    var instance = this;
-	    var myTimeout = this._motorTimeout = util.timeout(function() {
-	        if (instance._motorTimeout == myTimeout) {
-	            instance._motorTimeout = null;
-	        }
-	        if (window.native) {
-	            window.native.motorStop();
-	        }
-	        util.done();
-	    }, 1000 * durationSeconds);
-
-	    util.yield();
-	};
-
-	WeDo2Blocks.prototype.motorClockwise = function(argValues, util) {
-	    this._motorOnFor('right', parseFloat(argValues[0]), util);
-	};
-
-	WeDo2Blocks.prototype.motorCounterClockwise = function(argValues, util) {
-	    this._motorOnFor('left', parseFloat(argValues[0]), util);
-	};
-
-	WeDo2Blocks.prototype.motorSpeed = function(argValues) {
-	    var speed = argValues[0];
-	    switch (speed) {
-	    case 'slow':
-	        this._motorSpeed = 20;
-	        break;
-	    case 'medium':
-	        this._motorSpeed = 50;
-	        break;
-	    case 'fast':
-	        this._motorSpeed = 100;
-	        break;
-	    }
-	};
-
-	/**
-	 * Convert a color name to a WeDo color index.
-	 * Supports 'mystery' for a random hue.
-	 * @param {string} colorName The color to retrieve.
-	 * @returns {number} The WeDo color index.
-	 * @private
-	 */
-	WeDo2Blocks.prototype._getColor = function(colorName) {
-	    var colors = {
-	        'yellow': 7,
-	        'orange': 8,
-	        'coral': 9,
-	        'magenta': 1,
-	        'purple': 2,
-	        'blue': 3,
-	        'green': 6,
-	        'white': 10
+	Scratch3MotionBlocks.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_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
 	    };
+	};
 
-	    if (colorName == 'mystery') {
-	        return Math.floor((Math.random() * 10) + 1);
+	Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
+	    var radians = MathUtil.degToRad(util.target.direction);
+	    var dx = args.STEPS * Math.cos(radians);
+	    var dy = args.STEPS * Math.sin(radians);
+	    util.target.setXY(util.target.x + dx, util.target.y + dy);
+	};
+
+	Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
+	    util.target.setXY(args.X, args.Y);
+	};
+
+	Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
+	    util.target.setDirection(util.target.direction + args.DEGREES);
+	};
+
+	Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
+	    util.target.setDirection(util.target.direction - args.DEGREES);
+	};
+
+	Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
+	    util.target.setDirection(args.DIRECTION);
+	};
+
+	Scratch3MotionBlocks.prototype.changeX = function (args, util) {
+	    util.target.setXY(util.target.x + args.DX, util.target.y);
+	};
+
+	Scratch3MotionBlocks.prototype.setX = function (args, util) {
+	    util.target.setXY(args.X, util.target.y);
+	};
+
+	Scratch3MotionBlocks.prototype.changeY = function (args, util) {
+	    util.target.setXY(util.target.x, util.target.y + args.DY);
+	};
+
+	Scratch3MotionBlocks.prototype.setY = function (args, util) {
+	    util.target.setXY(util.target.x, args.Y);
+	};
+
+	Scratch3MotionBlocks.prototype.getX = function (args, util) {
+	    return util.target.x;
+	};
+
+	Scratch3MotionBlocks.prototype.getY = function (args, util) {
+	    return util.target.y;
+	};
+
+	Scratch3MotionBlocks.prototype.getDirection = function (args, util) {
+	    return util.target.direction;
+	};
+
+	module.exports = Scratch3MotionBlocks;
+
+
+/***/ },
+/* 80 */
+/***/ function(module, exports) {
+
+	function Scratch3OperatorsBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
+	    return {
+	        'math_number': this.number,
+	        'math_positive_number': this.number,
+	        'math_whole_number': this.number,
+	        'math_angle': this.number,
+	        'text': this.text,
+	        '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
+	    };
+	};
+
+	Scratch3OperatorsBlocks.prototype.number = function (args) {
+	    var num = Number(args.NUM);
+	    if (num !== num) {
+	        // NaN
+	        return 0;
 	    }
-
-	    return colors[colorName];
+	    return num;
 	};
 
-	WeDo2Blocks.prototype.setColor = function(argValues, util) {
-	    if (window.native) {
-	        var colorIndex = this._getColor(argValues[0]);
-	        window.native.setLedColor(colorIndex);
+	Scratch3OperatorsBlocks.prototype.text = function (args) {
+	    return String(args.TEXT);
+	};
+
+	Scratch3OperatorsBlocks.prototype.add = function (args) {
+	    return args.NUM1 + args.NUM2;
+	};
+
+	Scratch3OperatorsBlocks.prototype.subtract = function (args) {
+	    return args.NUM1 - args.NUM2;
+	};
+
+	Scratch3OperatorsBlocks.prototype.multiply = function (args) {
+	    return args.NUM1 * args.NUM2;
+	};
+
+	Scratch3OperatorsBlocks.prototype.divide = function (args) {
+	    return args.NUM1 / args.NUM2;
+	};
+
+	Scratch3OperatorsBlocks.prototype.lt = function (args) {
+	    return Boolean(args.OPERAND1 < args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.equals = function (args) {
+	    return Boolean(args.OPERAND1 == args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.gt = function (args) {
+	    return Boolean(args.OPERAND1 > args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.and = function (args) {
+	    return Boolean(args.OPERAND1 && args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.or = function (args) {
+	    return Boolean(args.OPERAND1 || args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.not = function (args) {
+	    return Boolean(!args.OPERAND);
+	};
+
+	Scratch3OperatorsBlocks.prototype.random = function (args) {
+	    var low = args.FROM <= args.TO ? args.FROM : args.TO;
+	    var high = args.FROM <= args.TO ? args.TO : args.FROM;
+	    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) {
+	        return low + parseInt(Math.random() * ((high + 1) - low));
 	    }
-	    // Pause for quarter second
-	    util.yield();
-	    util.timeout(function() {
-	        util.done();
-	    }, 250);
+	    return (Math.random() * (high - low)) + low;
 	};
 
-	WeDo2Blocks.prototype.whenDistanceClose = function() {
-	};
-
-	WeDo2Blocks.prototype.whenTilt = function() {
-	};
-
-	module.exports = WeDo2Blocks;
+	module.exports = Scratch3OperatorsBlocks;
 
 
 /***/ }
diff --git a/vm.min.js b/vm.min.js
index 53caf1d28..2f22a37cb 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,11 +1,10 @@
-!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.blocks=new s,t.runtime=new a(t.blocks),t.blockListener=t.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=t.blocks.generateBlockListener(!0,t.runtime)}var i=r(1),o=r(2),s=r(6),a=r(118);o.inherits(n,i),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),E(r)&&(m=" "+Date.prototype.toUTCString.call(r)),k(r)&&(m=" "+l(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var x;return x=b?h(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(x,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)I(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),I(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return x(t)&&"[object RegExp]"===L(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===L(t)}function k(t){return x(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function O(t){return 10>t?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(B,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!x(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var D,N={};e.debuglog=function(t){if(w(D)&&(D=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=x,e.isDate=E,e.isError=k,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!x(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){this._blocks={},this._stacks=[]}var i=r(7);n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getStacks=function(){return this._stacks},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getSubstack=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var n="SUBSTACK";return e>1&&(n+=e),n in r.inputs?r.inputs[n].block:null},n.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},n.prototype.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleStack(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},n.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var l=s.children[u];if(l.name){var h=l.name.toLowerCase();"block"==h?a=l:"shadow"==h&&(c=l)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name;n.fields[f]={name:f,value:s.children[0].data};break;case"value":case"statement":i(a,e,!1);var p=s.attribs.name;n.inputs[p]={name:p,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(8),s=r(57),a=s(o.parseDOM,{length:1,resolvers:[String],max:200});t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(a(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(9),o=r(16);t.exports={Parser:i,Tokenizer:r(10),ElementType:r(17),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(20))},get Stream(){return n("Stream",r(21))},get WritableStream(){return n("WritableStream",r(22))},get ProxyHandler(){return n("ProxyHandler",r(43))},get DomUtils(){return n("DomUtils",r(44))},get CollectingHandler(){return n("CollectingHandler",r(56))},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(10),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(11),u=r(13),l=r(14),h=r(15),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,x=f++,E=f++,k=f++,T=f++,A=f++,L=f++,O=f++,C=f++,I=f++,B=f++,D=f++,N=f++,R=f++,q=f++,U=f++,j=f++,P=f++,M=f++,F=f++,z=f++,H=f++,V=f++,G=f++,Y=f++,W=f++,K=f++,J=f++,X=f++,Q=f++,Z=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,lt=f++,ht=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=O,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=p:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=x:"/"===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=E,this._sectionStart=this._index+1):"'"===t?(this._state=k,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?C:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=I,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=I},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=I)},a.prototype._stateBeforeCdata1=o("C",R,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",j,L),a.prototype._stateBeforeCdata5=o("A",P,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=M,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=F)},a.prototype._stateAfterCdata1=i("]",z),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=M)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=G:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=X},a.prototype._stateBeforeScript1=s("R",Y),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",K),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,p),a.prototype._stateAfterScript2=o("I",Z,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",lt,ht),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(l.hasOwnProperty(r))return this._emitPartial(l[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===x?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===k?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===O?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===I?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===R?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===U?this._stateBeforeCdata4(t):this._state===j?this._stateBeforeCdata5(t):this._state===P?this._stateBeforeCdata6(t):this._state===M?this._stateInCdata(t):this._state===F?this._stateAfterCdata1(t):this._state===z?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===G?this._stateBeforeScript1(t):this._state===Y?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===K?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===X?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===lt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),
-this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===M||this._state===F||this._state===z?this._cbs.oncdata(t):this._state===I||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==x&&this._state!==S&&this._state!==w&&this._state!==k&&this._state!==E&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(12);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(17),o=/\s+/g,s=r(18),a=r(19),c={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(18),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 l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(8),u=c.DomHandler,l=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;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,u.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(22);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(8).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(9),o=r(23).Writable||r(42).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(24),n.Writable=r(38),n.Duplex=r(39),n.Transform=r(40),n.PassThrough=r(41),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function s(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var l=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(25),e.Stream=r(23),e.Readable=e,e.Writable=r(34),e.Duplex=r(33),e.Transform=r(36),e.PassThrough=r(37),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(23))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(33);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&&(L||(L=r(35).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(33);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||l(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)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=C)t=C;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(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||(O("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){O("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var c=0,u=0,l=n.length;l>u&&t>c;u++){var a=n[0],h=Math.min(t-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var x=r(26),E=r(27).Buffer;i.ReadableState=n;var k=r(1).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var T=r(23),A=r(31);A.inherits=r(5);var L,O=r(32);O=O&&O.debuglog?O.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(35).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){O("onunpipe"),t===h&&o()}function i(){O("onend"),t.end()}function o(){O("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){O("onerror",e),l(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),l()}function u(){O("onfinish"),t.removeListener("close",c),l()}function l(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var _=g(h);return t.on("drain",_),h.on("data",s),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){O("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)D(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var O=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(O,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var B,N={};e.debuglog=function(t){if(w(B)&&(B=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._stacks=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getStacks=function(){return this._stacks},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleStack(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},n.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name,p="";p=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[f]={name:f,value:p};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(15),u=r(17),h=r(18),l=r(19),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,E=f++,k=f++,x=f++,T=f++,A=f++,L=f++,I=f++,R=f++,D=f++,O=f++,B=f++,N=f++,C=f++,q=f++,U=f++,P=f++,M=f++,F=f++,j=f++,G=f++,V=f++,Y=f++,z=f++,H=f++,W=f++,X=f++,K=f++,J=f++,Z=f++,Q=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,ht=f++,lt=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,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=p:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?R:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=D,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=O)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=B:this._state=D},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=D)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",M,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=z:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=J;
+},a.prototype._stateBeforeScript1=s("R",H),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",X),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Z,p),a.prototype._stateAfterScript2=o("I",Q,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",ht,lt),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===E?this._stateBeforeAttributeValue(t):this._state===k?this._stateInAttributeValueDoubleQuotes(t):this._state===x?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===I?this._stateInProcessingInstruction(t):this._state===R?this._stateBeforeComment(t):this._state===D?this._stateInComment(t):this._state===O?this._stateAfterComment1(t):this._state===B?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===C?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===U?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===M?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===V?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===z?this._stateBeforeScript1(t):this._state===H?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Z?this._stateAfterScript2(t):this._state===Q?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===D||this._state===O||this._state===B?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==E&&this._state!==S&&this._state!==w&&this._state!==x&&this._state!==k&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(16);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(21),o=/\s+/g,s=r(22),a=r(23),c={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(22),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 h.getElementsByTagName(t,e,!0)}function o(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(12),u=c.DomHandler,h=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(l,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,u.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(26);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(12).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(13),o=r(27).Writable||r(46).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(28),n.Writable=r(42),n.Duplex=r(43),n.Transform=r(44),n.PassThrough=r(45),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(29),e.Stream=r(27),e.Readable=e,e.Writable=r(38),e.Duplex=r(37),e.Transform=r(40),e.PassThrough=r(41),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(27))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(37);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&&(L||(L=r(39).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(37);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||h(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&&l(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=R)t=R;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(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,l(t)}function l(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){I("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&x.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):k.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new k(t);for(var c=0,u=0,h=n.length;h>u&&t>c;u++){var a=n[0],l=Math.min(t-c,a.length);o?r+=a.slice(0,l):a.copy(r,c,0,l),l<a.length?n[0]=a.slice(l):n.shift(),c+=l}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var E=r(30),k=r(31).Buffer;i.ReadableState=n;var x=r(1).EventEmitter;x.listenerCount||(x.listenerCount=function(t,e){return t.listeners(e).length});var T=r(27),A=r(35);A.inherits=r(5);var L,I=r(36);I=I&&I.debuglog?I.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new k(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(39).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):l(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){I("onunpipe"),t===l&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function a(e){I("onerror",e),h(),t.removeListener("error",a),0===x.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),h()}function u(){I("onfinish"),t.removeListener("close",c),h()}function h(){I("unpipe"),l.unpipe(t)}var l=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,I("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):l.once("end",d),t.on("unpipe",n);var _=g(l);return t.on("drain",_),l.on("data",s),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",l),f.flowing||(I("pipe resume"),l.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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(X(r))return l(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=h(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&X(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function E(t,e,r,n){return W(Y(e),t,r,n)}function k(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,l,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,h>65535&&1114112>h&&(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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=z(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function j(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function M(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return K.toByteArray(M(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(28),J=r(29),X=r(30);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=H(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(27).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function r(t){function r(t){u[h++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;c="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+h>=1?f/c:f*Math.pow(2,1-h),e*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=l,e.isObject=h,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(27).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(31);a.inherits=r(5);var c=r(25),u=r(34);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(33);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(33);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,s,r,i,o),a}function l(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)h(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(l(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(27).Buffer;o.WritableState=i;var S=r(31);S.inherits=r(5);var x=r(23);S.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(27).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(33),c=r(31);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(36),o=r(31);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(34)},function(t,e,r){t.exports=r(33)},function(t,e,r){t.exports=r(36)},function(t,e,r){t.exports=r(37)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(8).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(45),r(51),r(52),r(53),r(54),r(55)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(17),s=r(46),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?l.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=l.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(47),l=r(48),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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var l=t[n];r+="root"===l.type?d(l.children,e):u.isTag(l)?i(l,e):l.type===u.Directive?o(l):l.type===u.Comment?c(l):l.type===u.CDATA?a(l):s(l,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(49),i=r(50);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(15)),l=i(u);e.XML=a(u,l);var h=n(r(13)),f=i(h);e.HTML=a(h,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(13),a=r(14),c=r(15),u=r(11),l=n(c),h=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),l(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),l=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:l,HTML:f,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(17).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(17),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,c,u=[],l=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(c=0;u[c]===l[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=l[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(8).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){"use strict";var n=r(58),i=r(59),o=r(65);t.exports=function(t){var e,s=n(arguments[1]);return s.normalizer||(e=s.length=i(s.length,t.length,s.async),0!==e&&(s.primitive?e===!1?s.normalizer=r(102):e>1&&(s.normalizer=r(103)(e)):e===!1?s.normalizer=r(104)():1===e?s.normalizer=r(106)():s.normalizer=r(107)(e))),s.async&&r(108),s.dispose&&r(111),s.maxAge&&r(112),s.max&&r(115),s.refCounter&&r(117),o(t,s)}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e,r){"use strict";var n=r(60);t.exports=function(t,e,r){var i;return isNaN(t)?(i=e,i>=0?r&&i?i-1:i:1):t===!1?!1:n(t)}},function(t,e,r){"use strict";var n=r(61),i=Math.max;t.exports=function(t){return i(0,n(t))}},function(t,e,r){"use strict";var n=r(62),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){"use strict";t.exports=r(63)()?Math.sign:r(64)},function(t,e){"use strict";t.exports=function(){var t=Math.sign;return"function"!=typeof t?!1:1===t(10)&&-1===t(-20)}},function(t,e){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){"use strict";var n=r(66),i=r(67),o=r(70),s=r(71),a=r(59),c=Object.prototype.hasOwnProperty;t.exports=function u(t){var e,r,l;return n(t),e=Object(arguments[1]),c.call(t,"__memoized__")&&!e.force?t:(r=a(e.length,t.length,e.async&&o.async),l=s(t,r,e),i(o,function(t,r){e[r]&&t(e[r],l,e)}),u.__profiler__&&u.__profiler__(l),l.updateEnv(),l.memoized)}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";t.exports=r(68)("forEach")},function(t,e,r){"use strict";var n=r(66),i=r(69),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var l,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),l=a(r),f&&l.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof t&&(t=l[t]),s.call(t,l,function(t,n){return c.call(r,t)?s.call(u,h,r[t],t,r,n):e})}}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e){"use strict"},function(t,e,r){"use strict";var n=r(72),i=r(79),o=r(81),s=r(86).methods,a=r(87),c=r(101),u=Function.prototype.apply,l=Function.prototype.call,h=Object.create,f=Object.prototype.hasOwnProperty,p=Object.defineProperties,d=s.on,g=s.emit;t.exports=function(t,e,r){var s,_,m,b,y,v,w,S,x,E,k,T,A,L=h(null);return _=e!==!1?e:isNaN(t.length)?1:t.length,r.normalizer&&(S=c(r.normalizer),m=S.get,b=S.set,y=S["delete"],v=S.clear),null!=r.resolvers&&(A=a(r.resolvers)),T=m?i(function(e){var r,i,o=arguments;if(A&&(o=A(o)),r=m(o),null!==r&&f.call(L,r))return x&&s.emit("get",r,o,this),L[r];if(i=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),null===r){if(r=m(o),null!==r)throw n("Circular invocation","CIRCULAR_INVOCATION");r=b(o)}else if(f.call(L,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[r]=i,E&&s.emit("set",r),i},_):0===e?function(){var e;if(f.call(L,"data"))return x&&s.emit("get","data",arguments,this),L.data;if(e=arguments.length?u.call(t,this,arguments):l.call(t,this),f.call(L,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return L.data=e,E&&s.emit("set","data"),e}:function(e){var r,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(L,i))return x&&s.emit("get",i,o,this),L[i];if(r=1===o.length?l.call(t,this,o[0]):u.call(t,this,o),f.call(L,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return L[i]=r,E&&s.emit("set",i),r},s={original:t,memoized:T,get:function(t){return A&&(t=A(t)),m?m(t):String(t[0])},has:function(t){return f.call(L,t)},"delete":function(t){var e;f.call(L,t)&&(y&&y(t),e=L[t],delete L[t],k&&s.emit("delete",t,e))},clear:function(){var t=L;v&&v(),L=h(null),s.emit("clear",t)},on:function(t,e){return"get"===t?x=!0:"set"===t?E=!0:"delete"===t&&(k=!0),d.call(this,t,e)},emit:g,updateEnv:function(){t=s.original}},w=m?i(function(t){var e,r=arguments;A&&(r=A(r)),e=m(r),null!==e&&s["delete"](e)},_):0===e?function(){return s["delete"]("data")}:function(t){return A&&(t=A(arguments)[0]),s["delete"](t)},p(T,{__memoized__:o(!0),"delete":o(w),clear:o(s.clear)}),s}},function(t,e,r){"use strict";var n=r(73),i=Error.captureStackTrace;e=t.exports=function(t){var r=new Error,o=arguments[1],s=arguments[2];return null==s&&o&&"object"==typeof o&&(s=o,o=null),null!=s&&n(r,s),r.message=String(t),null!=o&&(r.code=String(o)),i&&i(r,e),r}},function(t,e,r){"use strict";t.exports=r(74)()?Object.assign:r(75)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"!=typeof e?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(76),i=r(69),o=Math.max;t.exports=function(t,e){var r,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;c>s;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(77)()?Object.keys:r(78)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e,r){"use strict";var n,i,o,s,a=r(60),c=function(t,e){};try{Object.defineProperty(c,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(u){}1===c.length?(n={configurable:!0,writable:!1,enumerable:!1},i=Object.defineProperty,t.exports=function(t,e){return e=a(e),t.length===e?t:(n.value=e,i(t,"length",n))}):(s=r(80),o=function(){var t=[];return function(e){var r,n=0;if(t[e])return t[e];for(r=[];e--;)r.push("a"+(++n).toString(36));return new Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),t.exports=function(t,e){var r;if(e=a(e),t.length===e)return t;r=o(e)(t);try{s(r,t)}catch(n){}return r})},function(t,e,r){"use strict";var n=r(69),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames;t.exports=function(t,e){var r;if(t=Object(n(t)),s(Object(n(e))).forEach(function(n){try{i(t,n,o(e,n))}catch(s){r=s}}),void 0!==r)throw r;return t}},function(t,e,r){"use strict";var n,i=r(73),o=r(58),s=r(82),a=r(83);n=t.exports=function(t,e){var r,n,s,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},c?i(o(c),u):u},n.gs=function(t,e,r){var n,c,u,l;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,c=!1):(n=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:r,configurable:n,enumerable:c},u?i(o(u),l):l}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(84)()?String.prototype.contains:r(85)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"!=typeof r.contains?!1:r.contains("dwa")===!0&&r.contains("foo")===!1}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,c,u,l=r(81),h=r(66),f=Function.prototype.apply,p=Function.prototype.call,d=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),m.call(this,"__ee__")?r=this.__ee__:(r=b.value=d(null),g(this,"__ee__",b),b.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!m.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;r>e;++e)o[e-1]=arguments[e];f.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},c={on:l(n),once:l(i),off:l(o),emit:l(s)},u=_({},c),t.exports=e=function(t){return null==t?d(u):_(Object(t),c)},e.methods=a},function(t,e,r){"use strict";var n,i=r(88),o=r(66),s=Array.prototype.slice;n=function(t){return this.map(function(e,r){return e?e(t[r]):t[r]}).concat(s.call(t,this.length))},t.exports=function(t){return t=i(t),t.forEach(function(t){null!=t&&o(t)}),n.bind(t)}},function(t,e,r){"use strict";var n=r(89),i=Array.isArray;t.exports=function(t){return i(t)?t:n(t)}},function(t,e,r){"use strict";t.exports=r(90)()?Array.from:r(91)},function(t,e){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"!=typeof r?!1:(t=["raz","dwa"],e=r(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},function(t,e,r){"use strict";var n=r(92).iterator,i=r(97),o=r(98),s=r(60),a=r(66),c=r(69),u=r(100),l=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,d,g,_,m,b,y,v,w,S=arguments[1],x=arguments[2];if(t=Object(c(t)),null!=S&&a(S),this&&this!==Array&&o(this))e=this;else{if(!S){if(i(t))return _=t.length,1!==_?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(l(t)){for(g=new Array(_=t.length),r=0;_>r;++r)g[r]=t[r];return g}}g=[]}if(!l(t))if(void 0!==(v=t[n])){for(b=a(v).call(t),e&&(g=new e),y=b.next(),r=0;!y.done;)w=S?h.call(S,x,y.value,r):y.value,e?(f.value=w,p(g,r,f)):g[r]=w,y=b.next(),++r;_=r}else if(u(t)){for(_=t.length,e&&(g=new e),r=0,d=0;_>r;++r)w=t[r],_>r+1&&(m=w.charCodeAt(0),m>=55296&&56319>=m&&(w+=t[++r])),w=S?h.call(S,x,w,d):w,e?(f.value=w,p(g,d,f)):g[d]=w,++d;_=d}if(void 0===_)for(_=s(t.length),e&&(g=new e(_)),r=0;_>r;++r)w=S?h.call(S,x,t[r],r):t[r],e?(f.value=w,p(g,r,f)):g[r]=w;return e&&(f.value=null,g.length=_),g}},function(t,e,r){"use strict";t.exports=r(93)()?Symbol:r(94)},function(t,e){"use strict";t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return"symbol"==typeof Symbol.iterator?!0:"object"!=typeof Symbol.isConcatSpreadable?!1:"object"!=typeof Symbol.iterator?!1:"object"!=typeof Symbol.toPrimitive?!1:"object"!=typeof Symbol.toStringTag?!1:"object"==typeof Symbol.unscopables}},function(t,e,r){"use strict";var n,i,o,s=r(81),a=r(95),c=Object.create,u=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,f=c(null);"function"==typeof Symbol&&(n=Symbol);var p=function(){var t=c(null);return function(e){for(var r,n,i=0;t[e+(i||"")];)++i;return e+=i||"",t[e]=!0,r="@@"+e,l(h,r,s.gs(null,function(t){n||(n=!0,l(this,r,s(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError("TypeError: Symbol is not a constructor");return i(t)},t.exports=i=function d(t){var e;if(this instanceof d)throw new TypeError("TypeError: Symbol is not a constructor");return e=c(o.prototype),t=void 0===t?"":String(t),u(e,{__description__:s("",t),__name__:s("",p(t))})},u(i,{"for":s(function(t){return f[t]?f[t]:f[t]=i(String(t))}),keyFor:s(function(t){var e;a(t);for(e in f)if(f[e]===t)return e}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),u(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),l(i.prototype,i.toPrimitive,s("",function(){return a(this)})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(t,e,r){"use strict";var n=r(96);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},function(t,e){"use strict";t.exports=function(t){return t&&("symbol"==typeof t||"Symbol"===t["@@toStringTag"])||!1}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===n}},function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call(r(99));t.exports=function(t){return"function"==typeof t&&n.call(t)===i}},function(t,e){"use strict";t.exports=function(){}},function(t,e){"use strict";var r=Object.prototype.toString,n=r.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===n)||!1}},function(t,e,r){"use strict";var n=r(66);t.exports=function(t){var e;return"function"==typeof t?{set:t,get:t}:(e={get:n(t.get)},void 0!==t.set?(e.set=n(t.set),e["delete"]=n(t["delete"]),e.clear=n(t.clear),e):(e.set=e.get,e))}},function(t,e){"use strict";t.exports=function(t){var e,r,n=t.length;if(!n)return"";for(e=String(t[r=0]);--n;)e+=""+t[++r];return e}},function(t,e){"use strict";t.exports=function(t){return t?function(e){for(var r=String(e[0]),n=0,i=t;--i;)r+=""+e[++n];return r}:function(){return""}}},function(t,e,r){"use strict";var n=r(105),i=Object.create;t.exports=function(){var t=0,e=[],r=i(null);return{get:function(t){var r,i=0,o=e,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(r=n.call(o[0],t[i]),-1===r)return null;o=o[1][r],++i}return r=n.call(o[0],t[i]),-1===r?null:o[1][r]||null}return null},set:function(i){var o,s=0,a=e,c=i.length;if(0===c)a[c]=++t;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1,a[1].push([[],[]])),a=a[1][o],++s;o=n.call(a[0],i[s]),-1===o&&(o=a[0].push(i[s])-1),a[1][o]=++t}return r[t]=i,t},"delete":function(t){var i,o=0,s=e,a=r[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(i=n.call(s[0],a[o]),-1===i)return;u.push(s,i),s=s[1][i],++o}if(i=n.call(s[0],a[o]),-1===i)return;for(t=s[1][i],s[0].splice(i,1),s[1].splice(i,1);!s[0].length&&u.length;)i=u.pop(),s=u.pop(),s[0].splice(i,1),s[1].splice(i,1)}delete r[t]},clear:function(){e=[],r=i(null)}}}},function(t,e,r){"use strict";var n=r(60),i=r(69),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,c=Math.floor;t.exports=function(t){var e,r,u,l;if(t===t)return o.apply(this,arguments);for(r=n(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):n(this.length)-c(a(u)),e=u;r>e;++e)if(s.call(this,e)&&(l=this[e],l!==l))return e;return-1}},function(t,e,r){"use strict";var n=r(105);t.exports=function(){var t=0,e=[],r=[];return{get:function(t){var i=n.call(e,t[0]);return-1===i?null:r[i]},set:function(n){return e.push(n[0]),r.push(++t),t},"delete":function(t){var i=n.call(r,t);-1!==i&&(e.splice(i,1),r.splice(i,1))},clear:function(){e=[],r=[]}}}},function(t,e,r){"use strict";var n=r(105),i=Object.create;t.exports=function(t){var e=0,r=[[],[]],o=i(null);return{get:function(e){for(var i,o=0,s=r;t-1>o;){if(i=n.call(s[0],e[o]),-1===i)return null;s=s[1][i],++o}return i=n.call(s[0],e[o]),-1===i?null:s[1][i]||null},set:function(i){for(var s,a=0,c=r;t-1>a;)s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return s=n.call(c[0],i[a]),-1===s&&(s=c[0].push(i[a])-1),c[1][s]=++e,o[e]=i,e},"delete":function(e){for(var i,s=0,a=r,c=[],u=o[e];t-1>s;){if(i=n.call(a[0],u[s]),-1===i)return;c.push(a,i),a=a[1][i],++s}if(i=n.call(a[0],u[s]),-1!==i){for(e=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&c.length;)i=c.pop(),a=c.pop(),a[0].splice(i,1),a[1].splice(i,1);delete o[e]}},clear:function(){r=[[],[]],o=i(null)}}}},function(t,e,r){"use strict";var n=r(89),i=r(80),o=r(79),s=r(109),a=Array.prototype.slice,c=Function.prototype.apply,u=Object.create,l=Object.prototype.hasOwnProperty;r(70).async=function(t,e){var r,h,f,p=u(null),d=u(null),g=e.memoized,_=e.original;e.memoized=o(function(t){var e=arguments,n=e[e.length-1];return"function"==typeof n&&(r=n,e=a.call(e,0,-1)),g.apply(h=this,f=e)},g);try{i(e.memoized,g)}catch(m){}e.on("get",function(t){var n,i,o;if(r){if(p[t])return"function"==typeof p[t]?p[t]=[p[t],r]:p[t].push(r),void(r=null);n=r,i=h,o=f,r=h=f=null,s(function(){var s;l.call(d,t)?(s=d[t],e.emit("getasync",t,o,i),c.call(n,s.context,s.args)):(r=n,h=i,f=o,g.apply(i,o))})}}),e.original=function(){var t,i,o,a;return r?(t=n(arguments),i=function u(t){var r,i,o=u.id;return null==o?void s(c.bind(u,this,arguments)):(delete u.id,r=p[o],delete p[o],r?(i=n(arguments),e.has(o)&&(t?e["delete"](o):(d[o]={context:this,args:i},e.emit("setasync",o,"function"==typeof r?1:r.length))),"function"==typeof r?a=c.call(r,this,i):r.forEach(function(t){a=c.call(t,this,i)},this),a):void 0)},o=r,r=h=f=null,t.push(i),a=c.call(_,this,t),i.cb=o,r=i,a):c.call(_,this,arguments)},e.on("set",function(t){return r?(p[t]?"function"==typeof p[t]?p[t]=[p[t],r.cb]:p[t].push(r.cb):p[t]=r.cb,delete r.cb,r.id=t,void(r=null)):void e["delete"](t)}),e.on("delete",function(t){var r;l.call(p,t)||d[t]&&(r=d[t],delete d[t],e.emit("deleteasync",t,r))}),e.on("clear",function(){var t=d;d=u(null),e.emit("clearasync",t)})}},function(t,e,r){(function(e,r){"use strict";var n,i;n=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},i=function(t){var e,r=document.createTextNode(""),i=0;return new t(function(){var t;if(e)return t=e,e=null,"function"==typeof t?void t():void t.forEach(function(t){t()})}).observe(r,{characterData:!0}),function(t){return n(t),e?void("function"==typeof e?e=[e,t]:e.push(t)):(e=t,void(r.data=i=++i%2))}},t.exports=function(){if("undefined"!=typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return i(MutationObserver);if("function"==typeof WebKitMutationObserver)return i(WebKitMutationObserver)}return"function"==typeof r?function(t){r(n(t))}:"function"==typeof setTimeout?function(t){setTimeout(n(t),0)}:null}()}).call(e,r(3),r(110).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,c={},u=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=u++,n=arguments.length<2?!1:a.call(arguments,1);return c[r]=!0,o(function(){c[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete c[t]}}).call(e,r(110).setImmediate,r(110).clearImmediate)},function(t,e,r){"use strict";var n=r(66),i=r(67),o=r(70),s=Array.prototype.slice,a=Function.prototype.apply;o.dispose=function(t,e,r){var c;return n(t),r.async&&o.async?(e.on("deleteasync",c=function(e,r){a.call(t,null,s.call(r.args,1))}),void e.on("clearasync",function(t){i(t,function(t,e){c(e,t)})})):(e.on("delete",c=function(e,r){t(r)}),void e.on("clear",function(t){i(t,function(t,e){c(e,t)})}))}},function(t,e,r){"use strict";var n=r(89),i=r(99),o=r(67),s=r(113),a=r(70),c=Math.max,u=Math.min,l=Object.create;a.maxAge=function(t,e,r){var h,f,p,d;t=s(t),t&&(h=l(null),f=r.async&&a.async?"async":"",e.on("set"+f,function(r){h[r]=setTimeout(function(){e["delete"](r)},t),d&&(d[r]&&clearTimeout(d[r]),d[r]=setTimeout(function(){delete d[r]},p))}),e.on("delete"+f,function(t){clearTimeout(h[t]),delete h[t],d&&(clearTimeout(d[t]),delete d[t])}),r.preFetch&&(p=r.preFetch===!0||isNaN(r.preFetch)?.333:c(u(Number(r.preFetch),1),0),p&&(d={},p=(1-p)*t,e.on("get"+f,function(t,o,s){d[t]||(d[t]=setTimeout(function(){delete d[t],e["delete"](t),r.async&&(o=n(o),o.push(i)),e.memoized.apply(s,o)},0))}))),e.on("clear"+f,function(){o(h,function(t){clearTimeout(t)}),h={},d&&(o(d,function(t){clearTimeout(t)}),d={})}))}},function(t,e,r){"use strict";var n=r(60),i=r(114);t.exports=function(t){if(t=n(t),t>i)throw new TypeError(t+" exceeds maximum possible timeout");return t}},function(t,e){"use strict";t.exports=2147483647},function(t,e,r){"use strict";var n=r(60),i=r(116),o=r(70);o.max=function(t,e,r){var s,a,c;t=n(t),t&&(a=i(t),s=r.async&&o.async?"async":"",e.on("set"+s,c=function(t){t=a.hit(t),void 0!==t&&e["delete"](t)}),e.on("get"+s,c),e.on("delete"+s,a["delete"]),e.on("clear"+s,a.clear))}},function(t,e,r){"use strict";var n=r(60),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(t){var e,r=0,s=1,a=i(null),c=i(null),u=0;return t=n(t),{hit:function(n){var i=c[n],l=++u;if(a[l]=n,c[n]=l,!i){if(++r,t>=r)return;return n=a[s],e(n),n}if(delete a[i],s===i)for(;!o.call(a,++s);)continue},"delete":e=function(t){var e=c[t];if(e&&(delete a[e],delete c[t],--r,s===e)){if(!r)return u=0,void(s=1);for(;!o.call(a,++s);)continue}},clear:function(){r=0,s=1,a=i(null),c=i(null),u=0}}}},function(t,e,r){"use strict";var n=r(81),i=r(70),o=Object.create,s=Object.defineProperties;i.refCounter=function(t,e,r){var a,c;a=o(null),c=r.async&&i.async?"async":"",e.on("set"+c,function(t,e){a[t]=e||1}),e.on("get"+c,function(t){++a[t]}),e.on("delete"+c,function(t){delete a[t]}),e.on("clear"+c,function(){a={}}),s(e.memoized,{deleteRef:n(function(){var t=e.get(arguments);return null===t?null:a[t]?--a[t]?!1:(e["delete"](t),!0):null}),getRefCount:n(function(){var t=e.get(arguments);return null===t?0:a[t]?a[t]:0})})}},function(t,e,r){function n(t){i.call(this),this.blocks=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(119),s=r(121),a=r(2),c={scratch3:r(123),wedo2:r(124)};n.STACK_GLOW_ON="STACK_GLOW_ON",
-n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/30,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=this.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r];"event_whenflagclicked"===this.blocks.getBlock(n).opcode&&this._pushThread(e[r])}},n.prototype.startDistanceSensors=function(){for(var t=this.blocks.getStacks(),e=0;e<t.length;e++){var r=t[e];if("wedo_whendistanceclose"===this.blocks.getBlock(r).opcode){for(var n=!1,i=0;i<this.threads.length;i++)this.threads[i].topBlock===r&&(n=!0);n||this._pushThread(t[e])}}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}window["native"]&&window["native"].motorStop()},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.start=function(){window.setInterval&&window.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(120),o=r(121),s=r(122);n.WORK_TIME=10,n.DEBUG_BLOCK_CALLS=!0,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){for(var i=[],a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.stepThread(c):c.status===o.STATUS_YIELD?(s.resolve(c.yieldTimerId),r++):c.status===o.STATUS_DONE&&(c.status=o.STATUS_RUNNING),c.stack.length>0&&null===c.nextBlock&&c.status===o.STATUS_DONE&&(c.nextBlock=c.stack.pop(),null!==c.nextBlock&&c.status===o.STATUS_RUNNING),null===c.nextBlock&&c.status===o.STATUS_DONE?e.push(c):i.push(c)}t=i}return e},n.prototype.stepThread=function(t){var e=s.timerId,r=t.nextBlock;if(!r||!this.runtime.blocks.getBlock(r))return void(t.status=o.STATUS_DONE);t.nextBlock=this.runtime.blocks.getNextBlock(r);var i=this.runtime.blocks.getOpcode(r);t.stack.push(r),t.stack.length>t.stackFrames.length&&t.stackFrames.push({});var a=t.stackFrames[t.stackFrames.length-1],c=function(){t.status=o.STATUS_YIELD},u=this,l=function(){t.status=o.STATUS_DONE,t.nextBlock=u.runtime.blocks.getNextBlock(r),t.stack.pop(),t.stackFrames.pop(),u.runtime.glowBlock(r,!1)},h=function(t){for(var e=u.runtime.blocks.getStacks(),r=0;r<e.length;r++){var n=e[r],i=u.runtime.blocks.getBlock(n),o=t(i);if(o){for(var s=!1,a=0;a<u.runtime.threads.length;a++)if(u.runtime.threads[a].topBlock==n){s=!0;break}s||u.runtime._pushThread(n)}}},f=!1,p=function(){var e=u.runtime.blocks.getSubstack(r);e&&e.value?t.nextBlock=e.value:t.nextBlock=null,f=!0},d=[],g=this.runtime.blocks.getBlock(r).fields;for(var _ in g){var m=g[_];for(var b in m.blocks){var y=m.blocks[b],v=y.fields;for(var w in v){var S=v[w];d.push(S.value)}}}if(this.runtime.glowBlock(r,!0),i){var x=this.runtime.getOpcodeFunction(i);if(x){n.DEBUG_BLOCK_CALLS&&(console.groupCollapsed("Executing: "+i),console.log("with arguments: ",d),console.log("and stack frame: ",a));var E=null;try{E=x(d,{"yield":c,done:l,timeout:s.timeout,stackFrame:a,startSubstack:p,startHats:h})}catch(k){console.error("Exception calling block function for opcode: "+i+"\n"+k)}finally{s.timerId>e&&(t.yieldTimerId=s.timerId),t.status!==o.STATUS_RUNNING||f||l(),n.DEBUG_BLOCK_CALLS&&(console.log("ending stack frame: ",a),console.log("returned: ",E),console.groupEnd())}}else console.warn("Could not get implementation for opcode: "+i)}else console.warn("Could not get opcode for block: "+r)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.nextBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.yieldTimerId=-1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_DONE=2,t.exports=r},function(t,e,r){function n(){}var i=r(120);n.timers={},n.timerId=0,n.globalTimer=new i,n.timeout=function(t,e){var r=++n.timerId;return n.timers[r]=[t,n.globalTimer.time()+e],r},n.resolve=function(t){var e=n.timers[t];if(!e)return!1;var r=e[0],i=e[1];return n.globalTimer.time()<i?!1:(r(),delete n.timers[t],!0)},n.reject=function(t){n.timers[t]&&delete n.timers[t]},n.rejectAll=function(){n.timers={},n.timerId=0},t.exports=n},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_forever:this.forever,control_wait:this.wait,control_stop:this.stop,event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t[0])),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startSubstack()},r.prototype.forever=function(t,e){e.startSubstack()},r.prototype.wait=function(t,e){e["yield"](),e.timeout(function(){e.done()},1e3*parseFloat(t[0]))},r.prototype.stop=function(){this.runtime.stopAll()},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(t,e){e.startHats(function(e){if("event_whenbroadcastreceived"===e.opcode){var r=e.fields.CHOICE.blocks;for(var n in r){var i=r[n];return i.fields.CHOICE.value===t[0]}}return!1})},t.exports=r},function(t,e,r){function n(t){this.runtime=t,this._motorSpeed=100,this._motorTimeout=null}var i=r(122);n.prototype.getPrimitives=function(){return{wedo_motorclockwise:this.motorClockwise,wedo_motorcounterclockwise:this.motorCounterClockwise,wedo_motorspeed:this.motorSpeed,wedo_setcolor:this.setColor,wedo_whendistanceclose:this.whenDistanceClose,wedo_whentilt:this.whenTilt}},n.prototype._clamp=function(t,e,r){return Math.max(e,Math.min(t,r))},n.prototype._motorOnFor=function(t,e,r){this._motorTimeout>0&&(i.resolve(this._motorTimeout),this._motorTimeout=null),window["native"]&&window["native"].motorRun(t,this._motorSpeed);var n=this,o=this._motorTimeout=r.timeout(function(){n._motorTimeout==o&&(n._motorTimeout=null),window["native"]&&window["native"].motorStop(),r.done()},1e3*e);r["yield"]()},n.prototype.motorClockwise=function(t,e){this._motorOnFor("right",parseFloat(t[0]),e)},n.prototype.motorCounterClockwise=function(t,e){this._motorOnFor("left",parseFloat(t[0]),e)},n.prototype.motorSpeed=function(t){var e=t[0];switch(e){case"slow":this._motorSpeed=20;break;case"medium":this._motorSpeed=50;break;case"fast":this._motorSpeed=100}},n.prototype._getColor=function(t){var e={yellow:7,orange:8,coral:9,magenta:1,purple:2,blue:3,green:6,white:10};return"mystery"==t?Math.floor(10*Math.random()+1):e[t]},n.prototype.setColor=function(t,e){if(window["native"]){var r=this._getColor(t[0]);window["native"].setLedColor(r)}e["yield"](),e.timeout(function(){e.done()},250)},n.prototype.whenDistanceClose=function(){},n.prototype.whenTilt=function(){},t.exports=n}]);
\ No newline at end of file
+"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(J(r))return h(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return l(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=l(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Z),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return I(this,e,r);case"binary":return R(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(V(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(Y(e),t,r,n)}function E(t,e,r,n){return S(t,e,r,n)}function k(t,e,r,n){return W(H(e),t,r,n)}function x(t,e,r,n){return W(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,h,l;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&o)<<6|63&c,l>127&&(s=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&o)<<12|(63&c)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&1114112>l&&(s=l))}}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 L(n)}function L(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Q));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function C(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function F(t){if(t=j(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"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;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 Y(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return X.toByteArray(F(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var X=r(32),K=r(33),J=r(34);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Z={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return E(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||B(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||B(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||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||B(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||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||B(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||B(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||B(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||B(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||B(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return M(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=V(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(31).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===l?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:h+26>e?e-h:u+26>e?e-u+26:void 0}function r(t){function r(t){u[l++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;c="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),h="A".charCodeAt(0),l="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+l],l+=f,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+l>=1?f/c:f*Math.pow(2,1-l),e*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=h,e.isObject=l,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(31).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(35);a.inherits=r(5);var c=r(29),u=r(38);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(37);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(37);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function l(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)l(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(h(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(31).Buffer;o.WritableState=i;var S=r(35);S.inherits=r(5);var E=r(27);S.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(31).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(37),c=r(35);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(40),o=r(35);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(37)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(41)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(49),r(55),r(56),r(57),r(58),r(59)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(21),s=r(50),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),f=i(l);e.HTML=a(l,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:f,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(62),s=r(64),a=r(2),c={scratch3_control:r(66),scratch3_event:r(77),scratch3_looks:r(78),scratch3_motion:r(79),scratch3_operators:r(80)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getStacks(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var f=i.blocks.getInputs(o);for(var p in f){var d=f[p],g=d.block;if("undefined"==typeof s.reported[p]){var _=t.stepToReporter(e,g,p);if(_)return}u[p]=s.reported[p]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(t){this.runtime=t}var i=r(67);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(68)},function(t,e,r){"use strict";t.exports=r(69),r(71),r(72),r(73),r(74),r(76)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):f(e.promise,t._65));var n=o(r,t._65);n===b?f(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return f(t,m);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void p(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,p(t)}function f(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),p(t)}function p(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,f(e,t))});r||n!==b||(r=!0,f(e,m))}var _=r(70),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(69);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(69),s=r(75);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(c.length)throw c.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(70),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(69);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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}},r.prototype.number=function(t){var e=Number(t.NUM);return e!==e?0:e},r.prototype.text=function(t){return String(t.TEXT)},r.prototype.add=function(t){return t.NUM1+t.NUM2},r.prototype.subtract=function(t){return t.NUM1-t.NUM2},r.prototype.multiply=function(t){return t.NUM1*t.NUM2},r.prototype.divide=function(t){return t.NUM1/t.NUM2},r.prototype.lt=function(t){return Boolean(t.OPERAND1<t.OPERAND2)},r.prototype.equals=function(t){return Boolean(t.OPERAND1==t.OPERAND2)},r.prototype.gt=function(t){return Boolean(t.OPERAND1>t.OPERAND2)},r.prototype.and=function(t){return Boolean(t.OPERAND1&&t.OPERAND2)},r.prototype.or=function(t){return Boolean(t.OPERAND1||t.OPERAND2)},r.prototype.not=function(t){return Boolean(!t.OPERAND)},r.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},t.exports=r}]);
\ No newline at end of file
diff --git a/vm.worker.js b/vm.worker.js
index baf6eaf83..68443dd5c 100644
--- a/vm.worker.js
+++ b/vm.worker.js
@@ -109,6 +109,10 @@
 	    this.vmWorker.postMessage({method: 'stopAll'});
 	};
 
+	VirtualMachine.prototype.animationFrame = function () {
+	    this.vmWorker.postMessage({method: 'animationFrame'});
+	};
+
 	/**
 	 * Export and bind to `window`
 	 */
@@ -1026,6 +1030,9 @@
 	var queueIndex = -1;
 
 	function cleanUpNextTick() {
+	    if (!draining || !currentQueue) {
+	        return;
+	    }
 	    draining = false;
 	    if (currentQueue.length) {
 	        queue = currentQueue.concat(queue);

From c37675fcd7790d34415edb3979bfe4ef2d25d986 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 10 Aug 2016 12:04:02 -0400
Subject: [PATCH 160/302] Update README.md for `make serve` and playground

---
 README.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/README.md b/README.md
index 6dabf3716..1b7197870 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ npm install https://github.com/LLK/scratch-vm.git
 ```
 
 ## Setup
+For an extended setup example, check out the /playground directory, which includes a fully running VM instance.
 ```js
 var VirtualMachine = require('scratch-vm');
 var vm = new VirtualMachine();
@@ -23,6 +24,16 @@ flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 // Run threads
 vm.runtime.start();
 ```
+## Development Server and Playground
+For convenience, we've included a development server with the VM. This is useful because the VM can take advantage of executing in a WebWorker, which is not permitted in a local file. To start the server, run:
+
+```bash
+make serve
+```
+and go to [http://localhost:8080/](http://localhost:8080/) - you will be redirected to the playground, which demonstrates various tools and internal state.
+
+![VM Playground Screenshot](https://i.imgur.com/nOCNqEc.gif)
+
 
 ## Standalone Build
 ```bash

From 4faaf1b685ccb9823f9ec9d429ceb76909a8fed0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 11:11:27 -0400
Subject: [PATCH 161/302] Rename `stacks` to `scripts`

Further pushing toward removing ambiguity of what "stack" means in the codebase.
---
 src/engine/blocks.js  | 66 +++++++++++++++++++++----------------------
 src/engine/runtime.js | 28 +++++++++---------
 test/unit/blocks.js   | 42 +++++++++++++--------------
 3 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index da098df20..b4fab3809 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -15,11 +15,11 @@ function Blocks () {
     this._blocks = {};
 
     /**
-     * All stacks in the workspace.
-     * A list of block IDs that represent stacks (first block in stack).
+     * All top-level scripts in the workspace.
+     * A list of block IDs that represent scripts (i.e., first block in script).
      * @type {Array.<String>}
      */
-    this._stacks = [];
+    this._scripts = [];
 }
 
 /**
@@ -39,11 +39,11 @@ Blocks.prototype.getBlock = function (blockId) {
 };
 
 /**
- * Get all known top-level blocks that start stacks.
+ * Get all known top-level blocks that start scripts.
  * @return {Array.<string>} List of block IDs.
  */
-Blocks.prototype.getStacks = function () {
-    return this._stacks;
+Blocks.prototype.getScripts = function () {
+    return this._scripts;
 };
 
  /**
@@ -136,10 +136,10 @@ Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
         if (typeof e !== 'object') return;
         if (typeof e.blockId !== 'string') return;
 
-        // UI event: clicked stacks toggle in the runtime.
+        // UI event: clicked scripts toggle in the runtime.
         if (e.element === 'stackclick') {
             if (opt_runtime) {
-                opt_runtime.toggleStack(e.blockId);
+                opt_runtime.toggleScript(e.blockId);
             }
             return;
         }
@@ -182,7 +182,7 @@ Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
 // ---------------------------------------------------------------------
 
 /**
- * Block management: create blocks and stacks from a `create` event
+ * Block management: create blocks and scripts from a `create` event
  * @param {!Object} block Blockly create event to be processed
  * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
  */
@@ -190,12 +190,12 @@ Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
     // Create new block
     this._blocks[block.id] = block;
 
-    // Push block id to stacks array.
+    // Push block id to scripts array.
     // Blocks are added as a top-level stack if they are marked as a top-block
     // (if they were top-level XML in the event) and if they are not
     // flyout blocks.
     if (!opt_isFlyoutBlock && block.topLevel) {
-        this._addStack(block.id);
+        this._addScript(block.id);
     }
 };
 
@@ -233,10 +233,10 @@ Blocks.prototype.moveBlock = function (e) {
 
     // Has the block become a top-level block?
     if (e.newParent === undefined) {
-        this._addStack(e.id);
+        this._addScript(e.id);
     } else {
-        // Remove stack, if one exists.
-        this._deleteStack(e.id);
+        // Remove script, if one exists.
+        this._deleteScript(e.id);
         // Otherwise, try to connect it in its new place.
         if (e.newInput !== undefined) {
              // Moved to the new parent's input.
@@ -252,11 +252,11 @@ Blocks.prototype.moveBlock = function (e) {
 };
 
 /**
- * Block management: delete blocks and their associated stacks
- * @param {!Object} e Blockly delete event to be processed
+ * Block management: delete blocks and their associated scripts.
+ * @param {!Object} e Blockly delete event to be processed.
  */
 Blocks.prototype.deleteBlock = function (e) {
-    // @todo In runtime, stop threads running on this stack
+    // @todo In runtime, stop threads running on this script.
 
     // Get block
     var block = this._blocks[e.id];
@@ -274,36 +274,36 @@ Blocks.prototype.deleteBlock = function (e) {
         }
     }
 
-    // Delete stack
-    this._deleteStack(e.id);
+    // Delete any script starting with this block.
+    this._deleteScript(e.id);
 
-    // Delete block
+    // Delete block itself.
     delete this._blocks[e.id];
 };
 
 // ---------------------------------------------------------------------
 
 /**
- * Helper to add a stack to `this._stacks`
- * @param {?string} id ID of block that starts the stack
+ * Helper to add a stack to `this._scripts`.
+ * @param {?string} topBlockId ID of block that starts the script.
  */
-Blocks.prototype._addStack = function (id) {
-    var i = this._stacks.indexOf(id);
-    if (i > -1) return; // Already in stacks.
-    this._stacks.push(id);
+Blocks.prototype._addScript = function (topBlockId) {
+    var i = this._scripts.indexOf(topBlockId);
+    if (i > -1) return; // Already in scripts.
+    this._scripts.push(topBlockId);
     // Update `topLevel` property on the top block.
-    this._blocks[id].topLevel = true;
+    this._blocks[topBlockId].topLevel = true;
 };
 
 /**
- * Helper to remove a stack from `this._stacks`
- * @param {?string} id ID of block that starts the stack
+ * Helper to remove a script from `this._scripts`.
+ * @param {?string} topBlockId ID of block that starts the script.
  */
-Blocks.prototype._deleteStack = function (id) {
-    var i = this._stacks.indexOf(id);
-    if (i > -1) this._stacks.splice(i, 1);
+Blocks.prototype._deleteScript = function (topBlockId) {
+    var i = this._scripts.indexOf(topBlockId);
+    if (i > -1) this._scripts.splice(i, 1);
     // Update `topLevel` property on the top block.
-    if (this._blocks[id]) this._blocks[id].topLevel = false;
+    if (this._blocks[topBlockId]) this._blocks[topBlockId].topLevel = false;
 };
 
 module.exports = Blocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index f92a91db7..c32a72115 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -12,7 +12,7 @@ var defaultBlockPackages = {
 };
 
 /**
- * Manages targets, stacks, and the sequencer.
+ * Manages targets, scripts, and the sequencer.
  * @param {!Array.<Target>} targets List of targets for this runtime.
  */
 function Runtime (targets) {
@@ -146,39 +146,39 @@ Runtime.prototype._removeThread = function (thread) {
 };
 
 /**
- * Toggle a stack
- * @param {!string} stackId ID of block that starts the stack
+ * Toggle a script.
+ * @param {!string} topBlockId ID of block that starts the script.
  */
-Runtime.prototype.toggleStack = function (stackId) {
-    // Remove any existing thread
+Runtime.prototype.toggleScript = function (topBlockId) {
+    // Remove any existing thread.
     for (var i = 0; i < this.threads.length; i++) {
-        if (this.threads[i].topBlock == stackId) {
+        if (this.threads[i].topBlock == topBlockId) {
             this._removeThread(this.threads[i]);
             return;
         }
     }
-    // Otherwise add it
-    this._pushThread(stackId);
+    // Otherwise add it.
+    this._pushThread(topBlockId);
 };
 
 /**
  * Green flag, which stops currently running threads
- * and adds all top-level stacks that start with the green flag
+ * and adds all top-level scripts that start with the green flag
  */
 Runtime.prototype.greenFlag = function () {
     // Remove all existing threads
     for (var i = 0; i < this.threads.length; i++) {
         this._removeThread(this.threads[i]);
     }
-    // Add all top stacks with green flag
+    // Add all top scripts with green flag
     for (var t = 0; t < this.targets.length; t++) {
         var target = this.targets[t];
-        var stacks = target.blocks.getStacks();
-        for (var j = 0; j < stacks.length; j++) {
-            var topBlock = stacks[j];
+        var scripts = target.blocks.getScripts();
+        for (var j = 0; j < scripts.length; j++) {
+            var topBlock = scripts[j];
             if (target.blocks.getBlock(topBlock).opcode ===
                 'event_whenflagclicked') {
-                this._pushThread(stacks[j]);
+                this._pushThread(scripts[j]);
             }
         }
     }
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 244c0e03c..bd2348c03 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -9,15 +9,15 @@ test('spec', function (t) {
     t.ok(b instanceof Blocks);
 
     t.type(b._blocks, 'object');
-    t.type(b._stacks, 'object');
-    t.ok(Array.isArray(b._stacks));
+    t.type(b._scripts, 'object');
+    t.ok(Array.isArray(b._scripts));
 
     t.type(b.createBlock, 'function');
     t.type(b.moveBlock, 'function');
     t.type(b.changeBlock, 'function');
     t.type(b.deleteBlock, 'function');
     t.type(b.getBlock, 'function');
-    t.type(b.getStacks, 'function');
+    t.type(b.getScripts, 'function');
     t.type(b.getNextBlock, 'function');
     t.type(b.getBranch, 'function');
     t.type(b.getOpcode, 'function');
@@ -44,11 +44,11 @@ test('getBlock', function (t) {
     t.end();
 });
 
-test('getStacks', function (t) {
+test('getScripts', function (t) {
     var b = new Blocks();
-    var stacks = b.getStacks();
-    t.type(stacks, 'object');
-    t.equals(stacks.length, 0);
+    var scripts = b.getScripts();
+    t.type(scripts, 'object');
+    t.equals(scripts.length, 0);
     // Create two top-level blocks and one not.
     b.createBlock({
         id: 'foo',
@@ -75,12 +75,12 @@ test('getStacks', function (t) {
         topLevel: false
     });
 
-    stacks = b.getStacks();
-    t.type(stacks, 'object');
-    t.equals(stacks.length, 2);
-    t.ok(stacks.indexOf('foo') > -1);
-    t.ok(stacks.indexOf('foo2') > -1);
-    t.equals(stacks.indexOf('foo3'), -1);
+    scripts = b.getScripts();
+    t.type(scripts, 'object');
+    t.equals(scripts.length, 2);
+    t.ok(scripts.indexOf('foo') > -1);
+    t.ok(scripts.indexOf('foo2') > -1);
+    t.equals(scripts.indexOf('foo3'), -1);
     t.end();
 
 });
@@ -244,7 +244,7 @@ test('create', function (t) {
 
     t.type(b._blocks['foo'], 'object');
     t.equal(b._blocks['foo'].opcode, 'TEST_BLOCK');
-    t.notEqual(b._stacks.indexOf('foo'), -1);
+    t.notEqual(b._scripts.indexOf('foo'), -1);
     t.end();
 });
 
@@ -272,7 +272,7 @@ test('move', function (t) {
         id: 'bar',
         newParent: 'foo'
     });
-    t.equal(b._stacks.length, 1);
+    t.equal(b._scripts.length, 1);
     t.equal(Object.keys(b._blocks).length, 2);
     t.equal(b._blocks['foo'].next, 'bar');
 
@@ -281,7 +281,7 @@ test('move', function (t) {
         id: 'bar',
         oldParent: 'foo'
     });
-    t.equal(b._stacks.length, 2);
+    t.equal(b._scripts.length, 2);
     t.equal(Object.keys(b._blocks).length, 2);
     t.equal(b._blocks['foo'].next, null);
 
@@ -360,7 +360,7 @@ test('delete', function (t) {
     });
 
     t.type(b._blocks['foo'], 'undefined');
-    t.equal(b._stacks.indexOf('foo'), -1);
+    t.equal(b._scripts.indexOf('foo'), -1);
     t.end();
 });
 
@@ -398,9 +398,9 @@ test('delete chain', function (t) {
     t.type(b._blocks['foo'], 'undefined');
     t.type(b._blocks['foo2'], 'undefined');
     t.type(b._blocks['foo3'], 'undefined');
-    t.equal(b._stacks.indexOf('foo'), -1);
+    t.equal(b._scripts.indexOf('foo'), -1);
     t.equal(Object.keys(b._blocks).length, 0);
-    t.equal(b._stacks.length, 0);
+    t.equal(b._scripts.length, 0);
     t.end();
 });
 
@@ -461,8 +461,8 @@ test('delete inputs', function (t) {
     t.type(b._blocks['foo2'], 'undefined');
     t.type(b._blocks['foo3'], 'undefined');
     t.type(b._blocks['foo4'], 'undefined');
-    t.equal(b._stacks.indexOf('foo'), -1);
+    t.equal(b._scripts.indexOf('foo'), -1);
     t.equal(Object.keys(b._blocks).length, 0);
-    t.equal(b._stacks.length, 0);
+    t.equal(b._scripts.length, 0);
     t.end();
 });

From 8af657627bcd9c4fa57f7e175c001dde1e39a125 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 11:11:35 -0400
Subject: [PATCH 162/302] Recompile August 11

---
 vm.js     | 88 +++++++++++++++++++++++++++----------------------------
 vm.min.js |  4 +--
 2 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/vm.js b/vm.js
index a31504ded..30205d633 100644
--- a/vm.js
+++ b/vm.js
@@ -1585,11 +1585,11 @@
 	    this._blocks = {};
 
 	    /**
-	     * All stacks in the workspace.
-	     * A list of block IDs that represent stacks (first block in stack).
+	     * All top-level scripts in the workspace.
+	     * A list of block IDs that represent scripts (i.e., first block in script).
 	     * @type {Array.<String>}
 	     */
-	    this._stacks = [];
+	    this._scripts = [];
 	}
 
 	/**
@@ -1609,11 +1609,11 @@
 	};
 
 	/**
-	 * Get all known top-level blocks that start stacks.
+	 * Get all known top-level blocks that start scripts.
 	 * @return {Array.<string>} List of block IDs.
 	 */
-	Blocks.prototype.getStacks = function () {
-	    return this._stacks;
+	Blocks.prototype.getScripts = function () {
+	    return this._scripts;
 	};
 
 	 /**
@@ -1706,10 +1706,10 @@
 	        if (typeof e !== 'object') return;
 	        if (typeof e.blockId !== 'string') return;
 
-	        // UI event: clicked stacks toggle in the runtime.
+	        // UI event: clicked scripts toggle in the runtime.
 	        if (e.element === 'stackclick') {
 	            if (opt_runtime) {
-	                opt_runtime.toggleStack(e.blockId);
+	                opt_runtime.toggleScript(e.blockId);
 	            }
 	            return;
 	        }
@@ -1752,7 +1752,7 @@
 	// ---------------------------------------------------------------------
 
 	/**
-	 * Block management: create blocks and stacks from a `create` event
+	 * Block management: create blocks and scripts from a `create` event
 	 * @param {!Object} block Blockly create event to be processed
 	 * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
 	 */
@@ -1760,12 +1760,12 @@
 	    // Create new block
 	    this._blocks[block.id] = block;
 
-	    // Push block id to stacks array.
+	    // Push block id to scripts array.
 	    // Blocks are added as a top-level stack if they are marked as a top-block
 	    // (if they were top-level XML in the event) and if they are not
 	    // flyout blocks.
 	    if (!opt_isFlyoutBlock && block.topLevel) {
-	        this._addStack(block.id);
+	        this._addScript(block.id);
 	    }
 	};
 
@@ -1803,10 +1803,10 @@
 
 	    // Has the block become a top-level block?
 	    if (e.newParent === undefined) {
-	        this._addStack(e.id);
+	        this._addScript(e.id);
 	    } else {
-	        // Remove stack, if one exists.
-	        this._deleteStack(e.id);
+	        // Remove script, if one exists.
+	        this._deleteScript(e.id);
 	        // Otherwise, try to connect it in its new place.
 	        if (e.newInput !== undefined) {
 	             // Moved to the new parent's input.
@@ -1822,11 +1822,11 @@
 	};
 
 	/**
-	 * Block management: delete blocks and their associated stacks
-	 * @param {!Object} e Blockly delete event to be processed
+	 * Block management: delete blocks and their associated scripts.
+	 * @param {!Object} e Blockly delete event to be processed.
 	 */
 	Blocks.prototype.deleteBlock = function (e) {
-	    // @todo In runtime, stop threads running on this stack
+	    // @todo In runtime, stop threads running on this script.
 
 	    // Get block
 	    var block = this._blocks[e.id];
@@ -1844,34 +1844,34 @@
 	        }
 	    }
 
-	    // Delete stack
-	    this._deleteStack(e.id);
+	    // Delete any script starting with this block.
+	    this._deleteScript(e.id);
 
-	    // Delete block
+	    // Delete block itself.
 	    delete this._blocks[e.id];
 	};
 
 	// ---------------------------------------------------------------------
 
 	/**
-	 * Helper to add a stack to `this._stacks`
-	 * @param {?string} id ID of block that starts the stack
+	 * Helper to add a stack to `this._scripts`.
+	 * @param {?string} id ID of block that starts the script.
 	 */
-	Blocks.prototype._addStack = function (id) {
-	    var i = this._stacks.indexOf(id);
-	    if (i > -1) return; // Already in stacks.
-	    this._stacks.push(id);
+	Blocks.prototype._addScript = function (id) {
+	    var i = this._scripts.indexOf(id);
+	    if (i > -1) return; // Already in scripts.
+	    this._scripts.push(id);
 	    // Update `topLevel` property on the top block.
 	    this._blocks[id].topLevel = true;
 	};
 
 	/**
-	 * Helper to remove a stack from `this._stacks`
-	 * @param {?string} id ID of block that starts the stack
+	 * Helper to remove a stack from `this._scripts`.
+	 * @param {?string} id ID of block that starts the script.
 	 */
 	Blocks.prototype._deleteStack = function (id) {
-	    var i = this._stacks.indexOf(id);
-	    if (i > -1) this._stacks.splice(i, 1);
+	    var i = this._scripts.indexOf(id);
+	    if (i > -1) this._scripts.splice(i, 1);
 	    // Update `topLevel` property on the top block.
 	    if (this._blocks[id]) this._blocks[id].topLevel = false;
 	};
@@ -11279,7 +11279,7 @@
 	};
 
 	/**
-	 * Manages targets, stacks, and the sequencer.
+	 * Manages targets, scripts, and the sequencer.
 	 * @param {!Array.<Target>} targets List of targets for this runtime.
 	 */
 	function Runtime (targets) {
@@ -11413,39 +11413,39 @@
 	};
 
 	/**
-	 * Toggle a stack
-	 * @param {!string} stackId ID of block that starts the stack
+	 * Toggle a script.
+	 * @param {!string} topBlockId ID of block that starts the script.
 	 */
-	Runtime.prototype.toggleStack = function (stackId) {
-	    // Remove any existing thread
+	Runtime.prototype.toggleScript = function (topBlockId) {
+	    // Remove any existing thread.
 	    for (var i = 0; i < this.threads.length; i++) {
-	        if (this.threads[i].topBlock == stackId) {
+	        if (this.threads[i].topBlock == topBlockId) {
 	            this._removeThread(this.threads[i]);
 	            return;
 	        }
 	    }
-	    // Otherwise add it
-	    this._pushThread(stackId);
+	    // Otherwise add it.
+	    this._pushThread(topBlockId);
 	};
 
 	/**
 	 * Green flag, which stops currently running threads
-	 * and adds all top-level stacks that start with the green flag
+	 * and adds all top-level scripts that start with the green flag
 	 */
 	Runtime.prototype.greenFlag = function () {
 	    // Remove all existing threads
 	    for (var i = 0; i < this.threads.length; i++) {
 	        this._removeThread(this.threads[i]);
 	    }
-	    // Add all top stacks with green flag
+	    // Add all top scripts with green flag
 	    for (var t = 0; t < this.targets.length; t++) {
 	        var target = this.targets[t];
-	        var stacks = target.blocks.getStacks();
-	        for (var j = 0; j < stacks.length; j++) {
-	            var topBlock = stacks[j];
+	        var scripts = target.blocks.getScripts();
+	        for (var j = 0; j < scripts.length; j++) {
+	            var topBlock = scripts[j];
 	            if (target.blocks.getBlock(topBlock).opcode ===
 	                'event_whenflagclicked') {
-	                this._pushThread(stacks[j]);
+	                this._pushThread(scripts[j]);
 	            }
 	        }
 	    }
diff --git a/vm.min.js b/vm.min.js
index 2f22a37cb..c98a6b251 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,4 +1,4 @@
-!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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)D(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var O=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(O,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var B,N={};e.debuglog=function(t){if(w(B)&&(B=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._stacks=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getStacks=function(){return this._stacks},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleStack(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addStack(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addStack(t.id):(this._deleteStack(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteStack(t.id),delete this._blocks[t.id]},n.prototype._addStack=function(t){var e=this._stacks.indexOf(t);e>-1||(this._stacks.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=function(t){var e=this._stacks.indexOf(t);e>-1&&this._stacks.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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name,p="";p=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[f]={name:f,value:p};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(15),u=r(17),h=r(18),l=r(19),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,E=f++,k=f++,x=f++,T=f++,A=f++,L=f++,I=f++,R=f++,D=f++,O=f++,B=f++,N=f++,C=f++,q=f++,U=f++,P=f++,M=f++,F=f++,j=f++,G=f++,V=f++,Y=f++,z=f++,H=f++,W=f++,X=f++,K=f++,J=f++,Z=f++,Q=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,ht=f++,lt=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,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=p:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?R:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=D,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=O)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=B:this._state=D},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=D)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",M,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=z:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=J;
+!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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)D(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var O=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(O,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var B,N={};e.debuglog=function(t){if(w(B)&&(B=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleScript(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addScript(t.id):(this._deleteScript(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name,p="";p=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[f]={name:f,value:p};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(15),u=r(17),h=r(18),l=r(19),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,E=f++,k=f++,x=f++,T=f++,A=f++,L=f++,I=f++,R=f++,D=f++,O=f++,B=f++,N=f++,C=f++,q=f++,U=f++,P=f++,M=f++,F=f++,j=f++,G=f++,V=f++,Y=f++,z=f++,H=f++,W=f++,X=f++,K=f++,J=f++,Z=f++,Q=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,ht=f++,lt=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,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=p:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?R:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=D,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=O)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=B:this._state=D},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=D)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",M,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=z:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=J;
 },a.prototype._stateBeforeScript1=s("R",H),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",X),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Z,p),a.prototype._stateAfterScript2=o("I",Q,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",ht,lt),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===E?this._stateBeforeAttributeValue(t):this._state===k?this._stateInAttributeValueDoubleQuotes(t):this._state===x?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===I?this._stateInProcessingInstruction(t):this._state===R?this._stateBeforeComment(t):this._state===D?this._stateInComment(t):this._state===O?this._stateAfterComment1(t):this._state===B?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===C?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===U?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===M?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===V?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===z?this._stateBeforeScript1(t):this._state===H?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Z?this._stateAfterScript2(t):this._state===Q?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===D||this._state===O||this._state===B?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==E&&this._state!==S&&this._state!==w&&this._state!==x&&this._state!==k&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(16);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(21),o=/\s+/g,s=r(22),a=r(23),c={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(22),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 h.getElementsByTagName(t,e,!0)}function o(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(12),u=c.DomHandler,h=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(l,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,u.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(26);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(12).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(13),o=r(27).Writable||r(46).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(28),n.Writable=r(42),n.Duplex=r(43),n.Transform=r(44),n.PassThrough=r(45),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(29),e.Stream=r(27),e.Readable=e,e.Writable=r(38),e.Duplex=r(37),e.Transform=r(40),e.PassThrough=r(41),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(27))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(37);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&&(L||(L=r(39).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(37);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||h(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&&l(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=R)t=R;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(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,l(t)}function l(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){I("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&x.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):k.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new k(t);for(var c=0,u=0,h=n.length;h>u&&t>c;u++){var a=n[0],l=Math.min(t-c,a.length);o?r+=a.slice(0,l):a.copy(r,c,0,l),l<a.length?n[0]=a.slice(l):n.shift(),c+=l}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var E=r(30),k=r(31).Buffer;i.ReadableState=n;var x=r(1).EventEmitter;x.listenerCount||(x.listenerCount=function(t,e){return t.listeners(e).length});var T=r(27),A=r(35);A.inherits=r(5);var L,I=r(36);I=I&&I.debuglog?I.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new k(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(39).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):l(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){I("onunpipe"),t===l&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function a(e){I("onerror",e),h(),t.removeListener("error",a),0===x.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),h()}function u(){I("onfinish"),t.removeListener("close",c),h()}function h(){I("unpipe"),l.unpipe(t)}var l=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,I("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):l.once("end",d),t.on("unpipe",n);var _=g(l);return t.on("drain",_),l.on("data",s),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",l),f.flowing||(I("pipe resume"),l.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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
@@ -7,4 +7,4 @@ vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫"
 	 * @license  MIT
 	 */
 "use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(J(r))return h(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return l(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=l(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Z),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return I(this,e,r);case"binary":return R(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(V(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(Y(e),t,r,n)}function E(t,e,r,n){return S(t,e,r,n)}function k(t,e,r,n){return W(H(e),t,r,n)}function x(t,e,r,n){return W(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,h,l;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&o)<<6|63&c,l>127&&(s=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&o)<<12|(63&c)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&1114112>l&&(s=l))}}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 L(n)}function L(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Q));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function C(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function F(t){if(t=j(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"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;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 Y(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return X.toByteArray(F(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var X=r(32),K=r(33),J=r(34);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Z={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return E(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||B(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||B(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||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||B(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||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||B(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||B(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||B(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||B(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||B(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return M(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=V(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(31).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===l?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:h+26>e?e-h:u+26>e?e-u+26:void 0}function r(t){function r(t){u[l++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;c="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),h="A".charCodeAt(0),l="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+l],l+=f,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+l>=1?f/c:f*Math.pow(2,1-l),e*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=h,e.isObject=l,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(31).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(35);a.inherits=r(5);var c=r(29),u=r(38);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(37);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(37);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function l(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)l(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(h(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(31).Buffer;o.WritableState=i;var S=r(35);S.inherits=r(5);var E=r(27);S.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(31).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(37),c=r(35);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(40),o=r(35);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(37)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(41)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(49),r(55),r(56),r(57),r(58),r(59)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(21),s=r(50),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),f=i(l);e.HTML=a(l,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:f,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(62),s=r(64),a=r(2),c={scratch3_control:r(66),scratch3_event:r(77),scratch3_looks:r(78),scratch3_motion:r(79),scratch3_operators:r(80)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleStack=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getStacks(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var f=i.blocks.getInputs(o);for(var p in f){var d=f[p],g=d.block;if("undefined"==typeof s.reported[p]){var _=t.stepToReporter(e,g,p);if(_)return}u[p]=s.reported[p]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(t){this.runtime=t}var i=r(67);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(68)},function(t,e,r){"use strict";t.exports=r(69),r(71),r(72),r(73),r(74),r(76)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):f(e.promise,t._65));var n=o(r,t._65);n===b?f(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return f(t,m);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void p(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,p(t)}function f(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),p(t)}function p(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,f(e,t))});r||n!==b||(r=!0,f(e,m))}var _=r(70),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(69);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(69),s=r(75);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(c.length)throw c.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(70),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(69);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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}},r.prototype.number=function(t){var e=Number(t.NUM);return e!==e?0:e},r.prototype.text=function(t){return String(t.TEXT)},r.prototype.add=function(t){return t.NUM1+t.NUM2},r.prototype.subtract=function(t){return t.NUM1-t.NUM2},r.prototype.multiply=function(t){return t.NUM1*t.NUM2},r.prototype.divide=function(t){return t.NUM1/t.NUM2},r.prototype.lt=function(t){return Boolean(t.OPERAND1<t.OPERAND2)},r.prototype.equals=function(t){return Boolean(t.OPERAND1==t.OPERAND2)},r.prototype.gt=function(t){return Boolean(t.OPERAND1>t.OPERAND2)},r.prototype.and=function(t){return Boolean(t.OPERAND1&&t.OPERAND2)},r.prototype.or=function(t){return Boolean(t.OPERAND1||t.OPERAND2)},r.prototype.not=function(t){return Boolean(!t.OPERAND)},r.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},t.exports=r}]);
\ No newline at end of file
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),f=i(l);e.HTML=a(l,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:f,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(62),s=r(64),a=r(2),c={scratch3_control:r(66),scratch3_event:r(77),scratch3_looks:r(78),scratch3_motion:r(79),scratch3_operators:r(80)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleScript=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getScripts(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var f=i.blocks.getInputs(o);for(var p in f){var d=f[p],g=d.block;if("undefined"==typeof s.reported[p]){var _=t.stepToReporter(e,g,p);if(_)return}u[p]=s.reported[p]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(t){this.runtime=t}var i=r(67);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(68)},function(t,e,r){"use strict";t.exports=r(69),r(71),r(72),r(73),r(74),r(76)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):f(e.promise,t._65));var n=o(r,t._65);n===b?f(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return f(t,m);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void p(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,p(t)}function f(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),p(t)}function p(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,f(e,t))});r||n!==b||(r=!0,f(e,m))}var _=r(70),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(69);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(69),s=r(75);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(c.length)throw c.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(70),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(69);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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}},r.prototype.number=function(t){var e=Number(t.NUM);return e!==e?0:e},r.prototype.text=function(t){return String(t.TEXT)},r.prototype.add=function(t){return t.NUM1+t.NUM2},r.prototype.subtract=function(t){return t.NUM1-t.NUM2},r.prototype.multiply=function(t){return t.NUM1*t.NUM2},r.prototype.divide=function(t){return t.NUM1/t.NUM2},r.prototype.lt=function(t){return Boolean(t.OPERAND1<t.OPERAND2)},r.prototype.equals=function(t){return Boolean(t.OPERAND1==t.OPERAND2)},r.prototype.gt=function(t){return Boolean(t.OPERAND1>t.OPERAND2)},r.prototype.and=function(t){return Boolean(t.OPERAND1&&t.OPERAND2)},r.prototype.or=function(t){return Boolean(t.OPERAND1||t.OPERAND2)},r.prototype.not=function(t){return Boolean(!t.OPERAND)},r.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},t.exports=r}]);
\ No newline at end of file

From 07e965261d102541898ec3c93bc9c4e45c82e0bc Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 12:05:58 -0400
Subject: [PATCH 163/302] Implementation of remaining operators

---
 src/blocks/scratch3_operators.js | 66 +++++++++++++++++++++++++++++++-
 1 file changed, 65 insertions(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index fa43950ae..02eb20419 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -27,7 +27,14 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'operator_and': this.and,
         'operator_or': this.or,
         'operator_not': this.not,
-        'operator_random': this.random
+        '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_menu': this.mathopMenu,
+        'operator_mathop': this.mathop
     };
 };
 
@@ -97,4 +104,61 @@ Scratch3OperatorsBlocks.prototype.random = function (args) {
     return (Math.random() * (high - low)) + low;
 };
 
+Scratch3OperatorsBlocks.prototype.join = function (args) {
+    return String(String(args.STRING1) + String(args.STRING2));
+};
+
+Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
+    var index = Number(args.LETTER) - 1;
+    var str = String(args.STRING);
+    // Out of bounds?
+    if (index < 0 || index >= str.length) {
+        return '';
+    }
+    return str.charAt(index);
+};
+
+Scratch3OperatorsBlocks.prototype.length = function (args) {
+    return String(args.STRING).length;
+};
+
+Scratch3OperatorsBlocks.prototype.mod = function (args) {
+    var n = Number(args.NUM1);
+    var modulus = Number(args.NUM2);
+    var result = n % modulus;
+    // Scratch mod is kept positive.
+    if (result / modulus < 0) result += modulus;
+    return result;
+};
+
+Scratch3OperatorsBlocks.prototype.round = function (args) {
+    return Math.round(Number(args.NUM));
+};
+
+Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
+    return args.OPERATOR;
+};
+
+Scratch3OperatorsBlocks.prototype.mathop = function (args) {
+    var operator = String(args.OPERATOR).toLowerCase();
+    var n = Number(args.NUM);
+    switch (operator) {
+    case 'abs': return Math.abs(n);
+    case 'floor': return Math.floor(n);
+    case 'ceiling': return Math.ceil(n);
+    case 'sqrt': return Math.sqrt(n);
+    case 'sin': return Math.sin((Math.PI * n) / 180);
+    case 'cos': return Math.cos((Math.PI * n) / 180);
+    case 'tan': return Math.tan((Math.PI * n) / 180);
+    case 'asin': return (Math.asin(n) * 180) / Math.PI;
+    case 'acos': return (Math.acos(n) * 180) / Math.PI;
+    case 'atan': return (Math.atan(n) * 180) / Math.PI;
+    case 'ln': return Math.log(n);
+    case 'log': return Math.log(n) / Math.LN10;
+    case 'e ^': return Math.exp(n);
+    case '10 ^': return Math.pow(10, n);
+    }
+    return 0;
+};
+
 module.exports = Scratch3OperatorsBlocks;

From bfe007e29f42dd0362d4901474d224826d0c1762 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 18:47:34 -0400
Subject: [PATCH 164/302] Add casting utilities and apply them to operator
 blocks

---
 src/blocks/scratch3_operators.js | 52 +++++++++----------
 src/util/cast.js                 | 88 ++++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+), 26 deletions(-)
 create mode 100644 src/util/cast.js

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 02eb20419..725885015 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -1,3 +1,5 @@
+var Cast = require('../util/cast.js');
+
 function Scratch3OperatorsBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -39,56 +41,51 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
 };
 
 Scratch3OperatorsBlocks.prototype.number = function (args) {
-    var num = Number(args.NUM);
-    if (num !== num) {
-        // NaN
-        return 0;
-    }
-    return num;
+    return Cast.toNumber(args.NUM);
 };
 
 Scratch3OperatorsBlocks.prototype.text = function (args) {
-    return String(args.TEXT);
+    return Cast.toString(args.TEXT);
 };
 
 Scratch3OperatorsBlocks.prototype.add = function (args) {
-    return args.NUM1 + args.NUM2;
+    return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
 };
 
 Scratch3OperatorsBlocks.prototype.subtract = function (args) {
-    return args.NUM1 - args.NUM2;
+    return Cast.toNumber(args.NUM1) - Cast.toNumber(args.NUM2);
 };
 
 Scratch3OperatorsBlocks.prototype.multiply = function (args) {
-    return args.NUM1 * args.NUM2;
+    return Cast.toNumber(args.NUM1) * Cast.toNumber(args.NUM2);
 };
 
 Scratch3OperatorsBlocks.prototype.divide = function (args) {
-    return args.NUM1 / args.NUM2;
+    return Cast.toNumber(args.NUM1) / Cast.toNumber(args.NUM2);
 };
 
 Scratch3OperatorsBlocks.prototype.lt = function (args) {
-    return Boolean(args.OPERAND1 < args.OPERAND2);
+    return Cast.compare(args.OPERAND1, args.OPERAND2) < 0;
 };
 
 Scratch3OperatorsBlocks.prototype.equals = function (args) {
-    return Boolean(args.OPERAND1 == args.OPERAND2);
+    return Cast.compare(args.OPERAND1, args.OPERAND2) == 0;
 };
 
 Scratch3OperatorsBlocks.prototype.gt = function (args) {
-    return Boolean(args.OPERAND1 > args.OPERAND2);
+    return Cast.compare(args.OPERAND1, args.OPERAND2) > 0;
 };
 
 Scratch3OperatorsBlocks.prototype.and = function (args) {
-    return Boolean(args.OPERAND1 && args.OPERAND2);
+    return Cast.toBoolean(args.OPERAND1 && args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.or = function (args) {
-    return Boolean(args.OPERAND1 || args.OPERAND2);
+    return Cast.toBoolean(args.OPERAND1 || args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.not = function (args) {
-    return Boolean(!args.OPERAND);
+    return Cast.toBoolean(!args.OPERAND);
 };
 
 Scratch3OperatorsBlocks.prototype.random = function (args) {
@@ -105,12 +102,15 @@ Scratch3OperatorsBlocks.prototype.random = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.join = function (args) {
-    return String(String(args.STRING1) + String(args.STRING2));
+    return Cast.toString(
+        Cast.toString(args.STRING1) +
+        Cast.toString(args.STRING2)
+    );
 };
 
 Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
-    var index = Number(args.LETTER) - 1;
-    var str = String(args.STRING);
+    var index = Cast.toNumber(args.LETTER) - 1;
+    var str = Cast.toString(args.STRING);
     // Out of bounds?
     if (index < 0 || index >= str.length) {
         return '';
@@ -119,12 +119,12 @@ Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.length = function (args) {
-    return String(args.STRING).length;
+    return Cast.toString(args.STRING).length;
 };
 
 Scratch3OperatorsBlocks.prototype.mod = function (args) {
-    var n = Number(args.NUM1);
-    var modulus = Number(args.NUM2);
+    var n = Cast.toNumber(args.NUM1);
+    var modulus = Cast.toNumber(args.NUM2);
     var result = n % modulus;
     // Scratch mod is kept positive.
     if (result / modulus < 0) result += modulus;
@@ -132,7 +132,7 @@ Scratch3OperatorsBlocks.prototype.mod = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.round = function (args) {
-    return Math.round(Number(args.NUM));
+    return Math.round(Cast.toNumber(args.NUM));
 };
 
 Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
@@ -140,8 +140,8 @@ Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.mathop = function (args) {
-    var operator = String(args.OPERATOR).toLowerCase();
-    var n = Number(args.NUM);
+    var operator = Cast.toString(args.OPERATOR).toLowerCase();
+    var n = Cast.toNumber(args.NUM);
     switch (operator) {
     case 'abs': return Math.abs(n);
     case 'floor': return Math.floor(n);
diff --git a/src/util/cast.js b/src/util/cast.js
new file mode 100644
index 000000000..1f84663a3
--- /dev/null
+++ b/src/util/cast.js
@@ -0,0 +1,88 @@
+function Cast () {}
+
+/**
+ * @fileoverview
+ * Utilities for casting and comparing Scratch data-types.
+ * Scratch behaves slightly differently from JavaScript in many respects,
+ * and these differences should be encapsulated below.
+ * For example, in Scratch, add(1, join("hello", world")) -> 1.
+ * This is because "hello world" is cast to 0.
+ * In JavaScript, 1 + Number("hello" + "world") would give you NaN.
+ * Use when coercing a value before computation.
+ */
+
+/**
+ * Scratch cast to number.
+ * Treats NaN as 0.
+ * In Scratch 2.0, this is captured by `interp.numArg.`
+ * @param {*} value Value to cast to number.
+ * @return {number} The Scratch-casted number value.
+ */
+Cast.toNumber = function (value) {
+    var n = Number(value);
+    if (isNaN(n)) {
+        // Scratch treats NaN as 0, when needed as a number.
+        // E.g., 0 + NaN -> 0.
+        return 0;
+    }
+    return n;
+};
+
+/**
+ * Scratch cast to boolean.
+ * In Scratch 2.0, this is captured by `interp.boolArg.`
+ * Treats some string values differently from JavaScript.
+ * @param {*} value Value to cast to boolean.
+ * @return {boolean} The Scratch-casted boolean value.
+ */
+Cast.toBoolean = function (value) {
+    // Already a boolean?
+    if (typeof value === 'boolean') {
+        return value;
+    }
+    if (typeof value === 'string') {
+        // These specific strings are treated as false in Scratch.
+        if ((value == '') ||
+            (value == '0') ||
+            (value.toLowerCase() == 'false')) {
+            return false;
+        }
+        // All other strings treated as true.
+        return true;
+    }
+    // Coerce other values and numbers.
+    return Boolean(value);
+};
+
+/**
+ * Scratch cast to string.
+ * @param {*} value Value to cast to string.
+ * @return {string} The Scratch-casted string value.
+ */
+Cast.toString = function (value) {
+    return String(value);
+};
+
+/**
+ * Compare two values, using Scratch cast, case-insensitive string compare, etc.
+ * In Scratch 2.0, this is captured by `interp.compare.`
+ * @param {*} v1 First value to compare.
+ * @param {*} v2 Second value to compare.
+ * @returns {Number} Negative number if v1 < v2; 0 if equal; positive otherwise.
+ */
+Cast.compare = function (v1, v2) {
+    var n1 = Number(v1);
+    var n2 = Number(v2);
+    if (isNaN(n1) || isNaN(n2)) {
+        // At least one argument can't be converted to a number.
+        // Scratch compares strings as case insensitive.
+        var s1 = String(v1).toLowerCase();
+        var s2 = String(v2).toLowerCase();
+        return s1.localeCompare(s2);
+    } else {
+        // Compare as numbers.
+        return n1 - n2;
+    }
+};
+
+module.exports = Cast;

From 349cb14c5a3a0f52864f4f1a3eb72c2b349e1e30 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 19:00:11 -0400
Subject: [PATCH 165/302] Removing extra cast in join implementation

---
 src/blocks/scratch3_operators.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 725885015..7826c526c 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -102,10 +102,7 @@ Scratch3OperatorsBlocks.prototype.random = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.join = function (args) {
-    return Cast.toString(
-        Cast.toString(args.STRING1) +
-        Cast.toString(args.STRING2)
-    );
+    return Cast.toString(args.STRING1) + Cast.toString(args.STRING2);
 };
 
 Scratch3OperatorsBlocks.prototype.letterOf = function (args) {

From 7a44dce816628269ab3b47568ae7325a2ed96e29 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 11 Aug 2016 22:54:57 -0400
Subject: [PATCH 166/302] Add stats.js meter to playground

---
 package.json             | 1 +
 playground/index.html    | 3 ++-
 playground/playground.js | 8 ++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index df9aa470c..17e50fa4d 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
     "json-loader": "0.5.4",
     "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
     "scratch-render": "git+https://git@github.com/LLK/scratch-render.git",
+    "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 bcfb4426f..20b8db310 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -725,7 +725,8 @@
           </category>
           <category name="More Blocks" colour="#FF6680"></category>
   </xml>
-
+    <!-- FPS counter -->
+    <script src="../node_modules/stats.js/build/stats.min.js"></script>
     <!-- Syntax highlighter -->
     <script src="../node_modules/highlightjs/highlight.pack.min.js"></script>
     <!-- Scratch Blocks -->
diff --git a/playground/playground.js b/playground/playground.js
index 47631b201..0de1f9afb 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -29,6 +29,12 @@ window.onload = function() {
     });
     window.workspace = workspace;
 
+    // FPS counter.
+    var stats = new window.Stats();
+    document.getElementById('tab-renderexplorer').appendChild(stats.dom);
+    stats.dom.style.position = 'relative';
+    stats.begin();
+
     // Block events.
     // @todo: Re-enable flyout listening after fixing GH-69.
     workspace.addChangeListener(vm.blockListener);
@@ -87,6 +93,8 @@ window.onload = function() {
 
     // Inform VM of animation frames.
     var animate = function() {
+        stats.end();
+        stats.begin();
         window.vm.animationFrame();
         requestAnimationFrame(animate);
     };

From aebcfde49211fef02378874b748d19abe25c142d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 15 Aug 2016 21:37:36 -0400
Subject: [PATCH 167/302] Add VM "I/O devices", clock, mouse as demo

---
 playground/playground.js       | 18 ++++++++++++++
 src/blocks/scratch3_sensing.js | 43 ++++++++++++++++++++++++++++++++++
 src/engine/execute.js          |  9 ++++++-
 src/engine/runtime.js          | 12 +++++++++-
 src/index.js                   | 14 +++++++++++
 src/io/clock.js                | 16 +++++++++++++
 src/io/mouse.js                | 33 ++++++++++++++++++++++++++
 src/worker.js                  |  8 +++++++
 8 files changed, 151 insertions(+), 2 deletions(-)
 create mode 100644 src/blocks/scratch3_sensing.js
 create mode 100644 src/io/clock.js
 create mode 100644 src/io/mouse.js

diff --git a/playground/playground.js b/playground/playground.js
index 0de1f9afb..2367d539c 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -88,6 +88,24 @@ window.onload = function() {
         workspace.reportValue(data.id, data.value);
     });
 
+    // Feed mouse events as VM I/O events.
+    document.addEventListener('mousemove', function (e) {
+        var rect = canvas.getBoundingClientRect();
+        var coordinates = {
+            x: e.clientX - rect.left - rect.width / 2,
+            y: e.clientY - rect.top - rect.height / 2
+        };
+        window.vm.postIOData('mouse', coordinates);
+    });
+    canvas.addEventListener('mousedown', function (e) {
+        window.vm.postIOData('mouse', {isDown: true});
+        e.preventDefault();
+    });
+    canvas.addEventListener('mouseup', function (e) {
+        window.vm.postIOData('mouse', {isDown: false});
+        e.preventDefault();
+    });
+
     // Run threads
     vm.start();
 
diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
new file mode 100644
index 000000000..ee75cc43a
--- /dev/null
+++ b/src/blocks/scratch3_sensing.js
@@ -0,0 +1,43 @@
+function Scratch3SensingBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3SensingBlocks.prototype.getPrimitives = function() {
+    return {
+        'sensing_timer': this.getTimer,
+        'sensing_resettimer': this.resetTimer,
+        'sensing_mousex': this.getMouseX,
+        'sensing_mousey': this.getMouseY,
+        'sensing_mousedown': this.getMouseDown
+    };
+};
+
+Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
+    return util.ioQuery('clock', 'projectTimer');
+};
+
+Scratch3SensingBlocks.prototype.resetTimer = function (args, util) {
+    util.ioQuery('clock', 'resetProjectTimer');
+};
+
+Scratch3SensingBlocks.prototype.getMouseX = function (args, util) {
+    return util.ioQuery('mouse', 'getX');
+};
+
+Scratch3SensingBlocks.prototype.getMouseY = function (args, util) {
+    return util.ioQuery('mouse', 'getY');
+};
+
+Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
+    return util.ioQuery('mouse', 'getIsDown');
+};
+
+module.exports = Scratch3SensingBlocks;
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 73b724965..d885a6c58 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -77,7 +77,14 @@ var execute = function (sequencer, thread) {
         startBranch: function (branchNum) {
             sequencer.stepToBranch(thread, branchNum);
         },
-        target: target
+        target: target,
+        ioQuery: function (device, func, args) {
+            // Find the I/O device and execute the query/function call.
+            if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
+                var devObject = runtime.ioDevices[device];
+                return devObject[func].call(devObject, args);
+            }
+        }
     });
 
     // Deal with any reported value.
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index c32a72115..d244544aa 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -3,12 +3,17 @@ var Sequencer = require('./sequencer');
 var Thread = require('./thread');
 var util = require('util');
 
+// Virtual I/O devices.
+var Clock = require('../io/clock');
+var Mouse = require('../io/mouse');
+
 var defaultBlockPackages = {
     'scratch3_control': require('../blocks/scratch3_control'),
     'scratch3_event': require('../blocks/scratch3_event'),
     'scratch3_looks': require('../blocks/scratch3_looks'),
     'scratch3_motion': require('../blocks/scratch3_motion'),
-    'scratch3_operators': require('../blocks/scratch3_operators')
+    'scratch3_operators': require('../blocks/scratch3_operators'),
+    'scratch3_sensing': require('../blocks/scratch3_sensing')
 };
 
 /**
@@ -43,6 +48,11 @@ function Runtime (targets) {
      */
     this._primitives = {};
     this._registerBlockPackages();
+
+    this.ioDevices = {
+        'clock': new Clock(),
+        'mouse': new Mouse()
+    };
 }
 
 /**
diff --git a/src/index.js b/src/index.js
index db99f1d15..8807634a6 100644
--- a/src/index.js
+++ b/src/index.js
@@ -101,6 +101,17 @@ VirtualMachine.prototype.animationFrame = function () {
     this.runtime.animationFrame();
 };
 
+/**
+ * Post I/O data to the virtual devices.
+ * @param {?string} device Name of virtual I/O device.
+ * @param {Object} data Any data object to post to the I/O device.
+ */
+VirtualMachine.prototype.postIOData = function (device, data) {
+    if (this.runtime.ioDevices[device]) {
+        this.runtime.ioDevices[device].postData(data);
+    }
+};
+
 /*
  * Worker handlers: for all public methods available above,
  * we must also provide a message handler in case the VM is run
@@ -140,6 +151,9 @@ if (ENV_WORKER) {
         case 'animationFrame':
             self.vmInstance.animationFrame();
             break;
+        case 'postIOData':
+            self.vmInstance.postIOData(messageData.device, messageData.data);
+            break;
         default:
             if (e.data.id == 'RendererConnected') {
                 //initRenderWorker();
diff --git a/src/io/clock.js b/src/io/clock.js
new file mode 100644
index 000000000..b3bf1e0be
--- /dev/null
+++ b/src/io/clock.js
@@ -0,0 +1,16 @@
+var Timer = require('../util/timer');
+
+function Clock () {
+    this._projectTimer = new Timer();
+    this._projectTimer.start();
+}
+
+Clock.prototype.projectTimer = function () {
+    return this._projectTimer.timeElapsed() / 1000;
+};
+
+Clock.prototype.resetProjectTimer = function () {
+    this._projectTimer.start();
+};
+
+module.exports = Clock;
diff --git a/src/io/mouse.js b/src/io/mouse.js
new file mode 100644
index 000000000..7432c4358
--- /dev/null
+++ b/src/io/mouse.js
@@ -0,0 +1,33 @@
+var MathUtil = require('../util/math-util');
+
+function Mouse () {
+    this._x = 0;
+    this._y = 0;
+    this._isDown = false;
+}
+
+Mouse.prototype.postData = function(data) {
+    if (data.x) {
+        this._x = data.x;
+    }
+    if (data.y) {
+        this._y = data.y;
+    }
+    if (typeof data.isDown !== 'undefined') {
+        this._isDown = data.isDown;
+    }
+};
+
+Mouse.prototype.getX = function () {
+    return MathUtil.clamp(this._x, -240, 240);
+};
+
+Mouse.prototype.getY = function () {
+    return MathUtil.clamp(-this._y, -180, 180);
+};
+
+Mouse.prototype.getIsDown = function () {
+    return this._isDown;
+};
+
+module.exports = Mouse;
diff --git a/src/worker.js b/src/worker.js
index 70e6da5cb..248894537 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -51,6 +51,14 @@ VirtualMachine.prototype.getPlaygroundData = function () {
     this.vmWorker.postMessage({method: 'getPlaygroundData'});
 };
 
+VirtualMachine.prototype.postIOData = function (device, data) {
+    this.vmWorker.postMessage({
+        method: 'postIOData',
+        device: device,
+        data: data
+    });
+};
+
 VirtualMachine.prototype.start = function () {
     this.vmWorker.postMessage({method: 'start'});
 };

From f118c718a5cefc1698ba396be326819b85fff3d6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 16 Aug 2016 16:01:25 -0400
Subject: [PATCH 168/302] Recompile August 16

---
 vm.js        | 452 ++++++++++++++++++++++++++++++++++++++++++---------
 vm.min.js    |  11 +-
 vm.worker.js |   8 +
 3 files changed, 388 insertions(+), 83 deletions(-)

diff --git a/vm.js b/vm.js
index 30205d633..2c59a03d5 100644
--- a/vm.js
+++ b/vm.js
@@ -147,6 +147,17 @@
 	    this.runtime.animationFrame();
 	};
 
+	/**
+	 * Post I/O data to the virtual devices.
+	 * @param {?string} device Name of virtual I/O device.
+	 * @param {Object} data Any data object to post to the I/O device.
+	 */
+	VirtualMachine.prototype.postIOData = function (device, data) {
+	    if (this.runtime.ioDevices[device]) {
+	        this.runtime.ioDevices[device].postData(data);
+	    }
+	};
+
 	/*
 	 * Worker handlers: for all public methods available above,
 	 * we must also provide a message handler in case the VM is run
@@ -186,6 +197,9 @@
 	        case 'animationFrame':
 	            self.vmInstance.animationFrame();
 	            break;
+	        case 'postIOData':
+	            self.vmInstance.postIOData(messageData.device, messageData.data);
+	            break;
 	        default:
 	            if (e.data.id == 'RendererConnected') {
 	                //initRenderWorker();
@@ -1855,25 +1869,25 @@
 
 	/**
 	 * Helper to add a stack to `this._scripts`.
-	 * @param {?string} id ID of block that starts the script.
+	 * @param {?string} topBlockId ID of block that starts the script.
 	 */
-	Blocks.prototype._addScript = function (id) {
-	    var i = this._scripts.indexOf(id);
+	Blocks.prototype._addScript = function (topBlockId) {
+	    var i = this._scripts.indexOf(topBlockId);
 	    if (i > -1) return; // Already in scripts.
-	    this._scripts.push(id);
+	    this._scripts.push(topBlockId);
 	    // Update `topLevel` property on the top block.
-	    this._blocks[id].topLevel = true;
+	    this._blocks[topBlockId].topLevel = true;
 	};
 
 	/**
-	 * Helper to remove a stack from `this._scripts`.
-	 * @param {?string} id ID of block that starts the script.
+	 * Helper to remove a script from `this._scripts`.
+	 * @param {?string} topBlockId ID of block that starts the script.
 	 */
-	Blocks.prototype._deleteStack = function (id) {
-	    var i = this._scripts.indexOf(id);
+	Blocks.prototype._deleteScript = function (topBlockId) {
+	    var i = this._scripts.indexOf(topBlockId);
 	    if (i > -1) this._scripts.splice(i, 1);
 	    // Update `topLevel` property on the top block.
-	    if (this._blocks[id]) this._blocks[id].topLevel = false;
+	    if (this._blocks[topBlockId]) this._blocks[topBlockId].topLevel = false;
 	};
 
 	module.exports = Blocks;
@@ -11270,12 +11284,17 @@
 	var Thread = __webpack_require__(64);
 	var util = __webpack_require__(2);
 
+	// Virtual I/O devices.
+	var Clock = __webpack_require__(66);
+	var Mouse = __webpack_require__(67);
+
 	var defaultBlockPackages = {
-	    'scratch3_control': __webpack_require__(66),
-	    'scratch3_event': __webpack_require__(77),
-	    'scratch3_looks': __webpack_require__(78),
-	    'scratch3_motion': __webpack_require__(79),
-	    'scratch3_operators': __webpack_require__(80)
+	    'scratch3_control': __webpack_require__(68),
+	    'scratch3_event': __webpack_require__(79),
+	    'scratch3_looks': __webpack_require__(80),
+	    'scratch3_motion': __webpack_require__(81),
+	    'scratch3_operators': __webpack_require__(82),
+	    'scratch3_sensing': __webpack_require__(84)
 	};
 
 	/**
@@ -11310,6 +11329,11 @@
 	     */
 	    this._primitives = {};
 	    this._registerBlockPackages();
+
+	    this.ioDevices = {
+	        'clock': new Clock(),
+	        'mouse': new Mouse()
+	    };
 	}
 
 	/**
@@ -11962,7 +11986,14 @@
 	        startBranch: function (branchNum) {
 	            sequencer.stepToBranch(thread, branchNum);
 	        },
-	        target: target
+	        target: target,
+	        ioQuery: function (device, func, args) {
+	            // Find the I/O device and execute the query/function call.
+	            if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
+	                var devObject = runtime.ioDevices[device];
+	                return devObject[func].call(devObject, args);
+	            }
+	        }
 	    });
 
 	    // Deal with any reported value.
@@ -12012,7 +12043,68 @@
 /* 66 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Promise = __webpack_require__(67);
+	var Timer = __webpack_require__(63);
+
+	function Clock () {
+	    this._projectTimer = new Timer();
+	    this._projectTimer.start();
+	}
+
+	Clock.prototype.projectTimer = function () {
+	    return this._projectTimer.timeElapsed() / 1000;
+	};
+
+	Clock.prototype.resetProjectTimer = function () {
+	    this._projectTimer.start();
+	};
+
+	module.exports = Clock;
+
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var MathUtil = __webpack_require__(8);
+
+	function Mouse () {
+	    this._x = 0;
+	    this._y = 0;
+	    this._isDown = false;
+	}
+
+	Mouse.prototype.postData = function(data) {
+	    if (data.x) {
+	        this._x = data.x;
+	    }
+	    if (data.y) {
+	        this._y = data.y;
+	    }
+	    if (typeof data.isDown !== 'undefined') {
+	        this._isDown = data.isDown;
+	    }
+	};
+
+	Mouse.prototype.getX = function () {
+	    return MathUtil.clamp(this._x, -240, 240);
+	};
+
+	Mouse.prototype.getY = function () {
+	    return MathUtil.clamp(-this._y, -180, 180);
+	};
+
+	Mouse.prototype.getIsDown = function () {
+	    return this._isDown;
+	};
+
+	module.exports = Mouse;
+
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Promise = __webpack_require__(69);
 
 	function Scratch3ControlBlocks(runtime) {
 	    /**
@@ -12129,36 +12221,36 @@
 	module.exports = Scratch3ControlBlocks;
 
 
-/***/ },
-/* 67 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(68)
-
-
-/***/ },
-/* 68 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(69);
-	__webpack_require__(71);
-	__webpack_require__(72);
-	__webpack_require__(73);
-	__webpack_require__(74);
-	__webpack_require__(76);
-
-
 /***/ },
 /* 69 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var asap = __webpack_require__(70);
+	module.exports = __webpack_require__(70)
+
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	module.exports = __webpack_require__(71);
+	__webpack_require__(73);
+	__webpack_require__(74);
+	__webpack_require__(75);
+	__webpack_require__(76);
+	__webpack_require__(78);
+
+
+/***/ },
+/* 71 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var asap = __webpack_require__(72);
 
 	function noop() {}
 
@@ -12372,7 +12464,7 @@
 
 
 /***/ },
-/* 70 */
+/* 72 */
 /***/ function(module, exports) {
 
 	/* WEBPACK VAR INJECTION */(function(global) {"use strict";
@@ -12599,12 +12691,12 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
 
 /***/ },
-/* 71 */
+/* 73 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var Promise = __webpack_require__(69);
+	var Promise = __webpack_require__(71);
 
 	module.exports = Promise;
 	Promise.prototype.done = function (onFulfilled, onRejected) {
@@ -12618,12 +12710,12 @@
 
 
 /***/ },
-/* 72 */
+/* 74 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var Promise = __webpack_require__(69);
+	var Promise = __webpack_require__(71);
 
 	module.exports = Promise;
 	Promise.prototype['finally'] = function (f) {
@@ -12640,14 +12732,14 @@
 
 
 /***/ },
-/* 73 */
+/* 75 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
 	//This file contains the ES6 extensions to the core Promises/A+ API
 
-	var Promise = __webpack_require__(69);
+	var Promise = __webpack_require__(71);
 
 	module.exports = Promise;
 
@@ -12753,7 +12845,7 @@
 
 
 /***/ },
-/* 74 */
+/* 76 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
@@ -12761,8 +12853,8 @@
 	// This file contains then/promise specific extensions that are only useful
 	// for node.js interop
 
-	var Promise = __webpack_require__(69);
-	var asap = __webpack_require__(75);
+	var Promise = __webpack_require__(71);
+	var asap = __webpack_require__(77);
 
 	module.exports = Promise;
 
@@ -12889,13 +12981,13 @@
 
 
 /***/ },
-/* 75 */
+/* 77 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	// rawAsap provides everything we need except exception management.
-	var rawAsap = __webpack_require__(70);
+	var rawAsap = __webpack_require__(72);
 	// RawTasks are recycled to reduce GC churn.
 	var freeTasks = [];
 	// We queue errors to ensure they are thrown in right order (FIFO).
@@ -12961,12 +13053,12 @@
 
 
 /***/ },
-/* 76 */
+/* 78 */
 /***/ function(module, exports, __webpack_require__) {
 
 	'use strict';
 
-	var Promise = __webpack_require__(69);
+	var Promise = __webpack_require__(71);
 
 	module.exports = Promise;
 	Promise.enableSynchronous = function () {
@@ -13029,7 +13121,7 @@
 
 
 /***/ },
-/* 77 */
+/* 79 */
 /***/ function(module, exports) {
 
 	function Scratch3EventBlocks(runtime) {
@@ -13069,7 +13161,7 @@
 
 
 /***/ },
-/* 78 */
+/* 80 */
 /***/ function(module, exports) {
 
 	function Scratch3LooksBlocks(runtime) {
@@ -13173,7 +13265,7 @@
 
 
 /***/ },
-/* 79 */
+/* 81 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var MathUtil = __webpack_require__(8);
@@ -13262,8 +13354,10 @@
 
 
 /***/ },
-/* 80 */
-/***/ function(module, exports) {
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(83);
 
 	function Scratch3OperatorsBlocks(runtime) {
 	    /**
@@ -13294,61 +13388,63 @@
 	        'operator_and': this.and,
 	        'operator_or': this.or,
 	        'operator_not': this.not,
-	        'operator_random': this.random
+	        '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_menu': this.mathopMenu,
+	        'operator_mathop': this.mathop
 	    };
 	};
 
 	Scratch3OperatorsBlocks.prototype.number = function (args) {
-	    var num = Number(args.NUM);
-	    if (num !== num) {
-	        // NaN
-	        return 0;
-	    }
-	    return num;
+	    return Cast.toNumber(args.NUM);
 	};
 
 	Scratch3OperatorsBlocks.prototype.text = function (args) {
-	    return String(args.TEXT);
+	    return Cast.toString(args.TEXT);
 	};
 
 	Scratch3OperatorsBlocks.prototype.add = function (args) {
-	    return args.NUM1 + args.NUM2;
+	    return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.subtract = function (args) {
-	    return args.NUM1 - args.NUM2;
+	    return Cast.toNumber(args.NUM1) - Cast.toNumber(args.NUM2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.multiply = function (args) {
-	    return args.NUM1 * args.NUM2;
+	    return Cast.toNumber(args.NUM1) * Cast.toNumber(args.NUM2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.divide = function (args) {
-	    return args.NUM1 / args.NUM2;
+	    return Cast.toNumber(args.NUM1) / Cast.toNumber(args.NUM2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.lt = function (args) {
-	    return Boolean(args.OPERAND1 < args.OPERAND2);
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) < 0;
 	};
 
 	Scratch3OperatorsBlocks.prototype.equals = function (args) {
-	    return Boolean(args.OPERAND1 == args.OPERAND2);
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) == 0;
 	};
 
 	Scratch3OperatorsBlocks.prototype.gt = function (args) {
-	    return Boolean(args.OPERAND1 > args.OPERAND2);
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) > 0;
 	};
 
 	Scratch3OperatorsBlocks.prototype.and = function (args) {
-	    return Boolean(args.OPERAND1 && args.OPERAND2);
+	    return Cast.toBoolean(args.OPERAND1 && args.OPERAND2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.or = function (args) {
-	    return Boolean(args.OPERAND1 || args.OPERAND2);
+	    return Cast.toBoolean(args.OPERAND1 || args.OPERAND2);
 	};
 
 	Scratch3OperatorsBlocks.prototype.not = function (args) {
-	    return Boolean(!args.OPERAND);
+	    return Cast.toBoolean(!args.OPERAND);
 	};
 
 	Scratch3OperatorsBlocks.prototype.random = function (args) {
@@ -13364,8 +13460,208 @@
 	    return (Math.random() * (high - low)) + low;
 	};
 
+	Scratch3OperatorsBlocks.prototype.join = function (args) {
+	    return Cast.toString(args.STRING1) + Cast.toString(args.STRING2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
+	    var index = Cast.toNumber(args.LETTER) - 1;
+	    var str = Cast.toString(args.STRING);
+	    // Out of bounds?
+	    if (index < 0 || index >= str.length) {
+	        return '';
+	    }
+	    return str.charAt(index);
+	};
+
+	Scratch3OperatorsBlocks.prototype.length = function (args) {
+	    return Cast.toString(args.STRING).length;
+	};
+
+	Scratch3OperatorsBlocks.prototype.mod = function (args) {
+	    var n = Cast.toNumber(args.NUM1);
+	    var modulus = Cast.toNumber(args.NUM2);
+	    var result = n % modulus;
+	    // Scratch mod is kept positive.
+	    if (result / modulus < 0) result += modulus;
+	    return result;
+	};
+
+	Scratch3OperatorsBlocks.prototype.round = function (args) {
+	    return Math.round(Cast.toNumber(args.NUM));
+	};
+
+	Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
+	    return args.OPERATOR;
+	};
+
+	Scratch3OperatorsBlocks.prototype.mathop = function (args) {
+	    var operator = Cast.toString(args.OPERATOR).toLowerCase();
+	    var n = Cast.toNumber(args.NUM);
+	    switch (operator) {
+	    case 'abs': return Math.abs(n);
+	    case 'floor': return Math.floor(n);
+	    case 'ceiling': return Math.ceil(n);
+	    case 'sqrt': return Math.sqrt(n);
+	    case 'sin': return Math.sin((Math.PI * n) / 180);
+	    case 'cos': return Math.cos((Math.PI * n) / 180);
+	    case 'tan': return Math.tan((Math.PI * n) / 180);
+	    case 'asin': return (Math.asin(n) * 180) / Math.PI;
+	    case 'acos': return (Math.acos(n) * 180) / Math.PI;
+	    case 'atan': return (Math.atan(n) * 180) / Math.PI;
+	    case 'ln': return Math.log(n);
+	    case 'log': return Math.log(n) / Math.LN10;
+	    case 'e ^': return Math.exp(n);
+	    case '10 ^': return Math.pow(10, n);
+	    }
+	    return 0;
+	};
+
 	module.exports = Scratch3OperatorsBlocks;
 
 
+/***/ },
+/* 83 */
+/***/ function(module, exports) {
+
+	function Cast () {}
+
+	/**
+	 * @fileoverview
+	 * Utilities for casting and comparing Scratch data-types.
+	 * Scratch behaves slightly differently from JavaScript in many respects,
+	 * and these differences should be encapsulated below.
+	 * For example, in Scratch, add(1, join("hello", world")) -> 1.
+	 * This is because "hello world" is cast to 0.
+	 * In JavaScript, 1 + Number("hello" + "world") would give you NaN.
+	 * Use when coercing a value before computation.
+	 */
+
+	/**
+	 * Scratch cast to number.
+	 * Treats NaN as 0.
+	 * In Scratch 2.0, this is captured by `interp.numArg.`
+	 * @param {*} value Value to cast to number.
+	 * @return {number} The Scratch-casted number value.
+	 */
+	Cast.toNumber = function (value) {
+	    var n = Number(value);
+	    if (isNaN(n)) {
+	        // Scratch treats NaN as 0, when needed as a number.
+	        // E.g., 0 + NaN -> 0.
+	        return 0;
+	    }
+	    return n;
+	};
+
+	/**
+	 * Scratch cast to boolean.
+	 * In Scratch 2.0, this is captured by `interp.boolArg.`
+	 * Treats some string values differently from JavaScript.
+	 * @param {*} value Value to cast to boolean.
+	 * @return {boolean} The Scratch-casted boolean value.
+	 */
+	Cast.toBoolean = function (value) {
+	    // Already a boolean?
+	    if (typeof value === 'boolean') {
+	        return value;
+	    }
+	    if (typeof value === 'string') {
+	        // These specific strings are treated as false in Scratch.
+	        if ((value == '') ||
+	            (value == '0') ||
+	            (value.toLowerCase() == 'false')) {
+	            return false;
+	        }
+	        // All other strings treated as true.
+	        return true;
+	    }
+	    // Coerce other values and numbers.
+	    return Boolean(value);
+	};
+
+	/**
+	 * Scratch cast to string.
+	 * @param {*} value Value to cast to string.
+	 * @return {string} The Scratch-casted string value.
+	 */
+	Cast.toString = function (value) {
+	    return String(value);
+	};
+
+	/**
+	 * Compare two values, using Scratch cast, case-insensitive string compare, etc.
+	 * In Scratch 2.0, this is captured by `interp.compare.`
+	 * @param {*} v1 First value to compare.
+	 * @param {*} v2 Second value to compare.
+	 * @returns {Number} Negative number if v1 < v2; 0 if equal; positive otherwise.
+	 */
+	Cast.compare = function (v1, v2) {
+	    var n1 = Number(v1);
+	    var n2 = Number(v2);
+	    if (isNaN(n1) || isNaN(n2)) {
+	        // At least one argument can't be converted to a number.
+	        // Scratch compares strings as case insensitive.
+	        var s1 = String(v1).toLowerCase();
+	        var s2 = String(v2).toLowerCase();
+	        return s1.localeCompare(s2);
+	    } else {
+	        // Compare as numbers.
+	        return n1 - n2;
+	    }
+	};
+
+	module.exports = Cast;
+
+
+/***/ },
+/* 84 */
+/***/ function(module, exports) {
+
+	function Scratch3SensingBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3SensingBlocks.prototype.getPrimitives = function() {
+	    return {
+	        'sensing_timer': this.getTimer,
+	        'sensing_resettimer': this.resetTimer,
+	        'sensing_mousex': this.getMouseX,
+	        'sensing_mousey': this.getMouseY,
+	        'sensing_mousedown': this.getMouseDown
+	    };
+	};
+
+	Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
+	    return util.ioQuery('clock', 'projectTimer');
+	};
+
+	Scratch3SensingBlocks.prototype.resetTimer = function (args, util) {
+	    util.ioQuery('clock', 'resetProjectTimer');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseX = function (args, util) {
+	    return util.ioQuery('mouse', 'getX');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseY = function (args, util) {
+	    return util.ioQuery('mouse', 'getY');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
+	    return util.ioQuery('mouse', 'getIsDown');
+	};
+
+	module.exports = Scratch3SensingBlocks;
+
+
 /***/ }
 /******/ ]);
\ No newline at end of file
diff --git a/vm.min.js b/vm.min.js
index c98a6b251..3b039864b 100644
--- a/vm.min.js
+++ b/vm.min.js
@@ -1,10 +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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return f(t,r,n,g,e,b)}),t.seen.pop(),p(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)D(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 p(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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var O=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(O,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var B,N={};e.debuglog=function(t){if(w(B)&&(B=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){var r=n.pid;N[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else N[t]=function(){};return N[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleScript(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addScript(t.id):(this._deleteScript(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},n.prototype._deleteStack=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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var f=s.attribs.name,p="";p=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[f]={name:f,value:p};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,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 c=r(15),u=r(17),h=r(18),l=r(19),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,S=f++,E=f++,k=f++,x=f++,T=f++,A=f++,L=f++,I=f++,R=f++,D=f++,O=f++,B=f++,N=f++,C=f++,q=f++,U=f++,P=f++,M=f++,F=f++,j=f++,G=f++,V=f++,Y=f++,z=f++,H=f++,W=f++,X=f++,K=f++,J=f++,Z=f++,Q=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,st=f++,at=f++,ct=f++,ut=f++,ht=f++,lt=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=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=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,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=p:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?N:"-"===t?R:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=D,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=O)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=B:this._state=D},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=D)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",q,L),a.prototype._stateBeforeCdata3=o("A",U,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",M,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=z:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=ot:this._state=J;
-},a.prototype._stateBeforeScript1=s("R",H),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",X),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Z,p),a.prototype._stateAfterScript2=o("I",Q,p),a.prototype._stateAfterScript3=o("P",$,p),a.prototype._stateAfterScript4=o("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,p),a.prototype._stateAfterStyle2=o("L",at,p),a.prototype._stateAfterStyle3=o("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=o("#",ht,lt),a.prototype._stateBeforeNumericEntity=o("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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===p?(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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===E?this._stateBeforeAttributeValue(t):this._state===k?this._stateInAttributeValueDoubleQuotes(t):this._state===x?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===I?this._stateInProcessingInstruction(t):this._state===R?this._stateBeforeComment(t):this._state===D?this._stateInComment(t):this._state===O?this._stateAfterComment1(t):this._state===B?this._stateAfterComment2(t):this._state===N?this._stateBeforeCdata1(t):this._state===C?this._stateBeforeCdata2(t):this._state===q?this._stateBeforeCdata3(t):this._state===U?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===M?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===V?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===z?this._stateBeforeScript1(t):this._state===H?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Z?this._stateAfterScript2(t):this._state===Q?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===D||this._state===O||this._state===B?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==E&&this._state!==S&&this._state!==w&&this._state!==x&&this._state!==k&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(16);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(21),o=/\s+/g,s=r(22),a=r(23),c={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(22),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 h.getElementsByTagName(t,e,!0)}function o(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(12),u=c.DomHandler,h=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(l,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,u.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(26);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(12).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(13),o=r(27).Writable||r(46).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(28),n.Writable=r(42),n.Duplex=r(43),n.Transform=r(44),n.PassThrough=r(45),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(29),e.Stream=r(27),e.Readable=e,e.Writable=r(38),e.Duplex=r(37),e.Transform=r(40),e.PassThrough=r(41),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(27))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(37);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&&(L||(L=r(39).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(37);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||h(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&&l(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=R)t=R;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(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,l(t)}function l(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){I("emit readable"),t.emit("readable"),b(t)}function p(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<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&x.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):k.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new k(t);for(var c=0,u=0,h=n.length;h>u&&t>c;u++){var a=n[0],l=Math.min(t-c,a.length);o?r+=a.slice(0,l):a.copy(r,c,0,l),l<a.length?n[0]=a.slice(l):n.shift(),c+=l}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var E=r(30),k=r(31).Buffer;i.ReadableState=n;var x=r(1).EventEmitter;x.listenerCount||(x.listenerCount=function(t,e){return t.listeners(e).length});var T=r(27),A=r(35);A.inherits=r(5);var L,I=r(36);I=I&&I.debuglog?I.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new k(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(39).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):l(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){I("onunpipe"),t===l&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function a(e){I("onerror",e),h(),t.removeListener("error",a),0===x.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),h()}function u(){I("onfinish"),t.removeListener("close",c),h()}function h(){I("unpipe"),l.unpipe(t)}var l=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,I("pipe count=%d opts=%j",f.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;f.endEmitted?e.nextTick(d):l.once("end",d),t.on("unpipe",n);var _=g(l);return t.on("drain",_),l.on("data",s),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",l),f.flowing||(I("pipe resume"),l.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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.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)},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;case"postIOData":self.vmInstance.postIOData(e.device,e.data);break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return p(t,r,n,g,e,b)}),t.seen.pop(),f(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)R(e,String(s))?o.push(p(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var N=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(N,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var O,B={};e.debuglog=function(t){if(w(O)&&(O=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!B[t])if(new RegExp("\\b"+t+"\\b","i").test(O)){var r=n.pid;B[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else B[t]=function(){};return B[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",D(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleScript(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addScript(t.id):(this._deleteScript(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteScript(t.id),delete this._blocks[t.id]},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var p=s.attribs.name,f="";f=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[p]={name:p,value:f};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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 c=r(15),u=r(17),h=r(18),l=r(19),p=0,f=p++,d=p++,g=p++,_=p++,m=p++,b=p++,y=p++,v=p++,w=p++,S=p++,E=p++,k=p++,x=p++,T=p++,A=p++,L=p++,I=p++,D=p++,R=p++,N=p++,O=p++,B=p++,C=p++,M=p++,q=p++,P=p++,U=p++,F=p++,j=p++,G=p++,Y=p++,V=p++,z=p++,H=p++,W=p++,X=p++,K=p++,J=p++,Q=p++,Z=p++,$=p++,tt=p++,et=p++,rt=p++,nt=p++,it=p++,ot=p++,st=p++,at=p++,ct=p++,ut=p++,ht=p++,lt=p++,pt=p++,ft=p++,dt=0,gt=dt++,_t=dt++,mt=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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:Y,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=V:(this._state=f,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,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=_: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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?B:"-"===t?D:L},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=R,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=N)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=O:this._state=R},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=R)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",M,L),a.prototype._stateBeforeCdata3=o("A",q,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=z:"t"===t||"T"===t?this._state=et:(this._state=g,
+this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=J},a.prototype._stateBeforeScript1=s("R",H),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",X),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),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=b,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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ct,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",ht,lt),a.prototype._stateBeforeNumericEntity=o("X",ft,pt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===E?this._stateBeforeAttributeValue(t):this._state===k?this._stateInAttributeValueDoubleQuotes(t):this._state===x?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===I?this._stateInProcessingInstruction(t):this._state===D?this._stateBeforeComment(t):this._state===R?this._stateInComment(t):this._state===N?this._stateAfterComment1(t):this._state===O?this._stateAfterComment2(t):this._state===B?this._stateBeforeCdata1(t):this._state===C?this._stateBeforeCdata2(t):this._state===M?this._stateBeforeCdata3(t):this._state===q?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===Y?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===z?this._stateBeforeScript1(t):this._state===H?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===pt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===R||this._state===N||this._state===O?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==E&&this._state!==S&&this._state!==w&&this._state!==x&&this._state!==k&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(16);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(21),o=/\s+/g,s=r(22),a=r(23),c={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(22),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 h.getElementsByTagName(t,e,!0)}function o(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(12),u=c.DomHandler,h=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(l,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,u.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(26);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(12).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(13),o=r(27).Writable||r(46).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(28),n.Writable=r(42),n.Duplex=r(43),n.Transform=r(44),n.PassThrough=r(45),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(29),e.Stream=r(27),e.Readable=e,e.Writable=r(38),e.Duplex=r(37),e.Transform=r(40),e.PassThrough=r(41),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(27))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(37);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&&(L||(L=r(39).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(37);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||h(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&&l(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=D)t=D;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(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,l(t)}function l(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){p(t)}):p(t))}function p(t){I("emit readable"),t.emit("readable"),b(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<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&x.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):k.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new k(t);for(var c=0,u=0,h=n.length;h>u&&t>c;u++){var a=n[0],l=Math.min(t-c,a.length);o?r+=a.slice(0,l):a.copy(r,c,0,l),l<a.length?n[0]=a.slice(l):n.shift(),c+=l}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var E=r(30),k=r(31).Buffer;i.ReadableState=n;var x=r(1).EventEmitter;x.listenerCount||(x.listenerCount=function(t,e){return t.listeners(e).length});var T=r(27),A=r(35);A.inherits=r(5);var L,I=r(36);I=I&&I.debuglog?I.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new k(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(39).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var D=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):l(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){I("onunpipe"),t===l&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",s),!p.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function a(e){I("onerror",e),h(),t.removeListener("error",a),0===x.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),h()}function u(){I("onfinish"),t.removeListener("close",c),h()}function h(){I("unpipe"),l.unpipe(t)}var l=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,I("pipe count=%d opts=%j",p.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;p.endEmitted?e.nextTick(d):l.once("end",d),t.on("unpipe",n);var _=g(l);return t.on("drain",_),l.on("data",s),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",l),p.flowing||(I("pipe resume"),l.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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(J(r))return h(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return l(e,r);if(r instanceof ArrayBuffer)return f(e,r)}return r.length?p(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=l(e,new Uint8Array(r)),e}function p(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Z),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return I(this,e,r);case"binary":return R(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(V(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(Y(e),t,r,n)}function E(t,e,r,n){return S(t,e,r,n)}function k(t,e,r,n){return W(H(e),t,r,n)}function x(t,e,r,n){return W(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,h,l;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&o)<<6|63&c,l>127&&(s=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&o)<<12|(63&c)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&1114112>l&&(s=l))}}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 L(n)}function L(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Q));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function C(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function q(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function F(t){if(t=j(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"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;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 Y(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return X.toByteArray(F(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var X=r(32),K=r(33),J=r(34);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Z={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return E(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||B(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||B(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||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||B(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||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||B(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||B(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||B(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||B(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||B(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||N(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||N(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||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(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);N(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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);N(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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||N(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||N(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):q(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||N(this,e,r,4,2147483647,-2147483648),0>e&&(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):q(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return M(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=V(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(31).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===l?62:e===a||e===f?63:c>e?-1:c+10>e?e-c+26+26:h+26>e?e-h:u+26>e?e-u+26:void 0}function r(t){function r(t){u[l++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;c="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),h="A".charCodeAt(0),l="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+l],l+=f,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+l>=1?f/c:f*Math.pow(2,1-l),e*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=h,e.isObject=l,e.isDate=f,e.isError=p,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(31).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(35);a.inherits=r(5);var c=r(29),u=r(38);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(37);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(37);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function l(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function f(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(f(n),r)l(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(h(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(31).Buffer;o.WritableState=i;var S=r(35);S.inherits=r(5);var E=r(27);S.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(31).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(37),c=r(35);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(40),o=r(35);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(37)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(41)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(49),r(55),r(56),r(57),r(58),r(59)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(21),s=r(50),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 f||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(p,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(p,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),f=i(l);e.HTML=a(l,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:f,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages()}var i=r(1),o=r(62),s=r(64),a=r(2),c={scratch3_control:r(66),scratch3_event:r(77),scratch3_looks:r(78),scratch3_motion:r(79),scratch3_operators:r(80)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in c)if(c.hasOwnProperty(t)){var e=new c[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleScript=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getScripts(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var f=i.blocks.getInputs(o);for(var p in f){var d=f[p],g=d.block;if("undefined"==typeof s.reported[p]){var _=t.stepToReporter(e,g,p);if(_)return}u[p]=s.reported[p]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(t){this.runtime=t}var i=r(67);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(68)},function(t,e,r){"use strict";t.exports=r(69),r(71),r(72),r(73),r(74),r(76)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):f(e.promise,t._65));var n=o(r,t._65);n===b?f(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return f(t,m);if(r===t.then&&e instanceof a)return t._81=3,t._65=e,void p(t);if("function"==typeof r)return void g(r.bind(e),t)}t._81=1,t._65=e,p(t)}function f(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),p(t)}function p(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,f(e,t))});r||n!==b||(r=!0,f(e,m))}var _=r(70),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(69);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(69);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(69),s=r(75);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(c.length)throw c.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(70),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(69);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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}},r.prototype.number=function(t){var e=Number(t.NUM);return e!==e?0:e},r.prototype.text=function(t){return String(t.TEXT)},r.prototype.add=function(t){return t.NUM1+t.NUM2},r.prototype.subtract=function(t){return t.NUM1-t.NUM2},r.prototype.multiply=function(t){return t.NUM1*t.NUM2},r.prototype.divide=function(t){return t.NUM1/t.NUM2},r.prototype.lt=function(t){return Boolean(t.OPERAND1<t.OPERAND2)},r.prototype.equals=function(t){return Boolean(t.OPERAND1==t.OPERAND2)},r.prototype.gt=function(t){return Boolean(t.OPERAND1>t.OPERAND2)},r.prototype.and=function(t){return Boolean(t.OPERAND1&&t.OPERAND2)},r.prototype.or=function(t){return Boolean(t.OPERAND1||t.OPERAND2)},r.prototype.not=function(t){return Boolean(!t.OPERAND)},r.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},t.exports=r}]);
\ No newline at end of file
+"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(J(r))return h(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return l(e,r);if(r instanceof ArrayBuffer)return p(e,r)}return r.length?f(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function p(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=l(e,new Uint8Array(r)),e}function f(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return Y(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return I(this,e,r);case"binary":return D(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(Y(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function E(t,e,r,n){return S(t,e,r,n)}function k(t,e,r,n){return W(H(e),t,r,n)}function x(t,e,r,n){return W(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,h,l;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&o)<<6|63&c,l>127&&(s=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&o)<<12|(63&c)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&1114112>l&&(s=l))}}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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function N(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)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 must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function C(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function F(t){if(t=j(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"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;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return X.toByteArray(F(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var X=r(32),K=r(33),J=r(34);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return E(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||O(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||O(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||O(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||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||O(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||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||O(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||O(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||O(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||O(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||O(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||B(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||B(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&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):C(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):C(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):M(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):M(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>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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)),0>e&&(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):C(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):C(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):M(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),0>e&&(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):M(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=Y(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(31).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===l?62:e===a||e===p?63:c>e?-1:c+10>e?e-c+26+26:h+26>e?e-h:u+26>e?e-u+26:void 0}function r(t){function r(t){u[l++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;c="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),h="A".charCodeAt(0),l="-".charCodeAt(0),p="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,p=r?-1:1,f=t[e+l];for(l+=p,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+l],l+=p,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+l>=1?p/c:p*Math.pow(2,1-l),e*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+f]=255&s,f+=d,s/=256,u-=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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function p(t){return"[object Date]"===_(t)}function f(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=h,e.isObject=l,e.isDate=p,e.isError=f,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(31).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(35);a.inherits=r(5);var c=r(29),u=r(38);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(37);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(37);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function l(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function p(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(p(n),r)l(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(h(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(31).Buffer;o.WritableState=i;var S=r(35);S.inherits=r(5);var E=r(27);S.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(31).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(37),c=r(35);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(40),o=r(35);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(37)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(41)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(49),r(55),r(56),r(57),r(58),r(59)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(21),s=r(50),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
+}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 p||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(f,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),p=i(l);e.HTML=a(l,p);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),p=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:p,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages(),this.ioDevices={clock:new c,mouse:new u}}var i=r(1),o=r(62),s=r(64),a=r(2),c=r(66),u=r(67),h={scratch3_control:r(68),scratch3_event:r(79),scratch3_looks:r(80),scratch3_motion:r(81),scratch3_operators:r(82),scratch3_sensing:r(84)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleScript=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getScripts(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var p=i.blocks.getInputs(o);for(var f in p){var d=p[f],g=d.block;if("undefined"==typeof s.reported[f]){var _=t.stepToReporter(e,g,f);if(_)return}u[f]=s.reported[f]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i,ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(63);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(){this._x=0,this._y=0,this._isDown=!1}var i=r(8);n.prototype.postData=function(t){t.x&&(this._x=t.x),t.y&&(this._y=t.y),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown)},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(69);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(70)},function(t,e,r){"use strict";t.exports=r(71),r(73),r(74),r(75),r(76),r(78)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):p(e.promise,t._65));var n=o(r,t._65);n===b?p(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return p(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return p(t,m);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 p(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,p(e,t))});r||n!==b||(r=!0,p(e,m))}var _=r(72),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(71);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(71);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(71);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(71),s=r(77);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(c.length)throw c.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(72),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(71);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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(83);n.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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_menu:this.mathopMenu,operator_mathop:this.mathop}},n.prototype.number=function(t){return i.toNumber(t.NUM)},n.prototype.text=function(t){return i.toString(t.TEXT)},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&&t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1||t.OPERAND2)},n.prototype.not=function(t){return i.toBoolean(!t.OPERAND)},n.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},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 0>e||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 0>n/r&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathopMenu=function(t){return t.OPERATOR},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){function r(){}r.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},r.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},r.toString=function(t){return String(t)},r.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=r},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown}},r.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},r.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},r.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},r.prototype.getMouseY=function(t,e){
+return e.ioQuery("mouse","getY")},r.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},t.exports=r}]);
\ No newline at end of file
diff --git a/vm.worker.js b/vm.worker.js
index 68443dd5c..efdd8771a 100644
--- a/vm.worker.js
+++ b/vm.worker.js
@@ -97,6 +97,14 @@
 	    this.vmWorker.postMessage({method: 'getPlaygroundData'});
 	};
 
+	VirtualMachine.prototype.postIOData = function (device, data) {
+	    this.vmWorker.postMessage({
+	        method: 'postIOData',
+	        device: device,
+	        data: data
+	    });
+	};
+
 	VirtualMachine.prototype.start = function () {
 	    this.vmWorker.postMessage({method: 'start'});
 	};

From 94e389c8fb61c7a38ff62bed23e01f8fbc2155e4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 15:47:21 -0400
Subject: [PATCH 169/302] Refactor script glowing into its own runtime function

---
 src/engine/runtime.js | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index d244544aa..8a347a0c2 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -135,12 +135,14 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
 /**
  * Create a thread and push it to the list of threads.
  * @param {!string} id ID of block that starts the stack
+ * @return {!Thread} The newly created thread.
  */
 Runtime.prototype._pushThread = function (id) {
-    this.emit(Runtime.STACK_GLOW_ON, id);
     var thread = new Thread(id);
+    this.glowScript(id, true);
     thread.pushStack(id);
     this.threads.push(thread);
+    return thread;
 };
 
 /**
@@ -150,7 +152,7 @@ Runtime.prototype._pushThread = function (id) {
 Runtime.prototype._removeThread = function (thread) {
     var i = this.threads.indexOf(thread);
     if (i > -1) {
-        this.emit(Runtime.STACK_GLOW_OFF, thread.topBlock);
+        this.glowScript(thread.topBlock, false);
         this.threads.splice(i, 1);
     }
 };
@@ -234,6 +236,19 @@ Runtime.prototype.glowBlock = function (blockId, isGlowing) {
     }
 };
 
+/**
+ * Emit feedback for script glowing.
+ * @param {?string} topBlockId ID for the top block to update glow
+ * @param {boolean} isGlowing True to turn on glow; false to turn off.
+ */
+Runtime.prototype.glowScript = function (topBlockId, isGlowing) {
+    if (isGlowing) {
+        this.emit(Runtime.STACK_GLOW_ON, topBlockId);
+    } else {
+        this.emit(Runtime.STACK_GLOW_OFF, topBlockId);
+    }
+};
+
 /**
  * Emit value for reporter to show in the blocks.
  * @param {string} blockId ID for the block.

From 43f3b59f7c0c8e5d3b12305a57fcae915fbf3b9c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 15:53:34 -0400
Subject: [PATCH 170/302] Add `retireThread` to seqeuencer

---
 src/engine/sequencer.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 73126a227..11b134b53 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -166,4 +166,14 @@ Sequencer.prototype.proceedThread = function (thread) {
     }
 };
 
+/**
+ * Retire a thread in the middle, without considering further blocks.
+ * @param {!Thread} thread Thread object to retire.
+ */
+Sequencer.prototype.retireThread = function (thread) {
+    thread.stack = [];
+    thread.stackFrame = [];
+    thread.setStatus(Thread.STATUS_DONE);
+};
+
 module.exports = Sequencer;

From 39fdbaf98354c6807e772178092f72cad95d3e29 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 18:12:19 -0400
Subject: [PATCH 171/302] Add atStackTop helper to Thread

---
 src/engine/thread.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/engine/thread.js b/src/engine/thread.js
index d1bd73fc0..07a98b862 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -123,6 +123,14 @@ Thread.prototype.pushReportedValue = function (value) {
     }
 };
 
+/**
+ * Whether the current execution of a thread is at the top of the stack.
+ * @return {Boolean} True if execution is at top of the stack.
+ */
+Thread.prototype.atStackTop = function () {
+    return this.peekStack() === this.topBlock;
+};
+
 /**
  * Set thread status.
  * @param {number} status Enum representing thread status.

From b4cf64009fb4205022d14caf177683a0316aefbf Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 18:12:32 -0400
Subject: [PATCH 172/302] General-purpose hat implementation

---
 src/engine/execute.js | 105 ++++++++++++++++++-------
 src/engine/runtime.js | 173 +++++++++++++++++++++++++++++++++++++-----
 2 files changed, 232 insertions(+), 46 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index d885a6c58..3ab78752d 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -1,5 +1,14 @@
 var Thread = require('./thread');
 
+/**
+ * Utility function to determine if a value is a Promise.
+ * @param {*} value Value to check for a Promise.
+ * @return {Boolean} True if the value appears to be a Promise.
+ */
+var isPromise = function (value) {
+    return value && value.then && typeof value.then === 'function';
+};
+
 /**
  * Execute a block.
  * @param {!Sequencer} sequencer Which sequencer is executing.
@@ -21,9 +30,28 @@ var execute = function (sequencer, thread) {
     }
 
     var blockFunction = runtime.getOpcodeFunction(opcode);
-    if (!blockFunction) {
-        console.warn('Could not get implementation for opcode: ' + opcode);
-        return;
+    var isHat = runtime.getIsHat(opcode);
+
+    // Hats are implemented slightly differently from regular blocks.
+    // If they have an associated block function, it's treated as a predicate;
+    // if not, execution will proceed right through it (as a no-op).
+    if (isHat) {
+        var nextBlock = target.blocks.getNextBlock(currentBlockId);
+        if (!nextBlock) {
+            // Hat with no next block - don't try to evaluate it.
+            sequencer.retireThread(thread);
+            return;
+        }
+        if (!blockFunction) {
+            // No predicate for the hat - just continue to next block.
+            sequencer.proceedThread(thread);
+            return;
+        }
+    } else {
+        if (!blockFunction) {
+            console.warn('Could not get implementation for opcode: ' + opcode);
+            return;
+        }
     }
 
     // Generate values for arguments (inputs).
@@ -63,6 +91,8 @@ var execute = function (sequencer, thread) {
 
     var primitiveReportedValue = null;
     primitiveReportedValue = blockFunction(argValues, {
+        stackFrame: currentStackFrame.executionContext,
+        target: target,
         yield: function() {
             thread.setStatus(Thread.STATUS_YIELD);
         },
@@ -73,11 +103,14 @@ var execute = function (sequencer, thread) {
             thread.setStatus(Thread.STATUS_RUNNING);
             sequencer.proceedThread(thread);
         },
-        stackFrame: currentStackFrame.executionContext,
         startBranch: function (branchNum) {
             sequencer.stepToBranch(thread, branchNum);
         },
-        target: target,
+        triggerHats: function(requestedHat, opt_matchFields, opt_target) {
+            return (
+                runtime.triggerHats(requestedHat, opt_matchFields, opt_target)
+            );
+        },
         ioQuery: function (device, func, args) {
             // Find the I/O device and execute the query/function call.
             if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
@@ -87,28 +120,53 @@ var execute = function (sequencer, thread) {
         }
     });
 
-    // Deal with any reported value.
+    /**
+     * Handle any reported value from the primitive, either directly returned
+     * or after a promise resolves.
+     * @param {*} resolvedValue Value eventually returned from the primitive.
+     */
+    var handleReport = function (resolvedValue) {
+        thread.pushReportedValue(resolvedValue);
+        if (isHat) {
+            // Hat predicate was evaluated.
+            if (runtime.getIsEdgeTriggeredHat(opcode)) {
+                // If this is an edge-triggered hat, only proceed if
+                // the value is true and used to be false.
+                var oldEdgeValue = runtime.updateEdgeTriggeredValue(
+                    currentBlockId,
+                    resolvedValue
+                );
+                var edgeWasTriggered = !oldEdgeValue && resolvedValue;
+                if (!edgeWasTriggered) {
+                    sequencer.retireThread(thread);
+                }
+            } else {
+                // Not an edge-triggered hat: retire the thread
+                // if predicate was false.
+                if (!resolvedValue) {
+                    sequencer.retireThread(thread);
+                }
+            }
+        } else {
+            // In a non-hat, report the value visually if necessary if
+            // at the top of the thread stack.
+            if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
+                runtime.visualReport(currentBlockId, resolvedValue);
+            }
+            // Finished any yields.
+            thread.setStatus(Thread.STATUS_RUNNING);
+        }
+    };
+
     // If it's a promise, wait until promise resolves.
-    var isPromise = (
-        primitiveReportedValue &&
-        primitiveReportedValue.then &&
-        typeof primitiveReportedValue.then === 'function'
-    );
-    if (isPromise) {
+    if (isPromise(primitiveReportedValue)) {
         if (thread.status === Thread.STATUS_RUNNING) {
             // Primitive returned a promise; automatically yield thread.
             thread.setStatus(Thread.STATUS_YIELD);
         }
         // Promise handlers
         primitiveReportedValue.then(function(resolvedValue) {
-            // Promise resolved: the primitive reported a value.
-            thread.pushReportedValue(resolvedValue);
-            // Report the value visually if necessary.
-            if (typeof resolvedValue !== 'undefined' &&
-                thread.peekStack() === thread.topBlock) {
-                runtime.visualReport(thread.peekStack(), resolvedValue);
-            }
-            thread.setStatus(Thread.STATUS_RUNNING);
+            handleReport(resolvedValue);
             sequencer.proceedThread(thread);
         }, function(rejectionReason) {
             // Promise rejected: the primitive had some error.
@@ -118,12 +176,7 @@ var execute = function (sequencer, thread) {
             sequencer.proceedThread(thread);
         });
     } else if (thread.status === Thread.STATUS_RUNNING) {
-        thread.pushReportedValue(primitiveReportedValue);
-        // Report the value visually if necessary.
-        if (typeof primitiveReportedValue !== 'undefined' &&
-            thread.peekStack() === thread.topBlock) {
-            runtime.visualReport(thread.peekStack(), primitiveReportedValue);
-        }
+        handleReport(primitiveReportedValue);
     }
 };
 
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 8a347a0c2..62a083216 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -47,6 +47,8 @@ function Runtime (targets) {
      * @type {Object.<string, Function>}
      */
     this._primitives = {};
+    this._hats = {};
+    this._edgeTriggeredHatValues = {};
     this._registerBlockPackages();
 
     this.ioDevices = {
@@ -109,11 +111,23 @@ Runtime.prototype._registerBlockPackages = function () {
         if (defaultBlockPackages.hasOwnProperty(packageName)) {
             // @todo pass a different runtime depending on package privilege?
             var packageObject = new (defaultBlockPackages[packageName])(this);
-            var packageContents = packageObject.getPrimitives();
-            for (var op in packageContents) {
-                if (packageContents.hasOwnProperty(op)) {
-                    this._primitives[op] =
-                        packageContents[op].bind(packageObject);
+            // Collect primitives from package.
+            if (packageObject.getPrimitives) {
+                var packagePrimitives = packageObject.getPrimitives();
+                for (var op in packagePrimitives) {
+                    if (packagePrimitives.hasOwnProperty(op)) {
+                        this._primitives[op] =
+                            packagePrimitives[op].bind(packageObject);
+                    }
+                }
+            }
+            // Collect hat metadata from package.
+            if (packageObject.getHats) {
+                var packageHats = packageObject.getHats();
+                for (var hatName in packageHats) {
+                    if (packageHats.hasOwnProperty(hatName)) {
+                        this._hats[hatName] = packageHats[hatName];
+                    }
                 }
             }
         }
@@ -132,6 +146,46 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
+/**
+ * Return whether an opcode represents a hat block.
+ * @param {!string} opcode The opcode to look up.
+ * @return {Boolean} True if the op is known to be a hat.
+ */
+Runtime.prototype.getIsHat = function (opcode) {
+    return opcode in this._hats;
+};
+
+/**
+ * Return whether an opcode represents an edge-triggered hat block.
+ * @param {!string} opcode The opcode to look up.
+ * @return {Boolean} True if the op is known to be a edge-triggered hat.
+ */
+Runtime.prototype.getIsEdgeTriggeredHat = function (opcode) {
+    return opcode in this._hats && this._hats[opcode].edgeTriggered;
+};
+
+/**
+ * Update an edge-triggered hat block value.
+ * @param {!string} blockId ID of hat to store value for.
+ * @param {*} newValue Value to store for edge-triggered hat.
+ * @return {*} The old value for the edge-triggered hat.
+ */
+Runtime.prototype.updateEdgeTriggeredValue = function (blockId, newValue) {
+    var oldValue = this._edgeTriggeredHatValues[blockId];
+    this._edgeTriggeredHatValues[blockId] = newValue;
+    return oldValue;
+};
+
+/**
+ * Clear all edge-triggered hat values.
+ */
+Runtime.prototype.clearEdgeTriggeredValues = function () {
+    this._edgeTriggeredHatValues = {};
+};
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+
 /**
  * Create a thread and push it to the list of threads.
  * @param {!string} id ID of block that starts the stack
@@ -150,6 +204,7 @@ Runtime.prototype._pushThread = function (id) {
  * @param {?Thread} thread Thread object to remove from actives
  */
 Runtime.prototype._removeThread = function (thread) {
+    thread.setStatus(Thread.STATUS_DONE);
     var i = this.threads.indexOf(thread);
     if (i > -1) {
         this.glowScript(thread.topBlock, false);
@@ -174,28 +229,99 @@ Runtime.prototype.toggleScript = function (topBlockId) {
 };
 
 /**
- * Green flag, which stops currently running threads
- * and adds all top-level scripts that start with the green flag
+ * Run a function `f` for all scripts in a workspace.
+ * `f` will be called with two parameters:
+ *   -the top block ID of each script
+ *   -the opcode of that block, for convenience.
+ *   -fields on that block, for convenience.
+ * @param {!Function} f Function to call for each script.
+ * @param {Target=} opt_target Optionally, a target to restrict to.
  */
-Runtime.prototype.greenFlag = function () {
-    // Remove all existing threads
-    for (var i = 0; i < this.threads.length; i++) {
-        this._removeThread(this.threads[i]);
+Runtime.prototype.allScriptsDo = function (f, opt_target) {
+    var targets = this.targets;
+    if (opt_target) {
+        targets = [opt_target];
     }
-    // Add all top scripts with green flag
-    for (var t = 0; t < this.targets.length; t++) {
-        var target = this.targets[t];
+    for (var t = 0; t < targets.length; t++) {
+        var target = targets[t];
         var scripts = target.blocks.getScripts();
         for (var j = 0; j < scripts.length; j++) {
             var topBlock = scripts[j];
-            if (target.blocks.getBlock(topBlock).opcode ===
-                'event_whenflagclicked') {
-                this._pushThread(scripts[j]);
-            }
+            var topOpcode = target.blocks.getBlock(topBlock).opcode;
+            var topFields = target.blocks.getFields(topBlock);
+            f(topBlock, topOpcode, topFields);
         }
     }
 };
 
+/**
+ * Trigger all relevant hats.
+ * @param {!string} requestedHat Name of hat to trigger.
+ * @param {Object=} opt_matchFields Optionally, fields to match on the hat.
+ * @param {Target=} opt_target Optionally, a target to restrict to.
+ * @return {Array.<Thread>} List of threads started by this trigger.
+ */
+Runtime.prototype.triggerHats = function (requestedHat,
+    opt_matchFields, opt_target) {
+    var instance = this;
+    var newThreads = [];
+    // Consider all scripts, looking for hats named `requestedHat`.
+    this.allScriptsDo(function(topBlockId, topOpcode, topFields) {
+        if (topOpcode !== requestedHat) {
+            // Not the right hat.
+            return;
+        }
+        // Match any requested fields.
+        // For example: ensures that broadcasts match.
+        // This needs to happen before the block is evaluated
+        // (i.e., before the predicate can be run) because "broadcast and wait"
+        // needs to have a precise collection of triggered threads.
+        if (opt_matchFields) {
+            for (var matchField in opt_matchFields) {
+                if (topFields[matchField].value !==
+                    opt_matchFields[matchField]) {
+                    // Field mismatch.
+                    return;
+                }
+            }
+        }
+        if (instance._hats.hasOwnProperty(topOpcode)) {
+            // Look up metadata for the relevant hat.
+            var hatMeta = instance._hats[topOpcode];
+            if (hatMeta.restartExistingThreads) {
+                // If `restartExistingThreads` is true, this trigger
+                // 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) {
+                        instance._removeThread(instance.threads[i]);
+                    }
+                }
+            } else {
+                // If `restartExistingThreads` is false, this trigger
+                // 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) {
+                        // Some thread is already running.
+                        return;
+                    }
+                }
+            }
+            // Start the thread with this top block.
+            newThreads.push(instance._pushThread(topBlockId));
+        }
+    }, opt_target);
+    return newThreads;
+};
+
+/**
+ * Start all threads that start with the green flag.
+ */
+Runtime.prototype.greenFlag = function () {
+    this.ioDevices.clock.resetProjectTimer();
+    this.clearEdgeTriggeredValues();
+    this.triggerHats('event_whenflagclicked');
+};
+
 /**
  * Stop "everything"
  */
@@ -217,9 +343,16 @@ Runtime.prototype.stopAll = function () {
  * inactive threads after each iteration.
  */
 Runtime.prototype._step = function () {
+    // Find all edge-triggered hats, and add them to threads to be evaluated.
+    for (var hatType in this._hats) {
+        var hat = this._hats[hatType];
+        if (hat.edgeTriggered) {
+            this.triggerHats(hatType);
+        }
+    }
     var inactiveThreads = this.sequencer.stepThreads(this.threads);
-    for (var i = 0; i < inactiveThreads.length; i++) {
-        this._removeThread(inactiveThreads[i]);
+    for (var j = 0; j < inactiveThreads.length; j++) {
+        this._removeThread(inactiveThreads[j]);
     }
 };
 

From fe2ba2a5363e7da9472c668dbb276700604db8e2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 18:14:05 -0400
Subject: [PATCH 173/302] Implementation of timer > _, broadcast, broadcast and
 wait

---
 src/blocks/scratch3_event.js | 74 +++++++++++++++++++++++++++++++-----
 1 file changed, 64 insertions(+), 10 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index 18a5ab621..607923454 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -1,3 +1,5 @@
+var Thread = require('../engine/thread');
+
 function Scratch3EventBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -12,23 +14,75 @@ function Scratch3EventBlocks(runtime) {
  */
 Scratch3EventBlocks.prototype.getPrimitives = function() {
     return {
-        'event_whenflagclicked': this.whenFlagClicked,
-        'event_whenbroadcastreceived': this.whenBroadcastReceived,
-        'event_broadcast': this.broadcast
+        'event_broadcast': this.broadcast,
+        'event_broadcastandwait': this.broadcastAndWait,
+        'event_whengreaterthan': this.hatGreaterThanPredicate
     };
 };
 
-
-Scratch3EventBlocks.prototype.whenFlagClicked = function() {
-    // No-op
+Scratch3EventBlocks.prototype.getHats = function () {
+    return {
+        'event_whenflagclicked': {
+            restartExistingThreads: true
+        },
+        /*'event_whenkeypressed': {
+            restartExistingThreads: false
+        },
+        'event_whenthisspriteclicked': {
+            restartExistingThreads: true
+        },
+        'event_whenbackdropswitchesto': {
+            restartExistingThreads: true
+        },*/
+        'event_whengreaterthan': {
+            restartExistingThreads: false,
+            edgeTriggered: true
+        },
+        'event_whenbroadcastreceived': {
+            restartExistingThreads: true
+        }
+    };
 };
 
-Scratch3EventBlocks.prototype.whenBroadcastReceived = function() {
-    // No-op
+Scratch3EventBlocks.prototype.hatGreaterThanPredicate = function (args, util) {
+    // @todo: Other cases :)
+    if (args.WHENGREATERTHANMENU == 'TIMER') {
+        return util.ioQuery('clock', 'projectTimer') > args.VALUE;
+    }
+    return false;
 };
 
-Scratch3EventBlocks.prototype.broadcast = function() {
-    // @todo
+Scratch3EventBlocks.prototype.broadcast = function(args, util) {
+    util.triggerHats('event_whenbroadcastreceived', {
+        'BROADCAST_OPTION': args.BROADCAST_OPTION
+    });
+};
+
+Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
+    // Have we run before, triggering threads?
+    if (!util.stackFrame.triggeredThreads) {
+        // No - trigger hats for this broadcast.
+        util.stackFrame.triggeredThreads = util.triggerHats(
+            'event_whenbroadcastreceived', {
+                'BROADCAST_OPTION': args.BROADCAST_OPTION
+            }
+        );
+        if (util.stackFrame.triggeredThreads.length == 0) {
+            // Nothing was started.
+            return;
+        }
+    }
+    // We've run before; check if the wait is still going on.
+    var waiting = false;
+    for (var i = 0; i < util.stackFrame.triggeredThreads.length; i++) {
+        var thread = util.stackFrame.triggeredThreads[i];
+        if (thread.status !== Thread.STATUS_DONE) {
+            waiting = true;
+        }
+    }
+    if (waiting) {
+        util.yieldFrame();
+    }
 };
 
 module.exports = Scratch3EventBlocks;

From 4f2cccf279dba389cf6caf4239885f8a1b47ec8f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 18:37:03 -0400
Subject: [PATCH 174/302] Fix issue when broadcasting in a when-broadcast

---
 src/blocks/scratch3_event.js | 3 ++-
 src/engine/runtime.js        | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index 607923454..b47ba014b 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -76,7 +76,8 @@ Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
     var waiting = false;
     for (var i = 0; i < util.stackFrame.triggeredThreads.length; i++) {
         var thread = util.stackFrame.triggeredThreads[i];
-        if (thread.status !== Thread.STATUS_DONE) {
+        var activeThreads = this.runtime.threads;
+        if (activeThreads.indexOf(thread) > -1) { // @todo: A cleaner way?
             waiting = true;
         }
     }
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 62a083216..1d591c7ac 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -204,7 +204,6 @@ Runtime.prototype._pushThread = function (id) {
  * @param {?Thread} thread Thread object to remove from actives
  */
 Runtime.prototype._removeThread = function (thread) {
-    thread.setStatus(Thread.STATUS_DONE);
     var i = this.threads.indexOf(thread);
     if (i > -1) {
         this.glowScript(thread.topBlock, false);

From 4f81033762a8212827a392eaf3dc6269a704092a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 23 Aug 2016 18:46:54 -0400
Subject: [PATCH 175/302] Remove extra Thread require

---
 src/blocks/scratch3_event.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index b47ba014b..c03472698 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -1,5 +1,3 @@
-var Thread = require('../engine/thread');
-
 function Scratch3EventBlocks(runtime) {
     /**
      * The runtime instantiating this block package.

From 29887e24c9f96f95df89afe550f0fa9cfbbbb3c0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 24 Aug 2016 11:04:23 -0400
Subject: [PATCH 176/302] Simplify `execute` hat check.

In case a reporter has side-effects, we'd probably like to run hat predicates even if there is no next block.
---
 src/engine/execute.js | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/engine/execute.js b/src/engine/execute.js
index 3ab78752d..1d4ec6149 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -35,23 +35,13 @@ var execute = function (sequencer, thread) {
     // Hats are implemented slightly differently from regular blocks.
     // If they have an associated block function, it's treated as a predicate;
     // if not, execution will proceed right through it (as a no-op).
-    if (isHat) {
-        var nextBlock = target.blocks.getNextBlock(currentBlockId);
-        if (!nextBlock) {
-            // Hat with no next block - don't try to evaluate it.
-            sequencer.retireThread(thread);
-            return;
-        }
-        if (!blockFunction) {
-            // No predicate for the hat - just continue to next block.
-            sequencer.proceedThread(thread);
-            return;
-        }
-    } else {
-        if (!blockFunction) {
+    if (!blockFunction) {
+        if (!isHat) {
             console.warn('Could not get implementation for opcode: ' + opcode);
-            return;
         }
+        // Skip through the block.
+        // (either hat with no predicate, or missing op).
+        return;
     }
 
     // Generate values for arguments (inputs).

From 6d773076c517cd8a29fdea900892f07636bb363f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 24 Aug 2016 14:03:42 -0400
Subject: [PATCH 177/302] Update package.json

---
 package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 17e50fa4d..095dc2a9b 100644
--- a/package.json
+++ b/package.json
@@ -21,8 +21,8 @@
     "eslint": "2.7.0",
     "highlightjs": "8.7.0",
     "json-loader": "0.5.4",
-    "scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git",
-    "scratch-render": "git+https://git@github.com/LLK/scratch-render.git",
+    "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",

From 10ca84f2816ae53b432b1ffbc47c6ff3f18eb0c2 Mon Sep 17 00:00:00 2001
From: dekrain <dawidkrainski8@gmail.com>
Date: Fri, 26 Aug 2016 15:46:02 +0200
Subject: [PATCH 178/302] Update README

---
 README.md | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1b7197870..fccb41745 100644
--- a/README.md
+++ b/README.md
@@ -6,9 +6,16 @@
 [![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 
 ## Installation
+If you build own application:
 ```bash
 npm install https://github.com/LLK/scratch-vm.git
 ```
+If you want to edit/play yourself:
+```bash
+git clone git@github.com:LLK/scratch-vm.git
+cd scratch-vm
+npm install
+```
 
 ## Setup
 For an extended setup example, check out the /playground directory, which includes a fully running VM instance.
@@ -95,4 +102,4 @@ make coverage
 ```
 
 ## Donate
-We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!
+We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!
\ No newline at end of file

From 64b82f4dc23dd44be177629c02b3ca42dcc6e2ed Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 09:52:34 -0400
Subject: [PATCH 179/302] Switch back j->i

---
 src/engine/runtime.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 1d591c7ac..afdb63cf2 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -350,8 +350,8 @@ Runtime.prototype._step = function () {
         }
     }
     var inactiveThreads = this.sequencer.stepThreads(this.threads);
-    for (var j = 0; j < inactiveThreads.length; j++) {
-        this._removeThread(inactiveThreads[j]);
+    for (var i = 0; i < inactiveThreads.length; i++) {
+        this._removeThread(inactiveThreads[i]);
     }
 };
 

From 40c90bbcc76291c589fc50f375b51bb80746a322 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 10:01:31 -0400
Subject: [PATCH 180/302] Add `isActiveThread` and simplify broadcast-and-wait
 accordingly

---
 src/blocks/scratch3_event.js | 12 ++++--------
 src/engine/runtime.js        |  9 +++++++++
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index c03472698..f3f6e62a3 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -71,14 +71,10 @@ Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
         }
     }
     // We've run before; check if the wait is still going on.
-    var waiting = false;
-    for (var i = 0; i < util.stackFrame.triggeredThreads.length; i++) {
-        var thread = util.stackFrame.triggeredThreads[i];
-        var activeThreads = this.runtime.threads;
-        if (activeThreads.indexOf(thread) > -1) { // @todo: A cleaner way?
-            waiting = true;
-        }
-    }
+    var instance = this;
+    var waiting = util.stackFrame.triggeredThreads.some(function(thread) {
+        return instance.runtime.isActiveThread(thread);
+    });
     if (waiting) {
         util.yieldFrame();
     }
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index afdb63cf2..8283bdf5e 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -211,6 +211,15 @@ Runtime.prototype._removeThread = function (thread) {
     }
 };
 
+/**
+ * Return whether a thread is currently active/running.
+ * @param {?Thread} thread Thread object to check.
+ * @return {Boolean} True if the thread is active/running.
+ */
+Runtime.prototype.isActiveThread = function (thread) {
+    return this.threads.indexOf(thread) > -1;
+};
+
 /**
  * Toggle a script.
  * @param {!string} topBlockId ID of block that starts the script.

From 3ccfdf3df0fd82a675fc7ed8e45647198a07ce8f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 10:03:21 -0400
Subject: [PATCH 181/302] Use `hasOwnProperty` in
 `getIsHat`/`getIsEdgeTriggeredHat`

---
 src/engine/runtime.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 8283bdf5e..9ddf20509 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -152,7 +152,7 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
  * @return {Boolean} True if the op is known to be a hat.
  */
 Runtime.prototype.getIsHat = function (opcode) {
-    return opcode in this._hats;
+    return this._hats.hasOwnProperty(opcode);
 };
 
 /**
@@ -161,7 +161,8 @@ Runtime.prototype.getIsHat = function (opcode) {
  * @return {Boolean} True if the op is known to be a edge-triggered hat.
  */
 Runtime.prototype.getIsEdgeTriggeredHat = function (opcode) {
-    return opcode in this._hats && this._hats[opcode].edgeTriggered;
+    return this._hats.hasOwnProperty(opcode) &&
+        this._hats[opcode].edgeTriggered;
 };
 
 /**

From 29a595345a2fb09f30497f6f5143548af68d9b36 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 10:12:57 -0400
Subject: [PATCH 182/302] Wording change in README.md

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index fccb41745..1709bf467 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 [![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 
 ## Installation
-If you build own application:
+In your own node environment/application:
 ```bash
 npm install https://github.com/LLK/scratch-vm.git
 ```
@@ -102,4 +102,4 @@ make coverage
 ```
 
 ## Donate
-We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!
\ No newline at end of file
+We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!

From 1098a0698588b7c0d65ad5477779301fb8da3be3 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 10:18:49 -0400
Subject: [PATCH 183/302] Various renames for hat opcodes/top blocks,
 `allScriptsDo`

---
 src/engine/runtime.js | 69 ++++++++++++++++++++++---------------------
 1 file changed, 35 insertions(+), 34 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 9ddf20509..17985c285 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -240,9 +240,8 @@ Runtime.prototype.toggleScript = function (topBlockId) {
 /**
  * Run a function `f` for all scripts in a workspace.
  * `f` will be called with two parameters:
- *   -the top block ID of each script
- *   -the opcode of that block, for convenience.
- *   -fields on that block, for convenience.
+ *  - the top block ID of the script.
+ *  - the target that owns the script.
  * @param {!Function} f Function to call for each script.
  * @param {Target=} opt_target Optionally, a target to restrict to.
  */
@@ -255,28 +254,31 @@ Runtime.prototype.allScriptsDo = function (f, opt_target) {
         var target = targets[t];
         var scripts = target.blocks.getScripts();
         for (var j = 0; j < scripts.length; j++) {
-            var topBlock = scripts[j];
-            var topOpcode = target.blocks.getBlock(topBlock).opcode;
-            var topFields = target.blocks.getFields(topBlock);
-            f(topBlock, topOpcode, topFields);
+            var topBlockId = scripts[j];
+            f(topBlockId, target);
         }
     }
 };
 
 /**
  * Trigger all relevant hats.
- * @param {!string} requestedHat Name of hat to trigger.
+ * @param {!string} requestedHatOpcode Opcode of hat to trigger.
  * @param {Object=} opt_matchFields Optionally, fields to match on the hat.
  * @param {Target=} opt_target Optionally, a target to restrict to.
  * @return {Array.<Thread>} List of threads started by this trigger.
  */
-Runtime.prototype.triggerHats = function (requestedHat,
+Runtime.prototype.triggerHats = function (requestedHatOpcode,
     opt_matchFields, opt_target) {
+    if (!this._hats.hasOwnProperty(requestedHatOpcode)) {
+        // No known hat with this opcode.
+        return;
+    }
     var instance = this;
     var newThreads = [];
-    // Consider all scripts, looking for hats named `requestedHat`.
-    this.allScriptsDo(function(topBlockId, topOpcode, topFields) {
-        if (topOpcode !== requestedHat) {
+    // Consider all scripts, looking for hats with opcode `requestedHatOpcode`.
+    this.allScriptsDo(function(topBlockId, target) {
+        var potentialHatOpcode = target.blocks.getBlock(topBlockId).opcode;
+        if (potentialHatOpcode !== requestedHatOpcode) {
             // Not the right hat.
             return;
         }
@@ -285,39 +287,38 @@ Runtime.prototype.triggerHats = function (requestedHat,
         // This needs to happen before the block is evaluated
         // (i.e., before the predicate can be run) because "broadcast and wait"
         // needs to have a precise collection of triggered threads.
+        var hatFields = target.blocks.getFields(topBlockId);
         if (opt_matchFields) {
             for (var matchField in opt_matchFields) {
-                if (topFields[matchField].value !==
+                if (hatFields[matchField].value !==
                     opt_matchFields[matchField]) {
                     // Field mismatch.
                     return;
                 }
             }
         }
-        if (instance._hats.hasOwnProperty(topOpcode)) {
-            // Look up metadata for the relevant hat.
-            var hatMeta = instance._hats[topOpcode];
-            if (hatMeta.restartExistingThreads) {
-                // If `restartExistingThreads` is true, this trigger
-                // 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) {
-                        instance._removeThread(instance.threads[i]);
-                    }
-                }
-            } else {
-                // If `restartExistingThreads` is false, this trigger
-                // 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) {
-                        // Some thread is already running.
-                        return;
-                    }
+        // Look up metadata for the relevant hat.
+        var hatMeta = instance._hats[requestedHatOpcode];
+        if (hatMeta.restartExistingThreads) {
+            // If `restartExistingThreads` is true, this trigger
+            // 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) {
+                    instance._removeThread(instance.threads[i]);
+                }
+            }
+        } else {
+            // If `restartExistingThreads` is false, this trigger
+            // 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) {
+                    // Some thread is already running.
+                    return;
                 }
             }
-            // Start the thread with this top block.
-            newThreads.push(instance._pushThread(topBlockId));
         }
+        // Start the thread with this top block.
+        newThreads.push(instance._pushThread(topBlockId));
     }, opt_target);
     return newThreads;
 };

From bdc95cffc08c91c31763c68c89a668782f2f2531 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 29 Aug 2016 10:26:26 -0400
Subject: [PATCH 184/302] Rename trigger->activate/start

---
 src/blocks/scratch3_event.js | 16 +++++------
 src/engine/execute.js        | 16 +++++------
 src/engine/runtime.js        | 56 ++++++++++++++++++------------------
 3 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index f3f6e62a3..71326d494 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -34,7 +34,7 @@ Scratch3EventBlocks.prototype.getHats = function () {
         },*/
         'event_whengreaterthan': {
             restartExistingThreads: false,
-            edgeTriggered: true
+            edgeActivated: true
         },
         'event_whenbroadcastreceived': {
             restartExistingThreads: true
@@ -51,28 +51,28 @@ Scratch3EventBlocks.prototype.hatGreaterThanPredicate = function (args, util) {
 };
 
 Scratch3EventBlocks.prototype.broadcast = function(args, util) {
-    util.triggerHats('event_whenbroadcastreceived', {
+    util.startHats('event_whenbroadcastreceived', {
         'BROADCAST_OPTION': args.BROADCAST_OPTION
     });
 };
 
 Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
-    // Have we run before, triggering threads?
-    if (!util.stackFrame.triggeredThreads) {
-        // No - trigger hats for this broadcast.
-        util.stackFrame.triggeredThreads = util.triggerHats(
+    // Have we run before, starting threads?
+    if (!util.stackFrame.startedThreads) {
+        // No - start hats for this broadcast.
+        util.stackFrame.startedThreads = util.startHats(
             'event_whenbroadcastreceived', {
                 'BROADCAST_OPTION': args.BROADCAST_OPTION
             }
         );
-        if (util.stackFrame.triggeredThreads.length == 0) {
+        if (util.stackFrame.startedThreads.length == 0) {
             // Nothing was started.
             return;
         }
     }
     // We've run before; check if the wait is still going on.
     var instance = this;
-    var waiting = util.stackFrame.triggeredThreads.some(function(thread) {
+    var waiting = util.stackFrame.startedThreads.some(function(thread) {
         return instance.runtime.isActiveThread(thread);
     });
     if (waiting) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 1d4ec6149..5efe9bebd 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -96,9 +96,9 @@ var execute = function (sequencer, thread) {
         startBranch: function (branchNum) {
             sequencer.stepToBranch(thread, branchNum);
         },
-        triggerHats: function(requestedHat, opt_matchFields, opt_target) {
+        startHats: function(requestedHat, opt_matchFields, opt_target) {
             return (
-                runtime.triggerHats(requestedHat, opt_matchFields, opt_target)
+                runtime.startHats(requestedHat, opt_matchFields, opt_target)
             );
         },
         ioQuery: function (device, func, args) {
@@ -119,19 +119,19 @@ var execute = function (sequencer, thread) {
         thread.pushReportedValue(resolvedValue);
         if (isHat) {
             // Hat predicate was evaluated.
-            if (runtime.getIsEdgeTriggeredHat(opcode)) {
-                // If this is an edge-triggered hat, only proceed if
+            if (runtime.getIsEdgeActivatedHat(opcode)) {
+                // If this is an edge-activated hat, only proceed if
                 // the value is true and used to be false.
-                var oldEdgeValue = runtime.updateEdgeTriggeredValue(
+                var oldEdgeValue = runtime.updateEdgeActivatedValue(
                     currentBlockId,
                     resolvedValue
                 );
-                var edgeWasTriggered = !oldEdgeValue && resolvedValue;
-                if (!edgeWasTriggered) {
+                var edgeWasActivated = !oldEdgeValue && resolvedValue;
+                if (!edgeWasActivated) {
                     sequencer.retireThread(thread);
                 }
             } else {
-                // Not an edge-triggered hat: retire the thread
+                // Not an edge-activated hat: retire the thread
                 // if predicate was false.
                 if (!resolvedValue) {
                     sequencer.retireThread(thread);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 17985c285..921839497 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -48,7 +48,7 @@ function Runtime (targets) {
      */
     this._primitives = {};
     this._hats = {};
-    this._edgeTriggeredHatValues = {};
+    this._edgeActivatedHatValues = {};
     this._registerBlockPackages();
 
     this.ioDevices = {
@@ -156,32 +156,32 @@ Runtime.prototype.getIsHat = function (opcode) {
 };
 
 /**
- * Return whether an opcode represents an edge-triggered hat block.
+ * Return whether an opcode represents an edge-activated hat block.
  * @param {!string} opcode The opcode to look up.
- * @return {Boolean} True if the op is known to be a edge-triggered hat.
+ * @return {Boolean} True if the op is known to be a edge-activated hat.
  */
-Runtime.prototype.getIsEdgeTriggeredHat = function (opcode) {
+Runtime.prototype.getIsEdgeActivatedHat = function (opcode) {
     return this._hats.hasOwnProperty(opcode) &&
-        this._hats[opcode].edgeTriggered;
+        this._hats[opcode].edgeActivated;
 };
 
 /**
- * Update an edge-triggered hat block value.
+ * Update an edge-activated hat block value.
  * @param {!string} blockId ID of hat to store value for.
- * @param {*} newValue Value to store for edge-triggered hat.
- * @return {*} The old value for the edge-triggered hat.
+ * @param {*} newValue Value to store for edge-activated hat.
+ * @return {*} The old value for the edge-activated hat.
  */
-Runtime.prototype.updateEdgeTriggeredValue = function (blockId, newValue) {
-    var oldValue = this._edgeTriggeredHatValues[blockId];
-    this._edgeTriggeredHatValues[blockId] = newValue;
+Runtime.prototype.updateEdgeActivatedValue = function (blockId, newValue) {
+    var oldValue = this._edgeActivatedHatValues[blockId];
+    this._edgeActivatedHatValues[blockId] = newValue;
     return oldValue;
 };
 
 /**
- * Clear all edge-triggered hat values.
+ * Clear all edge-activaed hat values.
  */
-Runtime.prototype.clearEdgeTriggeredValues = function () {
-    this._edgeTriggeredHatValues = {};
+Runtime.prototype.clearEdgeActivatedValues = function () {
+    this._edgeActivatedHatValues = {};
 };
 
 // -----------------------------------------------------------------------------
@@ -261,13 +261,13 @@ Runtime.prototype.allScriptsDo = function (f, opt_target) {
 };
 
 /**
- * Trigger all relevant hats.
- * @param {!string} requestedHatOpcode Opcode of hat to trigger.
+ * Start all relevant hats.
+ * @param {!string} requestedHatOpcode Opcode of hats to start.
  * @param {Object=} opt_matchFields Optionally, fields to match on the hat.
  * @param {Target=} opt_target Optionally, a target to restrict to.
- * @return {Array.<Thread>} List of threads started by this trigger.
+ * @return {Array.<Thread>} List of threads started by this function.
  */
-Runtime.prototype.triggerHats = function (requestedHatOpcode,
+Runtime.prototype.startHats = function (requestedHatOpcode,
     opt_matchFields, opt_target) {
     if (!this._hats.hasOwnProperty(requestedHatOpcode)) {
         // No known hat with this opcode.
@@ -286,7 +286,7 @@ Runtime.prototype.triggerHats = function (requestedHatOpcode,
         // For example: ensures that broadcasts match.
         // This needs to happen before the block is evaluated
         // (i.e., before the predicate can be run) because "broadcast and wait"
-        // needs to have a precise collection of triggered threads.
+        // needs to have a precise collection of started threads.
         var hatFields = target.blocks.getFields(topBlockId);
         if (opt_matchFields) {
             for (var matchField in opt_matchFields) {
@@ -300,16 +300,16 @@ Runtime.prototype.triggerHats = function (requestedHatOpcode,
         // Look up metadata for the relevant hat.
         var hatMeta = instance._hats[requestedHatOpcode];
         if (hatMeta.restartExistingThreads) {
-            // If `restartExistingThreads` is true, this trigger
-            // should stop any existing threads starting with the top block.
+            // 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) {
                     instance._removeThread(instance.threads[i]);
                 }
             }
         } else {
-            // If `restartExistingThreads` is false, this trigger
-            // should give up if any threads with the top block are running.
+            // 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) {
                     // Some thread is already running.
@@ -328,8 +328,8 @@ Runtime.prototype.triggerHats = function (requestedHatOpcode,
  */
 Runtime.prototype.greenFlag = function () {
     this.ioDevices.clock.resetProjectTimer();
-    this.clearEdgeTriggeredValues();
-    this.triggerHats('event_whenflagclicked');
+    this.clearEdgeActivatedValues();
+    this.startHats('event_whenflagclicked');
 };
 
 /**
@@ -353,11 +353,11 @@ Runtime.prototype.stopAll = function () {
  * inactive threads after each iteration.
  */
 Runtime.prototype._step = function () {
-    // Find all edge-triggered hats, and add them to threads to be evaluated.
+    // Find all edge-activated hats, and add them to threads to be evaluated.
     for (var hatType in this._hats) {
         var hat = this._hats[hatType];
-        if (hat.edgeTriggered) {
-            this.triggerHats(hatType);
+        if (hat.edgeActivated) {
+            this.startHats(hatType);
         }
     }
     var inactiveThreads = this.sequencer.stepThreads(this.threads);

From be06078df11c9362a0c2699318dd671ea0be0050 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:21:32 -0400
Subject: [PATCH 185/302] Update sprite and clones to have basic costume
 support

---
 src/sprites/clone.js  | 58 +++++++++++++++++++++++++++++++++++++------
 src/sprites/sprite.js |  6 +++--
 2 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 8370ac73e..9c7537d27 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -4,11 +4,16 @@ var Target = require('../engine/target');
 
 /**
  * Clone (instance) of a sprite.
- * @param {!Blocks} spriteBlocks Reference to the sprite's blocks.
+ * @param {!Sprite} sprite Reference to the sprite.
  * @constructor
  */
-function Clone(spriteBlocks) {
-    Target.call(this, spriteBlocks);
+function Clone(sprite) {
+    Target.call(this, sprite.blocks);
+    /**
+     * Reference to the sprite that this is a clone of.
+     * @type {!Sprite}
+     */
+    this.sprite = sprite;
     /**
      * Reference to the global renderer for this VM, if one exists.
      * @type {?RenderWebGLWorker}
@@ -38,6 +43,8 @@ Clone.prototype.initDrawable = function () {
         var instance = this;
         createPromise.then(function (id) {
             instance.drawableID = id;
+            // Once the drawable is created, send our current set of properties.
+            instance.updateAllDrawableProperties();
         });
     }
 };
@@ -45,34 +52,40 @@ Clone.prototype.initDrawable = function () {
 // Clone-level properties.
 /**
  * Scratch X coordinate. Currently should range from -240 to 240.
- * @type {!number}
+ * @type {Number}
  */
 Clone.prototype.x = 0;
 
 /**
  * Scratch Y coordinate. Currently should range from -180 to 180.
- * @type {!number}
+ * @type {number}
  */
 Clone.prototype.y = 0;
 
 /**
  * Scratch direction. Currently should range from -179 to 180.
- * @type {!number}
+ * @type {number}
  */
 Clone.prototype.direction = 90;
 
 /**
  * Whether the clone is currently visible.
- * @type {!boolean}
+ * @type {boolean}
  */
 Clone.prototype.visible = true;
 
 /**
  * Size of clone as a percent of costume size. Ranges from 5% to 535%.
- * @type {!number}
+ * @type {number}
  */
 Clone.prototype.size = 100;
 
+/**
+ * Currently selected costume index.
+ * @type {number}
+ */
+Clone.prototype.currentCostume = 0;
+
 /**
  * Map of current graphic effect values.
  * @type {!Object.<string, number>}
@@ -184,4 +197,33 @@ Clone.prototype.clearEffects = function () {
     }
 };
 
+/**
+ * Set the current costume of this clone.
+ * @param {number} index New index of costume.
+ */
+Clone.prototype.setCostume = function (index) {
+    this.currentCostume = index;
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            skin: this.sprite.costumes[this.currentCostume].baseLayerMD5
+        });
+    }
+};
+
+/**
+ * Update all drawable properties for this clone.
+ * Use when a batch has changed, e.g., when the drawable is first created.
+ */
+Clone.prototype.updateAllDrawableProperties = function () {
+    if (this.renderer) {
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            position: [this.x, this.y],
+            direction: this.direction,
+            scale: [this.size, this.size],
+            visible: this.visible,
+            skin: this.sprite.costumes[this.currentCostume].baseLayerMD5
+        });
+    }
+};
+
 module.exports = Clone;
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
index b4abdbbb5..9add2c719 100644
--- a/src/sprites/sprite.js
+++ b/src/sprites/sprite.js
@@ -7,12 +7,14 @@ var Blocks = require('../engine/blocks');
  * @param {?Blocks} blocks Shared blocks object for all clones of sprite.
  * @constructor
  */
-function Sprite (blocks) {
+function Sprite (blocks, name) {
     if (!blocks) {
         // Shared set of blocks for all clones.
         blocks = new Blocks();
     }
     this.blocks = blocks;
+    this.name = name;
+    this.costumes = [];
     this.clones = [];
 }
 
@@ -21,7 +23,7 @@ function Sprite (blocks) {
  * @returns {!Clone} Newly created clone.
  */
 Sprite.prototype.createClone = function () {
-    var newClone = new Clone(this.blocks);
+    var newClone = new Clone(this);
     this.clones.push(newClone);
     return newClone;
 };

From 2da121d0194f237bf05059d7b4a7209fa79fcccb Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:21:42 -0400
Subject: [PATCH 186/302] Add UID utility

---
 src/util/uid.js | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 src/util/uid.js

diff --git a/src/util/uid.js b/src/util/uid.js
new file mode 100644
index 000000000..532f9e9bf
--- /dev/null
+++ b/src/util/uid.js
@@ -0,0 +1,29 @@
+/**
+ * @fileoverview UID generator, from Blockly.
+ */
+
+/**
+ * Legal characters for the unique ID.
+ * Should be all on a US keyboard.  No XML special characters or control codes.
+ * Removed $ due to issue 251.
+ * @private
+ */
+var soup_ = '!#%()*+,-./:;=?@[]^_`{|}~' +
+    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+
+/**
+ * Generate a unique ID, from Blockly.  This should be globally unique.
+ * 87 characters ^ 20 length > 128 bits (better than a UUID).
+ * @return {string} A globally unique ID string.
+ */
+var uid = function () {
+    var length = 20;
+    var soupLength = soup_.length;
+    var id = [];
+    for (var i = 0; i < length; i++) {
+        id[i] = soup_.charAt(Math.random() * soupLength);
+    }
+    return id.join('');
+};
+
+module.exports = uid;

From 8339e2769f7e4017f9d8f461ebd9b9fff9aa77b7 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:30:09 -0400
Subject: [PATCH 187/302] Clean up and add documentation to sprite/clone

---
 src/sprites/clone.js  |  4 ++--
 src/sprites/sprite.js | 24 ++++++++++++++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 9c7537d27..ba025ab73 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -205,7 +205,7 @@ Clone.prototype.setCostume = function (index) {
     this.currentCostume = index;
     if (this.renderer) {
         this.renderer.updateDrawableProperties(this.drawableID, {
-            skin: this.sprite.costumes[this.currentCostume].baseLayerMD5
+            skin: this.sprite.costumes[this.currentCostume].skin
         });
     }
 };
@@ -221,7 +221,7 @@ Clone.prototype.updateAllDrawableProperties = function () {
             direction: this.direction,
             scale: [this.size, this.size],
             visible: this.visible,
-            skin: this.sprite.costumes[this.currentCostume].baseLayerMD5
+            skin: this.sprite.costumes[this.currentCostume].skin
         });
     }
 };
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
index 9add2c719..0d2b6b70e 100644
--- a/src/sprites/sprite.js
+++ b/src/sprites/sprite.js
@@ -7,14 +7,34 @@ var Blocks = require('../engine/blocks');
  * @param {?Blocks} blocks Shared blocks object for all clones of sprite.
  * @constructor
  */
-function Sprite (blocks, name) {
+function Sprite (blocks) {
     if (!blocks) {
         // Shared set of blocks for all clones.
         blocks = new Blocks();
     }
     this.blocks = blocks;
-    this.name = name;
+    /**
+     * Human-readable name for this sprite (and all clones).
+     * @type {string}
+     */
+    this.name = '';
+    /**
+     * List of costumes for this sprite.
+     * Each entry is an object, e.g.,
+     * {
+     *      skin: "costume.svg",
+     *      name: "Costume Name",
+     *      bitmapResolution: 2,
+     *      rotationCenterX: 0,
+     *      rotationCenterY: 0
+     * }
+     * @type {Array.<!Object>}
+     */
     this.costumes = [];
+    /**
+     * List of clones for this sprite, including the original.
+     * @type {Array.<!Clone>}
+     */
     this.clones = [];
 }
 

From aa70c1bc3b9598df8f443523f2ffb283a5b369a4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:32:59 -0400
Subject: [PATCH 188/302] Add shadow, x, y properties to block adapter

---
 src/engine/adapter.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 388659fe8..57c413f3e 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -57,7 +57,10 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
         inputs: {}, // Inputs to this block and the blocks they point to.
         fields: {}, // Fields on this block and their values.
         next: null, // Next block in the stack, if one exists.
-        topLevel: isTopBlock // If this block starts a stack.
+        topLevel: isTopBlock, // If this block starts a stack.
+        shadow: blockDOM.name == 'shadow', // If this represents a shadow/slot.
+        x: blockDOM.attribs.x, // X position of script, if top-level.
+        y: blockDOM.attribs.y // Y position of script, if top-level.
     };
 
     // Add the block to the representation tree.

From 05a5369d7b43f04a707e2b3f37994ebfa6026949 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:34:17 -0400
Subject: [PATCH 189/302] Switch Blockly listener to normal function (not
 closure/generated)

---
 src/engine/blocks.js | 92 +++++++++++++++++++++-----------------------
 1 file changed, 43 insertions(+), 49 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index b4fab3809..96fdf50bf 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -120,63 +120,57 @@ Blocks.prototype.getInputs = function (id) {
 /**
  * Create event listener for blocks. Handles validation and serves as a generic
  * adapter between the blocks and the runtime interface.
+ * @param {Object} e Blockly "block" event
  * @param {boolean} isFlyout If true, create a listener for flyout events.
  * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
- * @return {Function} A generated listener to attach to Blockly instance.
  */
 
-Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
-    var instance = this;
-    /**
-     * The actual generated block listener.
-     * @param {Object} e Blockly "block" event
-     */
-    return function (e) {
-        // Validate event
-        if (typeof e !== 'object') return;
-        if (typeof e.blockId !== 'string') return;
+Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
+    // Validate event
+    if (typeof e !== 'object') return;
+    if (typeof e.blockId !== 'string') return;
 
-        // UI event: clicked scripts toggle in the runtime.
-        if (e.element === 'stackclick') {
-            if (opt_runtime) {
-                opt_runtime.toggleScript(e.blockId);
-            }
-            return;
+    // UI event: clicked scripts toggle in the runtime.
+    if (e.element === 'stackclick') {
+        if (opt_runtime) {
+            opt_runtime.toggleScript(e.blockId);
         }
+        return;
+    }
 
-        // Block create/update/destroy
-        switch (e.type) {
-        case 'create':
-            var newBlocks = adapter(e);
-            // A create event can create many blocks. Add them all.
-            for (var i = 0; i < newBlocks.length; i++) {
-                instance.createBlock(newBlocks[i], isFlyout);
-            }
-            break;
-        case 'change':
-            instance.changeBlock({
-                id: e.blockId,
-                element: e.element,
-                name: e.name,
-                value: e.newValue
-            });
-            break;
-        case 'move':
-            instance.moveBlock({
-                id: e.blockId,
-                oldParent: e.oldParentId,
-                oldInput: e.oldInputName,
-                newParent: e.newParentId,
-                newInput: e.newInputName
-            });
-            break;
-        case 'delete':
-            instance.deleteBlock({
-                id: e.blockId
-            });
-            break;
+    // Block create/update/destroy
+    switch (e.type) {
+    case 'create':
+        var newBlocks = adapter(e);
+        // A create event can create many blocks. Add them all.
+        for (var i = 0; i < newBlocks.length; i++) {
+            this.createBlock(newBlocks[i], isFlyout);
         }
-    };
+        break;
+    case 'change':
+        this.changeBlock({
+            id: e.blockId,
+            element: e.element,
+            name: e.name,
+            value: e.newValue
+        });
+        break;
+    case 'move':
+        this.moveBlock({
+            id: e.blockId,
+            oldParent: e.oldParentId,
+            oldInput: e.oldInputName,
+            newParent: e.newParentId,
+            newInput: e.newInputName,
+            newCoordinate: e.newCoordinate
+        });
+        break;
+    case 'delete':
+        this.deleteBlock({
+            id: e.blockId
+        });
+        break;
+    }
 };
 
 // ---------------------------------------------------------------------

From c58bda18399898ef2f8432a3fec31faf0325d26c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:34:29 -0400
Subject: [PATCH 190/302] Record coordinate changes in block representation

---
 src/engine/blocks.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 96fdf50bf..f57a4c882 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -212,6 +212,12 @@ Blocks.prototype.changeBlock = function (args) {
  * @param {!Object} e Blockly move event to be processed
  */
 Blocks.prototype.moveBlock = function (e) {
+    // Move coordinate changes.
+    if (e.newCoordinate) {
+        this._blocks[e.id].x = e.newCoordinate.x;
+        this._blocks[e.id].y = e.newCoordinate.y;
+    }
+
     // Remove from any old parent.
     if (e.oldParent !== undefined) {
         var oldParent = this._blocks[e.oldParent];

From b1a3026ea19ccd04cd61cc68c5da9e77245b0d6e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:38:45 -0400
Subject: [PATCH 191/302] Blockly XML encoding for `Blocks` object

Provide two functions, `toXML` and `blockToXML`, which can be used to generate workspaces based on the VM representation of the blocks.
---
 src/engine/blocks.js | 57 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index f57a4c882..771ad9a94 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -283,6 +283,63 @@ Blocks.prototype.deleteBlock = function (e) {
 
 // ---------------------------------------------------------------------
 
+/**
+ * Encode all of `this._blocks` as an XML string usable
+ * by a Blockly/scratch-blocks workspace.
+ * @return {string} String of XML representing this object's blocks.
+ */
+Blocks.prototype.toXML = function () {
+    var xmlString = '<xml xmlns="http://www.w3.org/1999/xhtml">';
+    for (var i = 0; i < this._scripts.length; i++) {
+        xmlString += this.blockToXML(this._scripts[i]);
+    }
+    return xmlString + '</xml>';
+};
+
+/**
+ * Recursively encode an individual block and its children
+ * into a Blockly/scratch-blocks XML string.
+ * @param {!string} blockId ID of block to encode.
+ * @return {string} String of XML representing this block and any children.
+ */
+Blocks.prototype.blockToXML = function (blockId) {
+    var block = this._blocks[blockId];
+    // Encode properties of this block.
+    var tagName = (block.shadow) ? 'shadow' : 'block';
+    var xy = (block.topLevel) ?
+        ' x="' + block.x +'"' + ' y="' + block.y +'"' :
+        '';
+    var xmlString = '';
+    xmlString += '<' + tagName +
+        ' id="' + block.id + '"' +
+        ' type="' + block.opcode + '"' +
+        xy +
+        '>';
+    // Add any inputs on this block.
+    for (var input in block.inputs) {
+        var blockInput = block.inputs[input];
+        // Only encode a value tag if the value input is occupied.
+        if (blockInput.block) {
+            xmlString += '<value name="' + blockInput.name + '">' +
+                this.blockToXML(blockInput.block) + '</value>';
+        }
+    }
+    // Add any fields on this block.
+    for (var field in block.fields) {
+        var blockField = block.fields[field];
+        xmlString += '<field name="' + blockField.name + '">' +
+            blockField.value + '</field>';
+    }
+    // Add blocks connected to the next connection.
+    if (block.next) {
+        xmlString += '<next>' + this.blockToXML(block.next) + '</next>';
+    }
+    xmlString += '</' + tagName + '>';
+    return xmlString;
+};
+
+// ---------------------------------------------------------------------
+
 /**
  * Helper to add a stack to `this._scripts`.
  * @param {?string} topBlockId ID of block that starts the script.

From 2c6722b958dcb3507c892cf0df7dc92aeb263aef Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:39:57 -0400
Subject: [PATCH 192/302] Add unique ID for Targets

---
 src/engine/target.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/engine/target.js b/src/engine/target.js
index ad7d192c6..53591cc08 100644
--- a/src/engine/target.js
+++ b/src/engine/target.js
@@ -1,4 +1,5 @@
 var Blocks = require('./blocks');
+var uid = require('../util/uid');
 
 /**
  * @fileoverview
@@ -14,6 +15,15 @@ function Target (blocks) {
     if (!blocks) {
         blocks = new Blocks(this);
     }
+    /**
+     * A unique ID for this target.
+     * @type {string}
+     */
+    this.id = uid();
+    /**
+     * Blocks run as code for this target.
+     * @type {!Blocks}
+     */
     this.blocks = blocks;
 }
 

From ad82a5cb74ef9b951fcffa0d3e13fa7c0bfe1dd4 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:50:10 -0400
Subject: [PATCH 193/302] Add naming mechanism for targets/clones

---
 src/engine/target.js | 10 ++++++++++
 src/sprites/clone.js |  9 +++++++++
 2 files changed, 19 insertions(+)

diff --git a/src/engine/target.js b/src/engine/target.js
index 53591cc08..acb2b30a6 100644
--- a/src/engine/target.js
+++ b/src/engine/target.js
@@ -27,4 +27,14 @@ function Target (blocks) {
     this.blocks = blocks;
 }
 
+/**
+ * Return a human-readable name for this target.
+ * Target implementations should override this.
+ * @abstract
+ * @returns {string} Human-readable name for the target.
+ */
+Target.prototype.getName = function () {
+    return this.id;
+};
+
 module.exports = Target;
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index ba025ab73..408667ab8 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -226,4 +226,13 @@ Clone.prototype.updateAllDrawableProperties = function () {
     }
 };
 
+/**
+ * Return the human-readable name for this clone, i.e., the sprite's name.
+ * @override
+ * @returns {string} Human-readable name for the clone.
+ */
+Clone.prototype.getName = function () {
+    return this.sprite.name;
+};
+
 module.exports = Clone;

From ba0cc0dcfc7b558bd344b50365876347b7e5fb85 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 11:50:29 -0400
Subject: [PATCH 194/302] Pass along newCoordinate of Blockly MOVE events

---
 src/worker.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/worker.js b/src/worker.js
index 248894537..208d4fa35 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -29,6 +29,7 @@ function VirtualMachine () {
             oldInputName: e.oldInputName,
             newParentId: e.newParentId,
             newInputName: e.newInputName,
+            newCoordinate: e.newCoordinate,
             xml: {
                 outerHTML: (e.xml) ? e.xml.outerHTML : null
             }

From 08f48c5b3090e47bd676287afdbea82437c21249 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 12:03:41 -0400
Subject: [PATCH 195/302] Always start runtime with an empty target list.

---
 src/engine/runtime.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index d244544aa..1de5a9bc2 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -18,9 +18,8 @@ var defaultBlockPackages = {
 
 /**
  * Manages targets, scripts, and the sequencer.
- * @param {!Array.<Target>} targets List of targets for this runtime.
  */
-function Runtime (targets) {
+function Runtime () {
     // Bind event emitter
     EventEmitter.call(this);
 
@@ -28,8 +27,9 @@ function Runtime (targets) {
 
     /**
      * Target management and storage.
+     * @type {Array.<!Target>}
      */
-    this.targets = targets;
+    this.targets = [];
 
     /**
      * A list of threads that are currently running in the VM.

From d4a43639f3b6dfc8757261e6d59806715c42add9 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 12:08:54 -0400
Subject: [PATCH 196/302] Add `editingTarget` and map block events to that
 target

---
 src/index.js | 49 +++++++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/src/index.js b/src/index.js
index 8807634a6..d468b3095 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,7 +1,6 @@
 var EventEmitter = require('events');
 var util = require('util');
 
-var Sprite = require('./sprites/sprite');
 var Runtime = require('./engine/runtime');
 
 /**
@@ -17,29 +16,19 @@ var ENV_WORKER = typeof importScripts === 'function';
  */
 function VirtualMachine () {
     var instance = this;
-
     // Bind event emitter and runtime to VM instance
-    // @todo Post message (Web Worker) polyfill
     EventEmitter.call(instance);
-    // @todo support multiple targets/sprites.
-    // This is just a demo/example.
-    var exampleSprite = new Sprite();
-    exampleSprite.createClone();
-    var exampleTargets = [exampleSprite.clones[0]];
-    instance.exampleSprite = exampleSprite;
-    instance.runtime = new Runtime(exampleTargets);
-
     /**
-     * Event listeners for scratch-blocks.
+     * VM runtime, to store blocks, I/O devices, sprites/targets, etc.
+     * @type {!Runtime}
      */
-    instance.blockListener = (
-        exampleSprite.blocks.generateBlockListener(false, instance.runtime)
-    );
-
-    instance.flyoutBlockListener = (
-        exampleSprite.blocks.generateBlockListener(true, instance.runtime)
-    );
-
+    instance.runtime = new Runtime();
+    /**
+     * The "currently editing"/selected target ID for the VM.
+     * Block events from any Blockly workspace are routed to this target.
+     * @type {!string}
+     */
+    instance.editingTarget = null;
     // Runtime emits are passed along as VM emits.
     instance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
         instance.emit(Runtime.STACK_GLOW_ON, {id: id});
@@ -89,7 +78,7 @@ VirtualMachine.prototype.stopAll = function () {
  */
 VirtualMachine.prototype.getPlaygroundData = function () {
     this.emit('playgroundData', {
-        blocks: this.exampleSprite.blocks,
+        blocks: this.editingTarget.blocks,
         threads: this.runtime.threads
     });
 };
@@ -136,15 +125,27 @@ if (ENV_WORKER) {
             self.vmInstance.runtime.stopAll();
             break;
         case 'blockListener':
-            self.vmInstance.blockListener(messageData.args);
+            if (self.vmInstance.editingTarget) {
+                self.vmInstance.editingTarget.blocks.blocklyListen(
+                    messageData.args,
+                    false,
+                    self.vmInstance.runtime
+                );
+            }
             break;
         case 'flyoutBlockListener':
-            self.vmInstance.flyoutBlockListener(messageData.args);
+            if (self.vmInstance.editingTarget) {
+                self.vmInstance.editingTarget.blocks.blocklyListen(
+                    messageData.args,
+                    true,
+                    self.vmInstance.runtime
+                );
+            }
             break;
         case 'getPlaygroundData':
             self.postMessage({
                 method: 'playgroundData',
-                blocks: self.vmInstance.exampleSprite.blocks,
+                blocks: self.vmInstance.editingTarget.blocks,
                 threads: self.vmInstance.runtime.threads
             });
             break;

From 23d9999a9f6a20b2634d7b41e6743c3eff7a9bb0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 12:18:24 -0400
Subject: [PATCH 197/302] Add `runtime.getTargetById` helper

---
 src/engine/runtime.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 1de5a9bc2..43d6b35b9 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -260,6 +260,20 @@ Runtime.prototype.targetForThread = function (thread) {
     }
 };
 
+/**
+ * Get a target by its id.
+ * @param {string} targetId Id of target to find.
+ * @return {?Target} The target, if found.
+ */
+Runtime.prototype.getTargetById = function (targetId) {
+    for (var i = 0; i < this.targets.length; i++) {
+        var target = this.targets[i];
+        if (target.id == targetId) {
+            return target;
+        }
+    }
+};
+
 /**
  * Handle an animation frame from the main thread.
  */

From 3e749fb9f107027459d6c5366cb180901d310056 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 12:28:09 -0400
Subject: [PATCH 198/302] Add loadProject, setEditingTarget, and UI emits

---
 src/index.js  | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/worker.js |  8 ++++++
 2 files changed, 84 insertions(+)

diff --git a/src/index.js b/src/index.js
index d468b3095..eafe0f579 100644
--- a/src/index.js
+++ b/src/index.js
@@ -101,6 +101,65 @@ VirtualMachine.prototype.postIOData = function (device, data) {
     }
 };
 
+/**
+ * Load a project from a Scratch 2.0 JSON representation.
+ * @param {string} json JSON string representing the project.
+ */
+VirtualMachine.prototype.loadProject = function (json) {
+    // Select the first target for editing, e.g., the stage.
+    this.editingTarget = this.runtime.targets[0];
+    // Update the VM user's knowledge of targets and blocks on the workspace.
+    this.emitTargetsUpdate();
+    this.emitWorkspaceUpdate();
+};
+
+/**
+ * Set an editing target. An editor UI can use this function to switch
+ * between editing different targets, sprites, etc.
+ * After switching the editing target, the VM may emit updates
+ * to the list of targets and any attached workspace blocks
+ * (see `emitTargetsUpdate` and `emitWorkspaceUpdate`).
+ * @param {string} targetId Id of target to set as editing.
+ */
+VirtualMachine.prototype.setEditingTarget = function (targetId) {
+    if (targetId == this.editingTarget.id) { // No change.
+        return;
+    }
+    var target = this.runtime.getTargetById(targetId);
+    if (target) {
+        this.editingTarget = target;
+        // Emit appropriate UI updates.
+        this.emitTargetsUpdate();
+        this.emitWorkspaceUpdate();
+    }
+};
+
+/**
+ * Emit metadata about available targets.
+ * An editor UI could use this to display a list of targets and show
+ * the currently editing one.
+ */
+VirtualMachine.prototype.emitTargetsUpdate = function () {
+    this.emit('targetsUpdate', {
+        // [[target id, human readable target name], ...].
+        targetList: this.runtime.targets.map(function(target) {
+            return [target.id, target.getName()];
+        }),
+        // Currently editing target id.
+        editingTarget: this.editingTarget.id
+    });
+};
+
+/**
+ * Emit an Blockly/scratch-blocks compatible XML representation
+ * of the current editing target's blocks.
+ */
+VirtualMachine.prototype.emitWorkspaceUpdate = function () {
+    this.emit('workspaceUpdate', {
+        'xml': this.editingTarget.blocks.toXML()
+    });
+};
+
 /*
  * Worker handlers: for all public methods available above,
  * we must also provide a message handler in case the VM is run
@@ -155,6 +214,12 @@ if (ENV_WORKER) {
         case 'postIOData':
             self.vmInstance.postIOData(messageData.device, messageData.data);
             break;
+        case 'setEditingTarget':
+            self.vmInstance.setEditingTarget(messageData.targetId);
+            break;
+        case 'loadProject':
+            self.vmInstance.loadProject(messageData.json);
+            break;
         default:
             if (e.data.id == 'RendererConnected') {
                 //initRenderWorker();
@@ -179,6 +244,17 @@ if (ENV_WORKER) {
     self.vmInstance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
         self.postMessage({method: Runtime.VISUAL_REPORT, id: id, value: value});
     });
+    self.vmInstance.on('workspaceUpdate', function(data) {
+        self.postMessage({method: 'workspaceUpdate',
+            xml: data.xml
+        });
+    });
+    self.vmInstance.on('targetsUpdate', function(data) {
+        self.postMessage({method: 'targetsUpdate',
+            targetList: data.targetList,
+            editingTarget: data.editingTarget
+        });
+    });
 }
 
 /**
diff --git a/src/worker.js b/src/worker.js
index 208d4fa35..c3616e859 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -76,6 +76,14 @@ VirtualMachine.prototype.animationFrame = function () {
     this.vmWorker.postMessage({method: 'animationFrame'});
 };
 
+VirtualMachine.prototype.loadProject = function (json) {
+    this.vmWorker.postMessage({method: 'loadProject', json: json});
+};
+
+VirtualMachine.prototype.setEditingTarget = function (targetId) {
+    this.vmWorker.postMessage({method: 'setEditingTarget', targetId: targetId});
+};
+
 /**
  * Export and bind to `window`
  */

From 75212c595882425e0d3e9ef92eb9d04addc79ef7 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 12:28:44 -0400
Subject: [PATCH 199/302] Add playground tools for targets, loading 2.0
 projects

---
 playground/index.html    |  4 ++++
 playground/playground.js | 51 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/playground/index.html b/playground/index.html
index 20b8db310..6c2dad4c8 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -12,6 +12,7 @@
         <h2>Scratch VM Playground</h2>
         <button id="greenflag">Green flag</button>
         <button id="stopall">Stop</button>
+        <select id="selectedTarget" multiple></select>
         <p>
             <a id="renderexplorer-link" href="#">Renderer</a><br />
             <a id="threadexplorer-link" href="#">VM Threads</a><br />
@@ -20,6 +21,8 @@
         <div id="tab-renderexplorer">
             Render<br />
             <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas>
+            <input id="projectId" value="119615668" />
+            <button id="projectLoadButton">Load</button>
         </div>
         <div id="tab-threadexplorer">
             Thread explorer
@@ -30,6 +33,7 @@
             <pre id="blockexplorer"></pre>
         </div>
     </div>
+
     <div id="blocks"></div>
 
     <xml id="toolbox" style="display: none">
diff --git a/playground/playground.js b/playground/playground.js
index 2367d539c..50b95b802 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -1,8 +1,27 @@
+var loadProject = function () {
+    var id = location.hash.substring(1) || 119615668;
+    var url = 'https://projects.scratch.mit.edu/internalapi/project/' +
+        id + '/get/';
+    var r = new XMLHttpRequest();
+    r.addEventListener('load', function() {
+        window.vm.loadProject(this.responseText);
+    });
+    r.open('GET', url);
+    r.send();
+};
+
 window.onload = function() {
     // Lots of global variables to make debugging easier
     var vm = new window.VirtualMachine();
     window.vm = vm;
 
+    // Loading projects from the server.
+    document.getElementById('projectLoadButton').onclick = function () {
+        document.location = '#' + document.getElementById('projectId').value;
+        location.reload();
+    };
+    loadProject();
+
     var canvas = document.getElementById('scratch-stage');
     window.renderer = new window.RenderWebGLLocal(canvas);
     window.renderer.connectWorker(window.vm.vmWorker);
@@ -71,6 +90,38 @@ window.onload = function() {
         updateBlockExplorer(data.blocks);
     });
 
+    vm.on('workspaceUpdate', function (data) {
+        window.Blockly.Events.disable();
+        workspace.clear();
+        var dom = window.Blockly.Xml.textToDom(data.xml);
+        window.Blockly.Xml.domToWorkspace(dom, workspace);
+        window.Blockly.Events.enable();
+    });
+
+    var selectedTarget = document.getElementById('selectedTarget');
+    vm.on('targetsUpdate', function (data) {
+        // Clear select box.
+        while (selectedTarget.firstChild) {
+            selectedTarget.removeChild(selectedTarget.firstChild);
+        }
+        // Generate new select box.
+        for (var i = 0; i < data.targetList.length; i++) {
+            var targetOption = document.createElement('option');
+            targetOption.setAttribute('value', data.targetList[i][0]);
+            // If target id matches editingTarget id, select it.
+            if (data.targetList[i][0] == data.editingTarget) {
+                targetOption.setAttribute('selected', 'selected');
+            }
+            targetOption.appendChild(
+                document.createTextNode(data.targetList[i][1])
+            );
+            selectedTarget.appendChild(targetOption);
+        }
+    });
+    selectedTarget.onchange = function () {
+        vm.setEditingTarget(this.value);
+    };
+
     // Feedback for stacks and blocks running.
     vm.on('STACK_GLOW_ON', function(data) {
         workspace.glowStack(data.id, true);

From c70e9759a97079ececad132e43064d89e458ccac Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 13:56:05 -0400
Subject: [PATCH 200/302] Add initial SB2 importer and spec map

---
 src/import/sb2import.js  |  256 +++++++
 src/import/sb2specmap.js | 1360 ++++++++++++++++++++++++++++++++++++++
 src/index.js             |    3 +
 3 files changed, 1619 insertions(+)
 create mode 100644 src/import/sb2import.js
 create mode 100644 src/import/sb2specmap.js

diff --git a/src/import/sb2import.js b/src/import/sb2import.js
new file mode 100644
index 000000000..beab39dd9
--- /dev/null
+++ b/src/import/sb2import.js
@@ -0,0 +1,256 @@
+/**
+ * @fileoverview
+ * Partial implementation of an SB2 JSON importer.
+ * Parses provided JSON and then generates all needed
+ * scratch-vm runtime structures.
+ */
+
+var Sprite = require('../sprites/sprite');
+var Blocks = require('../engine/blocks');
+
+var uid = require('../util/uid');
+var specMap = require('./sb2specmap');
+
+/**
+ * Top-level handler. Parse provided JSON,
+ * and process the top-level object (the stage object).
+ * @param {!string} json SB2-format JSON to load.
+ * @param {!Runtime} runtime Runtime object to load all structures into.
+ */
+function sb2import (json, runtime) {
+    parseScratchObject(
+        JSON.parse(json),
+        runtime
+    );
+}
+
+/**
+ * Parse a single "Scratch object" and create all its in-memory VM objects.
+ * @param {!Object} object From-JSON "Scratch object:" sprite, stage, watcher.
+ * @param {!Runtime} runtime Runtime object to load all structures into.
+ */
+function parseScratchObject (object, runtime) {
+    if (!object.hasOwnProperty('objName')) {
+        // Watcher/monitor - skip this object until those are implemented in VM.
+        // @todo
+        return;
+    }
+    // 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);
+    // Sprite/stage name from JSON.
+    if (object.hasOwnProperty('objName')) {
+        sprite.name = object.objName;
+    }
+    // Costumes from JSON.
+    if (object.hasOwnProperty('costumes')) {
+        for (var i = 0; i < object.costumes.length; i++) {
+            var costume = object.costumes[i];
+            // @todo: Make sure all the relevant metadata is being pulled out.
+            sprite.costumes.push({
+                skin: costume.baseLayerMD5,
+                name: costume.costumeName,
+                bitmapResolution: costume.bitmapResolution,
+                rotationCenterX: costume.rotationCenterX,
+                rotationCenterY: costume.rotationCenterY
+            });
+        }
+    }
+    // If included, parse any and all scripts/blocks on the object.
+    if (object.hasOwnProperty('scripts')) {
+        parseScripts(object.scripts, blocks);
+    }
+    // Create the first clone, and load its run-state from JSON.
+    var target = sprite.createClone();
+    // Add it to the runtime's list of targets.
+    runtime.targets.push(target);
+    if (object.scratchX) {
+        target.x = object.scratchX;
+    }
+    if (object.scratchY) {
+        target.y = object.scratchY;
+    }
+    if (object.direction) {
+        target.direction = object.direction;
+    }
+    if (object.scale) {
+        // SB2 stores as 1.0 = 100%; we use % in the VM.
+        target.size = object.scale * 100;
+    }
+    if (object.visible) {
+        target.visible = object.visible;
+    }
+    if (object.currentCostumeIndex) {
+        target.currentCostume = object.currentCostumeIndex;
+    }
+    // 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);
+        }
+    }
+}
+
+/**
+ * Parse a Scratch object's scripts into VM blocks.
+ * This should only handle top-level scripts that include X, Y coordinates.
+ * @param {!Object} scripts Scripts object from SB2 JSON.
+ * @param {!Blocks} blocks Blocks object to load parsed blocks into.
+ */
+function parseScripts (scripts, blocks) {
+    for (var i = 0; i < scripts.length; i++) {
+        var script = scripts[i];
+        var scriptX = script[0];
+        var scriptY = script[1];
+        var blockList = script[2];
+        var parsedBlockList = parseBlockList(blockList);
+        if (parsedBlockList[0]) {
+            // Adjust script coordinates to account for
+            // larger block size in scratch-blocks.
+            // @todo: Determine more precisely the right formulas here.
+            parsedBlockList[0].x = scriptX * 1.1;
+            parsedBlockList[0].y = scriptY * 1.1;
+            parsedBlockList[0].topLevel = true;
+        }
+        // Flatten children and create add the blocks.
+        var convertedBlocks = flatten(parsedBlockList);
+        for (var j = 0; j < convertedBlocks.length; j++) {
+            blocks.createBlock(convertedBlocks[j]);
+        }
+    }
+}
+
+/**
+ * Parse any list of blocks from SB2 JSON into a list of VM-format blocks.
+ * Could be used to parse a top-level script,
+ * a list of blocks in a branch (e.g., in forever),
+ * or a list of blocks in an argument (e.g., move [pick random...]).
+ * @param {Array.<Object>} blockList SB2 JSON-format block list.
+ * @return {Array.<Object>} Scratch VM-format block list.
+ */
+function parseBlockList (blockList) {
+    var resultingList = [];
+    var previousBlock = null; // For setting next.
+    for (var i = 0; i < blockList.length; i++) {
+        var block = blockList[i];
+        var parsedBlock = parseBlock(block);
+        if (previousBlock) {
+            previousBlock.next = parsedBlock.id;
+        }
+        previousBlock = parsedBlock;
+        resultingList.push(parsedBlock);
+    }
+    return resultingList;
+}
+
+/**
+ * Flatten a block tree into a block list.
+ * Children are temporarily stored on the `block.children` property.
+ * @param {Array.<Object>} blocks list generated by `parseBlockList`.
+ * @return {Array.<Object>} Flattened list to be passed to `blocks.createBlock`.
+ */
+function flatten (blocks) {
+    var finalBlocks = [];
+    for (var i = 0; i < blocks.length; i++) {
+        var block = blocks[i];
+        finalBlocks.push(block);
+        if (block.children) {
+            finalBlocks = finalBlocks.concat(flatten(block.children));
+        }
+        delete block.children;
+    }
+    return finalBlocks;
+}
+
+/**
+ * Parse a single SB2 JSON-formatted block and its children.
+ * @param {!Object} sb2block SB2 JSON-formatted block.
+ * @return {Object} Scratch VM format block.
+ */
+function parseBlock (sb2block) {
+    // First item in block object is the old opcode (e.g., 'forward:').
+    var oldOpcode = sb2block[0];
+    // Convert the block using the specMap. See sb2specmap.js.
+    if (!oldOpcode || !specMap[oldOpcode]) {
+        console.warn('Couldn\'t find SB2 block: ', oldOpcode);
+        return;
+    }
+    var blockMetadata = specMap[oldOpcode];
+    // Block skeleton.
+    var activeBlock = {
+        id: uid(), // Generate a new block unique ID.
+        opcode: blockMetadata.opcode, // Converted, e.g. "motion_movesteps".
+        inputs: {}, // Inputs to this block and the blocks they point to.
+        fields: {}, // Fields on this block and their values.
+        shadow: false, // No shadow blocks in an SB2 by default.
+        children: [] // Store any generated children, flattened in `flatten`.
+    };
+    // Look at the expected arguments in `blockMetadata.argMap.`
+    // The basic problem here is to turn positional SB2 arguments into
+    // non-positional named Scratch VM arguments.
+    for (var i = 0; i < blockMetadata.argMap.length; i++) {
+        var expectedArg = blockMetadata.argMap[i];
+        var providedArg = sb2block[i + 1]; // (i = 0 is opcode)
+        // Positional argument is an input.
+        if (expectedArg.type == 'input') {
+            // Create a new block and input metadata.
+            var inputUid = uid();
+            activeBlock.inputs[expectedArg.inputName] = {
+                name: expectedArg.inputName,
+                block: inputUid
+            };
+            if (typeof providedArg == 'object') {
+                // Block or block list occupies the input.
+                var innerBlocks;
+                if (typeof providedArg[0] == 'object') {
+                    // Block list occupies the input.
+                    innerBlocks = parseBlockList(providedArg);
+                } else {
+                    // Single block occupies the input.
+                    innerBlocks = [parseBlock(providedArg)];
+                }
+                activeBlock.inputs[expectedArg.inputName] = {
+                    name: expectedArg.inputName,
+                    block: innerBlocks[0].id
+                };
+                activeBlock.children = (
+                    activeBlock.children.concat(innerBlocks)
+                );
+            } else if (expectedArg.inputOp) {
+                // Unoccupied input. Generate a shadow block to occupy it.
+                var fieldName = expectedArg.inputName;
+                if (expectedArg.inputOp == 'math_number') {
+                    fieldName = 'NUM';
+                } else if (expectedArg.inputOp == 'text') {
+                    fieldName = 'TEXT';
+                } else if (expectedArg.inputOp == 'colour_picker') {
+                    fieldName = 'COLOR';
+                }
+                var fields = {};
+                fields[fieldName] = {
+                    name: fieldName,
+                    value: providedArg
+                };
+                activeBlock.children.push({
+                    id: inputUid,
+                    opcode: expectedArg.inputOp,
+                    inputs: {},
+                    fields: fields,
+                    next: null,
+                    topLevel: false,
+                    shadow: true
+                });
+            }
+        } else if (expectedArg.type == 'field') {
+            // Add as a field on this block.
+            activeBlock.fields[expectedArg.fieldName] = {
+                name: expectedArg.fieldName,
+                value: providedArg
+            };
+        }
+    }
+    return activeBlock;
+}
+
+module.exports = sb2import;
diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js
new file mode 100644
index 000000000..b27af983c
--- /dev/null
+++ b/src/import/sb2specmap.js
@@ -0,0 +1,1360 @@
+/**
+ * @fileoverview
+ * The specMap below handles a few pieces of "translation" work between
+ * 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 ordered, unnamed args to unordered, named inputs and fields.
+ * Keep this up-to-date as 3.0 blocks are renamed, changed, etc.
+ */
+var specMap = {
+    'forward:':{
+        'opcode':'motion_movesteps',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'STEPS'
+            }
+        ]
+    },
+    'turnRight:':{
+        'opcode':'motion_turnright',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DEGREES'
+            }
+        ]
+    },
+    'turnLeft:':{
+        'opcode':'motion_turnleft',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DEGREES'
+            }
+        ]
+    },
+    'heading:':{
+        'opcode':'motion_pointindirection',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DIRECTION'
+            }
+        ]
+    },
+    'pointTowards:':{
+        'opcode':'motion_pointtowards',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'motion_pointtowards_menu',
+                'inputName':'TOWARDS'
+            }
+        ]
+    },
+    'gotoX:y:':{
+        'opcode':'motion_gotoxy',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'X'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'Y'
+            }
+        ]
+    },
+    'gotoSpriteOrMouse:':{
+        'opcode':'motion_goto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'motion_goto_menu',
+                'inputName':'TO'
+            }
+        ]
+    },
+    'glideSecs:toX:y:elapsed:from:':{
+        'opcode':'motion_glidesecstoxy',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SECS'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'X'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'Y'
+            }
+        ]
+    },
+    'changeXposBy:':{
+        'opcode':'motion_changexby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DX'
+            }
+        ]
+    },
+    'xpos:':{
+        'opcode':'motion_setx',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'X'
+            }
+        ]
+    },
+    'changeYposBy:':{
+        'opcode':'motion_changeyby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DY'
+            }
+        ]
+    },
+    'ypos:':{
+        'opcode':'motion_sety',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'Y'
+            }
+        ]
+    },
+    'bounceOffEdge':{
+        'opcode':'motion_ifonedgebounce',
+        'argMap':[
+        ]
+    },
+    'setRotationStyle':{
+        'opcode':'motion_setrotationstyle',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'motion_setrotationstyle_menu',
+                'inputName':'STYLE'
+            }
+        ]
+    },
+    'xpos':{
+        'opcode':'motion_xposition',
+        'argMap':[
+        ]
+    },
+    'ypos':{
+        'opcode':'motion_yposition',
+        'argMap':[
+        ]
+    },
+    'heading':{
+        'opcode':'motion_direction',
+        'argMap':[
+        ]
+    },
+    'say:duration:elapsed:from:':{
+        'opcode':'looks_sayforsecs',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'MESSAGE'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SECS'
+            }
+        ]
+    },
+    'say:':{
+        'opcode':'looks_say',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'MESSAGE'
+            }
+        ]
+    },
+    'think:duration:elapsed:from:':{
+        'opcode':'looks_thinkforsecs',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'MESSAGE'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'MESSAGE'
+            }
+        ]
+    },
+    'think:':{
+        'opcode':'looks_think',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'MESSAGE'
+            }
+        ]
+    },
+    'show':{
+        'opcode':'looks_show',
+        'argMap':[
+        ]
+    },
+    'hide':{
+        'opcode':'looks_hide',
+        'argMap':[
+        ]
+    },
+    'lookLike:':{
+        'opcode':'looks_switchcostumeto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'looks_costume',
+                'inputName':'COSTUME'
+            }
+        ]
+    },
+    'nextCostume':{
+        'opcode':'looks_nextcostume',
+        'argMap':[
+        ]
+    },
+    'startScene':{
+        'opcode':'looks_switchbackdropto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'looks_backdrops',
+                'inputName':'COSTUME'
+            }
+        ]
+    },
+    'changeGraphicEffect:by:':{
+        'opcode':'looks_changeeffectby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'looks_effectmenu',
+                'inputName':'EFFECT'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'CHANGE'
+            }
+        ]
+    },
+    'setGraphicEffect:to:':{
+        'opcode':'looks_seteffectto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'looks_effectmenu',
+                'inputName':'EFFECT'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'VALUE'
+            }
+        ]
+    },
+    'filterReset':{
+        'opcode':'looks_cleargraphiceffects',
+        'argMap':[
+        ]
+    },
+    'changeSizeBy:':{
+        'opcode':'looks_changesizeby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'CHANGE'
+            }
+        ]
+    },
+    'setSizeTo:':{
+        'opcode':'looks_setsizeto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SIZE'
+            }
+        ]
+    },
+    'comeToFront':{
+        'opcode':'looks_gotofront',
+        'argMap':[
+        ]
+    },
+    'goBackByLayers:':{
+        'opcode':'looks_gobacklayers',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM'
+            }
+        ]
+    },
+    'costumeIndex':{
+        'opcode':'looks_costumeorder',
+        'argMap':[
+        ]
+    },
+    'sceneName':{
+        'opcode':'looks_backdropname',
+        'argMap':[
+        ]
+    },
+    'scale':{
+        'opcode':'looks_size',
+        'argMap':[
+        ]
+    },
+    'startSceneAndWait':{
+        'opcode':'looks_switchbackdroptoandwait',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'looks_backdrops',
+                'inputName':'COSTUME'
+            }
+        ]
+    },
+    'nextScene':{
+        'opcode':'looks_nextbackdrop',
+        'argMap':[
+        ]
+    },
+    'backgroundIndex':{
+        'opcode':'looks_backdroporder',
+        'argMap':[
+        ]
+    },
+    'playSound:':{
+        'opcode':'sound_play',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sound_sounds_option',
+                'inputName':'SOUND_MENU'
+            }
+        ]
+    },
+    'doPlaySoundAndWait':{
+        'opcode':'sound_playuntildone',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sound_sounds_option',
+                'inputName':'SOUND_MENU'
+            }
+        ]
+    },
+    'stopAllSounds':{
+        'opcode':'sound_stopallsounds',
+        'argMap':[
+        ]
+    },
+    'playDrum':{
+        'opcode':'sound_playdrumforbeats',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DRUMTYPE'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'BEATS'
+            }
+        ]
+    },
+    'rest:elapsed:from:':{
+        'opcode':'sound_restforbeats',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'BEATS'
+            }
+        ]
+    },
+    'noteOn:duration:elapsed:from:':{
+        'opcode':'sound_playnoteforbeats',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NOTE'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'BEATS'
+            }
+        ]
+    },
+    'instrument:':{
+        'opcode':'sound_setinstrumentto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'INSTRUMENT'
+            }
+        ]
+    },
+    'changeVolumeBy:':{
+        'opcode':'sound_changevolumeby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'VOLUME'
+            }
+        ]
+    },
+    'setVolumeTo:':{
+        'opcode':'sound_setvolumeto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'VOLUME'
+            }
+        ]
+    },
+    'volume':{
+        'opcode':'sound_volume',
+        'argMap':[
+        ]
+    },
+    'changeTempoBy:':{
+        'opcode':'sound_changetempoby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'TEMPO'
+            }
+        ]
+    },
+    'setTempoTo:':{
+        'opcode':'sound_settempoto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'TEMPO'
+            }
+        ]
+    },
+    'tempo':{
+        'opcode':'sound_tempo',
+        'argMap':[
+        ]
+    },
+    'clearPenTrails':{
+        'opcode':'pen_clear',
+        'argMap':[
+        ]
+    },
+    'stampCostume':{
+        'opcode':'pen_stamp',
+        'argMap':[
+        ]
+    },
+    'putPenDown':{
+        'opcode':'pen_pendown',
+        'argMap':[
+        ]
+    },
+    'putPenUp':{
+        'opcode':'pen_penup',
+        'argMap':[
+        ]
+    },
+    'penColor:':{
+        'opcode':'pen_setpencolortocolor',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'colour_picker',
+                'inputName':'COLOR'
+            }
+        ]
+    },
+    'changePenHueBy:':{
+        'opcode':'pen_changepencolorby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'COLOR'
+            }
+        ]
+    },
+    'setPenHueTo:':{
+        'opcode':'pen_setpencolortonum',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'COLOR'
+            }
+        ]
+    },
+    'changePenShadeBy:':{
+        'opcode':'pen_changepenshadeby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'XXXNAME'
+            }
+        ]
+    },
+    'setPenShadeTo:':{
+        'opcode':'pen_changepenshadeto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SHADE'
+            }
+        ]
+    },
+    'changePenSizeBy:':{
+        'opcode':'pen_changepensizeby',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SIZE'
+            }
+        ]
+    },
+    'penSize:':{
+        'opcode':'pen_setpensizeto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'SIZE'
+            }
+        ]
+    },
+    'whenGreenFlag':{
+        'opcode':'event_whenflagclicked',
+        'argMap':[
+        ]
+    },
+    'whenKeyPressed':{
+        'opcode':'event_whenkeypressed',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'KEY_OPTION'
+            }
+        ]
+    },
+    'whenClicked':{
+        'opcode':'event_whenthisspriteclicked',
+        'argMap':[
+        ]
+    },
+    'whenSceneStarts':{
+        'opcode':'event_whenbackdropswitchesto',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'BACKDROP'
+            }
+        ]
+    },
+    'whenSensorGreaterThan':{
+        'opcode':'event_whengreaterthan',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'WHENGREATERTHANMENU'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'VALUE'
+            }
+        ]
+    },
+    'whenIReceive':{
+        'opcode':'event_whenbroadcastreceived',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'BROADCAST_OPTION'
+            }
+        ]
+    },
+    'broadcast:':{
+        'opcode':'event_broadcast',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'BROADCAST_OPTION'
+            }
+        ]
+    },
+    'doBroadcastAndWait':{
+        'opcode':'event_broadcastandwait',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'BROADCAST_OPTION'
+            }
+        ]
+    },
+    'wait:elapsed:from:':{
+        'opcode':'control_wait',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'DURATION'
+            }
+        ]
+    },
+    'doRepeat':{
+        'opcode':'control_repeat',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'TIMES'
+            },
+            {
+                'type':'input',
+                'inputName': 'SUBSTACK'
+            }
+        ]
+    },
+    'doForever':{
+        'opcode':'control_forever',
+        'argMap':[
+            {
+                'type':'input',
+                'inputName':'SUBSTACK'
+            }
+        ]
+    },
+    'doIf':{
+        'opcode':'control_if',
+        'argMap':[
+            {
+                'type':'input',
+                'inputName':'CONDITION'
+            },
+            {
+                'type':'input',
+                'inputName':'SUBSTACK'
+            }
+        ]
+    },
+    'doIfElse':{
+        'opcode':'control_ifelse',
+        'argMap':[
+            {
+                'type':'input',
+                'inputName':'CONDITION'
+            },
+            {
+                'type':'input',
+                'inputName':'SUBSTACK'
+            },
+            {
+                'type':'input',
+                'inputName':'SUBSTACK2'
+            }
+        ]
+    },
+    'doWaitUntil':{
+        'opcode':'control_waituntil',
+        'argMap':[
+            {
+                'type':'input',
+                'inputName':'CONDITION'
+            }
+        ]
+    },
+    'doUntil':{
+        'opcode':'control_repeatuntil',
+        'argMap':[
+            {
+                'type':'input',
+                'inputName':'CONDITION'
+            },
+            {
+                'type':'input',
+                'inputName':'SUBSTACK'
+            }
+        ]
+    },
+    'stopScripts':{
+        'opcode':'control_stop',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'control_stop_menu',
+                'inputName':'STOP_OPTION'
+            }
+        ]
+    },
+    'whenCloned':{
+        'opcode':'control_start_as_clone',
+        'argMap':[
+        ]
+    },
+    'createCloneOf':{
+        'opcode':'control_create_clone_of',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'control_create_clone_of_menu',
+                'inputName':'CLONE_OPTION'
+            }
+        ]
+    },
+    'deleteClone':{
+        'opcode':'control_delete_this_clone',
+        'argMap':[
+        ]
+    },
+    'touching:':{
+        'opcode':'sensing_touchingobject',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_touchingobjectmenu',
+                'inputName':'TOUCHINGOBJECTMENU'
+            }
+        ]
+    },
+    'touchingColor:':{
+        'opcode':'sensing_touchingcolor',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'colour_picker',
+                'inputName':'COLOR'
+            }
+        ]
+    },
+    'color:sees:':{
+        'opcode':'sensing_coloristouchingcolor',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'colour_picker',
+                'inputName':'COLOR'
+            },
+            {
+                'type':'input',
+                'inputOp':'colour_picker',
+                'inputName':'COLOR2'
+            }
+        ]
+    },
+    'distanceTo:':{
+        'opcode':'sensing_distanceto',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_distancetomenu',
+                'inputName':'DISTANCETOMENU'
+            }
+        ]
+    },
+    'doAsk':{
+        'opcode':'sensing_askandwait',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'QUESTION'
+            }
+        ]
+    },
+    'answer':{
+        'opcode':'sensing_answer',
+        'argMap':[
+        ]
+    },
+    'keyPressed:':{
+        'opcode':'sensing_keypressed',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_keyoptions',
+                'inputName':'KEY_OPTIONS'
+            }
+        ]
+    },
+    'mousePressed':{
+        'opcode':'sensing_mousedown',
+        'argMap':[
+        ]
+    },
+    'mouseX':{
+        'opcode':'sensing_mousex',
+        'argMap':[
+        ]
+    },
+    'mouseY':{
+        'opcode':'sensing_mousey',
+        'argMap':[
+        ]
+    },
+    'soundLevel':{
+        'opcode':'sensing_loudness',
+        'argMap':[
+        ]
+    },
+    'senseVideoMotion':{
+        'opcode':'sensing_videoon',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_videoonmenuone',
+                'inputName':'VIDEOONMENU1'
+            },
+            {
+                'type':'input',
+                'inputOp':'sensing_videoonmenutwo',
+                'inputName':'VIDEOONMENU2'
+            }
+        ]
+    },
+    'setVideoState':{
+        'opcode':'sensing_videotoggle',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_videotogglemenu',
+                'inputName':'VIDEOTOGGLEMENU'
+            }
+        ]
+    },
+    'setVideoTransparency':{
+        'opcode':'sensing_setvideotransparency',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'TRANSPARENCY'
+            }
+        ]
+    },
+    'timer':{
+        'opcode':'sensing_timer',
+        'argMap':[
+        ]
+    },
+    'timerReset':{
+        'opcode':'sensing_resettimer',
+        'argMap':[
+        ]
+    },
+    'getAttribute:of:':{
+        'opcode':'sensing_of',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_ofattributemenu',
+                'inputName':'ATTRIBUTE'
+            },
+            {
+                'type':'input',
+                'inputOp':'sensing_ofobjectmenu',
+                'inputName':'OBJECT'
+            }
+        ]
+    },
+    'timeAndDate':{
+        'opcode':'sensing_current',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'sensing_currentmenu',
+                'inputName':'CURRENTMENU'
+            }
+        ]
+    },
+    'timestamp':{
+        'opcode':'sensing_dayssince2000',
+        'argMap':[
+        ]
+    },
+    'getUserName':{
+        'opcode':'sensing_username',
+        'argMap':[
+        ]
+    },
+    '+':{
+        'opcode':'operator_add',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM1'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM2'
+            }
+        ]
+    },
+    '-':{
+        'opcode':'operator_subtract',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM1'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM2'
+            }
+        ]
+    },
+    '*':{
+        'opcode':'operator_multiply',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM1'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM2'
+            }
+        ]
+    },
+    '/':{
+        'opcode':'operator_divide',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM1'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'NUM2'
+            }
+        ]
+    },
+    'randomFrom:to:':{
+        'opcode':'operator_random',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'FROM'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'TO'
+            }
+        ]
+    },
+    '<':{
+        'opcode':'operator_lt',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'OPERAND1'
+            },
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'OPERAND2'
+            }
+        ]
+    },
+    '=':{
+        'opcode':'operator_equals',
+        'argMap':[
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'OPERAND1'
+            },
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'OPERAND2'
+            }
+        ]
+    },
+    '>':{
+        '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_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_getvariable',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'VARIABLE'
+            }
+        ]
+    },
+    'setVar:to:':{
+        'opcode':'data_setvariableto',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'VARIABLE'
+            },
+            {
+                'type':'input',
+                'inputOp':'text',
+                'inputName':'VALUE'
+            }
+        ]
+    },
+    'changeVar:by:':{
+        'opcode':'data_changevariableby',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'VARIABLE'
+            },
+            {
+                'type':'input',
+                'inputOp':'math_number',
+                'inputName':'VALUE'
+            }
+        ]
+    },
+    'showVariable:':{
+        'opcode':'data_showvariable',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'VARIABLE'
+            }
+        ]
+    },
+    'hideVariable:':{
+        'opcode':'data_hidevariable',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'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':[]
+    }
+};
+module.exports = specMap;
diff --git a/src/index.js b/src/index.js
index eafe0f579..fb889c9a8 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,6 +2,7 @@ var EventEmitter = require('events');
 var util = require('util');
 
 var Runtime = require('./engine/runtime');
+var sb2import = require('./import/sb2import');
 
 /**
  * Whether the environment is a WebWorker.
@@ -106,6 +107,8 @@ VirtualMachine.prototype.postIOData = function (device, data) {
  * @param {string} json JSON string representing the project.
  */
 VirtualMachine.prototype.loadProject = function (json) {
+    // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
+    sb2import(json, this.runtime);
     // Select the first target for editing, e.g., the stage.
     this.editingTarget = this.runtime.targets[0];
     // Update the VM user's knowledge of targets and blocks on the workspace.

From 020250e25803e20dfb5674c38c974c7ec98652f2 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 31 Aug 2016 13:57:54 -0400
Subject: [PATCH 201/302] Test: take out old blockListener check

---
 test/integration/index.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/integration/index.js b/test/integration/index.js
index c98e44651..06bdcf37b 100644
--- a/test/integration/index.js
+++ b/test/integration/index.js
@@ -6,7 +6,6 @@ test('spec', function (t) {
 
     t.type(VirtualMachine, 'function');
     t.type(vm, 'object');
-    t.type(vm.blockListener, 'function');
     t.end();
 });
 

From 220d614a9d6dfce72efc788ab548be59f58c009d Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Wed, 31 Aug 2016 16:31:01 -0400
Subject: [PATCH 202/302] Better README! (#114)

Improve README
Implement "npm start"
---
 README.md              | 47 +++++++++++++++++++++++++++---------------
 StartServerWindows.bat |  2 ++
 package.json           |  3 ++-
 3 files changed, 34 insertions(+), 18 deletions(-)
 create mode 100644 StartServerWindows.bat

diff --git a/README.md b/README.md
index 1709bf467..1c9afbb93 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,8 @@
 [![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 
 ## Installation
+This requires you to have Git and Node.js installed.
+
 In your own node environment/application:
 ```bash
 npm install https://github.com/LLK/scratch-vm.git
@@ -17,27 +19,23 @@ cd scratch-vm
 npm install
 ```
 
-## Setup
-For an extended setup example, check out the /playground directory, which includes a fully running VM instance.
-```js
-var VirtualMachine = require('scratch-vm');
-var vm = new VirtualMachine();
+## Development Server
+This requires Node.js to be installed.
 
-// Block events
-workspace.addChangeListener(vm.blockListener);
-var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
-flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
-
-// Run threads
-vm.runtime.start();
-```
-## Development Server and Playground
-For convenience, we've included a development server with the VM. This is useful because the VM can take advantage of executing in a WebWorker, which is not permitted in a local file. To start the server, run:
+For convenience, we've included a development server with the VM. This is useful because the VM can take advantage of executing in a WebWorker, which is not permitted in a local file.
 
+## Running the Development Server
+Open a Command Prompt or Terminal in the repository and run:
 ```bash
-make serve
+npm start
 ```
-and go to [http://localhost:8080/](http://localhost:8080/) - you will be redirected to the playground, which demonstrates various tools and internal state.
+Or on Windows:
+```bash
+StartServerWindows.bat
+```
+
+## Playground
+To run the Playground, make sure the dev server's running and go to [http://localhost:8080/](http://localhost:8080/) - you will be redirected to the playground, which demonstrates various tools and internal state.
 
 ![VM Playground Screenshot](https://i.imgur.com/nOCNqEc.gif)
 
@@ -55,6 +53,21 @@ make build
 </script>
 ```
 
+## How to include in a Node.js App
+For an extended setup example, check out the /playground directory, which includes a fully running VM instance.
+```js
+var VirtualMachine = require('scratch-vm');
+var vm = new VirtualMachine();
+
+// Block events
+workspace.addChangeListener(vm.blockListener);
+var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
+flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
+
+// Run threads
+vm.runtime.start();
+```
+
 ## Abstract Syntax Tree
 
 #### Overview
diff --git a/StartServerWindows.bat b/StartServerWindows.bat
new file mode 100644
index 000000000..2ea1bccdb
--- /dev/null
+++ b/StartServerWindows.bat
@@ -0,0 +1,2 @@
+@echo off
+node_modules\.bin\webpack-dev-server --host 0.0.0.0 --port 80 --content-base .\
diff --git a/package.json b/package.json
index 095dc2a9b..f6e1ba3d8 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,8 @@
   },
   "main": "./src/index.js",
   "scripts": {
-    "test": "make test"
+    "test": "make test",
+    "start": "webpack-dev-server --host 0.0.0.0 --content-base ."
   },
   "dependencies": {
     "htmlparser2": "3.9.0",

From f981e8747f9a2820a86407e06ba40e035966306e Mon Sep 17 00:00:00 2001
From: liam4 <towerofnix@gmail.com>
Date: Fri, 2 Sep 2016 00:48:14 -0300
Subject: [PATCH 203/302] Implement 'current' block

---
 src/blocks/scratch3_sensing.js | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index ee75cc43a..3271990f3 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -16,7 +16,9 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
         'sensing_resettimer': this.resetTimer,
         'sensing_mousex': this.getMouseX,
         'sensing_mousey': this.getMouseY,
-        'sensing_mousedown': this.getMouseDown
+        'sensing_mousedown': this.getMouseDown,
+        'sensing_current': this.current,
+        'sensing_currentmenu': this.currentMenu
     };
 };
 
@@ -40,4 +42,28 @@ Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
     return util.ioQuery('mouse', 'getIsDown');
 };
 
+Scratch3SensingBlocks.prototype.current = function (args, util) {
+    var date = new Date();
+    switch (args.CURRENTMENU) {
+    case 'year':
+        return date.getFullYear();
+    case 'month':
+        return date.getMonth();
+    case 'date':
+        return date.getDate();
+    case 'dayofweek':
+        return date.getDay();
+    case 'hour':
+        return date.getHours();
+    case 'minute':
+        return date.getMinutes();
+    case 'second':
+        return date.getSeconds();
+    }
+};
+
+Scratch3SensingBlocks.prototype.currentMenu = function (args) {
+    return args.CURRENTMENU.toLowerCase();
+};
+
 module.exports = Scratch3SensingBlocks;

From 602cb47a1e1495fb833a1f56e6facfa823db933f Mon Sep 17 00:00:00 2001
From: liam4 <towerofnix@gmail.com>
Date: Fri, 2 Sep 2016 01:01:17 -0300
Subject: [PATCH 204/302] Remove unused util variable

---
 src/blocks/scratch3_sensing.js | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index 3271990f3..44e5a9b3c 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -42,23 +42,16 @@ Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
     return util.ioQuery('mouse', 'getIsDown');
 };
 
-Scratch3SensingBlocks.prototype.current = function (args, util) {
+Scratch3SensingBlocks.prototype.current = function (args) {
     var date = new Date();
     switch (args.CURRENTMENU) {
-    case 'year':
-        return date.getFullYear();
-    case 'month':
-        return date.getMonth();
-    case 'date':
-        return date.getDate();
-    case 'dayofweek':
-        return date.getDay();
-    case 'hour':
-        return date.getHours();
-    case 'minute':
-        return date.getMinutes();
-    case 'second':
-        return date.getSeconds();
+    case 'year': return date.getFullYear();
+    case 'month': return date.getMonth() + 1; // getMonth is zero-based
+    case 'date': return date.getDate();
+    case 'dayofweek': return date.getDay();
+    case 'hour': return date.getHours();
+    case 'minute': return date.getMinutes();
+    case 'second': return date.getSeconds();
     }
 };
 

From 4586507a8a85e7ea785273458f6264fa7524a1a1 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Fri, 2 Sep 2016 08:27:43 -0400
Subject: [PATCH 205/302] XML Import/Export (#119)

* Added Import/Export Area In Block Representations (Copied Some Code From scratch-blocks)

* Better TextArea Size For XML

* Made Import/Export It's Own Catatagory 1/3

* Made Import/Export It's Own Catatagory 2/3

* Made Import/Export It's Own Catatagory 3/3

* Added A Newline

* Removed Port 80 From StartServerWindows.bat

* </a> before <br />

* Removed taChange from HTML

* No More taChange()
---
 StartServerWindows.bat    |  2 +-
 playground/index.html     | 28 +++++++++++++++++++++++++++-
 playground/playground.css |  4 ++--
 playground/playground.js  | 12 ++++++++++++
 4 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/StartServerWindows.bat b/StartServerWindows.bat
index 2ea1bccdb..b81638194 100644
--- a/StartServerWindows.bat
+++ b/StartServerWindows.bat
@@ -1,2 +1,2 @@
 @echo off
-node_modules\.bin\webpack-dev-server --host 0.0.0.0 --port 80 --content-base .\
+node_modules\.bin\webpack-dev-server --host 0.0.0.0 --content-base .
diff --git a/playground/index.html b/playground/index.html
index 20b8db310..0492fac97 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -15,7 +15,8 @@
         <p>
             <a id="renderexplorer-link" href="#">Renderer</a><br />
             <a id="threadexplorer-link" href="#">VM Threads</a><br />
-            <a id="blockexplorer-link" href="#">VM Block Representation</a>
+            <a id="blockexplorer-link" href="#">VM Block Representation</a><br />
+            <a id="importexport-link" href="#">Import/Export XML</a>
         </p>
         <div id="tab-renderexplorer">
             Render<br />
@@ -29,6 +30,16 @@
             Block explorer
             <pre id="blockexplorer"></pre>
         </div>
+        <div id="tab-importexport">
+            Import/Export XML
+            <p>
+                <input type="button" value="Export to XML" onclick="toXml()">
+                &nbsp;
+                <input type="button" value="Import from XML" onclick="fromXml()" id="import">
+                <br><br>
+                <textarea id="importExport" style="width: 480px; height: 360px"></textarea>
+            </p>
+        </div>
     </div>
     <div id="blocks"></div>
 
@@ -741,5 +752,20 @@
     <script src="../vm.worker.js"></script>
     <!-- Playground -->
     <script src="./playground.js"></script>
+    <script>
+        function toXml() {
+            var output = document.getElementById('importExport');
+            var xml = Blockly.Xml.workspaceToDom(workspace);
+            output.value = Blockly.Xml.domToPrettyText(xml);
+            output.focus();
+            output.select();
+          }
+    
+          function fromXml() {
+            var input = document.getElementById('importExport');
+            var xml = Blockly.Xml.textToDom(input.value);
+            Blockly.Xml.domToWorkspace(workspace, xml);
+          }
+    </script>
 </body>
 </html>
diff --git a/playground/playground.css b/playground/playground.css
index a15e1d81c..c2f65505a 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -20,7 +20,7 @@ a {
     bottom: 0;
     width: 35%;
 }
-#blockexplorer, #threadexplorer {
+#blockexplorer, #threadexplorer, #importexport {
     position: absolute;
     width: 100%;
     height: 75%;
@@ -32,6 +32,6 @@ a {
     font-size: 10pt;
 }
 
-#tab-blockexplorer, #tab-threadexplorer {
+#tab-blockexplorer, #tab-threadexplorer, #tab-importexport {
     display: none;
 }
diff --git a/playground/playground.js b/playground/playground.js
index 2367d539c..03103e6ad 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -129,6 +129,7 @@ window.onload = function() {
     var tabBlockExplorer = document.getElementById('tab-blockexplorer');
     var tabThreadExplorer = document.getElementById('tab-threadexplorer');
     var tabRenderExplorer = document.getElementById('tab-renderexplorer');
+    var tabImportExport = document.getElementById('tab-importexport');
 
     // Handlers to show different explorers.
     document.getElementById('threadexplorer-link').addEventListener('click',
@@ -138,6 +139,7 @@ window.onload = function() {
             tabBlockExplorer.style.display = 'none';
             tabRenderExplorer.style.display = 'none';
             tabThreadExplorer.style.display = 'block';
+            tabImportExport.style.display = 'none';
         });
     document.getElementById('blockexplorer-link').addEventListener('click',
         function () {
@@ -146,6 +148,7 @@ window.onload = function() {
             tabBlockExplorer.style.display = 'block';
             tabRenderExplorer.style.display = 'none';
             tabThreadExplorer.style.display = 'none';
+            tabImportExport.style.display = 'none';
         });
     document.getElementById('renderexplorer-link').addEventListener('click',
         function () {
@@ -153,5 +156,14 @@ window.onload = function() {
             tabBlockExplorer.style.display = 'none';
             tabRenderExplorer.style.display = 'block';
             tabThreadExplorer.style.display = 'none';
+            tabImportExport.style.display = 'none';
+        });
+    document.getElementById('importexport-link').addEventListener('click',
+        function () {
+            window.exploreTabOpen = false;
+            tabBlockExplorer.style.display = 'none';
+            tabRenderExplorer.style.display = 'none';
+            tabThreadExplorer.style.display = 'none';
+            tabImportExport.style.display = 'block';
         });
 };

From bb48189e6f111ec56e040b807d571d2a3874f59f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 2 Sep 2016 08:41:12 -0400
Subject: [PATCH 206/302] CSS tweaks to import/export (#121)

---
 playground/index.html     | 2 +-
 playground/playground.css | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/playground/index.html b/playground/index.html
index 0492fac97..abd8e9e0b 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -37,7 +37,7 @@
                 &nbsp;
                 <input type="button" value="Import from XML" onclick="fromXml()" id="import">
                 <br><br>
-                <textarea id="importExport" style="width: 480px; height: 360px"></textarea>
+                <textarea id="importExport"></textarea>
             </p>
         </div>
     </div>
diff --git a/playground/playground.css b/playground/playground.css
index c2f65505a..32dd55836 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -35,3 +35,12 @@ a {
 #tab-blockexplorer, #tab-threadexplorer, #tab-importexport {
     display: none;
 }
+
+#importExport {
+    width: 400px;
+    height: 360px;
+    background: rgb(36,36,36);
+    color: rgb(217,217,217);
+    font-family: monospace;
+    font-size: 10pt;
+}

From 1437a358e155e6dd4c0a7b2e668e3c359982c6b4 Mon Sep 17 00:00:00 2001
From: liam4 <towerofnix@gmail.com>
Date: Fri, 2 Sep 2016 10:20:54 -0300
Subject: [PATCH 207/302] getDay is zero-based where Sunday = 0; Sunday should
 be 1

---
 src/blocks/scratch3_sensing.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index 44e5a9b3c..c1ac19c29 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -48,7 +48,7 @@ Scratch3SensingBlocks.prototype.current = function (args) {
     case 'year': return date.getFullYear();
     case 'month': return date.getMonth() + 1; // getMonth is zero-based
     case 'date': return date.getDate();
-    case 'dayofweek': return date.getDay();
+    case 'dayofweek': return date.getDay() + 1; // getDay is zero-based, Sun=0
     case 'hour': return date.getHours();
     case 'minute': return date.getMinutes();
     case 'second': return date.getSeconds();

From ae89cfbb6b8f76b57eb5aea041c10562b52423f0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 2 Sep 2016 09:47:27 -0400
Subject: [PATCH 208/302] Comment nit

---
 src/index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/index.js b/src/index.js
index fb889c9a8..e5c19ee1c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -125,7 +125,8 @@ VirtualMachine.prototype.loadProject = function (json) {
  * @param {string} targetId Id of target to set as editing.
  */
 VirtualMachine.prototype.setEditingTarget = function (targetId) {
-    if (targetId == this.editingTarget.id) { // No change.
+    // Has the target id changed? If not, exit.
+    if (targetId == this.editingTarget.id) {
         return;
     }
     var target = this.runtime.getTargetById(targetId);

From fc4c5023e14ae6e4d6eb1c04f19189a65b8a2ca1 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 2 Sep 2016 09:52:01 -0400
Subject: [PATCH 209/302] Adding some comments to playground.js handlers

---
 playground/playground.js | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 50b95b802..c715c2c93 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -12,6 +12,7 @@ var loadProject = function () {
 
 window.onload = function() {
     // Lots of global variables to make debugging easier
+    // Instantiate the VM worker.
     var vm = new window.VirtualMachine();
     window.vm = vm;
 
@@ -22,10 +23,12 @@ window.onload = function() {
     };
     loadProject();
 
+    // Instantiate the renderer and connect it to the VM.
     var canvas = document.getElementById('scratch-stage');
     window.renderer = new window.RenderWebGLLocal(canvas);
     window.renderer.connectWorker(window.vm.vmWorker);
 
+    // Instantiate scratch-blocks and attach it to the DOM.
     var toolbox = document.getElementById('toolbox');
     var workspace = window.Blockly.inject('blocks', {
         toolbox: toolbox,
@@ -48,23 +51,25 @@ window.onload = function() {
     });
     window.workspace = workspace;
 
-    // FPS counter.
+    // Attach scratch-blocks events to VM.
+    // @todo: Re-enable flyout listening after fixing GH-69.
+    workspace.addChangeListener(vm.blockListener);
+
+    // Create FPS counter.
     var stats = new window.Stats();
     document.getElementById('tab-renderexplorer').appendChild(stats.dom);
     stats.dom.style.position = 'relative';
     stats.begin();
 
-    // Block events.
-    // @todo: Re-enable flyout listening after fixing GH-69.
-    workspace.addChangeListener(vm.blockListener);
-
-    // Playground data
+    // Playground data tabs.
+    // Block representation tab.
     var blockexplorer = document.getElementById('blockexplorer');
     var updateBlockExplorer = function(blocks) {
         blockexplorer.innerHTML = JSON.stringify(blocks, null, 2);
         window.hljs.highlightBlock(blockexplorer);
     };
 
+    // Thread representation tab.
     var threadexplorer = document.getElementById('threadexplorer');
     var cachedThreadJSON = '';
     var updateThreadExplorer = function (threads) {
@@ -85,11 +90,14 @@ window.onload = function() {
         }
     };
 
+    // VM handlers.
+    // Receipt of new playground data (thread, block representations).
     vm.on('playgroundData', function(data) {
         updateThreadExplorer(data.threads);
         updateBlockExplorer(data.blocks);
     });
 
+    // Receipt of new block XML for the selected target.
     vm.on('workspaceUpdate', function (data) {
         window.Blockly.Events.disable();
         workspace.clear();
@@ -98,6 +106,7 @@ window.onload = function() {
         window.Blockly.Events.enable();
     });
 
+    // Receipt of new list of targets, selected target update.
     var selectedTarget = document.getElementById('selectedTarget');
     vm.on('targetsUpdate', function (data) {
         // Clear select box.

From e831866789487021398f73558e1e09054dde485e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 2 Sep 2016 11:23:09 -0400
Subject: [PATCH 210/302] Keyboard events, "key is down" reporter (#117)

* Keyboard events, "key is down" reporter

* Update comment about inputs

* Simplify/generalize keyMap into a keys-pressed list

* Cast values passed to scratchKeyToKeyCode appropriately.

* Cut unspaced key values

* Fix lint from merge commit
---
 playground/playground.js       | 25 +++++++++++++++
 src/blocks/scratch3_sensing.js | 10 ++++++
 src/engine/runtime.js          |  2 ++
 src/io/keyboard.js             | 57 ++++++++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 src/io/keyboard.js

diff --git a/playground/playground.js b/playground/playground.js
index a2c456e15..3592df1d3 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -166,6 +166,31 @@ window.onload = function() {
         e.preventDefault();
     });
 
+    // Feed keyboard events as VM I/O events.
+    document.addEventListener('keydown', function (e) {
+        // Don't capture keys intended for Blockly inputs.
+        if (e.target != document && e.target != document.body) {
+            return;
+        }
+        window.vm.postIOData('keyboard', {
+            keyCode: e.keyCode,
+            isDown: true
+        });
+        e.preventDefault();
+    });
+    document.addEventListener('keyup', function(e) {
+        // Always capture up events,
+        // even those that have switched to other targets.
+        window.vm.postIOData('keyboard', {
+            keyCode: e.keyCode,
+            isDown: false
+        });
+        // E.g., prevent scroll.
+        if (e.target != document && e.target != document.body) {
+            e.preventDefault();
+        }
+    });
+
     // Run threads
     vm.start();
 
diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index c1ac19c29..f868a4d3a 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -17,6 +17,8 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
         'sensing_mousex': this.getMouseX,
         'sensing_mousey': this.getMouseY,
         'sensing_mousedown': this.getMouseDown,
+        'sensing_keyoptions': this.keyOptions,
+        'sensing_keypressed': this.getKeyPressed,
         'sensing_current': this.current,
         'sensing_currentmenu': this.currentMenu
     };
@@ -59,4 +61,12 @@ Scratch3SensingBlocks.prototype.currentMenu = function (args) {
     return args.CURRENTMENU.toLowerCase();
 };
 
+Scratch3SensingBlocks.prototype.keyOptions = function (args) {
+    return args.KEY_OPTION.toLowerCase();
+};
+
+Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
+    return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTIONS);
+};
+
 module.exports = Scratch3SensingBlocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 2ebd9de53..fe539dfcd 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -5,6 +5,7 @@ var util = require('util');
 
 // Virtual I/O devices.
 var Clock = require('../io/clock');
+var Keyboard = require('../io/keyboard');
 var Mouse = require('../io/mouse');
 
 var defaultBlockPackages = {
@@ -53,6 +54,7 @@ function Runtime () {
 
     this.ioDevices = {
         'clock': new Clock(),
+        'keyboard': new Keyboard(),
         'mouse': new Mouse()
     };
 }
diff --git a/src/io/keyboard.js b/src/io/keyboard.js
new file mode 100644
index 000000000..b3a08bae6
--- /dev/null
+++ b/src/io/keyboard.js
@@ -0,0 +1,57 @@
+var Cast = require('../util/cast');
+
+function Keyboard () {
+    /**
+     * List of currently pressed keys.
+     * @type{Array.<number>}
+     */
+    this._keysPressed = [];
+}
+
+/**
+ * Convert a Scratch key name to a DOM keyCode.
+ * @param {Any} keyName Scratch key argument.
+ * @return {number} Key code corresponding to a DOM event.
+ */
+Keyboard.prototype._scratchKeyToKeyCode = function (keyName) {
+    if (typeof keyName == 'number') {
+        // Key codes placed in with number blocks.
+        return keyName;
+    }
+    var keyString = Cast.toString(keyName);
+    switch (keyString) {
+    case 'space': return 32;
+    case 'left arrow': return 37;
+    case 'up arrow': return 38;
+    case 'right arrow': return 39;
+    case 'down arrow': return 40;
+    // @todo: Consider adding other special keys here.
+    }
+    // Keys reported by DOM keyCode are upper case.
+    return keyString.toUpperCase().charCodeAt(0);
+};
+
+Keyboard.prototype.postData = function (data) {
+    if (data.keyCode) {
+        var index = this._keysPressed.indexOf(data.keyCode);
+        if (data.isDown) {
+            // If not already present, add to the list.
+            if (index < 0) {
+                this._keysPressed.push(data.keyCode);
+            }
+        } else if (index > -1) {
+            // If already present, remove from the list.
+            this._keysPressed.splice(index, 1);
+        }
+    }
+};
+
+Keyboard.prototype.getKeyIsDown = function (key) {
+    if (key == 'any') {
+        return this._keysPressed.length > 0;
+    }
+    var keyCode = this._scratchKeyToKeyCode(key);
+    return this._keysPressed.indexOf(keyCode) > -1;
+};
+
+module.exports = Keyboard;

From 8e217a75ab1045808a547e21dcd39d1fe809e39b Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Fri, 2 Sep 2016 11:42:59 -0400
Subject: [PATCH 211/302] Variable catagory like scratch-blocks (Code From
 Scratch-blocks) (Create Variable Button) (#131)

---
 playground/index.html | 38 +-------------------------------------
 1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 8847751e7..4851a490f 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -397,43 +397,7 @@
               </value>
     		    </block>
           </category>
-          <category name="Data" colour="#FF8C1A">
-            <block type="data_variable">
-              <value name="VARIABLE">
-                <shadow type="data_variablemenu"></shadow>
-              </value>
-            </block>
-            <block type="data_setvariableto">
-              <value name="VARIABLE">
-               <shadow type="data_variablemenu"></shadow>
-              </value>
-              <value name="VALUE">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="data_changevariableby">
-              <value name="VARIABLE">
-               <shadow type="data_variablemenu"></shadow>
-              </value>
-              <value name="VALUE">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="data_showvariable">
-              <value name="VARIABLE">
-               <shadow type="data_variablemenu"></shadow>
-              </value>
-            </block>
-            <block type="data_hidevariable">
-              <value name="VARIABLE">
-               <shadow type="data_variablemenu"></shadow>
-              </value>
-            </block>
-          </category>
+          <category name="Data" colour="#FF8C1A" custom="VARIABLE"></category>
           <category name="Events" colour="#FFD500">
             <block type="event_whenflagclicked"></block>
             <block type="event_whenkeypressed">

From 2b84c8d0fec6e8d31f11bb5177dfc28aad2a290b Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Fri, 2 Sep 2016 14:44:39 -0400
Subject: [PATCH 212/302] Move Load SB2 To Import/Export Section (#132)

---
 playground/index.html | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 4851a490f..fb1b97c75 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -17,13 +17,11 @@
             <a id="renderexplorer-link" href="#">Renderer</a><br />
             <a id="threadexplorer-link" href="#">VM Threads</a><br />
             <a id="blockexplorer-link" href="#">VM Block Representation</a><br />
-            <a id="importexport-link" href="#">Import/Export XML</a>
+            <a id="importexport-link" href="#">Import/Export</a>
         </p>
         <div id="tab-renderexplorer">
             Render<br />
             <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas>
-            <input id="projectId" value="119615668" />
-            <button id="projectLoadButton">Load</button>
         </div>
         <div id="tab-threadexplorer">
             Thread explorer
@@ -34,7 +32,9 @@
             <pre id="blockexplorer"></pre>
         </div>
         <div id="tab-importexport">
-            Import/Export XML
+            Import/Export
+            <input id="projectId" value="119615668" />
+            <button id="projectLoadButton">Load SB2</button><br />
             <p>
                 <input type="button" value="Export to XML" onclick="toXml()">
                 &nbsp;

From 7caf8e588aa61f00b55525a31a50da3c9afae852 Mon Sep 17 00:00:00 2001
From: dekrain <dawidkrainski8@gmail.com>
Date: Sat, 3 Sep 2016 22:33:45 +0200
Subject: [PATCH 213/302] More hats (#143)

* Key pressed hat

* Tabs -> Spaces

* Oops

* Edge activate

* Fix hat

Phew...

* I forgot to change it also here

:/ :/ :\

* Minor fixes for TravisCi

* Minor docs

* Line length
---
 src/blocks/scratch3_event.js |  3 ++-
 src/engine/runtime.js        |  2 +-
 src/io/keyboard.js           | 33 ++++++++++++++++++++++++++++++++-
 3 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index 71326d494..900fd1f2a 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -23,12 +23,13 @@ Scratch3EventBlocks.prototype.getHats = function () {
         'event_whenflagclicked': {
             restartExistingThreads: true
         },
-        /*'event_whenkeypressed': {
+        'event_whenkeypressed': {
             restartExistingThreads: false
         },
         'event_whenthisspriteclicked': {
             restartExistingThreads: true
         },
+		/*
         'event_whenbackdropswitchesto': {
             restartExistingThreads: true
         },*/
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index fe539dfcd..db157783b 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -54,7 +54,7 @@ function Runtime () {
 
     this.ioDevices = {
         'clock': new Clock(),
-        'keyboard': new Keyboard(),
+        'keyboard': new Keyboard(this),
         'mouse': new Mouse()
     };
 }
diff --git a/src/io/keyboard.js b/src/io/keyboard.js
index b3a08bae6..dc0f2dc72 100644
--- a/src/io/keyboard.js
+++ b/src/io/keyboard.js
@@ -1,11 +1,17 @@
 var Cast = require('../util/cast');
 
-function Keyboard () {
+function Keyboard (runtime) {
     /**
      * List of currently pressed keys.
      * @type{Array.<number>}
      */
     this._keysPressed = [];
+    /**
+     * Reference to the owning Runtime.
+     * Can be used, for example, to activate hats.
+     * @type{!Runtime}
+     */
+    this.runtime = runtime;
 }
 
 /**
@@ -31,6 +37,21 @@ Keyboard.prototype._scratchKeyToKeyCode = function (keyName) {
     return keyString.toUpperCase().charCodeAt(0);
 };
 
+Keyboard.prototype._keyCodeToScratchKey = function (keyCode) {
+    if (keyCode >= 48 && keyCode <= 90) {
+        // Standard letter.
+        return String.fromCharCode(keyCode).toLowerCase();
+    }
+    switch (keyCode) {
+    case 32: return 'space';
+    case 37: return 'leftarrow';
+    case 38: return 'uparrow';
+    case 39: return 'rightarrow';
+    case 40: return 'downarrow';
+    }
+    return null;
+};
+
 Keyboard.prototype.postData = function (data) {
     if (data.keyCode) {
         var index = this._keysPressed.indexOf(data.keyCode);
@@ -38,6 +59,16 @@ Keyboard.prototype.postData = function (data) {
             // If not already present, add to the list.
             if (index < 0) {
                 this._keysPressed.push(data.keyCode);
+                this.runtime.startHats('event_whenkeypressed',
+                    {
+                        'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
+                                          .toUpperCase()
+                    });
+
+                this.runtime.startHats('event_whenkeypressed',
+                    {
+                        'KEY_OPTION': 'ANY'
+                    });
             }
         } else if (index > -1) {
             // If already present, remove from the list.

From 9a8b68643a0a67e4913e8a58bdcb2b23b7105b5a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 6 Sep 2016 10:55:52 -0400
Subject: [PATCH 214/302] Shadow improvements (#135)

* Always add `next` to block representation

* Add `shadow` property to inputs, to maintain obscured shadows

* Create obscured shadows in SB2 import

* Add XML import of obscured shadows

* Alias SB2 shadow inputs to block inputs

* Add shadow to inputs on "delete inputs" test

* Add a small test to ensure obscured shadows are preserved

* Add more obscured shadow tests
---
 src/engine/adapter.js     |  7 +++-
 src/engine/blocks.js      | 40 ++++++++++++++-----
 src/import/sb2import.js   | 84 ++++++++++++++++++++++++++-------------
 test/fixtures/events.json |  6 +++
 test/unit/adapter.js      | 13 ++++++
 test/unit/blocks.js       | 27 ++++++++++---
 6 files changed, 132 insertions(+), 45 deletions(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 57c413f3e..90e401d68 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -114,11 +114,16 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
         case 'statement':
             // Recursively generate block structure for input block.
             domToBlock(childBlockNode, blocks, false);
+            if (childShadowNode && childBlockNode != childShadowNode) {
+                // Also generate the shadow block.
+                domToBlock(childShadowNode, blocks, false);
+            }
             // Link this block's input to the child block.
             var inputName = xmlChild.attribs.name;
             block.inputs[inputName] = {
                 name: inputName,
-                block: childBlockNode.attribs.id
+                block: childBlockNode.attribs.id,
+                shadow: childShadowNode ? childShadowNode.attribs.id : null
             };
             break;
         case 'next':
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 771ad9a94..a3d949a5f 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -166,6 +166,10 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
         });
         break;
     case 'delete':
+        // Don't accept delete events for shadow blocks being obscured.
+        if (this._blocks[e.blockId].shadow) {
+            return;
+        }
         this.deleteBlock({
             id: e.blockId
         });
@@ -181,9 +185,13 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
  * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
  */
 Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-    // Create new block
+    // Does the block already exist?
+    // Could happen, e.g., for an unobscured shadow.
+    if (this._blocks.hasOwnProperty(block.id)) {
+        return;
+    }
+    // Create new block.
     this._blocks[block.id] = block;
-
     // Push block id to scripts array.
     // Blocks are added as a top-level stack if they are marked as a top-block
     // (if they were top-level XML in the event) and if they are not
@@ -239,11 +247,11 @@ Blocks.prototype.moveBlock = function (e) {
         this._deleteScript(e.id);
         // Otherwise, try to connect it in its new place.
         if (e.newInput !== undefined) {
-             // Moved to the new parent's input.
-            this._blocks[e.newParent].inputs[e.newInput] = {
-                name: e.newInput,
-                block: e.id
-            };
+            // Moved to the new parent's input.
+            // Don't obscure the shadow block.
+            var newInput = this._blocks[e.newParent].inputs[e.newInput];
+            newInput.name = e.newInput;
+            newInput.block = e.id;
         } else {
             // Moved to the new parent's next connection.
             this._blocks[e.newParent].next = e.id;
@@ -272,6 +280,11 @@ Blocks.prototype.deleteBlock = function (e) {
         if (block.inputs[input].block !== null) {
             this.deleteBlock({id: block.inputs[input].block});
         }
+        // Delete obscured shadow blocks.
+        if (block.inputs[input].shadow !== null &&
+            block.inputs[input].shadow !== block.inputs[input].block) {
+            this.deleteBlock({id: block.inputs[input].shadow});
+        }
     }
 
     // Delete any script starting with this block.
@@ -319,9 +332,16 @@ Blocks.prototype.blockToXML = function (blockId) {
     for (var input in block.inputs) {
         var blockInput = block.inputs[input];
         // Only encode a value tag if the value input is occupied.
-        if (blockInput.block) {
-            xmlString += '<value name="' + blockInput.name + '">' +
-                this.blockToXML(blockInput.block) + '</value>';
+        if (blockInput.block || blockInput.shadow) {
+            xmlString += '<value name="' + blockInput.name + '">';
+            if (blockInput.block) {
+                xmlString += this.blockToXML(blockInput.block);
+            }
+            if (blockInput.shadow && blockInput.shadow != blockInput.block) {
+                // Obscured shadow.
+                xmlString += this.blockToXML(blockInput.shadow);
+            }
+            xmlString += '</value>';
         }
     }
     // Add any fields on this block.
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index beab39dd9..75bd418f7 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -183,6 +183,7 @@ function parseBlock (sb2block) {
         opcode: blockMetadata.opcode, // Converted, e.g. "motion_movesteps".
         inputs: {}, // Inputs to this block and the blocks they point to.
         fields: {}, // Fields on this block and their values.
+        next: null, // Next block.
         shadow: false, // No shadow blocks in an SB2 by default.
         children: [] // Store any generated children, flattened in `flatten`.
     };
@@ -192,13 +193,16 @@ function parseBlock (sb2block) {
     for (var i = 0; i < blockMetadata.argMap.length; i++) {
         var expectedArg = blockMetadata.argMap[i];
         var providedArg = sb2block[i + 1]; // (i = 0 is opcode)
+        // Whether the input is obscuring a shadow.
+        var shadowObscured = false;
         // Positional argument is an input.
         if (expectedArg.type == 'input') {
             // Create a new block and input metadata.
             var inputUid = uid();
             activeBlock.inputs[expectedArg.inputName] = {
                 name: expectedArg.inputName,
-                block: inputUid
+                block: null,
+                shadow: null
             };
             if (typeof providedArg == 'object') {
                 // Block or block list occupies the input.
@@ -210,37 +214,61 @@ function parseBlock (sb2block) {
                     // Single block occupies the input.
                     innerBlocks = [parseBlock(providedArg)];
                 }
-                activeBlock.inputs[expectedArg.inputName] = {
-                    name: expectedArg.inputName,
-                    block: innerBlocks[0].id
-                };
+                // Obscures any shadow.
+                shadowObscured = true;
+                activeBlock.inputs[expectedArg.inputName].block = (
+                    innerBlocks[0].id
+                );
                 activeBlock.children = (
                     activeBlock.children.concat(innerBlocks)
                 );
-            } else if (expectedArg.inputOp) {
-                // Unoccupied input. Generate a shadow block to occupy it.
-                var fieldName = expectedArg.inputName;
-                if (expectedArg.inputOp == 'math_number') {
-                    fieldName = 'NUM';
-                } else if (expectedArg.inputOp == 'text') {
-                    fieldName = 'TEXT';
-                } else if (expectedArg.inputOp == 'colour_picker') {
-                    fieldName = 'COLOR';
+            }
+            // Generate a shadow block to occupy the input.
+            // The shadow block is either visible or obscured.
+            if (!expectedArg.inputOp) {
+                // No editable shadow input; e.g., for a boolean.
+                continue;
+            }
+            // Each shadow has a field generated for it automatically.
+            // Value to be filled in the field.
+            var fieldValue = providedArg;
+            // Shadows' field names match the input name, except for these:
+            var fieldName = expectedArg.inputName;
+            if (expectedArg.inputOp == 'math_number') {
+                fieldName = 'NUM';
+                // Fields are given Scratch 2.0 default values if obscured.
+                if (shadowObscured) {
+                    fieldValue = 10;
                 }
-                var fields = {};
-                fields[fieldName] = {
-                    name: fieldName,
-                    value: providedArg
-                };
-                activeBlock.children.push({
-                    id: inputUid,
-                    opcode: expectedArg.inputOp,
-                    inputs: {},
-                    fields: fields,
-                    next: null,
-                    topLevel: false,
-                    shadow: true
-                });
+            } else if (expectedArg.inputOp == 'text') {
+                fieldName = 'TEXT';
+                if (shadowObscured) {
+                    fieldValue = '';
+                }
+            } else if (expectedArg.inputOp == 'colour_picker') {
+                fieldName = 'COLOR';
+                if (shadowObscured) {
+                    fieldValue = '#990000';
+                }
+            }
+            var fields = {};
+            fields[fieldName] = {
+                name: fieldName,
+                value: fieldValue
+            };
+            activeBlock.children.push({
+                id: inputUid,
+                opcode: expectedArg.inputOp,
+                inputs: {},
+                fields: fields,
+                next: null,
+                topLevel: false,
+                shadow: true
+            });
+            activeBlock.inputs[expectedArg.inputName].shadow = inputUid;
+            // If no block occupying the input, alias the block to the shadow.
+            if (!activeBlock.inputs[expectedArg.inputName].block) {
+                activeBlock.inputs[expectedArg.inputName].block = inputUid;
             }
         } else if (expectedArg.type == 'field') {
             // Add as a field on this block.
diff --git a/test/fixtures/events.json b/test/fixtures/events.json
index c1605cbde..d91370f6e 100644
--- a/test/fixtures/events.json
+++ b/test/fixtures/events.json
@@ -59,5 +59,11 @@
         "xml": {
             "outerHTML":  "<block type='operator_equals' id='l^H_{8[DDyDW?m)HIt@b' x='100' y='362'><value name='OPERAND1'><shadow type='text' id='Ud@4y]bc./]uv~te?brb'><field name='TEXT'></field></shadow></value><value name='OPERAND2'><shadow type='text' id='p8[y..,[K;~G,k7]N;08'><field name='TEXT'></field></shadow></value></block>"
         }
+    },
+    "createobscuredshadow": {
+        "name": "block",
+        "xml": {
+            "outerHTML": "<block type='operator_add' id='D;MqidqmaN}Dft)y#Bf`' x='80' y='98'><value name='NUM1'><shadow type='math_number' id='F[IFAdLbq8!q25+Nio@i'><field name='NUM'></field></shadow><block type='sensing_answer' id='D~ZQ|BYb1)xw4)8ziI%.'></block</value><value name='NUM2'><shadow type='math_number' id='|Sjv4!*X6;wj?QaCE{-9'><field name='NUM'></field></shadow></value></block>"
+        }
     }
 }
diff --git a/test/unit/adapter.js b/test/unit/adapter.js
index 63e823453..19289dacd 100644
--- a/test/unit/adapter.js
+++ b/test/unit/adapter.js
@@ -55,7 +55,9 @@ test('create with branch', function (t) {
     t.equal(result[0].topLevel, true);
     // In branch
     var branchBlockId = result[0].inputs['SUBSTACK']['block'];
+    var branchShadowId = result[0].inputs['SUBSTACK']['shadow'];
     t.type(branchBlockId, 'string');
+    t.equal(branchShadowId, null);
     // Find actual branch block
     var branchBlock = null;
     for (var i = 0; i < result.length; i++) {
@@ -83,6 +85,10 @@ test('create with two branches', function (t) {
     var secondBranchBlockId = result[0].inputs['SUBSTACK2']['block'];
     t.type(firstBranchBlockId, 'string');
     t.type(secondBranchBlockId, 'string');
+    var firstBranchShadowBlockId = result[0].inputs['SUBSTACK']['shadow'];
+    var secondBranchShadowBlockId = result[0].inputs['SUBSTACK2']['shadow'];
+    t.equal(firstBranchShadowBlockId, null);
+    t.equal(secondBranchShadowBlockId, null);
     // Find actual branch blocks
     var firstBranchBlock = null;
     var secondBranchBlock = null;
@@ -142,6 +148,13 @@ test('create with next connection', function (t) {
     t.end();
 });
 
+test('create with obscured shadow', function (t) {
+    var result = adapter(events.createobscuredshadow);
+    t.ok(Array.isArray(result));
+    t.equal(result.length, 4);
+    t.end();
+});
+
 test('create with invalid block xml', function (t) {
     // Entirely invalid block XML
     var result = adapter(events.createinvalid);
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index bd2348c03..81fb0ad93 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -130,7 +130,8 @@ test('getBranch', function (t) {
         inputs: {
             SUBSTACK: {
                 name: 'SUBSTACK',
-                block: 'foo2'
+                block: 'foo2',
+                shadow: null
             }
         },
         topLevel: true
@@ -164,11 +165,13 @@ test('getBranch2', function (t) {
         inputs: {
             SUBSTACK: {
                 name: 'SUBSTACK',
-                block: 'foo2'
+                block: 'foo2',
+                shadow: null
             },
             SUBSTACK2: {
                 name: 'SUBSTACK2',
-                block: 'foo3'
+                block: 'foo3',
+                shadow: null
             }
         },
         topLevel: true
@@ -416,11 +419,13 @@ test('delete inputs', function (t) {
         inputs: {
             input1: {
                 name: 'input1',
-                block: 'foo2'
+                block: 'foo2',
+                shadow: 'foo2'
             },
             SUBSTACK: {
                 name: 'SUBSTACK',
-                block: 'foo3'
+                block: 'foo3',
+                shadow: null
             }
         },
         topLevel: true
@@ -433,6 +438,14 @@ test('delete inputs', function (t) {
         inputs: {},
         topLevel: false
     });
+    b.createBlock({
+        id: 'foo5',
+        opcode: 'TEST_OBSCURED_SHADOW',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: false
+    });
     b.createBlock({
         id: 'foo3',
         opcode: 'TEST_BLOCK',
@@ -441,7 +454,8 @@ test('delete inputs', function (t) {
         inputs: {
             subinput: {
                 name: 'subinput',
-                block: 'foo4'
+                block: 'foo4',
+                shadow: 'foo5'
             }
         },
         topLevel: false
@@ -461,6 +475,7 @@ test('delete inputs', function (t) {
     t.type(b._blocks['foo2'], 'undefined');
     t.type(b._blocks['foo3'], 'undefined');
     t.type(b._blocks['foo4'], 'undefined');
+    t.type(b._blocks['foo5'], 'undefined');
     t.equal(b._scripts.indexOf('foo'), -1);
     t.equal(Object.keys(b._blocks).length, 0);
     t.equal(b._scripts.length, 0);

From 3dbfc3fdb6e3a37be5367bff4f638f6cf949fb88 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 6 Sep 2016 11:46:10 -0400
Subject: [PATCH 215/302] Tweaks from SB2 importer audit (#137)

* Fix SB2 variable imports!

* Fix expectedArg field types

* motion_pointindirection uses math_angle

* Fix "think for secs" expected input

* Add handling for empty input case (empty if-else, for example)

* Fix opcodes for if_else, repeat_until, set tempo

* Specialized number fields for SB2 import

* Convert color picker numbers to hex in SB2 import

* KEY_OPTIONS -> KEY_OPTION

* Backdrop blocks get BACKDROP

* Update toolbox XML to match naming changes

* Merge in math_angle case

* Move color converter to its own utility

* Fix merge conflicts

* Add negative color check.

* Fix keyoptions naming

* Pen JSON tweak post-scratch-blocks update
---
 playground/index.html    |  8 +++---
 src/import/sb2import.js  | 21 +++++++++------
 src/import/sb2specmap.js | 57 ++++++++++++++++++++++------------------
 src/util/color.js        | 17 ++++++++++++
 4 files changed, 65 insertions(+), 38 deletions(-)
 create mode 100644 src/util/color.js

diff --git a/playground/index.html b/playground/index.html
index fb1b97c75..e33b21034 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -205,12 +205,12 @@
             <block type="looks_nextcostume"></block>
             <block type="looks_nextbackdrop"></block>
             <block type="looks_switchbackdropto">
-              <value name="COSTUME">
+              <value name="BACKDROP">
                 <shadow type="looks_backdrops"></shadow>
               </value>
     		    </block>
             <block type="looks_switchbackdroptoandwait">
-              <value name="COSTUME">
+              <value name="BACKDROP">
                 <shadow type="looks_backdrops"></shadow>
               </value>
     		    </block>
@@ -503,7 +503,7 @@
             </block>
       		<block type="sensing_answer"></block>
     	    <block type="sensing_keypressed">
-              <value name="KEY_OPTIONS">
+              <value name="KEY_OPTION">
                 <shadow type="sensing_keyoptions"></shadow>
               </value>
           </block>
@@ -728,7 +728,7 @@
             output.focus();
             output.select();
           }
-    
+
           function fromXml() {
             var input = document.getElementById('importExport');
             var xml = Blockly.Xml.textToDom(input.value);
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 75bd418f7..07eb831b9 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -5,9 +5,9 @@
  * scratch-vm runtime structures.
  */
 
-var Sprite = require('../sprites/sprite');
 var Blocks = require('../engine/blocks');
-
+var Sprite = require('../sprites/sprite');
+var Color = require('../util/color.js');
 var uid = require('../util/uid');
 var specMap = require('./sb2specmap');
 
@@ -204,10 +204,10 @@ function parseBlock (sb2block) {
                 block: null,
                 shadow: null
             };
-            if (typeof providedArg == 'object') {
+            if (typeof providedArg == 'object' && providedArg) {
                 // Block or block list occupies the input.
                 var innerBlocks;
-                if (typeof providedArg[0] == 'object') {
+                if (typeof providedArg[0] == 'object' && providedArg[0]) {
                     // Block list occupies the input.
                     innerBlocks = parseBlockList(providedArg);
                 } else {
@@ -224,7 +224,6 @@ function parseBlock (sb2block) {
                 );
             }
             // Generate a shadow block to occupy the input.
-            // The shadow block is either visible or obscured.
             if (!expectedArg.inputOp) {
                 // No editable shadow input; e.g., for a boolean.
                 continue;
@@ -234,7 +233,11 @@ function parseBlock (sb2block) {
             var fieldValue = providedArg;
             // Shadows' field names match the input name, except for these:
             var fieldName = expectedArg.inputName;
-            if (expectedArg.inputOp == 'math_number') {
+            if (expectedArg.inputOp == 'math_number' ||
+                expectedArg.inputOp == 'math_whole_number' ||
+                expectedArg.inputOp == 'math_positive_number' ||
+                expectedArg.inputOp == 'math_integer' ||
+                expectedArg.inputOp == 'math_angle') {
                 fieldName = 'NUM';
                 // Fields are given Scratch 2.0 default values if obscured.
                 if (shadowObscured) {
@@ -246,7 +249,9 @@ function parseBlock (sb2block) {
                     fieldValue = '';
                 }
             } else if (expectedArg.inputOp == 'colour_picker') {
-                fieldName = 'COLOR';
+                // Convert SB2 color to hex.
+                fieldValue = Color.scratchColorToHex(providedArg);
+                fieldName = 'COLOUR';
                 if (shadowObscured) {
                     fieldValue = '#990000';
                 }
@@ -266,7 +271,7 @@ function parseBlock (sb2block) {
                 shadow: true
             });
             activeBlock.inputs[expectedArg.inputName].shadow = inputUid;
-            // If no block occupying the input, alias the block to the shadow.
+            // If no block occupying the input, alias to the shadow.
             if (!activeBlock.inputs[expectedArg.inputName].block) {
                 activeBlock.inputs[expectedArg.inputName].block = inputUid;
             }
diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js
index b27af983c..219265ede 100644
--- a/src/import/sb2specmap.js
+++ b/src/import/sb2specmap.js
@@ -44,7 +44,7 @@ var specMap = {
         'argMap':[
             {
                 'type':'input',
-                'inputOp':'math_number',
+                'inputOp':'math_angle',
                 'inputName':'DIRECTION'
             }
         ]
@@ -210,7 +210,7 @@ var specMap = {
             {
                 'type':'input',
                 'inputOp':'math_number',
-                'inputName':'MESSAGE'
+                'inputName':'SECS'
             }
         ]
     },
@@ -255,7 +255,7 @@ var specMap = {
             {
                 'type':'input',
                 'inputOp':'looks_backdrops',
-                'inputName':'COSTUME'
+                'inputName':'BACKDROP'
             }
         ]
     },
@@ -324,7 +324,7 @@ var specMap = {
         'argMap':[
             {
                 'type':'input',
-                'inputOp':'math_number',
+                'inputOp':'math_integer',
                 'inputName':'NUM'
             }
         ]
@@ -350,7 +350,7 @@ var specMap = {
             {
                 'type':'input',
                 'inputOp':'looks_backdrops',
-                'inputName':'COSTUME'
+                'inputName':'BACKDROP'
             }
         ]
     },
@@ -475,7 +475,7 @@ var specMap = {
         ]
     },
     'setTempoTo:':{
-        'opcode':'sound_settempoto',
+        'opcode':'sound_settempotobpm',
         'argMap':[
             {
                 'type':'input',
@@ -545,12 +545,12 @@ var specMap = {
             {
                 'type':'input',
                 'inputOp':'math_number',
-                'inputName':'XXXNAME'
+                'inputName':'SHADE'
             }
         ]
     },
     'setPenShadeTo:':{
-        'opcode':'pen_changepenshadeto',
+        'opcode':'pen_changepenshadeby',
         'argMap':[
             {
                 'type':'input',
@@ -653,7 +653,7 @@ var specMap = {
         'argMap':[
             {
                 'type':'input',
-                'inputOp':'math_number',
+                'inputOp':'math_positive_number',
                 'inputName':'DURATION'
             }
         ]
@@ -663,7 +663,7 @@ var specMap = {
         'argMap':[
             {
                 'type':'input',
-                'inputOp':'math_number',
+                'inputOp':'math_whole_number',
                 'inputName':'TIMES'
             },
             {
@@ -695,7 +695,7 @@ var specMap = {
         ]
     },
     'doIfElse':{
-        'opcode':'control_ifelse',
+        'opcode':'control_if_else',
         'argMap':[
             {
                 'type':'input',
@@ -712,7 +712,7 @@ var specMap = {
         ]
     },
     'doWaitUntil':{
-        'opcode':'control_waituntil',
+        'opcode':'control_wait_until',
         'argMap':[
             {
                 'type':'input',
@@ -721,7 +721,7 @@ var specMap = {
         ]
     },
     'doUntil':{
-        'opcode':'control_repeatuntil',
+        'opcode':'control_repeat_until',
         'argMap':[
             {
                 'type':'input',
@@ -829,7 +829,7 @@ var specMap = {
             {
                 'type':'input',
                 'inputOp':'sensing_keyoptions',
-                'inputName':'KEY_OPTIONS'
+                'inputName':'KEY_OPTION'
             }
         ]
     },
@@ -1108,7 +1108,7 @@ var specMap = {
         'argMap':[
             {
                 'type':'input',
-                'inputOp':'math_number',
+                'inputOp':'math_whole_number',
                 'inputName':'LETTER'
             },
             {
@@ -1169,11 +1169,12 @@ var specMap = {
         ]
     },
     'readVariable':{
-        'opcode':'data_getvariable',
+        'opcode':'data_variable',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'VARIABLE'
+                'type':'input',
+                'inputOp':'data_variablemenu',
+                'inputName':'VARIABLE'
             }
         ]
     },
@@ -1181,8 +1182,9 @@ var specMap = {
         'opcode':'data_setvariableto',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'VARIABLE'
+                'type':'input',
+                'inputOp':'data_variablemenu',
+                'inputName':'VARIABLE'
             },
             {
                 'type':'input',
@@ -1195,8 +1197,9 @@ var specMap = {
         'opcode':'data_changevariableby',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'VARIABLE'
+                'type':'input',
+                'inputOp':'data_variablemenu',
+                'inputName':'VARIABLE'
             },
             {
                 'type':'input',
@@ -1209,8 +1212,9 @@ var specMap = {
         'opcode':'data_showvariable',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'VARIABLE'
+                'type':'input',
+                'inputOp':'data_variablemenu',
+                'inputName':'VARIABLE'
             }
         ]
     },
@@ -1218,8 +1222,9 @@ var specMap = {
         'opcode':'data_hidevariable',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'VARIABLE'
+                'type':'input',
+                'inputOp':'data_variablemenu',
+                'inputName':'VARIABLE'
             }
         ]
     },
diff --git a/src/util/color.js b/src/util/color.js
new file mode 100644
index 000000000..81fe8b01e
--- /dev/null
+++ b/src/util/color.js
@@ -0,0 +1,17 @@
+function Color () {}
+
+/**
+ * Convert a Scratch color number to a hex string, #RRGGBB.
+ * @param {number} color RGB color as a decimal.
+ * @return {string} RGB color as #RRGGBB hex string.
+ */
+Color.scratchColorToHex = function (color) {
+    if (color < 0) {
+        color += 0xFFFFFF + 1;
+    }
+    var hex = Number(color).toString(16);
+    hex = '#' + '000000'.substr(0, 6 - hex.length) + hex;
+    return hex;
+};
+
+module.exports = Color;

From 3fcd70a8028f33050189ea029996e26bef874910 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 7 Sep 2016 15:57:53 -0400
Subject: [PATCH 216/302] KEY_OPTIONS -> KEY_OPTION

---
 src/blocks/scratch3_sensing.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index f868a4d3a..01717340b 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -66,7 +66,7 @@ Scratch3SensingBlocks.prototype.keyOptions = function (args) {
 };
 
 Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
-    return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTIONS);
+    return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTION);
 };
 
 module.exports = Scratch3SensingBlocks;

From f7e339f7c2609341f0b57044c78e04421f10eaae Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 7 Sep 2016 16:00:22 -0400
Subject: [PATCH 217/302] Remove uppercase from keyboard hat activators

---
 src/io/keyboard.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/io/keyboard.js b/src/io/keyboard.js
index dc0f2dc72..e99d59c28 100644
--- a/src/io/keyboard.js
+++ b/src/io/keyboard.js
@@ -62,12 +62,11 @@ Keyboard.prototype.postData = function (data) {
                 this.runtime.startHats('event_whenkeypressed',
                     {
                         'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
-                                          .toUpperCase()
                     });
 
                 this.runtime.startHats('event_whenkeypressed',
                     {
-                        'KEY_OPTION': 'ANY'
+                        'KEY_OPTION': 'any'
                     });
             }
         } else if (index > -1) {

From 14feb64005fa33b172d165e1cae59a3f47e8a3a3 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 8 Sep 2016 09:40:01 -0400
Subject: [PATCH 218/302] Create a new input if one doesn't exist (#148)

* Create a new input if one doesn't exist

* Add regression tests for move-into-empty and obscuring shadows via move
---
 src/engine/blocks.js | 12 ++++++---
 test/unit/blocks.js  | 61 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index a3d949a5f..421087f5b 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -249,9 +249,15 @@ Blocks.prototype.moveBlock = function (e) {
         if (e.newInput !== undefined) {
             // Moved to the new parent's input.
             // Don't obscure the shadow block.
-            var newInput = this._blocks[e.newParent].inputs[e.newInput];
-            newInput.name = e.newInput;
-            newInput.block = e.id;
+            var oldShadow = null;
+            if (this._blocks[e.newParent].inputs.hasOwnProperty(e.newInput)) {
+                oldShadow = this._blocks[e.newParent].inputs[e.newInput].shadow;
+            }
+            this._blocks[e.newParent].inputs[e.newInput] = {
+                name: e.newInput,
+                block: e.id,
+                shadow: oldShadow
+            };
         } else {
             // Moved to the new parent's next connection.
             this._blocks[e.newParent].next = e.id;
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index 81fb0ad93..2c9f8f13e 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -291,6 +291,67 @@ test('move', function (t) {
     t.end();
 });
 
+test('move into empty', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'bar',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.moveBlock({
+        id: 'bar',
+        newInput: 'fooInput',
+        newParent: 'foo'
+    });
+    t.equal(b._blocks['foo'].inputs['fooInput'].block, 'bar');
+    t.end();
+});
+
+test('move no obscure shadow', function (t) {
+    var b = new Blocks();
+    b.createBlock({
+        id: 'foo',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {
+            'fooInput': {
+                name: 'fooInput',
+                block: 'x',
+                shadow: 'y'
+            }
+        },
+        topLevel: true
+    });
+    b.createBlock({
+        id: 'bar',
+        opcode: 'TEST_BLOCK',
+        next: null,
+        fields: {},
+        inputs: {},
+        topLevel: true
+    });
+    b.moveBlock({
+        id: 'bar',
+        newInput: 'fooInput',
+        newParent: 'foo'
+    });
+    t.equal(b._blocks['foo'].inputs['fooInput'].block, 'bar');
+    t.equal(b._blocks['foo'].inputs['fooInput'].shadow, 'y');
+    t.end();
+});
+
 test('change', function (t) {
     var b = new Blocks();
     b.createBlock({

From 797f844de30df394068026bed2e7c09b7508d2a9 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 8 Sep 2016 09:40:27 -0400
Subject: [PATCH 219/302] Stage, costumes, backdrops (#149)

* Add `Clone.prototype.getCostumeIndexByName`, keep in range

* Add basic costume primitives from Scratch 2.0

* Add costume getter block

* Add properties and methods for distinguishing stage and sprites-vs-clones

* Add backdrop-related looks blocks

* Fix up "switch to backdrop" to be working

* Costume/backdrop reporters are 1-indexed

* Fire "when backdrop switched" hats

* Cut cloning helpers for a separate PR

* Disable many blocks on the stage

* Refactor into _setCostumeOrBackdrop; implement switch backdrop and wait

* Fire hats even when backdrop unchanged
---
 src/blocks/scratch3_event.js |   3 +-
 src/blocks/scratch3_looks.js | 125 ++++++++++++++++++++++++++++++++++-
 src/engine/runtime.js        |  13 ++++
 src/import/sb2import.js      |   9 ++-
 src/sprites/clone.js         |  40 ++++++++++-
 5 files changed, 183 insertions(+), 7 deletions(-)

diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index 900fd1f2a..330ab1d0e 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -29,10 +29,9 @@ Scratch3EventBlocks.prototype.getHats = function () {
         'event_whenthisspriteclicked': {
             restartExistingThreads: true
         },
-		/*
         'event_whenbackdropswitchesto': {
             restartExistingThreads: true
-        },*/
+        },
         'event_whengreaterthan': {
             restartExistingThreads: false,
             edgeActivated: true
diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index 33e1ef3bf..a2060e6c1 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -1,3 +1,5 @@
+var Cast = require('../util/cast');
+
 function Scratch3LooksBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -18,13 +20,23 @@ Scratch3LooksBlocks.prototype.getPrimitives = function() {
         'looks_thinkforsecs': this.sayforsecs,
         'looks_show': this.show,
         'looks_hide': this.hide,
+        'looks_backdrops': this.backdropMenu,
+        'looks_costume': this.costumeMenu,
+        'looks_switchcostumeto': this.switchCostume,
+        'looks_switchbackdropto': this.switchBackdrop,
+        'looks_switchbackdroptoandwait': this.switchBackdropAndWait,
+        'looks_nextcostume': this.nextCostume,
+        'looks_nextbackdrop': this.nextBackdrop,
         'looks_effectmenu': this.effectMenu,
         '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_size': this.getSize,
+        'looks_costumeorder': this.getCostumeIndex,
+        'looks_backdroporder': this.getBackdropIndex,
+        'looks_backdropname': this.getBackdropName
     };
 };
 
@@ -66,6 +78,103 @@ Scratch3LooksBlocks.prototype.hide = function (args, util) {
     util.target.setVisible(false);
 };
 
+/**
+ * Utility function to set the costume or backdrop of a target.
+ * Matches the behavior of Scratch 2.0 for different types of arguments.
+ * @param {!Target} target Target to set costume/backdrop to.
+ * @param {Any} requestedCostume Costume requested, e.g., 0, 'name', etc.
+ * @param {boolean=} opt_zeroIndex Set to zero-index the requestedCostume.
+ * @return {Array.<!Thread>} Any threads started by this switch.
+ */
+Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target,
+        requestedCostume, opt_zeroIndex) {
+    if (typeof requestedCostume === 'number') {
+        target.setCostume(opt_zeroIndex ?
+            requestedCostume : requestedCostume - 1);
+    } else {
+        var costumeIndex = target.getCostumeIndexByName(requestedCostume);
+        if (costumeIndex > -1) {
+            target.setCostume(costumeIndex);
+        } else if (costumeIndex == 'previous costume' ||
+                   costumeIndex == 'previous backdrop') {
+            target.setCostume(target.currentCostume - 1);
+        } else if (costumeIndex == 'next costume' ||
+                   costumeIndex == 'next backdrop') {
+            target.setCostume(target.currentCostume + 1);
+        } else {
+            var forcedNumber = Cast.toNumber(requestedCostume);
+            if (!isNaN(forcedNumber)) {
+                target.setCostume(opt_zeroIndex ?
+                    forcedNumber : forcedNumber - 1);
+            }
+        }
+    }
+    if (target == this.runtime.getTargetForStage()) {
+        // Target is the stage - start hats.
+        var newName = target.sprite.costumes[target.currentCostume].name;
+        return this.runtime.startHats('event_whenbackdropswitchesto', {
+            'BACKDROP': newName
+        });
+    }
+    return [];
+};
+
+// @todo(GH-146): Remove.
+Scratch3LooksBlocks.prototype.costumeMenu = function (args) {
+    return args.COSTUME;
+};
+
+Scratch3LooksBlocks.prototype.switchCostume = function (args, util) {
+    this._setCostumeOrBackdrop(util.target, args.COSTUME);
+};
+
+Scratch3LooksBlocks.prototype.nextCostume = function (args, util) {
+    this._setCostumeOrBackdrop(
+        util.target, util.target.currentCostume + 1, true
+    );
+};
+
+// @todo(GH-146): Remove.
+Scratch3LooksBlocks.prototype.backdropMenu = function (args) {
+    return args.BACKDROP;
+};
+
+Scratch3LooksBlocks.prototype.switchBackdrop = function (args) {
+    this._setCostumeOrBackdrop(this.runtime.getTargetForStage(), args.BACKDROP);
+};
+
+Scratch3LooksBlocks.prototype.switchBackdropAndWait = function (args, util) {
+    // Have we run before, starting threads?
+    if (!util.stackFrame.startedThreads) {
+        // No - switch the backdrop.
+        util.stackFrame.startedThreads = (
+            this._setCostumeOrBackdrop(
+                this.runtime.getTargetForStage(),
+                args.BACKDROP
+            )
+        );
+        if (util.stackFrame.startedThreads.length == 0) {
+            // Nothing was started.
+            return;
+        }
+    }
+    // We've run before; check if the wait is still going on.
+    var instance = this;
+    var waiting = util.stackFrame.startedThreads.some(function(thread) {
+        return instance.runtime.isActiveThread(thread);
+    });
+    if (waiting) {
+        util.yieldFrame();
+    }
+};
+
+Scratch3LooksBlocks.prototype.nextBackdrop = function () {
+    var stage = this.runtime.getTargetForStage();
+    this._setCostumeOrBackdrop(
+        stage, stage.currentCostume + 1, true
+    );
+};
+
 Scratch3LooksBlocks.prototype.effectMenu = function (args) {
     return args.EFFECT.toLowerCase();
 };
@@ -95,4 +204,18 @@ Scratch3LooksBlocks.prototype.getSize = function (args, util) {
     return util.target.size;
 };
 
+Scratch3LooksBlocks.prototype.getBackdropIndex = function () {
+    var stage = this.runtime.getTargetForStage();
+    return stage.currentCostume + 1;
+};
+
+Scratch3LooksBlocks.prototype.getBackdropName = function () {
+    var stage = this.runtime.getTargetForStage();
+    return stage.sprite.costumes[stage.currentCostume].name;
+};
+
+Scratch3LooksBlocks.prototype.getCostumeIndex = function (args, util) {
+    return util.target.currentCostume + 1;
+};
+
 module.exports = Scratch3LooksBlocks;
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index db157783b..143f30aa7 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -434,6 +434,19 @@ Runtime.prototype.getTargetById = function (targetId) {
     }
 };
 
+/**
+ * Get a target representing the Scratch stage, if one exists.
+ * @return {?Target} The target, if found.
+ */
+Runtime.prototype.getTargetForStage = function () {
+    for (var i = 0; i < this.targets.length; i++) {
+        var target = this.targets[i];
+        if (target.isStage) {
+            return target;
+        }
+    }
+};
+
 /**
  * Handle an animation frame from the main thread.
  */
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 07eb831b9..391ed06e3 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -20,7 +20,8 @@ var specMap = require('./sb2specmap');
 function sb2import (json, runtime) {
     parseScratchObject(
         JSON.parse(json),
-        runtime
+        runtime,
+        true
     );
 }
 
@@ -28,8 +29,9 @@ function sb2import (json, runtime) {
  * Parse a single "Scratch object" and create all its in-memory VM objects.
  * @param {!Object} object From-JSON "Scratch object:" sprite, stage, watcher.
  * @param {!Runtime} runtime Runtime object to load all structures into.
+ * @param {boolean} topLevel Whether this is the top-level object (stage).
  */
-function parseScratchObject (object, runtime) {
+function parseScratchObject (object, runtime, topLevel) {
     if (!object.hasOwnProperty('objName')) {
         // Watcher/monitor - skip this object until those are implemented in VM.
         // @todo
@@ -84,10 +86,11 @@ function parseScratchObject (object, runtime) {
     if (object.currentCostumeIndex) {
         target.currentCostume = object.currentCostumeIndex;
     }
+    target.isStage = topLevel;
     // 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);
+            parseScratchObject(object.children[j], runtime, false);
         }
     }
 }
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 408667ab8..9e6d23c8d 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -50,6 +50,12 @@ Clone.prototype.initDrawable = function () {
 };
 
 // Clone-level properties.
+/**
+ * Whether this clone represents the Scratch stage.
+ * @type {boolean}
+ */
+Clone.prototype.isStage = false;
+
 /**
  * Scratch X coordinate. Currently should range from -240 to 240.
  * @type {Number}
@@ -107,6 +113,9 @@ Clone.prototype.effects = {
  * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
  */
 Clone.prototype.setXY = function (x, y) {
+    if (this.isStage) {
+        return;
+    }
     this.x = x;
     this.y = y;
     if (this.renderer) {
@@ -121,6 +130,9 @@ Clone.prototype.setXY = function (x, y) {
  * @param {!number} direction New direction of clone.
  */
 Clone.prototype.setDirection = function (direction) {
+    if (this.isStage) {
+        return;
+    }
     // Keep direction between -179 and +180.
     this.direction = MathUtil.wrapClamp(direction, -179, 180);
     if (this.renderer) {
@@ -136,6 +148,9 @@ Clone.prototype.setDirection = function (direction) {
  * @param {?string} message Message to put in say bubble.
  */
 Clone.prototype.setSay = function (type, message) {
+    if (this.isStage) {
+        return;
+    }
     // @todo: Render to stage.
     if (!type || !message) {
         console.log('Clearing say bubble');
@@ -149,6 +164,9 @@ Clone.prototype.setSay = function (type, message) {
  * @param {!boolean} visible True if the sprite should be shown.
  */
 Clone.prototype.setVisible = function (visible) {
+    if (this.isStage) {
+        return;
+    }
     this.visible = visible;
     if (this.renderer) {
         this.renderer.updateDrawableProperties(this.drawableID, {
@@ -162,6 +180,9 @@ Clone.prototype.setVisible = function (visible) {
  * @param {!number} size Size of clone, from 5 to 535.
  */
 Clone.prototype.setSize = function (size) {
+    if (this.isStage) {
+        return;
+    }
     // Keep size between 5% and 535%.
     this.size = MathUtil.clamp(size, 5, 535);
     if (this.renderer) {
@@ -202,7 +223,10 @@ Clone.prototype.clearEffects = function () {
  * @param {number} index New index of costume.
  */
 Clone.prototype.setCostume = function (index) {
-    this.currentCostume = index;
+    // Keep the costume index within possible values.
+    this.currentCostume = MathUtil.wrapClamp(
+        index, 0, this.sprite.costumes.length - 1
+    );
     if (this.renderer) {
         this.renderer.updateDrawableProperties(this.drawableID, {
             skin: this.sprite.costumes[this.currentCostume].skin
@@ -210,6 +234,20 @@ Clone.prototype.setCostume = function (index) {
     }
 };
 
+/**
+ * Get a costume index of this clone, by name of the costume.
+ * @param {?string} costumeName Name of a costume.
+ * @return {number} Index of the named costume, or -1 if not present.
+ */
+Clone.prototype.getCostumeIndexByName = function (costumeName) {
+    for (var i = 0; i < this.sprite.costumes.length; i++) {
+        if (this.sprite.costumes[i].name == costumeName) {
+            return i;
+        }
+    }
+    return -1;
+};
+
 /**
  * Update all drawable properties for this clone.
  * Use when a batch has changed, e.g., when the drawable is first created.

From 5df0acc895a552067c43606ef1728437218723e0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 8 Sep 2016 09:40:53 -0400
Subject: [PATCH 220/302] Better glows (#152)

* Strip out old script glowing in thread management

* Add new tracking mechanism for glowing scripts

* Track parents and use them to determine script glows

* Use top-block for a thread if there's nothing on the stack

* Remove `console.log`
---
 src/engine/adapter.js   | 12 ++++---
 src/engine/blocks.js    | 16 ++++++++++
 src/engine/execute.js   |  7 +++++
 src/engine/runtime.js   | 70 ++++++++++++++++++++++++++++++++---------
 src/engine/thread.js    |  6 ++++
 src/import/sb2import.js |  6 ++++
 src/index.js            | 18 ++++++-----
 7 files changed, 107 insertions(+), 28 deletions(-)

diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 90e401d68..26f52be90 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -31,7 +31,7 @@ function domToBlocks (blocksDOM) {
         }
         var tagName = block.name.toLowerCase();
         if (tagName == 'block' || tagName == 'shadow') {
-            domToBlock(block, blocks, true);
+            domToBlock(block, blocks, true, null);
         }
     }
     // Flatten blocks object into a list.
@@ -48,8 +48,9 @@ function domToBlocks (blocksDOM) {
  * @param {Element} blockDOM DOM tree for an individual block.
  * @param {Object} blocks Collection of blocks to add to.
  * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
+ * @param {?string} parent Parent block ID.
  */
-function domToBlock (blockDOM, blocks, isTopBlock) {
+function domToBlock (blockDOM, blocks, isTopBlock, parent) {
     // Block skeleton.
     var block = {
         id: blockDOM.attribs.id, // Block ID
@@ -58,6 +59,7 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
         fields: {}, // Fields on this block and their values.
         next: null, // Next block in the stack, if one exists.
         topLevel: isTopBlock, // If this block starts a stack.
+        parent: parent, // Parent block ID, if available.
         shadow: blockDOM.name == 'shadow', // If this represents a shadow/slot.
         x: blockDOM.attribs.x, // X position of script, if top-level.
         y: blockDOM.attribs.y // Y position of script, if top-level.
@@ -113,10 +115,10 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
         case 'value':
         case 'statement':
             // Recursively generate block structure for input block.
-            domToBlock(childBlockNode, blocks, false);
+            domToBlock(childBlockNode, blocks, false, block.id);
             if (childShadowNode && childBlockNode != childShadowNode) {
                 // Also generate the shadow block.
-                domToBlock(childShadowNode, blocks, false);
+                domToBlock(childShadowNode, blocks, false, block.id);
             }
             // Link this block's input to the child block.
             var inputName = xmlChild.attribs.name;
@@ -132,7 +134,7 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
                 continue;
             }
             // Recursively generate block structure for next block.
-            domToBlock(childBlockNode, blocks, false);
+            domToBlock(childBlockNode, blocks, false, block.id);
             // Link next block to this block.
             block.next = childBlockNode.attribs.id;
             break;
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 421087f5b..ba9aac5bb 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -115,6 +115,20 @@ Blocks.prototype.getInputs = function (id) {
     return inputs;
 };
 
+/**
+ * Get the top-level script for a given block.
+ * @param {?string} id ID of block to query.
+ * @return {?string} ID of top-level script block.
+ */
+Blocks.prototype.getTopLevelScript = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    var block = this._blocks[id];
+    while (block.parent !== null) {
+        block = this._blocks[block.parent];
+    }
+    return block.id;
+};
+
 // ---------------------------------------------------------------------
 
 /**
@@ -237,6 +251,7 @@ Blocks.prototype.moveBlock = function (e) {
             // This block was connected to the old parent's next connection.
             oldParent.next = null;
         }
+        this._blocks[e.id].parent = null;
     }
 
     // Has the block become a top-level block?
@@ -262,6 +277,7 @@ Blocks.prototype.moveBlock = function (e) {
             // Moved to the new parent's next connection.
             this._blocks[e.newParent].next = e.id;
         }
+        this._blocks[e.id].parent = e.newParent;
     }
 };
 
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 5efe9bebd..6e19fcdfd 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -41,6 +41,7 @@ var execute = function (sequencer, thread) {
         }
         // Skip through the block.
         // (either hat with no predicate, or missing op).
+        thread.requestScriptGlowInFrame = true;
         return;
     }
 
@@ -110,6 +111,12 @@ var execute = function (sequencer, thread) {
         }
     });
 
+    if (typeof primitiveReportedValue === 'undefined') {
+        // No value reported - potentially a command block.
+        // Edge-activated hats don't request a glow; all commands do.
+        thread.requestScriptGlowInFrame = true;
+    }
+
     /**
      * Handle any reported value from the primitive, either directly returned
      * or after a promise resolves.
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 143f30aa7..473227ba8 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -57,28 +57,31 @@ function Runtime () {
         'keyboard': new Keyboard(this),
         'mouse': new Mouse()
     };
+
+    this._scriptGlowsPreviousFrame = [];
+    this._editingTarget = null;
 }
 
 /**
- * Event name for glowing a stack
+ * Event name for glowing a script.
  * @const {string}
  */
-Runtime.STACK_GLOW_ON = 'STACK_GLOW_ON';
+Runtime.SCRIPT_GLOW_ON = 'STACK_GLOW_ON';
 
 /**
- * Event name for unglowing a stack
+ * Event name for unglowing a script.
  * @const {string}
  */
-Runtime.STACK_GLOW_OFF = 'STACK_GLOW_OFF';
+Runtime.SCRIPT_GLOW_OFF = 'STACK_GLOW_OFF';
 
 /**
- * Event name for glowing a block
+ * Event name for glowing a block.
  * @const {string}
  */
 Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
 
 /**
- * Event name for unglowing a block
+ * Event name for unglowing a block.
  * @const {string}
  */
 Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
@@ -196,7 +199,6 @@ Runtime.prototype.clearEdgeActivatedValues = function () {
  */
 Runtime.prototype._pushThread = function (id) {
     var thread = new Thread(id);
-    this.glowScript(id, true);
     thread.pushStack(id);
     this.threads.push(thread);
     return thread;
@@ -209,7 +211,6 @@ Runtime.prototype._pushThread = function (id) {
 Runtime.prototype._removeThread = function (thread) {
     var i = this.threads.indexOf(thread);
     if (i > -1) {
-        this.glowScript(thread.topBlock, false);
         this.threads.splice(i, 1);
     }
 };
@@ -341,11 +342,6 @@ Runtime.prototype.stopAll = function () {
     var threadsCopy = this.threads.slice();
     while (threadsCopy.length > 0) {
         var poppedThread = threadsCopy.pop();
-        // Unglow any blocks on this thread's stack.
-        for (var i = 0; i < poppedThread.stack.length; i++) {
-            this.glowBlock(poppedThread.stack[i], false);
-        }
-        // Actually remove the thread.
         this._removeThread(poppedThread);
     }
 };
@@ -363,11 +359,55 @@ Runtime.prototype._step = function () {
         }
     }
     var inactiveThreads = this.sequencer.stepThreads(this.threads);
+    this._updateScriptGlows();
     for (var i = 0; i < inactiveThreads.length; i++) {
         this._removeThread(inactiveThreads[i]);
     }
 };
 
+Runtime.prototype.setEditingTarget = function (editingTarget) {
+    this._scriptGlowsPreviousFrame = [];
+    this._editingTarget = editingTarget;
+    this._updateScriptGlows();
+};
+
+Runtime.prototype._updateScriptGlows = function () {
+    // Set of scripts that request a glow this frame.
+    var requestedGlowsThisFrame = [];
+    // Final set of scripts glowing during this frame.
+    var finalScriptGlows = [];
+    // 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);
+        if (thread.requestScriptGlowInFrame && target == this._editingTarget) {
+            var blockForThread = thread.peekStack() || thread.topBlock;
+            var script = target.blocks.getTopLevelScript(blockForThread);
+            requestedGlowsThisFrame.push(script);
+        }
+    }
+    // Compare to previous frame.
+    for (var j = 0; j < this._scriptGlowsPreviousFrame.length; j++) {
+        var previousFrameGlow = this._scriptGlowsPreviousFrame[j];
+        if (requestedGlowsThisFrame.indexOf(previousFrameGlow) < 0) {
+            // Glow turned off.
+            this.glowScript(previousFrameGlow, false);
+        } else {
+            // Still glowing.
+            finalScriptGlows.push(previousFrameGlow);
+        }
+    }
+    for (var k = 0; k < requestedGlowsThisFrame.length; k++) {
+        var currentFrameGlow = requestedGlowsThisFrame[k];
+        if (this._scriptGlowsPreviousFrame.indexOf(currentFrameGlow) < 0) {
+            // Glow turned on.
+            this.glowScript(currentFrameGlow, true);
+            finalScriptGlows.push(currentFrameGlow);
+        }
+    }
+    this._scriptGlowsPreviousFrame = finalScriptGlows;
+};
+
 /**
  * Emit feedback for block glowing (used in the sequencer).
  * @param {?string} blockId ID for the block to update glow
@@ -388,9 +428,9 @@ Runtime.prototype.glowBlock = function (blockId, isGlowing) {
  */
 Runtime.prototype.glowScript = function (topBlockId, isGlowing) {
     if (isGlowing) {
-        this.emit(Runtime.STACK_GLOW_ON, topBlockId);
+        this.emit(Runtime.SCRIPT_GLOW_ON, topBlockId);
     } else {
-        this.emit(Runtime.STACK_GLOW_OFF, topBlockId);
+        this.emit(Runtime.SCRIPT_GLOW_OFF, topBlockId);
     }
 };
 
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 07a98b862..0dc982702 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -28,6 +28,12 @@ function Thread (firstBlock) {
      * @type {number}
      */
     this.status = 0; /* Thread.STATUS_RUNNING */
+
+    /**
+     * Whether the thread requests its script to glow during this frame.
+     * @type {boolean}
+     */
+    this.requestScriptGlowInFrame = false;
 }
 
 /**
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 391ed06e3..e8f14b708 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -115,6 +115,7 @@ function parseScripts (scripts, blocks) {
             parsedBlockList[0].x = scriptX * 1.1;
             parsedBlockList[0].y = scriptY * 1.1;
             parsedBlockList[0].topLevel = true;
+            parsedBlockList[0].parent = null;
         }
         // Flatten children and create add the blocks.
         var convertedBlocks = flatten(parsedBlockList);
@@ -139,6 +140,7 @@ function parseBlockList (blockList) {
         var block = blockList[i];
         var parsedBlock = parseBlock(block);
         if (previousBlock) {
+            parsedBlock.parent = previousBlock.id;
             previousBlock.next = parsedBlock.id;
         }
         previousBlock = parsedBlock;
@@ -217,6 +219,9 @@ function parseBlock (sb2block) {
                     // Single block occupies the input.
                     innerBlocks = [parseBlock(providedArg)];
                 }
+                for (var j = 0; j < innerBlocks.length; j++) {
+                    innerBlocks[j].parent = activeBlock.id;
+                }
                 // Obscures any shadow.
                 shadowObscured = true;
                 activeBlock.inputs[expectedArg.inputName].block = (
@@ -271,6 +276,7 @@ function parseBlock (sb2block) {
                 fields: fields,
                 next: null,
                 topLevel: false,
+                parent: activeBlock.id,
                 shadow: true
             });
             activeBlock.inputs[expectedArg.inputName].shadow = inputUid;
diff --git a/src/index.js b/src/index.js
index e5c19ee1c..e4dd8df5a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -31,11 +31,11 @@ function VirtualMachine () {
      */
     instance.editingTarget = null;
     // Runtime emits are passed along as VM emits.
-    instance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
-        instance.emit(Runtime.STACK_GLOW_ON, {id: id});
+    instance.runtime.on(Runtime.SCRIPT_GLOW_ON, function (id) {
+        instance.emit(Runtime.SCRIPT_GLOW_ON, {id: id});
     });
-    instance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
-        instance.emit(Runtime.STACK_GLOW_OFF, {id: id});
+    instance.runtime.on(Runtime.SCRIPT_GLOW_OFF, function (id) {
+        instance.emit(Runtime.SCRIPT_GLOW_OFF, {id: id});
     });
     instance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
         instance.emit(Runtime.BLOCK_GLOW_ON, {id: id});
@@ -114,6 +114,7 @@ VirtualMachine.prototype.loadProject = function (json) {
     // Update the VM user's knowledge of targets and blocks on the workspace.
     this.emitTargetsUpdate();
     this.emitWorkspaceUpdate();
+    this.runtime.setEditingTarget(this.editingTarget);
 };
 
 /**
@@ -135,6 +136,7 @@ VirtualMachine.prototype.setEditingTarget = function (targetId) {
         // Emit appropriate UI updates.
         this.emitTargetsUpdate();
         this.emitWorkspaceUpdate();
+        this.runtime.setEditingTarget(target);
     }
 };
 
@@ -233,11 +235,11 @@ if (ENV_WORKER) {
         }
     };
     // Bind runtime's emitted events to postmessages.
-    self.vmInstance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
-        self.postMessage({method: Runtime.STACK_GLOW_ON, id: id});
+    self.vmInstance.runtime.on(Runtime.SCRIPT_GLOW_ON, function (id) {
+        self.postMessage({method: Runtime.SCRIPT_GLOW_ON, id: id});
     });
-    self.vmInstance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
-        self.postMessage({method: Runtime.STACK_GLOW_OFF, id: id});
+    self.vmInstance.runtime.on(Runtime.SCRIPT_GLOW_OFF, function (id) {
+        self.postMessage({method: Runtime.SCRIPT_GLOW_OFF, id: id});
     });
     self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
         self.postMessage({method: Runtime.BLOCK_GLOW_ON, id: id});

From d93eeed05d21dbfd5e8a844eabe3861fef45c466 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 10:58:50 -0400
Subject: [PATCH 221/302] More color utilities, touching color, color touching
 color (#155)

* Fill out color utilities

* Amend Color.decimalToHex name

* Add `Cast.toScaledRgbColor`

* Add touching color, color touching color blocks

* Fix scale of Cast.toRgbColor

* Fix format of colors to use renderer-style lists

* Update `Color.decimalToRgb`

* Lint self
---
 src/blocks/scratch3_sensing.js | 20 ++++++++++
 src/import/sb2import.js        |  2 +-
 src/sprites/clone.js           | 29 ++++++++++++++
 src/util/cast.js               | 17 ++++++++
 src/util/color.js              | 71 +++++++++++++++++++++++++++++++---
 5 files changed, 132 insertions(+), 7 deletions(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index 01717340b..d9605a03c 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -1,3 +1,5 @@
+var Cast = require('../util/cast');
+
 function Scratch3SensingBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -12,6 +14,9 @@ function Scratch3SensingBlocks(runtime) {
  */
 Scratch3SensingBlocks.prototype.getPrimitives = function() {
     return {
+        'colour_picker': this.colorPicker,
+        'sensing_touchingcolor': this.touchingColor,
+        'sensing_coloristouchingcolor': this.colorTouchingColor,
         'sensing_timer': this.getTimer,
         'sensing_resettimer': this.resetTimer,
         'sensing_mousex': this.getMouseX,
@@ -24,6 +29,21 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
     };
 };
 
+Scratch3SensingBlocks.prototype.colorPicker = function (args) {
+    return args.COLOUR;
+};
+
+Scratch3SensingBlocks.prototype.touchingColor = function (args, util) {
+    var color = Cast.toRgbColorList(args.COLOR);
+    return util.target.isTouchingColor(color);
+};
+
+Scratch3SensingBlocks.prototype.colorTouchingColor = function (args, util) {
+    var maskColor = Cast.toRgbColorList(args.COLOR);
+    var targetColor = Cast.toRgbColorList(args.COLOR2);
+    return util.target.colorIsTouchingColor(targetColor, maskColor);
+};
+
 Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
     return util.ioQuery('clock', 'projectTimer');
 };
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index e8f14b708..b337f9326 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -258,7 +258,7 @@ function parseBlock (sb2block) {
                 }
             } else if (expectedArg.inputOp == 'colour_picker') {
                 // Convert SB2 color to hex.
-                fieldValue = Color.scratchColorToHex(providedArg);
+                fieldValue = Color.decimalToHex(providedArg);
                 fieldName = 'COLOUR';
                 if (shadowObscured) {
                     fieldValue = '#990000';
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 9e6d23c8d..72b26d139 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -273,4 +273,33 @@ Clone.prototype.getName = function () {
     return this.sprite.name;
 };
 
+/**
+ * Return whether the clone is touching a color.
+ * @param {Array.<number>} rgb [r,g,b], values between 0-255.
+ * @return {Promise.<Boolean>} True iff the clone is touching the color.
+ */
+Clone.prototype.isTouchingColor = function (rgb) {
+    if (this.renderer) {
+        return this.renderer.isTouchingColor(this.drawableID, rgb);
+    }
+    return false;
+};
+
+/**
+ * Return whether the clone's color is touching a color.
+ * @param {Object} targetRgb {Array.<number>} [r,g,b], values between 0-255.
+ * @param {Object} maskRgb {Array.<number>} [r,g,b], values between 0-255.
+ * @return {Promise.<Boolean>} True iff the clone's color is touching the color.
+ */
+Clone.prototype.colorIsTouchingColor = function (targetRgb, maskRgb) {
+    if (this.renderer) {
+        return this.renderer.isTouchingColor(
+            this.drawableID,
+            targetRgb,
+            maskRgb
+        );
+    }
+    return false;
+};
+
 module.exports = Clone;
diff --git a/src/util/cast.js b/src/util/cast.js
index 1f84663a3..8c1e534ab 100644
--- a/src/util/cast.js
+++ b/src/util/cast.js
@@ -1,3 +1,5 @@
+var Color = require('../util/color');
+
 function Cast () {}
 
 /**
@@ -63,6 +65,21 @@ Cast.toString = function (value) {
     return String(value);
 };
 
+/**
+ * Cast any Scratch argument to an RGB color object to be used for the renderer.
+ * @param {*} value Value to convert to RGB color object.
+ * @return {Array.<number>} [r,g,b], values between 0-255.
+ */
+Cast.toRgbColorList = function (value) {
+    var color;
+    if (typeof value == 'string' && value.substring(0, 1) == '#') {
+        color = Color.hexToRgb(value);
+    } else {
+        color = Color.decimalToRgb(Cast.toNumber(value));
+    }
+    return [color.r, color.g, color.b];
+};
+
 /**
  * Compare two values, using Scratch cast, case-insensitive string compare, etc.
  * In Scratch 2.0, this is captured by `interp.compare.`
diff --git a/src/util/color.js b/src/util/color.js
index 81fe8b01e..2635c1b6c 100644
--- a/src/util/color.js
+++ b/src/util/color.js
@@ -1,17 +1,76 @@
 function Color () {}
 
 /**
- * Convert a Scratch color number to a hex string, #RRGGBB.
- * @param {number} color RGB color as a decimal.
+ * Convert a Scratch decimal color to a hex string, #RRGGBB.
+ * @param {number} decimal RGB color as a decimal.
  * @return {string} RGB color as #RRGGBB hex string.
  */
-Color.scratchColorToHex = function (color) {
-    if (color < 0) {
-        color += 0xFFFFFF + 1;
+Color.decimalToHex = function (decimal) {
+    if (decimal < 0) {
+        decimal += 0xFFFFFF + 1;
     }
-    var hex = Number(color).toString(16);
+    var hex = Number(decimal).toString(16);
     hex = '#' + '000000'.substr(0, 6 - hex.length) + hex;
     return hex;
 };
 
+/**
+ * Convert a Scratch decimal color to an RGB color object.
+ * @param {number} decimal RGB color as decimal.
+ * @returns {Object} {r: R, g: G, b: B}, values between 0-255
+ */
+Color.decimalToRgb = function (decimal) {
+    var r = (decimal >> 16) & 0xFF;
+    var g = (decimal >> 8) & 0xFF;
+    var b = decimal & 0xFF;
+    return {r: r, g: g, b: b};
+};
+
+/**
+ * Convert a hex color (e.g., F00, #03F, #0033FF) to an RGB color object.
+ * CC-BY-SA Tim Down:
+ * https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
+ * @param {!string} hex Hex representation of the color.
+ * @return {Object} {r: R, g: G, b: B}, 0-255, or null.
+ */
+Color.hexToRgb = function (hex) {
+    var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+    hex = hex.replace(shorthandRegex, function(m, r, g, b) {
+        return r + r + g + g + b + b;
+    });
+    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+    return result ? {
+        r: parseInt(result[1], 16),
+        g: parseInt(result[2], 16),
+        b: parseInt(result[3], 16)
+    } : null;
+};
+
+/**
+ * Convert an RGB color object to a hex color.
+ * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
+ * @return {!string} Hex representation of the color.
+ */
+Color.rgbToHex = function (rgb) {
+    return Color.decimalToHex(Color.rgbToDecimal(rgb));
+};
+
+/**
+ * Convert an RGB color object to a Scratch decimal color.
+ * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
+ * @return {!number} Number representing the color.
+ */
+Color.rgbToDecimal = function (rgb) {
+    return (rgb.r << 16) + (rgb.g << 8) + rgb.b;
+};
+
+/**
+* Convert a hex color (e.g., F00, #03F, #0033FF) to a decimal color number.
+* @param {!string} hex Hex representation of the color.
+* @return {!number} Number representing the color.
+*/
+Color.hexToDecimal = function (hex) {
+    return Color.rgbToDecimal(Color.hexToRgb(hex));
+};
+
 module.exports = Color;

From 40b530fa7e134dac857d2519fc62daec783a09f3 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Mon, 12 Sep 2016 11:05:16 -0400
Subject: [PATCH 222/302] Offline Support [READY TO MERGE?] [ALONG WITH THE
 SCRATCH-RENDER PR] (#138)

* Remove Fallback Project

* Added A Newline and Removed Fallback Project

* Made The SB2 Project Import Field Fit In  More With All Other Textboxes

* Better Description Of SB2 Import Field

* Oops!

* The XML Import Area Doses Not Need To Be Resizable!

* That Didn't Work As Planned

* Now it won't rezize

* Added SB3New

* Add Code For SB3New

* Better 404

* Indentation

* NodeJS complains about quotes

* Moved And Renamed SB3New

* Renamed Refrences

* Prefix With ./

* Typo

* Newline Fix

* Scratch Cat By Default!

* Single Quotes And Max Legth Fixed

* Better Comment Above loadProject

* Move newProject to index.js

* Added Dependincies to index.js

* Deleted newProject.js

* Removed Unneeeded Semicolon

* @param {?string}

* Added SVG For Scxratch Cat

* Now Uses Scratch Cat Offline (REQUIRES PULL REQUEST MADE TO SCRATCH-RENDER TO BE MERGED OR IT WILL NOT WORK)

* Added Stage PNG

* Added Stage Creation

* Fix Sizing Issues

* Import And Compatibility With Less Hacky Image Import (Scratch-Render)

* Import And Compatibility With Less Hacky Image Import (Scratch-Render)

* Fixed Line Length

* Added Navigation Bar

* Added CSS For Drop Down Menus

* Nicer Scale

* Nicer Dropdowns

* Remobved Dropdown CSS (It Didn't Work)

* Add Scratch Player Bar CSS

* Add Scratch Player Bar HTML
---
 playground/index.html     |  29 +++++++++++----------
 playground/playground.css |  53 ++++++++++++++++++++++++++++++++++----
 playground/playground.js  |  10 ++++---
 src/Stage.png             | Bin 0 -> 1346 bytes
 src/import/sb2import.js   |   3 ++-
 src/index.js              |  46 ++++++++++++++++++++++++++++++++-
 src/scratch_cat.svg       |  42 ++++++++++++++++++++++++++++++
 7 files changed, 158 insertions(+), 25 deletions(-)
 create mode 100644 src/Stage.png
 create mode 100644 src/scratch_cat.svg

diff --git a/playground/index.html b/playground/index.html
index e33b21034..74a26d422 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -9,19 +9,20 @@
 </head>
 <body>
     <div id="vm-devtools">
-        <h2>Scratch VM Playground</h2>
-        <button id="greenflag">Green flag</button>
-        <button id="stopall">Stop</button>
-        <select id="selectedTarget" multiple></select>
-        <p>
-            <a id="renderexplorer-link" href="#">Renderer</a><br />
-            <a id="threadexplorer-link" href="#">VM Threads</a><br />
-            <a id="blockexplorer-link" href="#">VM Block Representation</a><br />
-            <a id="importexport-link" href="#">Import/Export</a>
-        </p>
+        <ul>
+            <li><a id="renderexplorer-link" href="#">Home</a></li>
+            <li><a id="threadexplorer-link" href="#">VM Threads</a></li>
+            <li><a id="blockexplorer-link" href="#">VM Block Representation</a></li>
+            <li><a id="importexport-link" href="#">Import/Export</a></li>
+        </ul><br />
         <div id="tab-renderexplorer">
-            Render<br />
-            <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas>
+            Home<br />
+            <rendererTop><rendererButtons>
+                <button id="greenflag">Green flag</button>
+                <button id="stopall">Stop</button><br />
+            </rendererButtons></rendererTop>
+            <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas><br />
+            <select id="selectedTarget" multiple></select><br />
         </div>
         <div id="tab-threadexplorer">
             Thread explorer
@@ -32,8 +33,8 @@
             <pre id="blockexplorer"></pre>
         </div>
         <div id="tab-importexport">
-            Import/Export
-            <input id="projectId" value="119615668" />
+            Import/Export<br />
+            Project ID: <input id="projectId" value="" />
             <button id="projectLoadButton">Load SB2</button><br />
             <p>
                 <input type="button" value="Export to XML" onclick="toXml()">
diff --git a/playground/playground.css b/playground/playground.css
index 32dd55836..7f789b9bd 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -1,6 +1,9 @@
 body {
     background: rgb(36,36,36);
 }
+textarea {
+    resize: none;
+}
 a {
     color: rgb(217,217,217);
 }
@@ -16,13 +19,12 @@ a {
     position: absolute;
     left: 1%;
     right: 60%;
-    top: 0;
+    top: 1%;
     bottom: 0;
     width: 35%;
 }
 #blockexplorer, #threadexplorer, #importexport {
     position: absolute;
-    width: 100%;
     height: 75%;
     overflow: scroll;
     border: 1px solid #fff;
@@ -30,17 +32,58 @@ a {
     color: rgb(217,217,217);
     font-family: monospace;
     font-size: 10pt;
+    width: 480px;
+    height: 360px;
 }
-
 #tab-blockexplorer, #tab-threadexplorer, #tab-importexport {
     display: none;
 }
-
 #importExport {
-    width: 400px;
+    width: 480px;
     height: 360px;
     background: rgb(36,36,36);
     color: rgb(217,217,217);
     font-family: monospace;
     font-size: 10pt;
 }
+#projectId {
+    background: rgb(36,36,36);
+    color: rgb(217,217,217);
+    font-family: monospace;
+    font-size: 10pt;
+}
+ul {
+    display: block;
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+    overflow: hidden;
+    background-color: #333;
+}
+rendererTop {
+    display: block;
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+    overflow: hidden;
+    background-color: #696969;
+    width: 480px;
+}
+rendererButtons {
+    float: right;
+    padding: 12px;
+}
+li {
+    float: left;
+}
+li a {
+    display: block;
+    color: white;
+    text-align: center;
+    padding: 14px 16px;
+    text-decoration: none;
+}
+/* Change the link color to #111 (black) on hover */
+li a:hover {
+    background-color: #111;
+}
diff --git a/playground/playground.js b/playground/playground.js
index 3592df1d3..30d10c123 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -1,11 +1,13 @@
 var loadProject = function () {
-    var id = location.hash.substring(1) || 119615668;
+    var id = location.hash.substring(1);
     var url = 'https://projects.scratch.mit.edu/internalapi/project/' +
         id + '/get/';
     var r = new XMLHttpRequest();
-    r.addEventListener('load', function() {
-        window.vm.loadProject(this.responseText);
-    });
+    r.onreadystatechange = function() {
+        if (this.readyState == 4) {
+            window.vm.loadProject(this.responseText);
+        }
+    };
     r.open('GET', url);
     r.send();
 };
diff --git a/src/Stage.png b/src/Stage.png
new file mode 100644
index 0000000000000000000000000000000000000000..c60861c2bd315d6eaffdb9dfb632abb49e1102d4
GIT binary patch
literal 1346
zcmeAS@N?(olHy`uVBq!ia0y~yV0-|?85~SN5r)wH<v^0LILO_JVcj{Imp~3nx}&cn
z1H;CC?mvmFKt5-IM`SSr1K(i~W;~w1A_b`Cx~Gd{NJZS+D~5~=3_OPy{4~FN^8};P
z4#o*884Vha%r2Z#3SJi&0-M-6giIW!EMQ#3!YiOUDm5A!qiJI_I}FmoVbV7CV3uBk
U&mZa{f#n{9r>mdKI;Vst00K&1Q~&?~

literal 0
HcmV?d00001

diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index b337f9326..494f528cd 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -51,7 +51,8 @@ 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: costume.baseLayerMD5,
+                skin: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/' 
+                    + costume.baseLayerMD5 + '/get/',
                 name: costume.costumeName,
                 bitmapResolution: costume.bitmapResolution,
                 rotationCenterX: costume.rotationCenterX,
diff --git a/src/index.js b/src/index.js
index e4dd8df5a..ceb52152f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,6 +3,8 @@ var util = require('util');
 
 var Runtime = require('./engine/runtime');
 var sb2import = require('./import/sb2import');
+var Sprite = require('./sprites/sprite');
+var Blocks = require('./engine/blocks');
 
 /**
  * Whether the environment is a WebWorker.
@@ -104,9 +106,51 @@ VirtualMachine.prototype.postIOData = function (device, data) {
 
 /**
  * Load a project from a Scratch 2.0 JSON representation.
- * @param {string} json JSON string representing the project.
+ * @param {?string} json JSON string representing the project.
+ * If JSON is NULL, fallback to creating blank project.
  */
 VirtualMachine.prototype.loadProject = function (json) {
+    if (!json) {
+        // Creates 'Stage'
+        var blocks2 = new Blocks();
+        var stage = new Sprite(blocks2);
+        stage.name = 'Stage';
+        stage.costumes.push({
+            skin: '/src/Stage.png',
+            name: 'backdrop1',
+            bitmapResolution: 1,
+            rotationCenterX: 240,
+            rotationCenterY: 180}); 
+        var target2 = stage.createClone();
+        this.runtime.targets.push(target2);
+        target2.x = 0;
+        target2.y = 0;
+        target2.direction = 90;
+        target2.size = 200;
+        target2.visible = true;
+        target2.isStage = true;
+        // Creates 'Sprite1'
+        var blocks1 = new Blocks();
+        var sprite = new Sprite(blocks1);
+        sprite.name = 'Sprite1';
+        sprite.costumes.push({
+            skin: '/src/scratch_cat.svg',
+            name: 'costume1',
+            bitmapResolution: 1,
+            rotationCenterX: 47,
+            rotationCenterY: 55}); 
+        var target1 = sprite.createClone();
+        this.runtime.targets.push(target1);
+        target1.x = 0;
+        target1.y = 0;
+        target1.direction = 90;
+        target1.size = 100;
+        target1.visible = true;
+        this.editingTarget = this.runtime.targets[0];
+        this.emitTargetsUpdate();
+        this.emitWorkspaceUpdate();
+        return;
+    }
     // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
     sb2import(json, this.runtime);
     // Select the first target for editing, e.g., the stage.
diff --git a/src/scratch_cat.svg b/src/scratch_cat.svg
new file mode 100644
index 000000000..823455468
--- /dev/null
+++ b/src/scratch_cat.svg
@@ -0,0 +1,42 @@
+<svg version="1.1" id="cat" x="0px" y="0px" width="95px" height="111px" viewBox="0 0 95 111" enable-background="new 0 0 95 111" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <g>
+    <g id="Layer_3">
+      <path fill="#FAA51D" stroke="#000000" d="M22.462,79.039c-2.415-0.451-5.304-1.309-7.742-3.503&#xD;&#xA;&#x9;&#x9;C9.268,70.629,7.526,62.535,3.672,64.622c-3.856,2.088-3.782,15.165,8.353,19.194c4.182,1.391,7.998,1.396,11.091,1.312&#xD;&#xA;&#x9;&#x9;c0.811-0.025,7.717-0.654,10.079-4.074c2.361-3.42,0.719-4.272-0.09-4.744C32.295,75.838,25.878,79.677,22.462,79.039z"/>
+      <path fill="#FFFFFF" d="M4.236,64.877c-1.989,0.613-3.075,4.998-2.076,8.484c0.998,3.49,2.634,5.022,3.863,6.398&#xD;&#xA;&#x9;&#x9;c1.528,1.038-0.72-2.402,1.361-4.15c2.075-1.744,5.733-0.914,5.733-0.914s-2.909-3.987-4.57-6.396&#xD;&#xA;&#x9;&#x9;C6.975,65.988,6.359,64.375,4.236,64.877z"/>
+    </g>
+    <g>
+      <path fill="#FAA51D" d="M38.217,86.756c0,0-8.832,6.2-17.071,8.412l0.086,0.215c1.247,1.824,5.87,7.497-0.334,9.496&#xD;&#xA;&#x9;&#x9;c-5.333,1.717-15.12-13.104-10.821-15.902c2.626-1.713,4.892-0.252,4.892-0.252s3.474-1.07,6.001-2.345&#xD;&#xA;&#x9;&#x9;c4.303-2.161,5.784-3.453,5.784-3.453s4.184-4.306,6.856-4.137C36.281,78.96,41.669,83.504,38.217,86.756z"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M21.232,95.383c1.247,1.824,5.87,7.497-0.334,9.496&#xD;&#xA;&#x9;&#x9;c-5.333,1.717-15.329-13.344-11.03-16.145c2.626-1.713,5.101-0.01,5.101-0.01s3.474-1.072,6.001-2.348&#xD;&#xA;&#x9;&#x9;c4.303-2.161,5.784-3.453,5.784-3.453"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M38.217,86.756c0,0-10.123,7.107-18.804,8.819"/>
+    </g>
+    <path fill="#FAA51D" stroke="#231F20" stroke-width="1.2" d="M52.169,74.885c0,0,1.235,0.165,4.744,3.676&#xD;&#xA;&#x9;c3.509,3.508,6.026,2.16,8.911,0.724c2.877-1.443,10.537-6.126,6.49-9.817c-4.049-3.688-6.207,1.146-9.715,2.405&#xD;&#xA;&#x9;c-3.512,1.26-5.061-2.487-6.858-4.287c-0.589-0.593-1.188-1.099-1.729-1.505c0,0-0.971-0.76-1.906,2.79&#xD;&#xA;&#x9;C51.172,72.412,50.162,73.415,52.169,74.885z"/>
+    <g id="Layer_2_1_">
+      <path fill="#FAA51D" stroke="#231F20" stroke-width="1.2" d="M46.753,82.012c1.188-0.912,2.397-2.402,3.951-4.713&#xD;&#xA;&#x9;&#x9;c1.296-1.927,2.7-5.578,2.7-5.578c0.875-2.521,1.934-6.576-1.902-7.296c-1.553-0.291-4.079-0.098-7.67-0.776&#xD;&#xA;&#x9;&#x9;c-3.593-0.681-6.798-2.522-9.517,2.233c-2.718,4.757-9.59,8.271-1.056,16.563c0,0,4.901,3.842,10.764,9.639&#xD;&#xA;&#x9;&#x9;c4.831,4.775,12.045,10.602,12.045,10.602s18.972,2.188,19.535-0.693c1.922-9.79-14.777-6.911-14.777-6.911&#xD;&#xA;&#x9;&#x9;s-4.605-3.933-6.725-5.794c-3.478-3.059-11.125-10.771-11.125-10.771"/>
+      <path fill="#FFFFFF" d="M51.253,75.434c0,0,2.47-2.66-2.469-5.317c-4.939-2.657-7.213-0.017-8.739,1.521&#xD;&#xA;&#x9;&#x9;c-2.644,2.655,3.443,6.611,3.443,6.611l3.176,3.204c0,0,1.738-1.647,2.499-2.979C50.036,77.26,51.253,75.434,51.253,75.434"/>
+    </g>
+    <g id="Layer_8"/>
+    <path fill="#FAA51D" stroke="#231F20" stroke-width="1.2" d="M29.926,73.218c0.749-0.571,2.889-2.202,4.854-3.657&#xD;&#xA;&#x9;c2.428-1.799,6.117-5.849,1.077-7.646c-5.04-1.801-7.507,1.604-11.519,4.946c-2.159,1.801-5.308,2.699-4.319,6.209&#xD;&#xA;&#x9;c0.993,3.511,4.862,13.408,11.789,10.17c6.929-3.239-1.799-9.18-3.06-11.157"/>
+    <g id="Layer_2">
+      <path fill="#FAA51D" stroke="#231F20" stroke-width="1.2" d="M52.709,14.156c-1.54-0.143-4.75-0.316-6.518-0.231&#xD;&#xA;&#x9;&#x9;c-4.728,0.225-9.224,1.928-9.224,1.928L23.949,7.357l2.235,18.906c0.646-0.782-10.555,12.804-3.479,24.224&#xD;&#xA;&#x9;&#x9;c7.08,11.426,22.233,16.518,40.988,12.792c18.755-3.729,23.229-14.531,21.986-20.246c-1.242-5.714-8.322-7.823-8.322-7.823&#xD;&#xA;&#x9;&#x9;s-0.09-4.48-3.328-9.97c-1.926-3.268-8.348-8.041-8.348-8.041L62.822,5.647l-7.452,7.204L52.709,14.156z"/>
+      <path fill="#FFFFFF" d="M76.42,35.066l-2.482-2.064l-9.115,2.661c0,0,0,3.419-4.367,4.367c-4.37,0.951-11.211-2.277-11.211-2.277&#xD;&#xA;&#x9;&#x9;L41.46,41.17c0,0-8.437,0.928-8.739,6.081C32.048,58.704,46.1,63.479,51.425,63.783c2.905,0.167,8.235-0.338,12.277-1.141&#xD;&#xA;&#x9;&#x9;c17.752-3.234,22.551-13.919,21.31-19.635c-1.242-5.714-7.978-7.196-7.978-7.196L76.42,35.066z"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M10.673,46.155c0,0,4.107,0.374,5.974,0.268&#xD;&#xA;&#x9;&#x9;c1.865-0.107,5.492-0.587,5.492-0.587"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M81.656,40.671c0,0,4.549-0.743,6.859-1.549&#xD;&#xA;&#x9;&#x9;c2.715-0.942,4.543-2.545,4.543-2.545"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M22.337,41.909c0,0-2.384-1.777-6.117-3.43&#xD;&#xA;&#x9;&#x9;c-4.134-1.831-6.405-2.303-6.405-2.303"/>
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M82.117,46.622c0,0,2.726,1.104,5.533,1.385&#xD;&#xA;&#x9;&#x9;c2.77,0.276,4.646,0.11,4.646,0.11"/>
+      <path fill="none" stroke="#000000" stroke-linecap="round" stroke-miterlimit="10" d="M52.35,14.212&#xD;&#xA;&#x9;&#x9;c2.84,0.7,3.887,1.469,3.887,1.469"/>
+      <line fill="none" stroke="#000000" x1="33.898" y1="13.684" x2="39.956" y2="18.042"/>
+    </g>
+    <g id="Layer_5">
+      <path fill="#FFFFFF" stroke="#231F20" d="M71.84,25.366c2.924,4.479,3.033,9.591,0.242,11.415&#xD;&#xA;&#x9;&#x9;c-2.793,1.825-7.426-0.332-10.354-4.813c-2.933-4.48-3.037-9.589-0.244-11.415C64.275,18.73,68.913,20.884,71.84,25.366z"/>
+      <path fill="#231F20" d="M71.089,32.522c0,1.08-0.802,1.956-1.8,1.956c-0.993,0-1.803-0.877-1.803-1.956&#xD;&#xA;&#x9;&#x9;c0-1.08,0.81-1.958,1.803-1.958C70.287,30.564,71.089,31.442,71.089,32.522"/>
+    </g>
+    <g id="Layer_7">
+      <path fill="#FFFFFF" stroke="#231F20" d="M47.867,28.619c2.926,4.48,2.619,9.862-0.681,12.015&#xD;&#xA;&#x9;&#x9;c-3.302,2.159-8.351,0.272-11.276-4.208c-2.928-4.48-2.624-9.86,0.678-12.017C39.891,22.253,44.938,24.137,47.867,28.619z"/>
+      <path fill="#231F20" d="M46.079,34.507c0,1.081-0.803,1.957-1.801,1.957c-0.992,0-1.803-0.878-1.803-1.957&#xD;&#xA;&#x9;&#x9;c0-1.08,0.811-1.957,1.803-1.957C45.274,32.55,46.079,33.427,46.079,34.507"/>
+    </g>
+    <path fill="#5E4A42" stroke="#000000" d="M59.766,37.926c1.854,0,4.555-0.284,4.697,0.569c0.143,0.855-1.709,4.203-2.988,4.345&#xD;&#xA;&#x9;c-1.283,0.142-6.125-2.353-6.195-3.919C55.206,37.355,58.055,37.926,59.766,37.926z"/>
+    <g id="Layer_4">
+      <path fill="none" stroke="#231F20" stroke-width="1.2" d="M46.774,45.235c0,0,10.347,3.054,14.217,3.897&#xD;&#xA;&#x9;&#x9;c3.868,0.842,10.851,1.684,10.851,1.684s-7.99,10.245-17.328,7.644C45.176,55.863,45.345,49.975,46.774,45.235z"/>
+    </g>
+  </g>
+</svg>

From 79346c0925e41d14543c8bd9e96961495f805c37 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 12:03:24 -0400
Subject: [PATCH 223/302] Fixes for #138 (#166)

* Markup/CSS adjustments

* Move assets to folder

* Strip extra font-family

* More robust handling of project-load fail state

* Move empty project creation to its own function

* Move green flag/stop back out of the tab

* Restore default id
---
 {src => assets}/scratch_cat.svg   |   0
 src/Stage.png => assets/stage.png | Bin
 playground/index.html             |  28 ++++-----
 playground/playground.css         |  33 +++--------
 playground/playground.js          |  11 +++-
 src/index.js                      |  92 ++++++++++++++++--------------
 src/worker.js                     |   4 ++
 7 files changed, 86 insertions(+), 82 deletions(-)
 rename {src => assets}/scratch_cat.svg (100%)
 rename src/Stage.png => assets/stage.png (100%)

diff --git a/src/scratch_cat.svg b/assets/scratch_cat.svg
similarity index 100%
rename from src/scratch_cat.svg
rename to assets/scratch_cat.svg
diff --git a/src/Stage.png b/assets/stage.png
similarity index 100%
rename from src/Stage.png
rename to assets/stage.png
diff --git a/playground/index.html b/playground/index.html
index 74a26d422..9ed6519b6 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -9,20 +9,22 @@
 </head>
 <body>
     <div id="vm-devtools">
-        <ul>
-            <li><a id="renderexplorer-link" href="#">Home</a></li>
-            <li><a id="threadexplorer-link" href="#">VM Threads</a></li>
-            <li><a id="blockexplorer-link" href="#">VM Block Representation</a></li>
+        <h2>Scratch VM Playground</h2>
+        <select id="selectedTarget" multiple></select>
+        <div id="projectButtons">
+            <button id="greenflag">Green flag</button>
+            <button id="stopall">Stop</button>
+        </div>
+        <br />
+        <ul id="playgroundLinks">
+            <li><a id="renderexplorer-link" href="#">Renderer</a></li>
+            <li><a id="threadexplorer-link" href="#">Threads</a></li>
+            <li><a id="blockexplorer-link" href="#">Block Representation</a></li>
             <li><a id="importexport-link" href="#">Import/Export</a></li>
         </ul><br />
         <div id="tab-renderexplorer">
-            Home<br />
-            <rendererTop><rendererButtons>
-                <button id="greenflag">Green flag</button>
-                <button id="stopall">Stop</button><br />
-            </rendererButtons></rendererTop>
+            Renderer<br />
             <canvas id="scratch-stage" style="width: 480px; height: 360px;"></canvas><br />
-            <select id="selectedTarget" multiple></select><br />
         </div>
         <div id="tab-threadexplorer">
             Thread explorer
@@ -34,13 +36,13 @@
         </div>
         <div id="tab-importexport">
             Import/Export<br />
-            Project ID: <input id="projectId" value="" />
-            <button id="projectLoadButton">Load SB2</button><br />
+            Project ID: <input id="projectId" value="119615668" />
+            <button id="projectLoadButton">Load</button><br />
             <p>
                 <input type="button" value="Export to XML" onclick="toXml()">
                 &nbsp;
                 <input type="button" value="Import from XML" onclick="fromXml()" id="import">
-                <br><br>
+                <br /><br />
                 <textarea id="importExport"></textarea>
             </p>
         </div>
diff --git a/playground/playground.css b/playground/playground.css
index 7f789b9bd..41586749f 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -1,12 +1,12 @@
 body {
     background: rgb(36,36,36);
 }
-textarea {
-    resize: none;
-}
 a {
     color: rgb(217,217,217);
 }
+h2 {
+    font-size: 1em;
+}
 #blocks {
     position: absolute;
     left: 40%;
@@ -43,8 +43,6 @@ a {
     height: 360px;
     background: rgb(36,36,36);
     color: rgb(217,217,217);
-    font-family: monospace;
-    font-size: 10pt;
 }
 #projectId {
     background: rgb(36,36,36);
@@ -52,7 +50,7 @@ a {
     font-family: monospace;
     font-size: 10pt;
 }
-ul {
+ul#playgroundLinks {
     display: block;
     list-style-type: none;
     margin: 0;
@@ -60,30 +58,15 @@ ul {
     overflow: hidden;
     background-color: #333;
 }
-rendererTop {
-    display: block;
-    list-style-type: none;
-    margin: 0;
-    padding: 0;
-    overflow: hidden;
-    background-color: #696969;
-    width: 480px;
-}
-rendererButtons {
-    float: right;
-    padding: 12px;
-}
-li {
+#playgroundLinks li {
     float: left;
 }
-li a {
+#playgroundLinks li a {
     display: block;
     color: white;
     text-align: center;
-    padding: 14px 16px;
-    text-decoration: none;
+    padding: 5px 10px;
 }
-/* Change the link color to #111 (black) on hover */
-li a:hover {
+#playgroundLinks li a:hover {
     background-color: #111;
 }
diff --git a/playground/playground.js b/playground/playground.js
index 30d10c123..19107cdf3 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -1,11 +1,18 @@
 var loadProject = function () {
     var id = location.hash.substring(1);
+    if (id.length < 1) {
+        id = '119615668';
+    }
     var url = 'https://projects.scratch.mit.edu/internalapi/project/' +
         id + '/get/';
     var r = new XMLHttpRequest();
     r.onreadystatechange = function() {
-        if (this.readyState == 4) {
-            window.vm.loadProject(this.responseText);
+        if (this.readyState === 4) {
+            if (r.status === 200) {
+                window.vm.loadProject(this.responseText);
+            } else {
+                window.vm.createEmptyProject();
+            }
         }
     };
     r.open('GET', url);
diff --git a/src/index.js b/src/index.js
index ceb52152f..e97957d07 100644
--- a/src/index.js
+++ b/src/index.js
@@ -107,50 +107,8 @@ VirtualMachine.prototype.postIOData = function (device, data) {
 /**
  * Load a project from a Scratch 2.0 JSON representation.
  * @param {?string} json JSON string representing the project.
- * If JSON is NULL, fallback to creating blank project.
  */
 VirtualMachine.prototype.loadProject = function (json) {
-    if (!json) {
-        // Creates 'Stage'
-        var blocks2 = new Blocks();
-        var stage = new Sprite(blocks2);
-        stage.name = 'Stage';
-        stage.costumes.push({
-            skin: '/src/Stage.png',
-            name: 'backdrop1',
-            bitmapResolution: 1,
-            rotationCenterX: 240,
-            rotationCenterY: 180}); 
-        var target2 = stage.createClone();
-        this.runtime.targets.push(target2);
-        target2.x = 0;
-        target2.y = 0;
-        target2.direction = 90;
-        target2.size = 200;
-        target2.visible = true;
-        target2.isStage = true;
-        // Creates 'Sprite1'
-        var blocks1 = new Blocks();
-        var sprite = new Sprite(blocks1);
-        sprite.name = 'Sprite1';
-        sprite.costumes.push({
-            skin: '/src/scratch_cat.svg',
-            name: 'costume1',
-            bitmapResolution: 1,
-            rotationCenterX: 47,
-            rotationCenterY: 55}); 
-        var target1 = sprite.createClone();
-        this.runtime.targets.push(target1);
-        target1.x = 0;
-        target1.y = 0;
-        target1.direction = 90;
-        target1.size = 100;
-        target1.visible = true;
-        this.editingTarget = this.runtime.targets[0];
-        this.emitTargetsUpdate();
-        this.emitWorkspaceUpdate();
-        return;
-    }
     // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
     sb2import(json, this.runtime);
     // Select the first target for editing, e.g., the stage.
@@ -161,6 +119,53 @@ VirtualMachine.prototype.loadProject = function (json) {
     this.runtime.setEditingTarget(this.editingTarget);
 };
 
+/**
+ * Temporary way to make an empty project, in case the desired project
+ * cannot be loaded from the online server.
+ */
+VirtualMachine.prototype.createEmptyProject = function () {
+    // Stage.
+    var blocks2 = new Blocks();
+    var stage = new Sprite(blocks2);
+    stage.name = 'Stage';
+    stage.costumes.push({
+        skin: '/assets/stage.png',
+        name: 'backdrop1',
+        bitmapResolution: 1,
+        rotationCenterX: 240,
+        rotationCenterY: 180
+    });
+    var target2 = stage.createClone();
+    this.runtime.targets.push(target2);
+    target2.x = 0;
+    target2.y = 0;
+    target2.direction = 90;
+    target2.size = 200;
+    target2.visible = true;
+    target2.isStage = true;
+    // Sprite1 (cat).
+    var blocks1 = new Blocks();
+    var sprite = new Sprite(blocks1);
+    sprite.name = 'Sprite1';
+    sprite.costumes.push({
+        skin: '/assets/scratch_cat.svg',
+        name: 'costume1',
+        bitmapResolution: 1,
+        rotationCenterX: 47,
+        rotationCenterY: 55
+    });
+    var target1 = sprite.createClone();
+    this.runtime.targets.push(target1);
+    target1.x = 0;
+    target1.y = 0;
+    target1.direction = 90;
+    target1.size = 100;
+    target1.visible = true;
+    this.editingTarget = this.runtime.targets[0];
+    this.emitTargetsUpdate();
+    this.emitWorkspaceUpdate();
+};
+
 /**
  * Set an editing target. An editor UI can use this function to switch
  * between editing different targets, sprites, etc.
@@ -267,6 +272,9 @@ if (ENV_WORKER) {
         case 'setEditingTarget':
             self.vmInstance.setEditingTarget(messageData.targetId);
             break;
+        case 'createEmptyProject':
+            self.vmInstance.createEmptyProject();
+            break;
         case 'loadProject':
             self.vmInstance.loadProject(messageData.json);
             break;
diff --git a/src/worker.js b/src/worker.js
index c3616e859..5b46c7e77 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -80,6 +80,10 @@ VirtualMachine.prototype.loadProject = function (json) {
     this.vmWorker.postMessage({method: 'loadProject', json: json});
 };
 
+VirtualMachine.prototype.createEmptyProject = function () {
+    this.vmWorker.postMessage({method: 'createEmptyProject'});
+};
+
 VirtualMachine.prototype.setEditingTarget = function (targetId) {
     this.vmWorker.postMessage({method: 'setEditingTarget', targetId: targetId});
 };

From ebbfe881db6033c454bff1ed7a65291d7e83b2da Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 13:09:01 -0400
Subject: [PATCH 224/302] Augment Timer with documentation and
 `self.performance.now` (#163)

* Augment Timer with documentation and `self.performance.now`

* Add undefined check for `self`.
---
 src/util/timer.js | 64 +++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 57 insertions(+), 7 deletions(-)

diff --git a/src/util/timer.js b/src/util/timer.js
index 10a5b3241..48dd223d5 100644
--- a/src/util/timer.js
+++ b/src/util/timer.js
@@ -1,20 +1,70 @@
 /**
- * Constructor
+ * @fileoverview
+ * A utility for accurately measuring time.
+ * To use:
+ * ---
+ * var timer = new Timer();
+ * timer.start();
+ * ... pass some time ...
+ * var timeDifference = timer.timeElapsed();
+ * ---
+ * Or, you can use the `time` and `relativeTime`
+ * to do some measurement yourself.
  */
-function Timer () {
-    this.startTime = 0;
-}
 
+/**
+ * @constructor
+ */
+function Timer () {}
+
+/**
+ * Used to store the start time of a timer action.
+ * Updated when calling `timer.start`.
+ */
+Timer.prototype.startTime = 0;
+
+/**
+ * Return the currently known absolute time, in ms precision.
+ * @returns {number} ms elapsed since 1 January 1970 00:00:00 UTC.
+ */
 Timer.prototype.time = function () {
-    return Date.now();
+    if (Date.now) {
+        return Date.now();
+    } else {
+        return new Date().getTime();
+    }
 };
 
+/**
+ * Returns a time accurate relative to other times produced by this function.
+ * If possible, will use sub-millisecond precision.
+ * If not, will use millisecond precision.
+ * Not guaranteed to produce the same absolute values per-system.
+ * @returns {number} ms-scale accurate time relative to other relative times.
+ */
+Timer.prototype.relativeTime = function () {
+    if (typeof self !== 'undefined' &&
+        self.performance && 'now' in self.performance) {
+        return self.performance.now();
+    } else {
+        return this.time();
+    }
+};
+
+/**
+ * Start a timer for measuring elapsed time,
+ * at the most accurate precision possible.
+ */
 Timer.prototype.start = function () {
-    this.startTime = this.time();
+    this.startTime = this.relativeTime();
 };
 
+/**
+ * Check time elapsed since `timer.start` was called.
+ * @returns {number} Time elapsed, in ms (possibly sub-ms precision).
+ */
 Timer.prototype.timeElapsed = function () {
-    return this.time() - this.startTime;
+    return this.relativeTime() - this.startTime;
 };
 
 module.exports = Timer;

From bbea1af5a34b265e3f112b044aa38d7d4564c801 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 13:14:16 -0400
Subject: [PATCH 225/302] Better shadow evaluation (#160)

* Better shadow evaluation

* Audit and improve casting for all primitives

* Force repeat times to int

* Remove colorPicker shadow menu
---
 src/blocks/scratch3_control.js   |  16 +++--
 src/blocks/scratch3_event.js     |  14 ++--
 src/blocks/scratch3_looks.js     |  34 ++++-----
 src/blocks/scratch3_motion.js    |  31 +++++---
 src/blocks/scratch3_operators.js |  30 ++------
 src/blocks/scratch3_sensing.js   |  21 ++----
 src/engine/execute.js            | 119 +++++++++++++++++--------------
 src/sprites/clone.js             |   1 +
 8 files changed, 132 insertions(+), 134 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index 25221c1c6..bc9213f2a 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -1,3 +1,4 @@
+var Cast = require('../util/cast');
 var Promise = require('promise');
 
 function Scratch3ControlBlocks(runtime) {
@@ -25,9 +26,10 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() {
 };
 
 Scratch3ControlBlocks.prototype.repeat = function(args, util) {
+    var times = Math.floor(Cast.toNumber(args.TIMES));
     // Initialize loop
     if (util.stackFrame.loopCounter === undefined) {
-        util.stackFrame.loopCounter = parseInt(args.TIMES);
+        util.stackFrame.loopCounter = times;
     }
     // Only execute once per frame.
     // When the branch finishes, `repeat` will be executed again and
@@ -47,13 +49,14 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
 };
 
 Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
+    var condition = Cast.toBoolean(args.CONDITION);
     // Only execute once per frame.
     // When the branch finishes, `repeat` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
     if (!util.stackFrame.executedInFrame) {
         util.stackFrame.executedInFrame = true;
         // If the condition is true, start the branch.
-        if (!args.CONDITION) {
+        if (!condition) {
             util.startBranch();
         }
     } else {
@@ -76,30 +79,33 @@ Scratch3ControlBlocks.prototype.forever = function(args, util) {
 };
 
 Scratch3ControlBlocks.prototype.wait = function(args) {
+    var duration = Cast.toNumber(args.DURATION);
     return new Promise(function(resolve) {
         setTimeout(function() {
             resolve();
-        }, 1000 * args.DURATION);
+        }, 1000 * duration);
     });
 };
 
 Scratch3ControlBlocks.prototype.if = function(args, util) {
+    var condition = Cast.toBoolean(args.CONDITION);
     // Only execute one time. `if` will be returned to
     // when the branch finishes, but it shouldn't execute again.
     if (util.stackFrame.executedInFrame === undefined) {
         util.stackFrame.executedInFrame = true;
-        if (args.CONDITION) {
+        if (condition) {
             util.startBranch();
         }
     }
 };
 
 Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
+    var condition = Cast.toBoolean(args.CONDITION);
     // Only execute one time. `ifElse` will be returned to
     // when the branch finishes, but it shouldn't execute again.
     if (util.stackFrame.executedInFrame === undefined) {
         util.stackFrame.executedInFrame = true;
-        if (args.CONDITION) {
+        if (condition) {
             util.startBranch(1);
         } else {
             util.startBranch(2);
diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index 330ab1d0e..dfc612914 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -1,3 +1,5 @@
+var Cast = require('../util/cast');
+
 function Scratch3EventBlocks(runtime) {
     /**
      * The runtime instantiating this block package.
@@ -43,26 +45,30 @@ Scratch3EventBlocks.prototype.getHats = function () {
 };
 
 Scratch3EventBlocks.prototype.hatGreaterThanPredicate = function (args, util) {
+    var option = Cast.toString(args.WHENGREATERTHANMENU).toLowerCase();
+    var value = Cast.toNumber(args.VALUE);
     // @todo: Other cases :)
-    if (args.WHENGREATERTHANMENU == 'TIMER') {
-        return util.ioQuery('clock', 'projectTimer') > args.VALUE;
+    if (option == 'timer') {
+        return util.ioQuery('clock', 'projectTimer') > value;
     }
     return false;
 };
 
 Scratch3EventBlocks.prototype.broadcast = function(args, util) {
+    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
     util.startHats('event_whenbroadcastreceived', {
-        'BROADCAST_OPTION': args.BROADCAST_OPTION
+        'BROADCAST_OPTION': broadcastOption
     });
 };
 
 Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
+    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
     // Have we run before, starting threads?
     if (!util.stackFrame.startedThreads) {
         // No - start hats for this broadcast.
         util.stackFrame.startedThreads = util.startHats(
             'event_whenbroadcastreceived', {
-                'BROADCAST_OPTION': args.BROADCAST_OPTION
+                'BROADCAST_OPTION': broadcastOption
             }
         );
         if (util.stackFrame.startedThreads.length == 0) {
diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index a2060e6c1..35a9136d1 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -20,14 +20,11 @@ Scratch3LooksBlocks.prototype.getPrimitives = function() {
         'looks_thinkforsecs': this.sayforsecs,
         'looks_show': this.show,
         'looks_hide': this.hide,
-        'looks_backdrops': this.backdropMenu,
-        'looks_costume': this.costumeMenu,
         'looks_switchcostumeto': this.switchCostume,
         'looks_switchbackdropto': this.switchBackdrop,
         'looks_switchbackdroptoandwait': this.switchBackdropAndWait,
         'looks_nextcostume': this.nextCostume,
         'looks_nextbackdrop': this.nextBackdrop,
-        'looks_effectmenu': this.effectMenu,
         'looks_changeeffectby': this.changeEffect,
         'looks_seteffectto': this.setEffect,
         'looks_cleargraphiceffects': this.clearEffects,
@@ -119,11 +116,6 @@ Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target,
     return [];
 };
 
-// @todo(GH-146): Remove.
-Scratch3LooksBlocks.prototype.costumeMenu = function (args) {
-    return args.COSTUME;
-};
-
 Scratch3LooksBlocks.prototype.switchCostume = function (args, util) {
     this._setCostumeOrBackdrop(util.target, args.COSTUME);
 };
@@ -134,11 +126,6 @@ Scratch3LooksBlocks.prototype.nextCostume = function (args, util) {
     );
 };
 
-// @todo(GH-146): Remove.
-Scratch3LooksBlocks.prototype.backdropMenu = function (args) {
-    return args.BACKDROP;
-};
-
 Scratch3LooksBlocks.prototype.switchBackdrop = function (args) {
     this._setCostumeOrBackdrop(this.runtime.getTargetForStage(), args.BACKDROP);
 };
@@ -175,17 +162,18 @@ Scratch3LooksBlocks.prototype.nextBackdrop = function () {
     );
 };
 
-Scratch3LooksBlocks.prototype.effectMenu = function (args) {
-    return args.EFFECT.toLowerCase();
-};
-
 Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
-    var newValue = args.CHANGE + util.target.effects[args.EFFECT];
-    util.target.setEffect(args.EFFECT, newValue);
+    var effect = Cast.toString(args.EFFECT).toLowerCase();
+    var change = Cast.toNumber(args.CHANGE);
+    if (!util.target.effects.hasOwnProperty(effect)) return;
+    var newValue = change + util.target.effects[effect];
+    util.target.setEffect(effect, newValue);
 };
 
 Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
-    util.target.setEffect(args.EFFECT, args.VALUE);
+    var effect = Cast.toString(args.EFFECT).toLowerCase();
+    var value = Cast.toNumber(args.VALUE);
+    util.target.setEffect(effect, value);
 };
 
 Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
@@ -193,11 +181,13 @@ Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
 };
 
 Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
-    util.target.setSize(util.target.size + args.CHANGE);
+    var change = Cast.toNumber(args.CHANGE);
+    util.target.setSize(util.target.size + change);
 };
 
 Scratch3LooksBlocks.prototype.setSize = function (args, util) {
-    util.target.setSize(args.SIZE);
+    var size = Cast.toNumber(args.SIZE);
+    util.target.setSize(size);
 };
 
 Scratch3LooksBlocks.prototype.getSize = function (args, util) {
diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 730eee03f..5d4fefadf 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -1,3 +1,4 @@
+var Cast = require('../util/cast');
 var MathUtil = require('../util/math-util');
 
 function Scratch3MotionBlocks(runtime) {
@@ -30,42 +31,52 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
 };
 
 Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
+    var steps = Cast.toNumber(args.STEPS);
     var radians = MathUtil.degToRad(util.target.direction);
-    var dx = args.STEPS * Math.cos(radians);
-    var dy = args.STEPS * Math.sin(radians);
+    var dx = steps * Math.cos(radians);
+    var dy = steps * Math.sin(radians);
     util.target.setXY(util.target.x + dx, util.target.y + dy);
 };
 
 Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
-    util.target.setXY(args.X, args.Y);
+    var x = Cast.toNumber(args.X);
+    var y = Cast.toNumber(args.Y);
+    util.target.setXY(x, y);
 };
 
 Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
-    util.target.setDirection(util.target.direction + args.DEGREES);
+    var degrees = Cast.toNumber(args.DEGREES);
+    util.target.setDirection(util.target.direction + degrees);
 };
 
 Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
-    util.target.setDirection(util.target.direction - args.DEGREES);
+    var degrees = Cast.toNumber(args.DEGREES);
+    util.target.setDirection(util.target.direction - degrees);
 };
 
 Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
-    util.target.setDirection(args.DIRECTION);
+    var direction = Cast.toNumber(args.DIRECTION);
+    util.target.setDirection(direction);
 };
 
 Scratch3MotionBlocks.prototype.changeX = function (args, util) {
-    util.target.setXY(util.target.x + args.DX, util.target.y);
+    var dx = Cast.toNumber(args.DX);
+    util.target.setXY(util.target.x + dx, util.target.y);
 };
 
 Scratch3MotionBlocks.prototype.setX = function (args, util) {
-    util.target.setXY(args.X, util.target.y);
+    var x = Cast.toNumber(args.X);
+    util.target.setXY(x, util.target.y);
 };
 
 Scratch3MotionBlocks.prototype.changeY = function (args, util) {
-    util.target.setXY(util.target.x, util.target.y + args.DY);
+    var dy = Cast.toNumber(args.DY);
+    util.target.setXY(util.target.x, util.target.y + dy);
 };
 
 Scratch3MotionBlocks.prototype.setY = function (args, util) {
-    util.target.setXY(util.target.x, args.Y);
+    var y = Cast.toNumber(args.Y);
+    util.target.setXY(util.target.x, y);
 };
 
 Scratch3MotionBlocks.prototype.getX = function (args, util) {
diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index 7826c526c..ddd9e3837 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -14,11 +14,6 @@ function Scratch3OperatorsBlocks(runtime) {
  */
 Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
     return {
-        'math_number': this.number,
-        'math_positive_number': this.number,
-        'math_whole_number': this.number,
-        'math_angle': this.number,
-        'text': this.text,
         'operator_add': this.add,
         'operator_subtract': this.subtract,
         'operator_multiply': this.multiply,
@@ -35,19 +30,10 @@ Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
         'operator_length': this.length,
         'operator_mod': this.mod,
         'operator_round': this.round,
-        'operator_mathop_menu': this.mathopMenu,
         'operator_mathop': this.mathop
     };
 };
 
-Scratch3OperatorsBlocks.prototype.number = function (args) {
-    return Cast.toNumber(args.NUM);
-};
-
-Scratch3OperatorsBlocks.prototype.text = function (args) {
-    return Cast.toString(args.TEXT);
-};
-
 Scratch3OperatorsBlocks.prototype.add = function (args) {
     return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
 };
@@ -77,20 +63,22 @@ Scratch3OperatorsBlocks.prototype.gt = function (args) {
 };
 
 Scratch3OperatorsBlocks.prototype.and = function (args) {
-    return Cast.toBoolean(args.OPERAND1 && args.OPERAND2);
+    return Cast.toBoolean(args.OPERAND1) && Cast.toBoolean(args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.or = function (args) {
-    return Cast.toBoolean(args.OPERAND1 || args.OPERAND2);
+    return Cast.toBoolean(args.OPERAND1) || Cast.toBoolean(args.OPERAND2);
 };
 
 Scratch3OperatorsBlocks.prototype.not = function (args) {
-    return Cast.toBoolean(!args.OPERAND);
+    return !Cast.toBoolean(args.OPERAND);
 };
 
 Scratch3OperatorsBlocks.prototype.random = function (args) {
-    var low = args.FROM <= args.TO ? args.FROM : args.TO;
-    var high = args.FROM <= args.TO ? args.TO : args.FROM;
+    var nFrom = Cast.toNumber(args.FROM);
+    var nTo = Cast.toNumber(args.TO);
+    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);
@@ -132,10 +120,6 @@ Scratch3OperatorsBlocks.prototype.round = function (args) {
     return Math.round(Cast.toNumber(args.NUM));
 };
 
-Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
-    return args.OPERATOR;
-};
-
 Scratch3OperatorsBlocks.prototype.mathop = function (args) {
     var operator = Cast.toString(args.OPERATOR).toLowerCase();
     var n = Cast.toNumber(args.NUM);
diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index d9605a03c..5e392ef86 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -14,7 +14,6 @@ function Scratch3SensingBlocks(runtime) {
  */
 Scratch3SensingBlocks.prototype.getPrimitives = function() {
     return {
-        'colour_picker': this.colorPicker,
         'sensing_touchingcolor': this.touchingColor,
         'sensing_coloristouchingcolor': this.colorTouchingColor,
         'sensing_timer': this.getTimer,
@@ -22,17 +21,11 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
         'sensing_mousex': this.getMouseX,
         'sensing_mousey': this.getMouseY,
         'sensing_mousedown': this.getMouseDown,
-        'sensing_keyoptions': this.keyOptions,
         'sensing_keypressed': this.getKeyPressed,
-        'sensing_current': this.current,
-        'sensing_currentmenu': this.currentMenu
+        'sensing_current': this.current
     };
 };
 
-Scratch3SensingBlocks.prototype.colorPicker = function (args) {
-    return args.COLOUR;
-};
-
 Scratch3SensingBlocks.prototype.touchingColor = function (args, util) {
     var color = Cast.toRgbColorList(args.COLOR);
     return util.target.isTouchingColor(color);
@@ -65,8 +58,9 @@ Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
 };
 
 Scratch3SensingBlocks.prototype.current = function (args) {
+    var menuOption = Cast.toString(args.CURRENTMENU).toLowerCase();
     var date = new Date();
-    switch (args.CURRENTMENU) {
+    switch (menuOption) {
     case 'year': return date.getFullYear();
     case 'month': return date.getMonth() + 1; // getMonth is zero-based
     case 'date': return date.getDate();
@@ -75,14 +69,7 @@ Scratch3SensingBlocks.prototype.current = function (args) {
     case 'minute': return date.getMinutes();
     case 'second': return date.getSeconds();
     }
-};
-
-Scratch3SensingBlocks.prototype.currentMenu = function (args) {
-    return args.CURRENTMENU.toLowerCase();
-};
-
-Scratch3SensingBlocks.prototype.keyOptions = function (args) {
-    return args.KEY_OPTION.toLowerCase();
+    return 0;
 };
 
 Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 6e19fcdfd..2dfc075f5 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -22,40 +22,91 @@ var execute = function (sequencer, thread) {
     var currentBlockId = thread.peekStack();
     var currentStackFrame = thread.peekStackFrame();
 
+    // Query info about the block.
     var opcode = target.blocks.getOpcode(currentBlockId);
+    var blockFunction = runtime.getOpcodeFunction(opcode);
+    var isHat = runtime.getIsHat(opcode);
+    var fields = target.blocks.getFields(currentBlockId);
+    var inputs = target.blocks.getInputs(currentBlockId);
 
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + currentBlockId);
         return;
     }
 
-    var blockFunction = runtime.getOpcodeFunction(opcode);
-    var isHat = runtime.getIsHat(opcode);
-
-    // Hats are implemented slightly differently from regular blocks.
-    // If they have an associated block function, it's treated as a predicate;
-    // if not, execution will proceed right through it (as a no-op).
-    if (!blockFunction) {
-        if (!isHat) {
-            console.warn('Could not get implementation for opcode: ' + opcode);
+    /**
+     * Handle any reported value from the primitive, either directly returned
+     * or after a promise resolves.
+     * @param {*} resolvedValue Value eventually returned from the primitive.
+     */
+    var handleReport = function (resolvedValue) {
+        thread.pushReportedValue(resolvedValue);
+        if (isHat) {
+            // Hat predicate was evaluated.
+            if (runtime.getIsEdgeActivatedHat(opcode)) {
+                // If this is an edge-activated hat, only proceed if
+                // the value is true and used to be false.
+                var oldEdgeValue = runtime.updateEdgeActivatedValue(
+                    currentBlockId,
+                    resolvedValue
+                );
+                var edgeWasActivated = !oldEdgeValue && resolvedValue;
+                if (!edgeWasActivated) {
+                    sequencer.retireThread(thread);
+                }
+            } else {
+                // Not an edge-activated hat: retire the thread
+                // if predicate was false.
+                if (!resolvedValue) {
+                    sequencer.retireThread(thread);
+                }
+            }
+        } else {
+            // In a non-hat, report the value visually if necessary if
+            // at the top of the thread stack.
+            if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
+                runtime.visualReport(currentBlockId, resolvedValue);
+            }
+            // Finished any yields.
+            thread.setStatus(Thread.STATUS_RUNNING);
+        }
+    };
+
+    // Hats and single-field shadows are implemented slightly differently
+    // from regular blocks.
+    // For hats: if they have an associated block function,
+    // it's treated as a predicate; if not, execution will proceed as a no-op.
+    // For single-field shadows: If the block has a single field, and no inputs,
+    // immediately return the value of the field.
+    if (!blockFunction) {
+        if (isHat) {
+            // Skip through the block (hat with no predicate).
+            return;
+        } else {
+            if (Object.keys(fields).length == 1 &&
+                Object.keys(inputs).length == 0) {
+                // One field and no inputs - treat as arg.
+                for (var fieldKey in fields) { // One iteration.
+                    handleReport(fields[fieldKey].value);
+                }
+            } else {
+                console.warn('Could not get implementation for opcode: ' +
+                    opcode);
+            }
+            thread.requestScriptGlowInFrame = true;
+            return;
         }
-        // Skip through the block.
-        // (either hat with no predicate, or missing op).
-        thread.requestScriptGlowInFrame = true;
-        return;
     }
 
     // Generate values for arguments (inputs).
     var argValues = {};
 
     // Add all fields on this block to the argValues.
-    var fields = target.blocks.getFields(currentBlockId);
     for (var fieldName in fields) {
         argValues[fieldName] = fields[fieldName].value;
     }
 
     // Recursively evaluate input blocks.
-    var inputs = target.blocks.getInputs(currentBlockId);
     for (var inputName in inputs) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
@@ -117,44 +168,6 @@ var execute = function (sequencer, thread) {
         thread.requestScriptGlowInFrame = true;
     }
 
-    /**
-     * Handle any reported value from the primitive, either directly returned
-     * or after a promise resolves.
-     * @param {*} resolvedValue Value eventually returned from the primitive.
-     */
-    var handleReport = function (resolvedValue) {
-        thread.pushReportedValue(resolvedValue);
-        if (isHat) {
-            // Hat predicate was evaluated.
-            if (runtime.getIsEdgeActivatedHat(opcode)) {
-                // If this is an edge-activated hat, only proceed if
-                // the value is true and used to be false.
-                var oldEdgeValue = runtime.updateEdgeActivatedValue(
-                    currentBlockId,
-                    resolvedValue
-                );
-                var edgeWasActivated = !oldEdgeValue && resolvedValue;
-                if (!edgeWasActivated) {
-                    sequencer.retireThread(thread);
-                }
-            } else {
-                // Not an edge-activated hat: retire the thread
-                // if predicate was false.
-                if (!resolvedValue) {
-                    sequencer.retireThread(thread);
-                }
-            }
-        } else {
-            // In a non-hat, report the value visually if necessary if
-            // at the top of the thread stack.
-            if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
-                runtime.visualReport(currentBlockId, resolvedValue);
-            }
-            // Finished any yields.
-            thread.setStatus(Thread.STATUS_RUNNING);
-        }
-    };
-
     // If it's a promise, wait until promise resolves.
     if (isPromise(primitiveReportedValue)) {
         if (thread.status === Thread.STATUS_RUNNING) {
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 72b26d139..b24ea4368 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -198,6 +198,7 @@ Clone.prototype.setSize = function (size) {
  * @param {!number} value Numerical magnitude of effect.
  */
 Clone.prototype.setEffect = function (effectName, value) {
+    if (!this.effects.hasOwnProperty(effectName)) return;
     this.effects[effectName] = value;
     if (this.renderer) {
         var props = {};

From 91cdec15474d86b960f64ce952c0ff432d524fbe Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 13:26:10 -0400
Subject: [PATCH 226/302] Implement glide (#154)

---
 src/blocks/scratch3_motion.js | 37 +++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 5d4fefadf..10679750d 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -1,5 +1,6 @@
 var Cast = require('../util/cast');
 var MathUtil = require('../util/math-util');
+var Timer = require('../util/timer');
 
 function Scratch3MotionBlocks(runtime) {
     /**
@@ -20,6 +21,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         '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,
@@ -59,6 +61,41 @@ Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
     util.target.setDirection(direction);
 };
 
+Scratch3MotionBlocks.prototype.glide = function (args, util) {
+    if (!util.stackFrame.timer) {
+        // First time: save data for future use.
+        util.stackFrame.timer = new Timer();
+        util.stackFrame.timer.start();
+        util.stackFrame.duration = Cast.toNumber(args.SECS);
+        util.stackFrame.startX = util.target.x;
+        util.stackFrame.startY = util.target.y;
+        util.stackFrame.endX = Cast.toNumber(args.X);
+        util.stackFrame.endY = Cast.toNumber(args.Y);
+        if (util.stackFrame.duration <= 0) {
+            // Duration too short to glide.
+            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
+            return;
+        }
+        util.yieldFrame();
+    } else {
+        var timeElapsed = util.stackFrame.timer.timeElapsed();
+        if (timeElapsed < util.stackFrame.duration * 1000) {
+            // In progress: move to intermediate position.
+            var frac = timeElapsed / (util.stackFrame.duration * 1000);
+            var dx = frac * (util.stackFrame.endX - util.stackFrame.startX);
+            var dy = frac * (util.stackFrame.endY - util.stackFrame.startY);
+            util.target.setXY(
+                util.stackFrame.startX + dx,
+                util.stackFrame.startY + dy
+            );
+            util.yieldFrame();
+        } else {
+            // Finished: move to final position.
+            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
+        }
+    }
+};
+
 Scratch3MotionBlocks.prototype.changeX = function (args, util) {
     var dx = Cast.toNumber(args.DX);
     util.target.setXY(util.target.x + dx, util.target.y);

From c357a62005eaa60359954fb013bf9fc1f3e07c0c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 13:52:44 -0400
Subject: [PATCH 227/302] Key repeats, with OS delay (#168)

---
 src/io/keyboard.js | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/io/keyboard.js b/src/io/keyboard.js
index e99d59c28..ea423fd40 100644
--- a/src/io/keyboard.js
+++ b/src/io/keyboard.js
@@ -44,10 +44,10 @@ Keyboard.prototype._keyCodeToScratchKey = function (keyCode) {
     }
     switch (keyCode) {
     case 32: return 'space';
-    case 37: return 'leftarrow';
-    case 38: return 'uparrow';
-    case 39: return 'rightarrow';
-    case 40: return 'downarrow';
+    case 37: return 'left arrow';
+    case 38: return 'up arrow';
+    case 39: return 'right arrow';
+    case 40: return 'down arrow';
     }
     return null;
 };
@@ -59,16 +59,14 @@ Keyboard.prototype.postData = function (data) {
             // If not already present, add to the list.
             if (index < 0) {
                 this._keysPressed.push(data.keyCode);
-                this.runtime.startHats('event_whenkeypressed',
-                    {
-                        'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
-                    });
-
-                this.runtime.startHats('event_whenkeypressed',
-                    {
-                        'KEY_OPTION': 'any'
-                    });
             }
+            // Always trigger hats, even if it was already pressed.
+            this.runtime.startHats('event_whenkeypressed', {
+                'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
+            });
+            this.runtime.startHats('event_whenkeypressed', {
+                'KEY_OPTION': 'any'
+            });
         } else if (index > -1) {
             // If already present, remove from the list.
             this._keysPressed.splice(index, 1);

From 833c5ed313be8c07c73114f3b62d7c3d0512cc87 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 12 Sep 2016 17:16:10 -0400
Subject: [PATCH 228/302] When clicked hats (#156)

---
 playground/playground.js | 26 ++++++++++++++++++++++----
 src/engine/runtime.js    |  2 +-
 src/io/mouse.js          | 33 ++++++++++++++++++++++++++++++---
 3 files changed, 53 insertions(+), 8 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 19107cdf3..a17792bba 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -161,17 +161,35 @@ window.onload = function() {
     document.addEventListener('mousemove', function (e) {
         var rect = canvas.getBoundingClientRect();
         var coordinates = {
-            x: e.clientX - rect.left - rect.width / 2,
-            y: e.clientY - rect.top - rect.height / 2
+            x: e.clientX - rect.left,
+            y: e.clientY - rect.top,
+            canvasWidth: rect.width,
+            canvasHeight: rect.height
         };
         window.vm.postIOData('mouse', coordinates);
     });
     canvas.addEventListener('mousedown', function (e) {
-        window.vm.postIOData('mouse', {isDown: true});
+        var rect = canvas.getBoundingClientRect();
+        var data = {
+            isDown: true,
+            x: e.clientX - rect.left,
+            y: e.clientY - rect.top,
+            canvasWidth: rect.width,
+            canvasHeight: rect.height
+        };
+        window.vm.postIOData('mouse', data);
         e.preventDefault();
     });
     canvas.addEventListener('mouseup', function (e) {
-        window.vm.postIOData('mouse', {isDown: false});
+        var rect = canvas.getBoundingClientRect();
+        var data = {
+            isDown: false,
+            x: e.clientX - rect.left,
+            y: e.clientY - rect.top,
+            canvasWidth: rect.width,
+            canvasHeight: rect.height
+        };
+        window.vm.postIOData('mouse', data);
         e.preventDefault();
     });
 
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 473227ba8..6c5f36eb1 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -55,7 +55,7 @@ function Runtime () {
     this.ioDevices = {
         'clock': new Clock(),
         'keyboard': new Keyboard(this),
-        'mouse': new Mouse()
+        'mouse': new Mouse(this)
     };
 
     this._scriptGlowsPreviousFrame = [];
diff --git a/src/io/mouse.js b/src/io/mouse.js
index 7432c4358..990ba96f1 100644
--- a/src/io/mouse.js
+++ b/src/io/mouse.js
@@ -1,20 +1,47 @@
 var MathUtil = require('../util/math-util');
 
-function Mouse () {
+function Mouse (runtime) {
     this._x = 0;
     this._y = 0;
     this._isDown = false;
+    /**
+     * Reference to the owning Runtime.
+     * Can be used, for example, to activate hats.
+     * @type{!Runtime}
+     */
+    this.runtime = runtime;
 }
 
 Mouse.prototype.postData = function(data) {
     if (data.x) {
-        this._x = data.x;
+        this._x = data.x - data.canvasWidth / 2;
     }
     if (data.y) {
-        this._y = data.y;
+        this._y = data.y - data.canvasHeight / 2;
     }
     if (typeof data.isDown !== 'undefined') {
         this._isDown = data.isDown;
+        if (this._isDown) {
+            this._activateClickHats(data.x, data.y);
+        }
+    }
+};
+
+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;
+                }
+            }
+        });
     }
 };
 

From 08b40b4d1daa5adb32ebc7325e9489c0a6545023 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 13 Sep 2016 17:49:45 -0400
Subject: [PATCH 229/302] Drop worker support (#175)

* Take out worker code

* Fix Blockly event listening (minus worker)

* Recompile Sept. 13
---
 playground/index.html    |    2 +-
 playground/playground.js |    1 -
 src/index.js             |  123 +-
 src/worker.js            |   95 -
 vm.js                    | 9658 +++++++++++++++++++++++++-------------
 vm.min.js                |   12 +-
 vm.worker.js             | 1169 -----
 webpack.config.js        |    3 +-
 8 files changed, 6425 insertions(+), 4638 deletions(-)
 delete mode 100644 src/worker.js
 delete mode 100644 vm.worker.js

diff --git a/playground/index.html b/playground/index.html
index 9ed6519b6..67ac05cd1 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -720,7 +720,7 @@
     <!-- Renderer -->
     <script src="../node_modules/scratch-render/render.js"></script>
     <!-- VM Worker -->
-    <script src="../vm.worker.js"></script>
+    <script src="../vm.js"></script>
     <!-- Playground -->
     <script src="./playground.js"></script>
     <script>
diff --git a/playground/playground.js b/playground/playground.js
index a17792bba..9561173b3 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -35,7 +35,6 @@ 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.connectWorker(window.vm.vmWorker);
 
     // Instantiate scratch-blocks and attach it to the DOM.
     var toolbox = document.getElementById('toolbox');
diff --git a/src/index.js b/src/index.js
index e97957d07..a51bae135 100644
--- a/src/index.js
+++ b/src/index.js
@@ -6,12 +6,6 @@ var sb2import = require('./import/sb2import');
 var Sprite = require('./sprites/sprite');
 var Blocks = require('./engine/blocks');
 
-/**
- * Whether the environment is a WebWorker.
- * @const{boolean}
- */
-var ENV_WORKER = typeof importScripts === 'function';
-
 /**
  * Handles connections between blocks, stage, and extensions.
  *
@@ -48,6 +42,8 @@ function VirtualMachine () {
     instance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
         instance.emit(Runtime.VISUAL_REPORT, {id: id, value: value});
     });
+
+    this.blockListener = this.blockListener.bind(this);
 }
 
 /**
@@ -166,6 +162,20 @@ VirtualMachine.prototype.createEmptyProject = function () {
     this.emitWorkspaceUpdate();
 };
 
+/**
+ * Handle a Blockly event for the current editing target.
+ * @param {!Blockly.Event} e Any Blockly event.
+ */
+VirtualMachine.prototype.blockListener = function (e) {
+    if (this.editingTarget) {
+        this.editingTarget.blocks.blocklyListen(
+            e,
+            false,
+            this.runtime
+        );
+    }
+};
+
 /**
  * Set an editing target. An editor UI can use this function to switch
  * between editing different targets, sprites, etc.
@@ -214,107 +224,6 @@ VirtualMachine.prototype.emitWorkspaceUpdate = function () {
         'xml': this.editingTarget.blocks.toXML()
     });
 };
-
-/*
- * Worker handlers: for all public methods available above,
- * we must also provide a message handler in case the VM is run
- * from a worker environment.
- */
-if (ENV_WORKER) {
-    self.importScripts(
-        './node_modules/scratch-render/render-worker.js'
-    );
-    self.renderer = new self.RenderWebGLWorker();
-    self.vmInstance = new VirtualMachine();
-    self.onmessage = function (e) {
-        var messageData = e.data;
-        switch (messageData.method) {
-        case 'start':
-            self.vmInstance.runtime.start();
-            break;
-        case 'greenFlag':
-            self.vmInstance.runtime.greenFlag();
-            break;
-        case 'stopAll':
-            self.vmInstance.runtime.stopAll();
-            break;
-        case 'blockListener':
-            if (self.vmInstance.editingTarget) {
-                self.vmInstance.editingTarget.blocks.blocklyListen(
-                    messageData.args,
-                    false,
-                    self.vmInstance.runtime
-                );
-            }
-            break;
-        case 'flyoutBlockListener':
-            if (self.vmInstance.editingTarget) {
-                self.vmInstance.editingTarget.blocks.blocklyListen(
-                    messageData.args,
-                    true,
-                    self.vmInstance.runtime
-                );
-            }
-            break;
-        case 'getPlaygroundData':
-            self.postMessage({
-                method: 'playgroundData',
-                blocks: self.vmInstance.editingTarget.blocks,
-                threads: self.vmInstance.runtime.threads
-            });
-            break;
-        case 'animationFrame':
-            self.vmInstance.animationFrame();
-            break;
-        case 'postIOData':
-            self.vmInstance.postIOData(messageData.device, messageData.data);
-            break;
-        case 'setEditingTarget':
-            self.vmInstance.setEditingTarget(messageData.targetId);
-            break;
-        case 'createEmptyProject':
-            self.vmInstance.createEmptyProject();
-            break;
-        case 'loadProject':
-            self.vmInstance.loadProject(messageData.json);
-            break;
-        default:
-            if (e.data.id == 'RendererConnected') {
-                //initRenderWorker();
-            }
-            self.renderer.onmessage(e);
-            break;
-        }
-    };
-    // Bind runtime's emitted events to postmessages.
-    self.vmInstance.runtime.on(Runtime.SCRIPT_GLOW_ON, function (id) {
-        self.postMessage({method: Runtime.SCRIPT_GLOW_ON, id: id});
-    });
-    self.vmInstance.runtime.on(Runtime.SCRIPT_GLOW_OFF, function (id) {
-        self.postMessage({method: Runtime.SCRIPT_GLOW_OFF, id: id});
-    });
-    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
-        self.postMessage({method: Runtime.BLOCK_GLOW_ON, id: id});
-    });
-    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
-        self.postMessage({method: Runtime.BLOCK_GLOW_OFF, id: id});
-    });
-    self.vmInstance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
-        self.postMessage({method: Runtime.VISUAL_REPORT, id: id, value: value});
-    });
-    self.vmInstance.on('workspaceUpdate', function(data) {
-        self.postMessage({method: 'workspaceUpdate',
-            xml: data.xml
-        });
-    });
-    self.vmInstance.on('targetsUpdate', function(data) {
-        self.postMessage({method: 'targetsUpdate',
-            targetList: data.targetList,
-            editingTarget: data.editingTarget
-        });
-    });
-}
-
 /**
  * Export and bind to `window`
  */
diff --git a/src/worker.js b/src/worker.js
deleted file mode 100644
index 5b46c7e77..000000000
--- a/src/worker.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var EventEmitter = require('events');
-var util = require('util');
-
-function VirtualMachine () {
-    if (!window.Worker) {
-        console.error('WebWorkers not supported in this environment.' +
-            ' Please use the non-worker version (vm.js or vm.min.js).');
-        return;
-    }
-    var instance = this;
-    EventEmitter.call(instance);
-    instance.vmWorker = new Worker('../vm.js');
-
-    // onmessage calls are converted into emitted events.
-    instance.vmWorker.onmessage = function (e) {
-        instance.emit(e.data.method, e.data);
-    };
-
-    instance.blockListener = function (e) {
-        // Messages from Blockly are not serializable by default.
-        // Pull out the necessary, serializable components to pass across.
-        var serializableE = {
-            blockId: e.blockId,
-            element: e.element,
-            type: e.type,
-            name: e.name,
-            newValue: e.newValue,
-            oldParentId: e.oldParentId,
-            oldInputName: e.oldInputName,
-            newParentId: e.newParentId,
-            newInputName: e.newInputName,
-            newCoordinate: e.newCoordinate,
-            xml: {
-                outerHTML: (e.xml) ? e.xml.outerHTML : null
-            }
-        };
-        instance.vmWorker.postMessage({
-            method: 'blockListener',
-            args: serializableE
-        });
-    };
-}
-
-/**
- * Inherit from EventEmitter
- */
-util.inherits(VirtualMachine, EventEmitter);
-
-// For documentation, please see index.js.
-// These mirror the functionality provided there, with the worker wrapper.
-VirtualMachine.prototype.getPlaygroundData = function () {
-    this.vmWorker.postMessage({method: 'getPlaygroundData'});
-};
-
-VirtualMachine.prototype.postIOData = function (device, data) {
-    this.vmWorker.postMessage({
-        method: 'postIOData',
-        device: device,
-        data: data
-    });
-};
-
-VirtualMachine.prototype.start = function () {
-    this.vmWorker.postMessage({method: 'start'});
-};
-
-VirtualMachine.prototype.greenFlag = function () {
-    this.vmWorker.postMessage({method: 'greenFlag'});
-};
-
-VirtualMachine.prototype.stopAll = function () {
-    this.vmWorker.postMessage({method: 'stopAll'});
-};
-
-VirtualMachine.prototype.animationFrame = function () {
-    this.vmWorker.postMessage({method: 'animationFrame'});
-};
-
-VirtualMachine.prototype.loadProject = function (json) {
-    this.vmWorker.postMessage({method: 'loadProject', json: json});
-};
-
-VirtualMachine.prototype.createEmptyProject = function () {
-    this.vmWorker.postMessage({method: 'createEmptyProject'});
-};
-
-VirtualMachine.prototype.setEditingTarget = function (targetId) {
-    this.vmWorker.postMessage({method: 'setEditingTarget', targetId: targetId});
-};
-
-/**
- * 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 2c59a03d5..83bd76738 100644
--- a/vm.js
+++ b/vm.js
@@ -47,14 +47,10 @@
 	var EventEmitter = __webpack_require__(1);
 	var util = __webpack_require__(2);
 
-	var Sprite = __webpack_require__(6);
-	var Runtime = __webpack_require__(61);
-
-	/**
-	 * Whether the environment is a WebWorker.
-	 * @const{boolean}
-	 */
-	var ENV_WORKER = typeof importScripts === 'function';
+	var Runtime = __webpack_require__(6);
+	var sb2import = __webpack_require__(33);
+	var Sprite = __webpack_require__(85);
+	var Blocks = __webpack_require__(34);
 
 	/**
 	 * Handles connections between blocks, stage, and extensions.
@@ -63,35 +59,25 @@
 	 */
 	function VirtualMachine () {
 	    var instance = this;
-
 	    // Bind event emitter and runtime to VM instance
-	    // @todo Post message (Web Worker) polyfill
 	    EventEmitter.call(instance);
-	    // @todo support multiple targets/sprites.
-	    // This is just a demo/example.
-	    var exampleSprite = new Sprite();
-	    exampleSprite.createClone();
-	    var exampleTargets = [exampleSprite.clones[0]];
-	    instance.exampleSprite = exampleSprite;
-	    instance.runtime = new Runtime(exampleTargets);
-
 	    /**
-	     * Event listeners for scratch-blocks.
+	     * VM runtime, to store blocks, I/O devices, sprites/targets, etc.
+	     * @type {!Runtime}
 	     */
-	    instance.blockListener = (
-	        exampleSprite.blocks.generateBlockListener(false, instance.runtime)
-	    );
-
-	    instance.flyoutBlockListener = (
-	        exampleSprite.blocks.generateBlockListener(true, instance.runtime)
-	    );
-
+	    instance.runtime = new Runtime();
+	    /**
+	     * The "currently editing"/selected target ID for the VM.
+	     * Block events from any Blockly workspace are routed to this target.
+	     * @type {!string}
+	     */
+	    instance.editingTarget = null;
 	    // Runtime emits are passed along as VM emits.
-	    instance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
-	        instance.emit(Runtime.STACK_GLOW_ON, {id: id});
+	    instance.runtime.on(Runtime.SCRIPT_GLOW_ON, function (id) {
+	        instance.emit(Runtime.SCRIPT_GLOW_ON, {id: id});
 	    });
-	    instance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
-	        instance.emit(Runtime.STACK_GLOW_OFF, {id: id});
+	    instance.runtime.on(Runtime.SCRIPT_GLOW_OFF, function (id) {
+	        instance.emit(Runtime.SCRIPT_GLOW_OFF, {id: id});
 	    });
 	    instance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
 	        instance.emit(Runtime.BLOCK_GLOW_ON, {id: id});
@@ -102,6 +88,8 @@
 	    instance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
 	        instance.emit(Runtime.VISUAL_REPORT, {id: id, value: value});
 	    });
+
+	    this.blockListener = this.blockListener.bind(this);
 	}
 
 	/**
@@ -135,7 +123,7 @@
 	 */
 	VirtualMachine.prototype.getPlaygroundData = function () {
 	    this.emit('playgroundData', {
-	        blocks: this.exampleSprite.blocks,
+	        blocks: this.editingTarget.blocks,
 	        threads: this.runtime.threads
 	    });
 	};
@@ -158,74 +146,130 @@
 	    }
 	};
 
-	/*
-	 * Worker handlers: for all public methods available above,
-	 * we must also provide a message handler in case the VM is run
-	 * from a worker environment.
+	/**
+	 * Load a project from a Scratch 2.0 JSON representation.
+	 * @param {?string} json JSON string representing the project.
 	 */
-	if (ENV_WORKER) {
-	    self.importScripts(
-	        './node_modules/scratch-render/render-worker.js'
-	    );
-	    self.renderer = new self.RenderWebGLWorker();
-	    self.vmInstance = new VirtualMachine();
-	    self.onmessage = function (e) {
-	        var messageData = e.data;
-	        switch (messageData.method) {
-	        case 'start':
-	            self.vmInstance.runtime.start();
-	            break;
-	        case 'greenFlag':
-	            self.vmInstance.runtime.greenFlag();
-	            break;
-	        case 'stopAll':
-	            self.vmInstance.runtime.stopAll();
-	            break;
-	        case 'blockListener':
-	            self.vmInstance.blockListener(messageData.args);
-	            break;
-	        case 'flyoutBlockListener':
-	            self.vmInstance.flyoutBlockListener(messageData.args);
-	            break;
-	        case 'getPlaygroundData':
-	            self.postMessage({
-	                method: 'playgroundData',
-	                blocks: self.vmInstance.exampleSprite.blocks,
-	                threads: self.vmInstance.runtime.threads
-	            });
-	            break;
-	        case 'animationFrame':
-	            self.vmInstance.animationFrame();
-	            break;
-	        case 'postIOData':
-	            self.vmInstance.postIOData(messageData.device, messageData.data);
-	            break;
-	        default:
-	            if (e.data.id == 'RendererConnected') {
-	                //initRenderWorker();
-	            }
-	            self.renderer.onmessage(e);
-	            break;
-	        }
-	    };
-	    // Bind runtime's emitted events to postmessages.
-	    self.vmInstance.runtime.on(Runtime.STACK_GLOW_ON, function (id) {
-	        self.postMessage({method: Runtime.STACK_GLOW_ON, id: id});
-	    });
-	    self.vmInstance.runtime.on(Runtime.STACK_GLOW_OFF, function (id) {
-	        self.postMessage({method: Runtime.STACK_GLOW_OFF, id: id});
-	    });
-	    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
-	        self.postMessage({method: Runtime.BLOCK_GLOW_ON, id: id});
-	    });
-	    self.vmInstance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
-	        self.postMessage({method: Runtime.BLOCK_GLOW_OFF, id: id});
-	    });
-	    self.vmInstance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
-	        self.postMessage({method: Runtime.VISUAL_REPORT, id: id, value: value});
-	    });
-	}
+	VirtualMachine.prototype.loadProject = function (json) {
+	    // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
+	    sb2import(json, this.runtime);
+	    // Select the first target for editing, e.g., the stage.
+	    this.editingTarget = this.runtime.targets[0];
+	    // Update the VM user's knowledge of targets and blocks on the workspace.
+	    this.emitTargetsUpdate();
+	    this.emitWorkspaceUpdate();
+	    this.runtime.setEditingTarget(this.editingTarget);
+	};
 
+	/**
+	 * Temporary way to make an empty project, in case the desired project
+	 * cannot be loaded from the online server.
+	 */
+	VirtualMachine.prototype.createEmptyProject = function () {
+	    // Stage.
+	    var blocks2 = new Blocks();
+	    var stage = new Sprite(blocks2);
+	    stage.name = 'Stage';
+	    stage.costumes.push({
+	        skin: '/assets/stage.png',
+	        name: 'backdrop1',
+	        bitmapResolution: 1,
+	        rotationCenterX: 240,
+	        rotationCenterY: 180
+	    });
+	    var target2 = stage.createClone();
+	    this.runtime.targets.push(target2);
+	    target2.x = 0;
+	    target2.y = 0;
+	    target2.direction = 90;
+	    target2.size = 200;
+	    target2.visible = true;
+	    target2.isStage = true;
+	    // Sprite1 (cat).
+	    var blocks1 = new Blocks();
+	    var sprite = new Sprite(blocks1);
+	    sprite.name = 'Sprite1';
+	    sprite.costumes.push({
+	        skin: '/assets/scratch_cat.svg',
+	        name: 'costume1',
+	        bitmapResolution: 1,
+	        rotationCenterX: 47,
+	        rotationCenterY: 55
+	    });
+	    var target1 = sprite.createClone();
+	    this.runtime.targets.push(target1);
+	    target1.x = 0;
+	    target1.y = 0;
+	    target1.direction = 90;
+	    target1.size = 100;
+	    target1.visible = true;
+	    this.editingTarget = this.runtime.targets[0];
+	    this.emitTargetsUpdate();
+	    this.emitWorkspaceUpdate();
+	};
+
+	/**
+	 * Handle a Blockly event for the current editing target.
+	 * @param {!Blockly.Event} e Any Blockly event.
+	 */
+	VirtualMachine.prototype.blockListener = function (e) {
+	    if (this.editingTarget) {
+	        this.editingTarget.blocks.blocklyListen(
+	            e,
+	            false,
+	            this.runtime
+	        );
+	    }
+	};
+
+	/**
+	 * Set an editing target. An editor UI can use this function to switch
+	 * between editing different targets, sprites, etc.
+	 * After switching the editing target, the VM may emit updates
+	 * to the list of targets and any attached workspace blocks
+	 * (see `emitTargetsUpdate` and `emitWorkspaceUpdate`).
+	 * @param {string} targetId Id of target to set as editing.
+	 */
+	VirtualMachine.prototype.setEditingTarget = function (targetId) {
+	    // Has the target id changed? If not, exit.
+	    if (targetId == this.editingTarget.id) {
+	        return;
+	    }
+	    var target = this.runtime.getTargetById(targetId);
+	    if (target) {
+	        this.editingTarget = target;
+	        // Emit appropriate UI updates.
+	        this.emitTargetsUpdate();
+	        this.emitWorkspaceUpdate();
+	        this.runtime.setEditingTarget(target);
+	    }
+	};
+
+	/**
+	 * Emit metadata about available targets.
+	 * An editor UI could use this to display a list of targets and show
+	 * the currently editing one.
+	 */
+	VirtualMachine.prototype.emitTargetsUpdate = function () {
+	    this.emit('targetsUpdate', {
+	        // [[target id, human readable target name], ...].
+	        targetList: this.runtime.targets.map(function(target) {
+	            return [target.id, target.getName()];
+	        }),
+	        // Currently editing target id.
+	        editingTarget: this.editingTarget.id
+	    });
+	};
+
+	/**
+	 * Emit an Blockly/scratch-blocks compatible XML representation
+	 * of the current editing target's blocks.
+	 */
+	VirtualMachine.prototype.emitWorkspaceUpdate = function () {
+	    this.emit('workspaceUpdate', {
+	        'xml': this.editingTarget.blocks.toXML()
+	    });
+	};
 	/**
 	 * Export and bind to `window`
 	 */
@@ -296,8 +340,12 @@
 	      er = arguments[1];
 	      if (er instanceof Error) {
 	        throw er; // Unhandled 'error' event
+	      } else {
+	        // At least give some kind of context to the user
+	        var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
+	        err.context = er;
+	        throw err;
 	      }
-	      throw TypeError('Uncaught, unspecified "error" event.');
 	    }
 	  }
 
@@ -1135,8 +1183,74 @@
 /***/ function(module, exports) {
 
 	// shim for using process in browser
-
 	var process = module.exports = {};
+
+	// cached from whatever global is present so that test runners that stub it
+	// don't break things.  But we need to wrap it in a try catch in case it is
+	// wrapped in strict mode code which doesn't define any globals.  It's inside a
+	// function because try/catches deoptimize in certain engines.
+
+	var cachedSetTimeout;
+	var cachedClearTimeout;
+
+	(function () {
+	    try {
+	        cachedSetTimeout = setTimeout;
+	    } catch (e) {
+	        cachedSetTimeout = function () {
+	            throw new Error('setTimeout is not defined');
+	        }
+	    }
+	    try {
+	        cachedClearTimeout = clearTimeout;
+	    } catch (e) {
+	        cachedClearTimeout = function () {
+	            throw new Error('clearTimeout is not defined');
+	        }
+	    }
+	} ())
+	function runTimeout(fun) {
+	    if (cachedSetTimeout === setTimeout) {
+	        //normal enviroments in sane situations
+	        return setTimeout(fun, 0);
+	    }
+	    try {
+	        // when when somebody has screwed with setTimeout but no I.E. maddness
+	        return cachedSetTimeout(fun, 0);
+	    } catch(e){
+	        try {
+	            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+	            return cachedSetTimeout.call(null, fun, 0);
+	        } catch(e){
+	            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+	            return cachedSetTimeout.call(this, fun, 0);
+	        }
+	    }
+
+
+	}
+	function runClearTimeout(marker) {
+	    if (cachedClearTimeout === clearTimeout) {
+	        //normal enviroments in sane situations
+	        return clearTimeout(marker);
+	    }
+	    try {
+	        // when when somebody has screwed with setTimeout but no I.E. maddness
+	        return cachedClearTimeout(marker);
+	    } catch (e){
+	        try {
+	            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
+	            return cachedClearTimeout.call(null, marker);
+	        } catch (e){
+	            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+	            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+	            return cachedClearTimeout.call(this, marker);
+	        }
+	    }
+
+
+
+	}
 	var queue = [];
 	var draining = false;
 	var currentQueue;
@@ -1161,7 +1275,7 @@
 	    if (draining) {
 	        return;
 	    }
-	    var timeout = setTimeout(cleanUpNextTick);
+	    var timeout = runTimeout(cleanUpNextTick);
 	    draining = true;
 
 	    var len = queue.length;
@@ -1178,7 +1292,7 @@
 	    }
 	    currentQueue = null;
 	    draining = false;
-	    clearTimeout(timeout);
+	    runClearTimeout(timeout);
 	}
 
 	process.nextTick = function (fun) {
@@ -1190,7 +1304,7 @@
 	    }
 	    queue.push(new Item(fun, args));
 	    if (queue.length === 1 && !draining) {
-	        setTimeout(drainQueue, 0);
+	        runTimeout(drainQueue);
 	    }
 	};
 
@@ -1274,232 +1388,1504 @@
 /* 6 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Clone = __webpack_require__(7);
-	var Blocks = __webpack_require__(10);
+	var EventEmitter = __webpack_require__(1);
+	var Sequencer = __webpack_require__(7);
+	var Thread = __webpack_require__(9);
+	var util = __webpack_require__(2);
+
+	// Virtual I/O devices.
+	var Clock = __webpack_require__(11);
+	var Keyboard = __webpack_require__(12);
+	var Mouse = __webpack_require__(15);
+
+	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)
+	};
 
 	/**
-	 * 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.
-	 * @constructor
+	 * Manages targets, scripts, and the sequencer.
 	 */
-	function Sprite (blocks) {
-	    if (!blocks) {
-	        // Shared set of blocks for all clones.
-	        blocks = new Blocks();
-	    }
-	    this.blocks = blocks;
-	    this.clones = [];
+	function Runtime () {
+	    // Bind event emitter
+	    EventEmitter.call(this);
+
+	    // State for the runtime
+
+	    /**
+	     * Target management and storage.
+	     * @type {Array.<!Target>}
+	     */
+	    this.targets = [];
+
+	    /**
+	     * A list of threads that are currently running in the VM.
+	     * Threads are added when execution starts and pruned when execution ends.
+	     * @type {Array.<Thread>}
+	     */
+	    this.threads = [];
+
+	    /** @type {!Sequencer} */
+	    this.sequencer = new Sequencer(this);
+
+	    /**
+	     * Map to look up a block primitive's implementation function by its opcode.
+	     * This is a two-step lookup: package name first, then primitive name.
+	     * @type {Object.<string, Function>}
+	     */
+	    this._primitives = {};
+	    this._hats = {};
+	    this._edgeActivatedHatValues = {};
+	    this._registerBlockPackages();
+
+	    this.ioDevices = {
+	        'clock': new Clock(),
+	        'keyboard': new Keyboard(this),
+	        'mouse': new Mouse(this)
+	    };
+
+	    this._scriptGlowsPreviousFrame = [];
+	    this._editingTarget = null;
 	}
 
 	/**
-	 * Create a clone of this sprite.
-	 * @returns {!Clone} Newly created clone.
+	 * Event name for glowing a script.
+	 * @const {string}
 	 */
-	Sprite.prototype.createClone = function () {
-	    var newClone = new Clone(this.blocks);
-	    this.clones.push(newClone);
-	    return newClone;
+	Runtime.SCRIPT_GLOW_ON = 'STACK_GLOW_ON';
+
+	/**
+	 * Event name for unglowing a script.
+	 * @const {string}
+	 */
+	Runtime.SCRIPT_GLOW_OFF = 'STACK_GLOW_OFF';
+
+	/**
+	 * Event name for glowing a block.
+	 * @const {string}
+	 */
+	Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
+
+	/**
+	 * Event name for unglowing a block.
+	 * @const {string}
+	 */
+	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
+
+	/**
+	 * Event name for visual value report.
+	 * @const {string}
+	 */
+	Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
+
+	/**
+	 * Inherit from EventEmitter
+	 */
+	util.inherits(Runtime, EventEmitter);
+
+	/**
+	 * How rapidly we try to step threads, in ms.
+	 */
+	Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
+
+
+	// -----------------------------------------------------------------------------
+	// -----------------------------------------------------------------------------
+
+	/**
+	 * Register default block packages with this runtime.
+	 * @todo Prefix opcodes with package name.
+	 * @private
+	 */
+	Runtime.prototype._registerBlockPackages = function () {
+	    for (var packageName in defaultBlockPackages) {
+	        if (defaultBlockPackages.hasOwnProperty(packageName)) {
+	            // @todo pass a different runtime depending on package privilege?
+	            var packageObject = new (defaultBlockPackages[packageName])(this);
+	            // Collect primitives from package.
+	            if (packageObject.getPrimitives) {
+	                var packagePrimitives = packageObject.getPrimitives();
+	                for (var op in packagePrimitives) {
+	                    if (packagePrimitives.hasOwnProperty(op)) {
+	                        this._primitives[op] =
+	                            packagePrimitives[op].bind(packageObject);
+	                    }
+	                }
+	            }
+	            // Collect hat metadata from package.
+	            if (packageObject.getHats) {
+	                var packageHats = packageObject.getHats();
+	                for (var hatName in packageHats) {
+	                    if (packageHats.hasOwnProperty(hatName)) {
+	                        this._hats[hatName] = packageHats[hatName];
+	                    }
+	                }
+	            }
+	        }
+	    }
 	};
 
-	module.exports = Sprite;
+	/**
+	 * Retrieve the function associated with the given opcode.
+	 * @param {!string} opcode The opcode to look up.
+	 * @return {Function} The function which implements the opcode.
+	 */
+	Runtime.prototype.getOpcodeFunction = function (opcode) {
+	    return this._primitives[opcode];
+	};
+
+	// -----------------------------------------------------------------------------
+	// -----------------------------------------------------------------------------
+
+	/**
+	 * Return whether an opcode represents a hat block.
+	 * @param {!string} opcode The opcode to look up.
+	 * @return {Boolean} True if the op is known to be a hat.
+	 */
+	Runtime.prototype.getIsHat = function (opcode) {
+	    return this._hats.hasOwnProperty(opcode);
+	};
+
+	/**
+	 * Return whether an opcode represents an edge-activated hat block.
+	 * @param {!string} opcode The opcode to look up.
+	 * @return {Boolean} True if the op is known to be a edge-activated hat.
+	 */
+	Runtime.prototype.getIsEdgeActivatedHat = function (opcode) {
+	    return this._hats.hasOwnProperty(opcode) &&
+	        this._hats[opcode].edgeActivated;
+	};
+
+	/**
+	 * Update an edge-activated hat block value.
+	 * @param {!string} blockId ID of hat to store value for.
+	 * @param {*} newValue Value to store for edge-activated hat.
+	 * @return {*} The old value for the edge-activated hat.
+	 */
+	Runtime.prototype.updateEdgeActivatedValue = function (blockId, newValue) {
+	    var oldValue = this._edgeActivatedHatValues[blockId];
+	    this._edgeActivatedHatValues[blockId] = newValue;
+	    return oldValue;
+	};
+
+	/**
+	 * Clear all edge-activaed hat values.
+	 */
+	Runtime.prototype.clearEdgeActivatedValues = function () {
+	    this._edgeActivatedHatValues = {};
+	};
+
+	// -----------------------------------------------------------------------------
+	// -----------------------------------------------------------------------------
+
+	/**
+	 * Create a thread and push it to the list of threads.
+	 * @param {!string} id ID of block that starts the stack
+	 * @return {!Thread} The newly created thread.
+	 */
+	Runtime.prototype._pushThread = function (id) {
+	    var thread = new Thread(id);
+	    thread.pushStack(id);
+	    this.threads.push(thread);
+	    return thread;
+	};
+
+	/**
+	 * Remove a thread from the list of threads.
+	 * @param {?Thread} thread Thread object to remove from actives
+	 */
+	Runtime.prototype._removeThread = function (thread) {
+	    var i = this.threads.indexOf(thread);
+	    if (i > -1) {
+	        this.threads.splice(i, 1);
+	    }
+	};
+
+	/**
+	 * Return whether a thread is currently active/running.
+	 * @param {?Thread} thread Thread object to check.
+	 * @return {Boolean} True if the thread is active/running.
+	 */
+	Runtime.prototype.isActiveThread = function (thread) {
+	    return this.threads.indexOf(thread) > -1;
+	};
+
+	/**
+	 * Toggle a script.
+	 * @param {!string} topBlockId ID of block that starts the script.
+	 */
+	Runtime.prototype.toggleScript = function (topBlockId) {
+	    // Remove any existing thread.
+	    for (var i = 0; i < this.threads.length; i++) {
+	        if (this.threads[i].topBlock == topBlockId) {
+	            this._removeThread(this.threads[i]);
+	            return;
+	        }
+	    }
+	    // Otherwise add it.
+	    this._pushThread(topBlockId);
+	};
+
+	/**
+	 * Run a function `f` for all scripts in a workspace.
+	 * `f` will be called with two parameters:
+	 *  - the top block ID of the script.
+	 *  - the target that owns the script.
+	 * @param {!Function} f Function to call for each script.
+	 * @param {Target=} opt_target Optionally, a target to restrict to.
+	 */
+	Runtime.prototype.allScriptsDo = function (f, opt_target) {
+	    var targets = this.targets;
+	    if (opt_target) {
+	        targets = [opt_target];
+	    }
+	    for (var t = 0; t < targets.length; t++) {
+	        var target = targets[t];
+	        var scripts = target.blocks.getScripts();
+	        for (var j = 0; j < scripts.length; j++) {
+	            var topBlockId = scripts[j];
+	            f(topBlockId, target);
+	        }
+	    }
+	};
+
+	/**
+	 * Start all relevant hats.
+	 * @param {!string} requestedHatOpcode Opcode of hats to start.
+	 * @param {Object=} opt_matchFields Optionally, fields to match on the hat.
+	 * @param {Target=} opt_target Optionally, a target to restrict to.
+	 * @return {Array.<Thread>} List of threads started by this function.
+	 */
+	Runtime.prototype.startHats = function (requestedHatOpcode,
+	    opt_matchFields, opt_target) {
+	    if (!this._hats.hasOwnProperty(requestedHatOpcode)) {
+	        // No known hat with this opcode.
+	        return;
+	    }
+	    var instance = this;
+	    var newThreads = [];
+	    // Consider all scripts, looking for hats with opcode `requestedHatOpcode`.
+	    this.allScriptsDo(function(topBlockId, target) {
+	        var potentialHatOpcode = target.blocks.getBlock(topBlockId).opcode;
+	        if (potentialHatOpcode !== requestedHatOpcode) {
+	            // Not the right hat.
+	            return;
+	        }
+	        // Match any requested fields.
+	        // For example: ensures that broadcasts match.
+	        // This needs to happen before the block is evaluated
+	        // (i.e., before the predicate can be run) because "broadcast and wait"
+	        // needs to have a precise collection of started threads.
+	        var hatFields = target.blocks.getFields(topBlockId);
+	        if (opt_matchFields) {
+	            for (var matchField in opt_matchFields) {
+	                if (hatFields[matchField].value !==
+	                    opt_matchFields[matchField]) {
+	                    // Field mismatch.
+	                    return;
+	                }
+	            }
+	        }
+	        // Look up metadata for the relevant hat.
+	        var hatMeta = instance._hats[requestedHatOpcode];
+	        if (hatMeta.restartExistingThreads) {
+	            // 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) {
+	                    instance._removeThread(instance.threads[i]);
+	                }
+	            }
+	        } else {
+	            // 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) {
+	                    // Some thread is already running.
+	                    return;
+	                }
+	            }
+	        }
+	        // Start the thread with this top block.
+	        newThreads.push(instance._pushThread(topBlockId));
+	    }, opt_target);
+	    return newThreads;
+	};
+
+	/**
+	 * Start all threads that start with the green flag.
+	 */
+	Runtime.prototype.greenFlag = function () {
+	    this.ioDevices.clock.resetProjectTimer();
+	    this.clearEdgeActivatedValues();
+	    this.startHats('event_whenflagclicked');
+	};
+
+	/**
+	 * Stop "everything"
+	 */
+	Runtime.prototype.stopAll = function () {
+	    var threadsCopy = this.threads.slice();
+	    while (threadsCopy.length > 0) {
+	        var poppedThread = threadsCopy.pop();
+	        this._removeThread(poppedThread);
+	    }
+	};
+
+	/**
+	 * Repeatedly run `sequencer.stepThreads` and filter out
+	 * inactive threads after each iteration.
+	 */
+	Runtime.prototype._step = function () {
+	    // Find all edge-activated hats, and add them to threads to be evaluated.
+	    for (var hatType in this._hats) {
+	        var hat = this._hats[hatType];
+	        if (hat.edgeActivated) {
+	            this.startHats(hatType);
+	        }
+	    }
+	    var inactiveThreads = this.sequencer.stepThreads(this.threads);
+	    this._updateScriptGlows();
+	    for (var i = 0; i < inactiveThreads.length; i++) {
+	        this._removeThread(inactiveThreads[i]);
+	    }
+	};
+
+	Runtime.prototype.setEditingTarget = function (editingTarget) {
+	    this._scriptGlowsPreviousFrame = [];
+	    this._editingTarget = editingTarget;
+	    this._updateScriptGlows();
+	};
+
+	Runtime.prototype._updateScriptGlows = function () {
+	    // Set of scripts that request a glow this frame.
+	    var requestedGlowsThisFrame = [];
+	    // Final set of scripts glowing during this frame.
+	    var finalScriptGlows = [];
+	    // 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);
+	        if (thread.requestScriptGlowInFrame && target == this._editingTarget) {
+	            var blockForThread = thread.peekStack() || thread.topBlock;
+	            var script = target.blocks.getTopLevelScript(blockForThread);
+	            requestedGlowsThisFrame.push(script);
+	        }
+	    }
+	    // Compare to previous frame.
+	    for (var j = 0; j < this._scriptGlowsPreviousFrame.length; j++) {
+	        var previousFrameGlow = this._scriptGlowsPreviousFrame[j];
+	        if (requestedGlowsThisFrame.indexOf(previousFrameGlow) < 0) {
+	            // Glow turned off.
+	            this.glowScript(previousFrameGlow, false);
+	        } else {
+	            // Still glowing.
+	            finalScriptGlows.push(previousFrameGlow);
+	        }
+	    }
+	    for (var k = 0; k < requestedGlowsThisFrame.length; k++) {
+	        var currentFrameGlow = requestedGlowsThisFrame[k];
+	        if (this._scriptGlowsPreviousFrame.indexOf(currentFrameGlow) < 0) {
+	            // Glow turned on.
+	            this.glowScript(currentFrameGlow, true);
+	            finalScriptGlows.push(currentFrameGlow);
+	        }
+	    }
+	    this._scriptGlowsPreviousFrame = finalScriptGlows;
+	};
+
+	/**
+	 * Emit feedback for block glowing (used in the sequencer).
+	 * @param {?string} blockId ID for the block to update glow
+	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
+	 */
+	Runtime.prototype.glowBlock = function (blockId, isGlowing) {
+	    if (isGlowing) {
+	        this.emit(Runtime.BLOCK_GLOW_ON, blockId);
+	    } else {
+	        this.emit(Runtime.BLOCK_GLOW_OFF, blockId);
+	    }
+	};
+
+	/**
+	 * Emit feedback for script glowing.
+	 * @param {?string} topBlockId ID for the top block to update glow
+	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
+	 */
+	Runtime.prototype.glowScript = function (topBlockId, isGlowing) {
+	    if (isGlowing) {
+	        this.emit(Runtime.SCRIPT_GLOW_ON, topBlockId);
+	    } else {
+	        this.emit(Runtime.SCRIPT_GLOW_OFF, topBlockId);
+	    }
+	};
+
+	/**
+	 * Emit value for reporter to show in the blocks.
+	 * @param {string} blockId ID for the block.
+	 * @param {string} value Value to show associated with the block.
+	 */
+	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.
+	 * @return {?Target} The target, if found.
+	 */
+	Runtime.prototype.getTargetById = function (targetId) {
+	    for (var i = 0; i < this.targets.length; i++) {
+	        var target = this.targets[i];
+	        if (target.id == targetId) {
+	            return target;
+	        }
+	    }
+	};
+
+	/**
+	 * Get a target representing the Scratch stage, if one exists.
+	 * @return {?Target} The target, if found.
+	 */
+	Runtime.prototype.getTargetForStage = function () {
+	    for (var i = 0; i < this.targets.length; i++) {
+	        var target = this.targets[i];
+	        if (target.isStage) {
+	            return target;
+	        }
+	    }
+	};
+
+	/**
+	 * Handle an animation frame from the main thread.
+	 */
+	Runtime.prototype.animationFrame = function () {
+	    if (self.renderer) {
+	        self.renderer.draw();
+	    }
+	};
+
+	/**
+	 * Set up timers to repeatedly step in a browser
+	 */
+	Runtime.prototype.start = function () {
+	    self.setInterval(function() {
+	        this._step();
+	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
+	};
+
+	module.exports = Runtime;
 
 
 /***/ },
 /* 7 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var util = __webpack_require__(2);
-	var MathUtil = __webpack_require__(8);
-	var Target = __webpack_require__(9);
+	var Timer = __webpack_require__(8);
+	var Thread = __webpack_require__(9);
+	var execute = __webpack_require__(10);
 
-	/**
-	 * Clone (instance) of a sprite.
-	 * @param {!Blocks} spriteBlocks Reference to the sprite's blocks.
-	 * @constructor
-	 */
-	function Clone(spriteBlocks) {
-	    Target.call(this, spriteBlocks);
+	function Sequencer (runtime) {
 	    /**
-	     * Reference to the global renderer for this VM, if one exists.
-	     * @type {?RenderWebGLWorker}
+	     * A utility timer for timing thread sequencing.
+	     * @type {!Timer}
 	     */
-	    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;
-	    }
-	    /**
-	     * ID of the drawable for this clone returned by the renderer, if rendered.
-	     * @type {?Number}
-	     */
-	    this.drawableID = null;
+	    this.timer = new Timer();
 
-	    this.initDrawable();
+	    /**
+	     * Reference to the runtime owning this sequencer.
+	     * @type {!Runtime}
+	     */
+	    this.runtime = runtime;
 	}
-	util.inherits(Clone, Target);
 
 	/**
-	 * Create a clone's drawable with the this.renderer.
+	 * The sequencer does as much work as it can within WORK_TIME milliseconds,
+	 * then yields. This is essentially a rate-limiter for blocks.
+	 * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
+	 * @const {!number}
 	 */
-	Clone.prototype.initDrawable = function () {
-	    if (this.renderer) {
-	        var createPromise = this.renderer.createDrawable();
-	        var instance = this;
-	        createPromise.then(function (id) {
-	            instance.drawableID = id;
-	        });
+	Sequencer.WORK_TIME = 10;
+
+	/**
+	 * Step through all threads in `this.threads`, running them in order.
+	 * @param {Array.<Thread>} threads List of which threads to step.
+	 * @return {Array.<Thread>} All threads which have finished in this iteration.
+	 */
+	Sequencer.prototype.stepThreads = function (threads) {
+	    // Start counting toward WORK_TIME
+	    this.timer.start();
+	    // List of threads which have been killed by this step.
+	    var inactiveThreads = [];
+	    // If all of the threads are yielding, we should yield.
+	    var numYieldingThreads = 0;
+	    // Clear all yield statuses that were for the previous frame.
+	    for (var t = 0; t < threads.length; t++) {
+	        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
+	            threads[t].setStatus(Thread.STATUS_RUNNING);
+	        }
 	    }
-	};
 
-	// Clone-level properties.
-	/**
-	 * Scratch X coordinate. Currently should range from -240 to 240.
-	 * @type {!number}
-	 */
-	Clone.prototype.x = 0;
-
-	/**
-	 * Scratch Y coordinate. Currently should range from -180 to 180.
-	 * @type {!number}
-	 */
-	Clone.prototype.y = 0;
-
-	/**
-	 * Scratch direction. Currently should range from -179 to 180.
-	 * @type {!number}
-	 */
-	Clone.prototype.direction = 90;
-
-	/**
-	 * Whether the clone is currently visible.
-	 * @type {!boolean}
-	 */
-	Clone.prototype.visible = true;
-
-	/**
-	 * Size of clone as a percent of costume size. Ranges from 5% to 535%.
-	 * @type {!number}
-	 */
-	Clone.prototype.size = 100;
-
-	/**
-	 * Map of current graphic effect values.
-	 * @type {!Object.<string, number>}
-	 */
-	Clone.prototype.effects = {
-	    'color': 0,
-	    'fisheye': 0,
-	    'whirl': 0,
-	    'pixelate': 0,
-	    'mosaic': 0,
-	    'brightness': 0,
-	    'ghost': 0
-	};
-	// End clone-level properties.
-
-	/**
-	 * Set the X and Y coordinates of a clone.
-	 * @param {!number} x New X coordinate of clone, in Scratch coordinates.
-	 * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
-	 */
-	Clone.prototype.setXY = function (x, y) {
-	    this.x = x;
-	    this.y = y;
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            position: [this.x, this.y]
-	        });
+	    // While there are still threads to run and we are within WORK_TIME,
+	    // continue executing threads.
+	    while (threads.length > 0 &&
+	           threads.length > numYieldingThreads &&
+	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
+	        // New threads at the end of the iteration.
+	        var newThreads = [];
+	        // Reset yielding thread count.
+	        numYieldingThreads = 0;
+	        // Attempt to run each thread one time
+	        for (var i = 0; i < threads.length; i++) {
+	            var activeThread = threads[i];
+	            if (activeThread.status === Thread.STATUS_RUNNING) {
+	                // Normal-mode thread: step.
+	                this.startThread(activeThread);
+	            } else if (activeThread.status === Thread.STATUS_YIELD ||
+	                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
+	                // Yielding thread: do nothing for this step.
+	                numYieldingThreads++;
+	            }
+	            if (activeThread.stack.length === 0 &&
+	                activeThread.status === Thread.STATUS_DONE) {
+	                // Finished with this thread - tell runtime to clean it up.
+	                inactiveThreads.push(activeThread);
+	            } else {
+	                // Keep this thead in the loop.
+	                newThreads.push(activeThread);
+	            }
+	        }
+	        // Effectively filters out threads that have stopped.
+	        threads = newThreads;
 	    }
+	    return inactiveThreads;
 	};
 
 	/**
-	 * Set the direction of a clone.
-	 * @param {!number} direction New direction of clone.
+	 * Step the requested thread
+	 * @param {!Thread} thread Thread object to step
 	 */
-	Clone.prototype.setDirection = function (direction) {
-	    // Keep direction between -179 and +180.
-	    this.direction = MathUtil.wrapClamp(direction, -179, 180);
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            direction: this.direction
-	        });
-	    }
-	};
-
-	/**
-	 * Set a say bubble on this clone.
-	 * @param {?string} type Type of say bubble: "say", "think", or null.
-	 * @param {?string} message Message to put in say bubble.
-	 */
-	Clone.prototype.setSay = function (type, message) {
-	    // @todo: Render to stage.
-	    if (!type || !message) {
-	        console.log('Clearing say bubble');
+	Sequencer.prototype.startThread = function (thread) {
+	    var currentBlockId = thread.peekStack();
+	    if (!currentBlockId) {
+	        // A "null block" - empty branch.
+	        // Yield for the frame.
+	        thread.popStack();
+	        thread.setStatus(Thread.STATUS_YIELD_FRAME);
 	        return;
 	    }
-	    console.log('Setting say bubble:', type, message);
-	};
-
-	/**
-	 * Set visibility of the clone; i.e., whether it's shown or hidden.
-	 * @param {!boolean} visible True if the sprite should be shown.
-	 */
-	Clone.prototype.setVisible = function (visible) {
-	    this.visible = visible;
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            visible: this.visible
-	        });
+	    // Execute the current block
+	    execute(this, thread);
+	    // If the block executed without yielding and without doing control flow,
+	    // move to done.
+	    if (thread.status === Thread.STATUS_RUNNING &&
+	        thread.peekStack() === currentBlockId) {
+	        this.proceedThread(thread);
 	    }
 	};
 
 	/**
-	 * Set size of the clone, as a percentage of the costume size.
-	 * @param {!number} size Size of clone, from 5 to 535.
+	 * Step a thread into a block's branch.
+	 * @param {!Thread} thread Thread object to step to branch.
+	 * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
 	 */
-	Clone.prototype.setSize = function (size) {
-	    // Keep size between 5% and 535%.
-	    this.size = MathUtil.clamp(size, 5, 535);
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            scale: [this.size, this.size]
-	        });
+	Sequencer.prototype.stepToBranch = function (thread, branchNum) {
+	    if (!branchNum) {
+	        branchNum = 1;
+	    }
+	    var currentBlockId = thread.peekStack();
+	    var branchId = this.runtime.targetForThread(thread).blocks.getBranch(
+	        currentBlockId,
+	        branchNum
+	    );
+	    if (branchId) {
+	        // Push branch ID to the thread's stack.
+	        thread.pushStack(branchId);
+	    } else {
+	        // Push null, so we come back to the current block.
+	        thread.pushStack(null);
 	    }
 	};
 
 	/**
-	 * Set a particular graphic effect on this clone.
-	 * @param {!string} effectName Name of effect (see `Clone.prototype.effects`).
-	 * @param {!number} value Numerical magnitude of effect.
+	 * Step a thread into an input reporter, and manage its status appropriately.
+	 * @param {!Thread} thread Thread object to step to reporter.
+	 * @param {!string} blockId ID of reporter block.
+	 * @param {!string} inputName Name of input on parent block.
+	 * @return {boolean} True if yielded, false if it finished immediately.
 	 */
-	Clone.prototype.setEffect = function (effectName, value) {
-	    this.effects[effectName] = value;
-	    if (this.renderer) {
-	        var props = {};
-	        props[effectName] = this.effects[effectName];
-	        this.renderer.updateDrawableProperties(this.drawableID, props);
+	Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
+	    var currentStackFrame = thread.peekStackFrame();
+	    // Push to the stack to evaluate the reporter block.
+	    thread.pushStack(blockId);
+	    // Save name of input for `Thread.pushReportedValue`.
+	    currentStackFrame.waitingReporter = inputName;
+	    // Actually execute the block.
+	    this.startThread(thread);
+	    // If a reporter yielded, caller must wait for it to unyield.
+	    // The value will be populated once the reporter unyields,
+	    // and passed up to the currentStackFrame on next execution.
+	    return thread.status === Thread.STATUS_YIELD;
+	};
+
+	/**
+	 * Finish stepping a thread and proceed it to the next block.
+	 * @param {!Thread} thread Thread object to proceed.
+	 */
+	Sequencer.prototype.proceedThread = function (thread) {
+	    var currentBlockId = thread.peekStack();
+	    // Mark the status as done and proceed to the next block.
+	    // 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));
+	    if (nextBlockId) {
+	        thread.pushStack(nextBlockId);
+	    }
+	    // If we can't find a next block to run, mark the thread as done.
+	    if (!thread.peekStack()) {
+	        thread.setStatus(Thread.STATUS_DONE);
 	    }
 	};
 
 	/**
-	 * Clear all graphic effects on this clone.
+	 * Retire a thread in the middle, without considering further blocks.
+	 * @param {!Thread} thread Thread object to retire.
 	 */
-	Clone.prototype.clearEffects = function () {
-	    for (var effectName in this.effects) {
-	        this.effects[effectName] = 0;
-	    }
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, this.effects);
-	    }
+	Sequencer.prototype.retireThread = function (thread) {
+	    thread.stack = [];
+	    thread.stackFrame = [];
+	    thread.setStatus(Thread.STATUS_DONE);
 	};
 
-	module.exports = Clone;
+	module.exports = Sequencer;
 
 
 /***/ },
 /* 8 */
+/***/ function(module, exports) {
+
+	/**
+	 * @fileoverview
+	 * A utility for accurately measuring time.
+	 * To use:
+	 * ---
+	 * var timer = new Timer();
+	 * timer.start();
+	 * ... pass some time ...
+	 * var timeDifference = timer.timeElapsed();
+	 * ---
+	 * Or, you can use the `time` and `relativeTime`
+	 * to do some measurement yourself.
+	 */
+
+	/**
+	 * @constructor
+	 */
+	function Timer () {}
+
+	/**
+	 * Used to store the start time of a timer action.
+	 * Updated when calling `timer.start`.
+	 */
+	Timer.prototype.startTime = 0;
+
+	/**
+	 * Return the currently known absolute time, in ms precision.
+	 * @returns {number} ms elapsed since 1 January 1970 00:00:00 UTC.
+	 */
+	Timer.prototype.time = function () {
+	    if (Date.now) {
+	        return Date.now();
+	    } else {
+	        return new Date().getTime();
+	    }
+	};
+
+	/**
+	 * Returns a time accurate relative to other times produced by this function.
+	 * If possible, will use sub-millisecond precision.
+	 * If not, will use millisecond precision.
+	 * Not guaranteed to produce the same absolute values per-system.
+	 * @returns {number} ms-scale accurate time relative to other relative times.
+	 */
+	Timer.prototype.relativeTime = function () {
+	    if (typeof self !== 'undefined' &&
+	        self.performance && 'now' in self.performance) {
+	        return self.performance.now();
+	    } else {
+	        return this.time();
+	    }
+	};
+
+	/**
+	 * Start a timer for measuring elapsed time,
+	 * at the most accurate precision possible.
+	 */
+	Timer.prototype.start = function () {
+	    this.startTime = this.relativeTime();
+	};
+
+	/**
+	 * Check time elapsed since `timer.start` was called.
+	 * @returns {number} Time elapsed, in ms (possibly sub-ms precision).
+	 */
+	Timer.prototype.timeElapsed = function () {
+	    return this.relativeTime() - this.startTime;
+	};
+
+	module.exports = Timer;
+
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+	/**
+	 * A thread is a running stack context and all the metadata needed.
+	 * @param {?string} firstBlock First block to execute in the thread.
+	 * @constructor
+	 */
+	function Thread (firstBlock) {
+	    /**
+	     * ID of top block of the thread
+	     * @type {!string}
+	     */
+	    this.topBlock = firstBlock;
+
+	    /**
+	     * Stack for the thread. When the sequencer enters a control structure,
+	     * the block is pushed onto the stack so we know where to exit.
+	     * @type {Array.<string>}
+	     */
+	    this.stack = [];
+
+	    /**
+	     * Stack frames for the thread. Store metadata for the executing blocks.
+	     * @type {Array.<Object>}
+	     */
+	    this.stackFrames = [];
+
+	    /**
+	     * Status of the thread, one of three states (below)
+	     * @type {number}
+	     */
+	    this.status = 0; /* Thread.STATUS_RUNNING */
+
+	    /**
+	     * Whether the thread requests its script to glow during this frame.
+	     * @type {boolean}
+	     */
+	    this.requestScriptGlowInFrame = false;
+	}
+
+	/**
+	 * Thread status for initialized or running thread.
+	 * This is the default state for a thread - execution should run normally,
+	 * stepping from block to block.
+	 * @const
+	 */
+	Thread.STATUS_RUNNING = 0;
+
+	/**
+	 * Thread status for a yielded thread.
+	 * Threads are in this state when a primitive has yielded; execution is paused
+	 * until the relevant primitive unyields.
+	 * @const
+	 */
+	Thread.STATUS_YIELD = 1;
+
+	/**
+	 * Thread status for a single-frame yield.
+	 * @const
+	 */
+	Thread.STATUS_YIELD_FRAME = 2;
+
+	/**
+	 * Thread status for a finished/done thread.
+	 * Thread is in this state when there are no more blocks to execute.
+	 * @const
+	 */
+	Thread.STATUS_DONE = 3;
+
+	/**
+	 * Push stack and update stack frames appropriately.
+	 * @param {string} blockId Block ID to push to stack.
+	 */
+	Thread.prototype.pushStack = function (blockId) {
+	    this.stack.push(blockId);
+	    // Push an empty stack frame, if we need one.
+	    // Might not, if we just popped the stack.
+	    if (this.stack.length > this.stackFrames.length) {
+	        this.stackFrames.push({
+	            reported: {}, // Collects reported input values.
+	            waitingReporter: null, // Name of waiting reporter.
+	            executionContext: {} // A context passed to block implementations.
+	        });
+	    }
+	};
+
+	/**
+	 * Pop last block on the stack and its stack frame.
+	 * @return {string} Block ID popped from the stack.
+	 */
+	Thread.prototype.popStack = function () {
+	    this.stackFrames.pop();
+	    return this.stack.pop();
+	};
+
+	/**
+	 * Get top stack item.
+	 * @return {?string} Block ID on top of stack.
+	 */
+	Thread.prototype.peekStack = function () {
+	    return this.stack[this.stack.length - 1];
+	};
+
+
+	/**
+	 * Get top stack frame.
+	 * @return {?Object} Last stack frame stored on this thread.
+	 */
+	Thread.prototype.peekStackFrame = function () {
+	    return this.stackFrames[this.stackFrames.length - 1];
+	};
+
+	/**
+	 * Get stack frame above the current top.
+	 * @return {?Object} Second to last stack frame stored on this thread.
+	 */
+	Thread.prototype.peekParentStackFrame = function () {
+	    return this.stackFrames[this.stackFrames.length - 2];
+	};
+
+	/**
+	 * Push a reported value to the parent of the current stack frame.
+	 * @param {!Any} value Reported value to push.
+	 */
+	Thread.prototype.pushReportedValue = function (value) {
+	    var parentStackFrame = this.peekParentStackFrame();
+	    if (parentStackFrame) {
+	        var waitingReporter = parentStackFrame.waitingReporter;
+	        parentStackFrame.reported[waitingReporter] = value;
+	        parentStackFrame.waitingReporter = null;
+	    }
+	};
+
+	/**
+	 * Whether the current execution of a thread is at the top of the stack.
+	 * @return {Boolean} True if execution is at top of the stack.
+	 */
+	Thread.prototype.atStackTop = function () {
+	    return this.peekStack() === this.topBlock;
+	};
+
+	/**
+	 * Set thread status.
+	 * @param {number} status Enum representing thread status.
+	 */
+	Thread.prototype.setStatus = function (status) {
+	    this.status = status;
+	};
+
+	module.exports = Thread;
+
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Thread = __webpack_require__(9);
+
+	/**
+	 * Utility function to determine if a value is a Promise.
+	 * @param {*} value Value to check for a Promise.
+	 * @return {Boolean} True if the value appears to be a Promise.
+	 */
+	var isPromise = function (value) {
+	    return value && value.then && typeof value.then === 'function';
+	};
+
+	/**
+	 * Execute a block.
+	 * @param {!Sequencer} sequencer Which sequencer is executing.
+	 * @param {!Thread} thread Thread which to read and execute.
+	 */
+	var execute = function (sequencer, thread) {
+	    var runtime = sequencer.runtime;
+	    var target = runtime.targetForThread(thread);
+
+	    // Current block to execute is the one on the top of the stack.
+	    var currentBlockId = thread.peekStack();
+	    var currentStackFrame = thread.peekStackFrame();
+
+	    // Query info about the block.
+	    var opcode = target.blocks.getOpcode(currentBlockId);
+	    var blockFunction = runtime.getOpcodeFunction(opcode);
+	    var isHat = runtime.getIsHat(opcode);
+	    var fields = target.blocks.getFields(currentBlockId);
+	    var inputs = target.blocks.getInputs(currentBlockId);
+
+	    if (!opcode) {
+	        console.warn('Could not get opcode for block: ' + currentBlockId);
+	        return;
+	    }
+
+	    /**
+	     * Handle any reported value from the primitive, either directly returned
+	     * or after a promise resolves.
+	     * @param {*} resolvedValue Value eventually returned from the primitive.
+	     */
+	    var handleReport = function (resolvedValue) {
+	        thread.pushReportedValue(resolvedValue);
+	        if (isHat) {
+	            // Hat predicate was evaluated.
+	            if (runtime.getIsEdgeActivatedHat(opcode)) {
+	                // If this is an edge-activated hat, only proceed if
+	                // the value is true and used to be false.
+	                var oldEdgeValue = runtime.updateEdgeActivatedValue(
+	                    currentBlockId,
+	                    resolvedValue
+	                );
+	                var edgeWasActivated = !oldEdgeValue && resolvedValue;
+	                if (!edgeWasActivated) {
+	                    sequencer.retireThread(thread);
+	                }
+	            } else {
+	                // Not an edge-activated hat: retire the thread
+	                // if predicate was false.
+	                if (!resolvedValue) {
+	                    sequencer.retireThread(thread);
+	                }
+	            }
+	        } else {
+	            // In a non-hat, report the value visually if necessary if
+	            // at the top of the thread stack.
+	            if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
+	                runtime.visualReport(currentBlockId, resolvedValue);
+	            }
+	            // Finished any yields.
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	        }
+	    };
+
+	    // Hats and single-field shadows are implemented slightly differently
+	    // from regular blocks.
+	    // For hats: if they have an associated block function,
+	    // it's treated as a predicate; if not, execution will proceed as a no-op.
+	    // For single-field shadows: If the block has a single field, and no inputs,
+	    // immediately return the value of the field.
+	    if (!blockFunction) {
+	        if (isHat) {
+	            // Skip through the block (hat with no predicate).
+	            return;
+	        } else {
+	            if (Object.keys(fields).length == 1 &&
+	                Object.keys(inputs).length == 0) {
+	                // One field and no inputs - treat as arg.
+	                for (var fieldKey in fields) { // One iteration.
+	                    handleReport(fields[fieldKey].value);
+	                }
+	            } else {
+	                console.warn('Could not get implementation for opcode: ' +
+	                    opcode);
+	            }
+	            thread.requestScriptGlowInFrame = true;
+	            return;
+	        }
+	    }
+
+	    // Generate values for arguments (inputs).
+	    var argValues = {};
+
+	    // Add all fields on this block to the argValues.
+	    for (var fieldName in fields) {
+	        argValues[fieldName] = fields[fieldName].value;
+	    }
+
+	    // Recursively evaluate input blocks.
+	    for (var inputName in inputs) {
+	        var input = inputs[inputName];
+	        var inputBlockId = input.block;
+	        // Is there no value for this input waiting in the stack frame?
+	        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
+	            // If there's not, we need to evaluate the block.
+	            var reporterYielded = (
+	                sequencer.stepToReporter(thread, inputBlockId, inputName)
+	            );
+	            // If the reporter yielded, return immediately;
+	            // it needs time to finish and report its value.
+	            if (reporterYielded) {
+	                return;
+	            }
+	        }
+	        argValues[inputName] = currentStackFrame.reported[inputName];
+	    }
+
+	    // If we've gotten this far, all of the input blocks are evaluated,
+	    // and `argValues` is fully populated. So, execute the block primitive.
+	    // First, clear `currentStackFrame.reported`, so any subsequent execution
+	    // (e.g., on return from a branch) gets fresh inputs.
+	    currentStackFrame.reported = {};
+
+	    var primitiveReportedValue = null;
+	    primitiveReportedValue = blockFunction(argValues, {
+	        stackFrame: currentStackFrame.executionContext,
+	        target: target,
+	        yield: function() {
+	            thread.setStatus(Thread.STATUS_YIELD);
+	        },
+	        yieldFrame: function() {
+	            thread.setStatus(Thread.STATUS_YIELD_FRAME);
+	        },
+	        done: function() {
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	            sequencer.proceedThread(thread);
+	        },
+	        startBranch: function (branchNum) {
+	            sequencer.stepToBranch(thread, branchNum);
+	        },
+	        startHats: function(requestedHat, opt_matchFields, opt_target) {
+	            return (
+	                runtime.startHats(requestedHat, opt_matchFields, opt_target)
+	            );
+	        },
+	        ioQuery: function (device, func, args) {
+	            // Find the I/O device and execute the query/function call.
+	            if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
+	                var devObject = runtime.ioDevices[device];
+	                return devObject[func].call(devObject, args);
+	            }
+	        }
+	    });
+
+	    if (typeof primitiveReportedValue === 'undefined') {
+	        // No value reported - potentially a command block.
+	        // Edge-activated hats don't request a glow; all commands do.
+	        thread.requestScriptGlowInFrame = true;
+	    }
+
+	    // If it's a promise, wait until promise resolves.
+	    if (isPromise(primitiveReportedValue)) {
+	        if (thread.status === Thread.STATUS_RUNNING) {
+	            // Primitive returned a promise; automatically yield thread.
+	            thread.setStatus(Thread.STATUS_YIELD);
+	        }
+	        // Promise handlers
+	        primitiveReportedValue.then(function(resolvedValue) {
+	            handleReport(resolvedValue);
+	            sequencer.proceedThread(thread);
+	        }, function(rejectionReason) {
+	            // Promise rejected: the primitive had some error.
+	            // Log it and proceed.
+	            console.warn('Primitive rejected promise: ', rejectionReason);
+	            thread.setStatus(Thread.STATUS_RUNNING);
+	            sequencer.proceedThread(thread);
+	        });
+	    } else if (thread.status === Thread.STATUS_RUNNING) {
+	        handleReport(primitiveReportedValue);
+	    }
+	};
+
+	module.exports = execute;
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Timer = __webpack_require__(8);
+
+	function Clock () {
+	    this._projectTimer = new Timer();
+	    this._projectTimer.start();
+	}
+
+	Clock.prototype.projectTimer = function () {
+	    return this._projectTimer.timeElapsed() / 1000;
+	};
+
+	Clock.prototype.resetProjectTimer = function () {
+	    this._projectTimer.start();
+	};
+
+	module.exports = Clock;
+
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+
+	function Keyboard (runtime) {
+	    /**
+	     * List of currently pressed keys.
+	     * @type{Array.<number>}
+	     */
+	    this._keysPressed = [];
+	    /**
+	     * Reference to the owning Runtime.
+	     * Can be used, for example, to activate hats.
+	     * @type{!Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Convert a Scratch key name to a DOM keyCode.
+	 * @param {Any} keyName Scratch key argument.
+	 * @return {number} Key code corresponding to a DOM event.
+	 */
+	Keyboard.prototype._scratchKeyToKeyCode = function (keyName) {
+	    if (typeof keyName == 'number') {
+	        // Key codes placed in with number blocks.
+	        return keyName;
+	    }
+	    var keyString = Cast.toString(keyName);
+	    switch (keyString) {
+	    case 'space': return 32;
+	    case 'left arrow': return 37;
+	    case 'up arrow': return 38;
+	    case 'right arrow': return 39;
+	    case 'down arrow': return 40;
+	    // @todo: Consider adding other special keys here.
+	    }
+	    // Keys reported by DOM keyCode are upper case.
+	    return keyString.toUpperCase().charCodeAt(0);
+	};
+
+	Keyboard.prototype._keyCodeToScratchKey = function (keyCode) {
+	    if (keyCode >= 48 && keyCode <= 90) {
+	        // Standard letter.
+	        return String.fromCharCode(keyCode).toLowerCase();
+	    }
+	    switch (keyCode) {
+	    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;
+	};
+
+	Keyboard.prototype.postData = function (data) {
+	    if (data.keyCode) {
+	        var index = this._keysPressed.indexOf(data.keyCode);
+	        if (data.isDown) {
+	            // If not already present, add to the list.
+	            if (index < 0) {
+	                this._keysPressed.push(data.keyCode);
+	            }
+	            // Always trigger hats, even if it was already pressed.
+	            this.runtime.startHats('event_whenkeypressed', {
+	                'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
+	            });
+	            this.runtime.startHats('event_whenkeypressed', {
+	                'KEY_OPTION': 'any'
+	            });
+	        } else if (index > -1) {
+	            // If already present, remove from the list.
+	            this._keysPressed.splice(index, 1);
+	        }
+	    }
+	};
+
+	Keyboard.prototype.getKeyIsDown = function (key) {
+	    if (key == 'any') {
+	        return this._keysPressed.length > 0;
+	    }
+	    var keyCode = this._scratchKeyToKeyCode(key);
+	    return this._keysPressed.indexOf(keyCode) > -1;
+	};
+
+	module.exports = Keyboard;
+
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Color = __webpack_require__(14);
+
+	function Cast () {}
+
+	/**
+	 * @fileoverview
+	 * Utilities for casting and comparing Scratch data-types.
+	 * Scratch behaves slightly differently from JavaScript in many respects,
+	 * and these differences should be encapsulated below.
+	 * For example, in Scratch, add(1, join("hello", world")) -> 1.
+	 * This is because "hello world" is cast to 0.
+	 * In JavaScript, 1 + Number("hello" + "world") would give you NaN.
+	 * Use when coercing a value before computation.
+	 */
+
+	/**
+	 * Scratch cast to number.
+	 * Treats NaN as 0.
+	 * In Scratch 2.0, this is captured by `interp.numArg.`
+	 * @param {*} value Value to cast to number.
+	 * @return {number} The Scratch-casted number value.
+	 */
+	Cast.toNumber = function (value) {
+	    var n = Number(value);
+	    if (isNaN(n)) {
+	        // Scratch treats NaN as 0, when needed as a number.
+	        // E.g., 0 + NaN -> 0.
+	        return 0;
+	    }
+	    return n;
+	};
+
+	/**
+	 * Scratch cast to boolean.
+	 * In Scratch 2.0, this is captured by `interp.boolArg.`
+	 * Treats some string values differently from JavaScript.
+	 * @param {*} value Value to cast to boolean.
+	 * @return {boolean} The Scratch-casted boolean value.
+	 */
+	Cast.toBoolean = function (value) {
+	    // Already a boolean?
+	    if (typeof value === 'boolean') {
+	        return value;
+	    }
+	    if (typeof value === 'string') {
+	        // These specific strings are treated as false in Scratch.
+	        if ((value == '') ||
+	            (value == '0') ||
+	            (value.toLowerCase() == 'false')) {
+	            return false;
+	        }
+	        // All other strings treated as true.
+	        return true;
+	    }
+	    // Coerce other values and numbers.
+	    return Boolean(value);
+	};
+
+	/**
+	 * Scratch cast to string.
+	 * @param {*} value Value to cast to string.
+	 * @return {string} The Scratch-casted string value.
+	 */
+	Cast.toString = function (value) {
+	    return String(value);
+	};
+
+	/**
+	 * Cast any Scratch argument to an RGB color object to be used for the renderer.
+	 * @param {*} value Value to convert to RGB color object.
+	 * @return {Array.<number>} [r,g,b], values between 0-255.
+	 */
+	Cast.toRgbColorList = function (value) {
+	    var color;
+	    if (typeof value == 'string' && value.substring(0, 1) == '#') {
+	        color = Color.hexToRgb(value);
+	    } else {
+	        color = Color.decimalToRgb(Cast.toNumber(value));
+	    }
+	    return [color.r, color.g, color.b];
+	};
+
+	/**
+	 * Compare two values, using Scratch cast, case-insensitive string compare, etc.
+	 * In Scratch 2.0, this is captured by `interp.compare.`
+	 * @param {*} v1 First value to compare.
+	 * @param {*} v2 Second value to compare.
+	 * @returns {Number} Negative number if v1 < v2; 0 if equal; positive otherwise.
+	 */
+	Cast.compare = function (v1, v2) {
+	    var n1 = Number(v1);
+	    var n2 = Number(v2);
+	    if (isNaN(n1) || isNaN(n2)) {
+	        // At least one argument can't be converted to a number.
+	        // Scratch compares strings as case insensitive.
+	        var s1 = String(v1).toLowerCase();
+	        var s2 = String(v2).toLowerCase();
+	        return s1.localeCompare(s2);
+	    } else {
+	        // Compare as numbers.
+	        return n1 - n2;
+	    }
+	};
+
+	module.exports = Cast;
+
+
+/***/ },
+/* 14 */
+/***/ function(module, exports) {
+
+	function Color () {}
+
+	/**
+	 * Convert a Scratch decimal color to a hex string, #RRGGBB.
+	 * @param {number} decimal RGB color as a decimal.
+	 * @return {string} RGB color as #RRGGBB hex string.
+	 */
+	Color.decimalToHex = function (decimal) {
+	    if (decimal < 0) {
+	        decimal += 0xFFFFFF + 1;
+	    }
+	    var hex = Number(decimal).toString(16);
+	    hex = '#' + '000000'.substr(0, 6 - hex.length) + hex;
+	    return hex;
+	};
+
+	/**
+	 * Convert a Scratch decimal color to an RGB color object.
+	 * @param {number} decimal RGB color as decimal.
+	 * @returns {Object} {r: R, g: G, b: B}, values between 0-255
+	 */
+	Color.decimalToRgb = function (decimal) {
+	    var r = (decimal >> 16) & 0xFF;
+	    var g = (decimal >> 8) & 0xFF;
+	    var b = decimal & 0xFF;
+	    return {r: r, g: g, b: b};
+	};
+
+	/**
+	 * Convert a hex color (e.g., F00, #03F, #0033FF) to an RGB color object.
+	 * CC-BY-SA Tim Down:
+	 * https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
+	 * @param {!string} hex Hex representation of the color.
+	 * @return {Object} {r: R, g: G, b: B}, 0-255, or null.
+	 */
+	Color.hexToRgb = function (hex) {
+	    var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+	    hex = hex.replace(shorthandRegex, function(m, r, g, b) {
+	        return r + r + g + g + b + b;
+	    });
+	    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+	    return result ? {
+	        r: parseInt(result[1], 16),
+	        g: parseInt(result[2], 16),
+	        b: parseInt(result[3], 16)
+	    } : null;
+	};
+
+	/**
+	 * Convert an RGB color object to a hex color.
+	 * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
+	 * @return {!string} Hex representation of the color.
+	 */
+	Color.rgbToHex = function (rgb) {
+	    return Color.decimalToHex(Color.rgbToDecimal(rgb));
+	};
+
+	/**
+	 * Convert an RGB color object to a Scratch decimal color.
+	 * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
+	 * @return {!number} Number representing the color.
+	 */
+	Color.rgbToDecimal = function (rgb) {
+	    return (rgb.r << 16) + (rgb.g << 8) + rgb.b;
+	};
+
+	/**
+	* Convert a hex color (e.g., F00, #03F, #0033FF) to a decimal color number.
+	* @param {!string} hex Hex representation of the color.
+	* @return {!number} Number representing the color.
+	*/
+	Color.hexToDecimal = function (hex) {
+	    return Color.rgbToDecimal(Color.hexToRgb(hex));
+	};
+
+	module.exports = Color;
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var MathUtil = __webpack_require__(16);
+
+	function Mouse (runtime) {
+	    this._x = 0;
+	    this._y = 0;
+	    this._isDown = false;
+	    /**
+	     * Reference to the owning Runtime.
+	     * Can be used, for example, to activate hats.
+	     * @type{!Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	Mouse.prototype.postData = function(data) {
+	    if (data.x) {
+	        this._x = data.x - data.canvasWidth / 2;
+	    }
+	    if (data.y) {
+	        this._y = data.y - data.canvasHeight / 2;
+	    }
+	    if (typeof data.isDown !== 'undefined') {
+	        this._isDown = data.isDown;
+	        if (this._isDown) {
+	            this._activateClickHats(data.x, data.y);
+	        }
+	    }
+	};
+
+	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;
+	                }
+	            }
+	        });
+	    }
+	};
+
+	Mouse.prototype.getX = function () {
+	    return MathUtil.clamp(this._x, -240, 240);
+	};
+
+	Mouse.prototype.getY = function () {
+	    return MathUtil.clamp(-this._y, -180, 180);
+	};
+
+	Mouse.prototype.getIsDown = function () {
+	    return this._isDown;
+	};
+
+	module.exports = Mouse;
+
+
+/***/ },
+/* 16 */
 /***/ function(module, exports) {
 
 	function MathUtil () {}
@@ -1553,36 +2939,2026 @@
 
 
 /***/ },
-/* 9 */
+/* 17 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Blocks = __webpack_require__(10);
+	var Cast = __webpack_require__(13);
+	var Promise = __webpack_require__(18);
 
-	/**
-	 * @fileoverview
-	 * A Target is an abstract "code-running" object for the Scratch VM.
-	 * Examples include sprites/clones or potentially physical-world devices.
-	 */
-
-	/**
-	 * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
-	 * @constructor
-	 */
-	function Target (blocks) {
-	    if (!blocks) {
-	        blocks = new Blocks(this);
-	    }
-	    this.blocks = blocks;
+	function Scratch3ControlBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
 	}
 
-	module.exports = Target;
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3ControlBlocks.prototype.getPrimitives = function() {
+	    return {
+	        'control_repeat': this.repeat,
+	        'control_repeat_until': this.repeatUntil,
+	        'control_forever': this.forever,
+	        'control_wait': this.wait,
+	        'control_if': this.if,
+	        'control_if_else': this.ifElse,
+	        'control_stop': this.stop
+	    };
+	};
+
+	Scratch3ControlBlocks.prototype.repeat = function(args, util) {
+	    var times = Math.floor(Cast.toNumber(args.TIMES));
+	    // Initialize loop
+	    if (util.stackFrame.loopCounter === undefined) {
+	        util.stackFrame.loopCounter = times;
+	    }
+	    // Only execute once per frame.
+	    // When the branch finishes, `repeat` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        // Decrease counter
+	        util.stackFrame.loopCounter--;
+	        // If we still have some left, start the branch.
+	        if (util.stackFrame.loopCounter >= 0) {
+	            util.startBranch();
+	        }
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
+	    var condition = Cast.toBoolean(args.CONDITION);
+	    // Only execute once per frame.
+	    // When the branch finishes, `repeat` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        // If the condition is true, start the branch.
+	        if (!condition) {
+	            util.startBranch();
+	        }
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.forever = function(args, util) {
+	    // Only execute once per frame.
+	    // When the branch finishes, `forever` will be executed again and
+	    // the second branch will be taken, yielding for the rest of the frame.
+	    if (!util.stackFrame.executedInFrame) {
+	        util.stackFrame.executedInFrame = true;
+	        util.startBranch();
+	    } else {
+	        util.stackFrame.executedInFrame = false;
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.wait = function(args) {
+	    var duration = Cast.toNumber(args.DURATION);
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            resolve();
+	        }, 1000 * duration);
+	    });
+	};
+
+	Scratch3ControlBlocks.prototype.if = function(args, util) {
+	    var condition = Cast.toBoolean(args.CONDITION);
+	    // Only execute one time. `if` will be returned to
+	    // when the branch finishes, but it shouldn't execute again.
+	    if (util.stackFrame.executedInFrame === undefined) {
+	        util.stackFrame.executedInFrame = true;
+	        if (condition) {
+	            util.startBranch();
+	        }
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
+	    var condition = Cast.toBoolean(args.CONDITION);
+	    // Only execute one time. `ifElse` will be returned to
+	    // when the branch finishes, but it shouldn't execute again.
+	    if (util.stackFrame.executedInFrame === undefined) {
+	        util.stackFrame.executedInFrame = true;
+	        if (condition) {
+	            util.startBranch(1);
+	        } else {
+	            util.startBranch(2);
+	        }
+	    }
+	};
+
+	Scratch3ControlBlocks.prototype.stop = function() {
+	    // @todo - don't use this.runtime
+	    this.runtime.stopAll();
+	};
+
+	module.exports = Scratch3ControlBlocks;
 
 
 /***/ },
-/* 10 */
+/* 18 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var adapter = __webpack_require__(11);
+	'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);
+
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var asap = __webpack_require__(21);
+
+	function noop() {}
+
+	// States:
+	//
+	// 0 - pending
+	// 1 - fulfilled with _value
+	// 2 - rejected with _value
+	// 3 - adopted the state of another promise, _value
+	//
+	// once the state is no longer pending (0) it is immutable
+
+	// All `_` prefixed properties will be reduced to `_{random number}`
+	// at build time to obfuscate them and discourage their use.
+	// We don't use symbols or Object.defineProperty to fully hide them
+	// because the performance isn't good enough.
+
+
+	// to avoid using try/catch inside critical functions, we
+	// extract them to here.
+	var LAST_ERROR = null;
+	var IS_ERROR = {};
+	function getThen(obj) {
+	  try {
+	    return obj.then;
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+
+	function tryCallOne(fn, a) {
+	  try {
+	    return fn(a);
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+	function tryCallTwo(fn, a, b) {
+	  try {
+	    fn(a, b);
+	  } catch (ex) {
+	    LAST_ERROR = ex;
+	    return IS_ERROR;
+	  }
+	}
+
+	module.exports = Promise;
+
+	function Promise(fn) {
+	  if (typeof this !== 'object') {
+	    throw new TypeError('Promises must be constructed via new');
+	  }
+	  if (typeof fn !== 'function') {
+	    throw new TypeError('not a function');
+	  }
+	  this._45 = 0;
+	  this._81 = 0;
+	  this._65 = null;
+	  this._54 = null;
+	  if (fn === noop) return;
+	  doResolve(fn, this);
+	}
+	Promise._10 = null;
+	Promise._97 = null;
+	Promise._61 = noop;
+
+	Promise.prototype.then = function(onFulfilled, onRejected) {
+	  if (this.constructor !== Promise) {
+	    return safeThen(this, onFulfilled, onRejected);
+	  }
+	  var res = new Promise(noop);
+	  handle(this, new Handler(onFulfilled, onRejected, res));
+	  return res;
+	};
+
+	function safeThen(self, onFulfilled, onRejected) {
+	  return new self.constructor(function (resolve, reject) {
+	    var res = new Promise(noop);
+	    res.then(resolve, reject);
+	    handle(self, new Handler(onFulfilled, onRejected, res));
+	  });
+	};
+	function handle(self, deferred) {
+	  while (self._81 === 3) {
+	    self = self._65;
+	  }
+	  if (Promise._10) {
+	    Promise._10(self);
+	  }
+	  if (self._81 === 0) {
+	    if (self._45 === 0) {
+	      self._45 = 1;
+	      self._54 = deferred;
+	      return;
+	    }
+	    if (self._45 === 1) {
+	      self._45 = 2;
+	      self._54 = [self._54, deferred];
+	      return;
+	    }
+	    self._54.push(deferred);
+	    return;
+	  }
+	  handleResolved(self, deferred);
+	}
+
+	function handleResolved(self, deferred) {
+	  asap(function() {
+	    var cb = self._81 === 1 ? deferred.onFulfilled : deferred.onRejected;
+	    if (cb === null) {
+	      if (self._81 === 1) {
+	        resolve(deferred.promise, self._65);
+	      } else {
+	        reject(deferred.promise, self._65);
+	      }
+	      return;
+	    }
+	    var ret = tryCallOne(cb, self._65);
+	    if (ret === IS_ERROR) {
+	      reject(deferred.promise, LAST_ERROR);
+	    } else {
+	      resolve(deferred.promise, ret);
+	    }
+	  });
+	}
+	function resolve(self, newValue) {
+	  // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
+	  if (newValue === self) {
+	    return reject(
+	      self,
+	      new TypeError('A promise cannot be resolved with itself.')
+	    );
+	  }
+	  if (
+	    newValue &&
+	    (typeof newValue === 'object' || typeof newValue === 'function')
+	  ) {
+	    var then = getThen(newValue);
+	    if (then === IS_ERROR) {
+	      return reject(self, LAST_ERROR);
+	    }
+	    if (
+	      then === self.then &&
+	      newValue instanceof Promise
+	    ) {
+	      self._81 = 3;
+	      self._65 = newValue;
+	      finale(self);
+	      return;
+	    } else if (typeof then === 'function') {
+	      doResolve(then.bind(newValue), self);
+	      return;
+	    }
+	  }
+	  self._81 = 1;
+	  self._65 = newValue;
+	  finale(self);
+	}
+
+	function reject(self, newValue) {
+	  self._81 = 2;
+	  self._65 = newValue;
+	  if (Promise._97) {
+	    Promise._97(self, newValue);
+	  }
+	  finale(self);
+	}
+	function finale(self) {
+	  if (self._45 === 1) {
+	    handle(self, self._54);
+	    self._54 = null;
+	  }
+	  if (self._45 === 2) {
+	    for (var i = 0; i < self._54.length; i++) {
+	      handle(self, self._54[i]);
+	    }
+	    self._54 = null;
+	  }
+	}
+
+	function Handler(onFulfilled, onRejected, promise){
+	  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+	  this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+	  this.promise = promise;
+	}
+
+	/**
+	 * Take a potentially misbehaving resolver function and make sure
+	 * onFulfilled and onRejected are only called once.
+	 *
+	 * Makes no guarantees about asynchrony.
+	 */
+	function doResolve(fn, promise) {
+	  var done = false;
+	  var res = tryCallTwo(fn, function (value) {
+	    if (done) return;
+	    done = true;
+	    resolve(promise, value);
+	  }, function (reason) {
+	    if (done) return;
+	    done = true;
+	    reject(promise, reason);
+	  })
+	  if (!done && res === IS_ERROR) {
+	    done = true;
+	    reject(promise, LAST_ERROR);
+	  }
+	}
+
+
+/***/ },
+/* 21 */
+/***/ function(module, exports) {
+
+	/* WEBPACK VAR INJECTION */(function(global) {"use strict";
+
+	// Use the fastest means possible to execute a task in its own turn, with
+	// priority over other events including IO, animation, reflow, and redraw
+	// events in browsers.
+	//
+	// An exception thrown by a task will permanently interrupt the processing of
+	// subsequent tasks. The higher level `asap` function ensures that if an
+	// exception is thrown by a task, that the task queue will continue flushing as
+	// soon as possible, but if you use `rawAsap` directly, you are responsible to
+	// either ensure that no exceptions are thrown from your task, or to manually
+	// call `rawAsap.requestFlush` if an exception is thrown.
+	module.exports = rawAsap;
+	function rawAsap(task) {
+	    if (!queue.length) {
+	        requestFlush();
+	        flushing = true;
+	    }
+	    // Equivalent to push, but avoids a function call.
+	    queue[queue.length] = task;
+	}
+
+	var queue = [];
+	// Once a flush has been requested, no further calls to `requestFlush` are
+	// necessary until the next `flush` completes.
+	var flushing = false;
+	// `requestFlush` is an implementation-specific method that attempts to kick
+	// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
+	// the event queue before yielding to the browser's own event loop.
+	var requestFlush;
+	// The position of the next task to execute in the task queue. This is
+	// preserved between calls to `flush` so that it can be resumed if
+	// a task throws an exception.
+	var index = 0;
+	// If a task schedules additional tasks recursively, the task queue can grow
+	// unbounded. To prevent memory exhaustion, the task queue will periodically
+	// truncate already-completed tasks.
+	var capacity = 1024;
+
+	// The flush function processes all tasks that have been scheduled with
+	// `rawAsap` unless and until one of those tasks throws an exception.
+	// If a task throws an exception, `flush` ensures that its state will remain
+	// consistent and will resume where it left off when called again.
+	// However, `flush` does not make any arrangements to be called again if an
+	// exception is thrown.
+	function flush() {
+	    while (index < queue.length) {
+	        var currentIndex = index;
+	        // Advance the index before calling the task. This ensures that we will
+	        // begin flushing on the next task the task throws an error.
+	        index = index + 1;
+	        queue[currentIndex].call();
+	        // Prevent leaking memory for long chains of recursive calls to `asap`.
+	        // If we call `asap` within tasks scheduled by `asap`, the queue will
+	        // grow, but to avoid an O(n) walk for every task we execute, we don't
+	        // shift tasks off the queue after they have been executed.
+	        // Instead, we periodically shift 1024 tasks off the queue.
+	        if (index > capacity) {
+	            // Manually shift all values starting at the index back to the
+	            // beginning of the queue.
+	            for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
+	                queue[scan] = queue[scan + index];
+	            }
+	            queue.length -= index;
+	            index = 0;
+	        }
+	    }
+	    queue.length = 0;
+	    index = 0;
+	    flushing = false;
+	}
+
+	// `requestFlush` is implemented using a strategy based on data collected from
+	// every available SauceLabs Selenium web driver worker at time of writing.
+	// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
+
+	// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
+	// have WebKitMutationObserver but not un-prefixed MutationObserver.
+	// Must use `global` instead of `window` to work in both frames and web
+	// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
+	var BrowserMutationObserver = global.MutationObserver || global.WebKitMutationObserver;
+
+	// MutationObservers are desirable because they have high priority and work
+	// reliably everywhere they are implemented.
+	// They are implemented in all modern browsers.
+	//
+	// - Android 4-4.3
+	// - Chrome 26-34
+	// - Firefox 14-29
+	// - Internet Explorer 11
+	// - iPad Safari 6-7.1
+	// - iPhone Safari 7-7.1
+	// - Safari 6-7
+	if (typeof BrowserMutationObserver === "function") {
+	    requestFlush = makeRequestCallFromMutationObserver(flush);
+
+	// MessageChannels are desirable because they give direct access to the HTML
+	// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
+	// 11-12, and in web workers in many engines.
+	// Although message channels yield to any queued rendering and IO tasks, they
+	// would be better than imposing the 4ms delay of timers.
+	// However, they do not work reliably in Internet Explorer or Safari.
+
+	// Internet Explorer 10 is the only browser that has setImmediate but does
+	// not have MutationObservers.
+	// Although setImmediate yields to the browser's renderer, it would be
+	// preferrable to falling back to setTimeout since it does not have
+	// the minimum 4ms penalty.
+	// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
+	// Desktop to a lesser extent) that renders both setImmediate and
+	// MessageChannel useless for the purposes of ASAP.
+	// https://github.com/kriskowal/q/issues/396
+
+	// Timers are implemented universally.
+	// We fall back to timers in workers in most engines, and in foreground
+	// contexts in the following browsers.
+	// However, note that even this simple case requires nuances to operate in a
+	// broad spectrum of browsers.
+	//
+	// - Firefox 3-13
+	// - Internet Explorer 6-9
+	// - iPad Safari 4.3
+	// - Lynx 2.8.7
+	} else {
+	    requestFlush = makeRequestCallFromTimer(flush);
+	}
+
+	// `requestFlush` requests that the high priority event queue be flushed as
+	// soon as possible.
+	// This is useful to prevent an error thrown in a task from stalling the event
+	// queue if the exception handled by Node.js’s
+	// `process.on("uncaughtException")` or by a domain.
+	rawAsap.requestFlush = requestFlush;
+
+	// To request a high priority event, we induce a mutation observer by toggling
+	// the text of a text node between "1" and "-1".
+	function makeRequestCallFromMutationObserver(callback) {
+	    var toggle = 1;
+	    var observer = new BrowserMutationObserver(callback);
+	    var node = document.createTextNode("");
+	    observer.observe(node, {characterData: true});
+	    return function requestCall() {
+	        toggle = -toggle;
+	        node.data = toggle;
+	    };
+	}
+
+	// The message channel technique was discovered by Malte Ubl and was the
+	// original foundation for this library.
+	// http://www.nonblocking.io/2011/06/windownexttick.html
+
+	// Safari 6.0.5 (at least) intermittently fails to create message ports on a
+	// page's first load. Thankfully, this version of Safari supports
+	// MutationObservers, so we don't need to fall back in that case.
+
+	// function makeRequestCallFromMessageChannel(callback) {
+	//     var channel = new MessageChannel();
+	//     channel.port1.onmessage = callback;
+	//     return function requestCall() {
+	//         channel.port2.postMessage(0);
+	//     };
+	// }
+
+	// For reasons explained above, we are also unable to use `setImmediate`
+	// under any circumstances.
+	// Even if we were, there is another bug in Internet Explorer 10.
+	// It is not sufficient to assign `setImmediate` to `requestFlush` because
+	// `setImmediate` must be called *by name* and therefore must be wrapped in a
+	// closure.
+	// Never forget.
+
+	// function makeRequestCallFromSetImmediate(callback) {
+	//     return function requestCall() {
+	//         setImmediate(callback);
+	//     };
+	// }
+
+	// Safari 6.0 has a problem where timers will get lost while the user is
+	// scrolling. This problem does not impact ASAP because Safari 6.0 supports
+	// mutation observers, so that implementation is used instead.
+	// However, if we ever elect to use timers in Safari, the prevalent work-around
+	// is to add a scroll event listener that calls for a flush.
+
+	// `setTimeout` does not call the passed callback if the delay is less than
+	// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
+	// even then.
+
+	function makeRequestCallFromTimer(callback) {
+	    return function requestCall() {
+	        // We dispatch a timeout with a specified delay of 0 for engines that
+	        // can reliably accommodate that request. This will usually be snapped
+	        // to a 4 milisecond delay, but once we're flushing, there's no delay
+	        // between events.
+	        var timeoutHandle = setTimeout(handleTimer, 0);
+	        // However, since this timer gets frequently dropped in Firefox
+	        // workers, we enlist an interval handle that will try to fire
+	        // an event 20 times per second until it succeeds.
+	        var intervalHandle = setInterval(handleTimer, 50);
+
+	        function handleTimer() {
+	            // Whichever timer succeeds will cancel both timers and
+	            // execute the callback.
+	            clearTimeout(timeoutHandle);
+	            clearInterval(intervalHandle);
+	            callback();
+	        }
+	    };
+	}
+
+	// This is for `asap.js` only.
+	// Its name will be periodically randomized to break any code that depends on
+	// its existence.
+	rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
+
+	// ASAP was originally a nextTick shim included in Q. This was factored out
+	// into this ASAP package. It was later adapted to RSVP which made further
+	// amendments. These decisions, particularly to marginalize MessageChannel and
+	// to capture the MutationObserver implementation in a closure, were integrated
+	// back into ASAP proper.
+	// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
+
+	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 22 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(20);
+
+	module.exports = Promise;
+	Promise.prototype.done = function (onFulfilled, onRejected) {
+	  var self = arguments.length ? this.then.apply(this, arguments) : this;
+	  self.then(null, function (err) {
+	    setTimeout(function () {
+	      throw err;
+	    }, 0);
+	  });
+	};
+
+
+/***/ },
+/* 23 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(20);
+
+	module.exports = Promise;
+	Promise.prototype['finally'] = function (f) {
+	  return this.then(function (value) {
+	    return Promise.resolve(f()).then(function () {
+	      return value;
+	    });
+	  }, function (err) {
+	    return Promise.resolve(f()).then(function () {
+	      throw err;
+	    });
+	  });
+	};
+
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	//This file contains the ES6 extensions to the core Promises/A+ API
+
+	var Promise = __webpack_require__(20);
+
+	module.exports = Promise;
+
+	/* Static Functions */
+
+	var TRUE = valuePromise(true);
+	var FALSE = valuePromise(false);
+	var NULL = valuePromise(null);
+	var UNDEFINED = valuePromise(undefined);
+	var ZERO = valuePromise(0);
+	var EMPTYSTRING = valuePromise('');
+
+	function valuePromise(value) {
+	  var p = new Promise(Promise._61);
+	  p._81 = 1;
+	  p._65 = value;
+	  return p;
+	}
+	Promise.resolve = function (value) {
+	  if (value instanceof Promise) return value;
+
+	  if (value === null) return NULL;
+	  if (value === undefined) return UNDEFINED;
+	  if (value === true) return TRUE;
+	  if (value === false) return FALSE;
+	  if (value === 0) return ZERO;
+	  if (value === '') return EMPTYSTRING;
+
+	  if (typeof value === 'object' || typeof value === 'function') {
+	    try {
+	      var then = value.then;
+	      if (typeof then === 'function') {
+	        return new Promise(then.bind(value));
+	      }
+	    } catch (ex) {
+	      return new Promise(function (resolve, reject) {
+	        reject(ex);
+	      });
+	    }
+	  }
+	  return valuePromise(value);
+	};
+
+	Promise.all = function (arr) {
+	  var args = Array.prototype.slice.call(arr);
+
+	  return new Promise(function (resolve, reject) {
+	    if (args.length === 0) return resolve([]);
+	    var remaining = args.length;
+	    function res(i, val) {
+	      if (val && (typeof val === 'object' || typeof val === 'function')) {
+	        if (val instanceof Promise && val.then === Promise.prototype.then) {
+	          while (val._81 === 3) {
+	            val = val._65;
+	          }
+	          if (val._81 === 1) return res(i, val._65);
+	          if (val._81 === 2) reject(val._65);
+	          val.then(function (val) {
+	            res(i, val);
+	          }, reject);
+	          return;
+	        } else {
+	          var then = val.then;
+	          if (typeof then === 'function') {
+	            var p = new Promise(then.bind(val));
+	            p.then(function (val) {
+	              res(i, val);
+	            }, reject);
+	            return;
+	          }
+	        }
+	      }
+	      args[i] = val;
+	      if (--remaining === 0) {
+	        resolve(args);
+	      }
+	    }
+	    for (var i = 0; i < args.length; i++) {
+	      res(i, args[i]);
+	    }
+	  });
+	};
+
+	Promise.reject = function (value) {
+	  return new Promise(function (resolve, reject) {
+	    reject(value);
+	  });
+	};
+
+	Promise.race = function (values) {
+	  return new Promise(function (resolve, reject) {
+	    values.forEach(function(value){
+	      Promise.resolve(value).then(resolve, reject);
+	    });
+	  });
+	};
+
+	/* Prototype Methods */
+
+	Promise.prototype['catch'] = function (onRejected) {
+	  return this.then(null, onRejected);
+	};
+
+
+/***/ },
+/* 25 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	// 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);
+
+	module.exports = Promise;
+
+	/* Static Functions */
+
+	Promise.denodeify = function (fn, argumentCount) {
+	  if (
+	    typeof argumentCount === 'number' && argumentCount !== Infinity
+	  ) {
+	    return denodeifyWithCount(fn, argumentCount);
+	  } else {
+	    return denodeifyWithoutCount(fn);
+	  }
+	}
+
+	var callbackFn = (
+	  'function (err, res) {' +
+	  'if (err) { rj(err); } else { rs(res); }' +
+	  '}'
+	);
+	function denodeifyWithCount(fn, argumentCount) {
+	  var args = [];
+	  for (var i = 0; i < argumentCount; i++) {
+	    args.push('a' + i);
+	  }
+	  var body = [
+	    'return function (' + args.join(',') + ') {',
+	    'var self = this;',
+	    'return new Promise(function (rs, rj) {',
+	    'var res = fn.call(',
+	    ['self'].concat(args).concat([callbackFn]).join(','),
+	    ');',
+	    'if (res &&',
+	    '(typeof res === "object" || typeof res === "function") &&',
+	    'typeof res.then === "function"',
+	    ') {rs(res);}',
+	    '});',
+	    '};'
+	  ].join('');
+	  return Function(['Promise', 'fn'], body)(Promise, fn);
+	}
+	function denodeifyWithoutCount(fn) {
+	  var fnLength = Math.max(fn.length - 1, 3);
+	  var args = [];
+	  for (var i = 0; i < fnLength; i++) {
+	    args.push('a' + i);
+	  }
+	  var body = [
+	    'return function (' + args.join(',') + ') {',
+	    'var self = this;',
+	    'var args;',
+	    'var argLength = arguments.length;',
+	    'if (arguments.length > ' + fnLength + ') {',
+	    '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 = ' + callbackFn + ';',
+	    'var res;',
+	    'switch (argLength) {',
+	    args.concat(['extra']).map(function (_, index) {
+	      return (
+	        'case ' + (index) + ':' +
+	        'res = fn.call(' + ['self'].concat(args.slice(0, index)).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'],
+	    body
+	  )(Promise, fn);
+	}
+
+	Promise.nodeify = function (fn) {
+	  return function () {
+	    var args = Array.prototype.slice.call(arguments);
+	    var callback =
+	      typeof args[args.length - 1] === 'function' ? args.pop() : null;
+	    var ctx = this;
+	    try {
+	      return fn.apply(this, arguments).nodeify(callback, ctx);
+	    } catch (ex) {
+	      if (callback === null || typeof callback == 'undefined') {
+	        return new Promise(function (resolve, reject) {
+	          reject(ex);
+	        });
+	      } else {
+	        asap(function () {
+	          callback.call(ctx, ex);
+	        })
+	      }
+	    }
+	  }
+	}
+
+	Promise.prototype.nodeify = function (callback, ctx) {
+	  if (typeof callback != 'function') return this;
+
+	  this.then(function (value) {
+	    asap(function () {
+	      callback.call(ctx, null, value);
+	    });
+	  }, function (err) {
+	    asap(function () {
+	      callback.call(ctx, err);
+	    });
+	  });
+	}
+
+
+/***/ },
+/* 26 */
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+
+	// rawAsap provides everything we need except exception management.
+	var rawAsap = __webpack_require__(21);
+	// RawTasks are recycled to reduce GC churn.
+	var freeTasks = [];
+	// We queue errors to ensure they are thrown in right order (FIFO).
+	// Array-as-queue is good enough here, since we are just dealing with exceptions.
+	var pendingErrors = [];
+	var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
+
+	function throwFirstError() {
+	    if (pendingErrors.length) {
+	        throw pendingErrors.shift();
+	    }
+	}
+
+	/**
+	 * Calls a task as soon as possible after returning, in its own event, with priority
+	 * over other events like animation, reflow, and repaint. An error thrown from an
+	 * event will not interrupt, nor even substantially slow down the processing of
+	 * other events, but will be rather postponed to a lower priority event.
+	 * @param {{call}} task A callable object, typically a function that takes no
+	 * arguments.
+	 */
+	module.exports = asap;
+	function asap(task) {
+	    var rawTask;
+	    if (freeTasks.length) {
+	        rawTask = freeTasks.pop();
+	    } else {
+	        rawTask = new RawTask();
+	    }
+	    rawTask.task = task;
+	    rawAsap(rawTask);
+	}
+
+	// We wrap tasks with recyclable task objects.  A task object implements
+	// `call`, just like a function.
+	function RawTask() {
+	    this.task = null;
+	}
+
+	// The sole purpose of wrapping the task is to catch the exception and recycle
+	// the task object after its single use.
+	RawTask.prototype.call = function () {
+	    try {
+	        this.task.call();
+	    } catch (error) {
+	        if (asap.onerror) {
+	            // This hook exists purely for testing purposes.
+	            // Its name will be periodically randomized to break any code that
+	            // depends on its existence.
+	            asap.onerror(error);
+	        } else {
+	            // In a web browser, exceptions are not fatal. However, to avoid
+	            // slowing down the queue of pending tasks, we rethrow the error in a
+	            // lower priority turn.
+	            pendingErrors.push(error);
+	            requestErrorThrow();
+	        }
+	    } finally {
+	        this.task = null;
+	        freeTasks[freeTasks.length] = this;
+	    }
+	};
+
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var Promise = __webpack_require__(20);
+
+	module.exports = Promise;
+	Promise.enableSynchronous = function () {
+	  Promise.prototype.isPending = function() {
+	    return this.getState() == 0;
+	  };
+
+	  Promise.prototype.isFulfilled = function() {
+	    return this.getState() == 1;
+	  };
+
+	  Promise.prototype.isRejected = function() {
+	    return this.getState() == 2;
+	  };
+
+	  Promise.prototype.getValue = function () {
+	    if (this._81 === 3) {
+	      return this._65.getValue();
+	    }
+
+	    if (!this.isFulfilled()) {
+	      throw new Error('Cannot get a value of an unfulfilled promise.');
+	    }
+
+	    return this._65;
+	  };
+
+	  Promise.prototype.getReason = function () {
+	    if (this._81 === 3) {
+	      return this._65.getReason();
+	    }
+
+	    if (!this.isRejected()) {
+	      throw new Error('Cannot get a rejection reason of a non-rejected promise.');
+	    }
+
+	    return this._65;
+	  };
+
+	  Promise.prototype.getState = function () {
+	    if (this._81 === 3) {
+	      return this._65.getState();
+	    }
+	    if (this._81 === -1 || this._81 === -2) {
+	      return 0;
+	    }
+
+	    return this._81;
+	  };
+	};
+
+	Promise.disableSynchronous = function() {
+	  Promise.prototype.isPending = undefined;
+	  Promise.prototype.isFulfilled = undefined;
+	  Promise.prototype.isRejected = undefined;
+	  Promise.prototype.getValue = undefined;
+	  Promise.prototype.getReason = undefined;
+	  Promise.prototype.getState = undefined;
+	};
+
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+
+	function Scratch3EventBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3EventBlocks.prototype.getPrimitives = function() {
+	    return {
+	        'event_broadcast': this.broadcast,
+	        'event_broadcastandwait': this.broadcastAndWait,
+	        'event_whengreaterthan': this.hatGreaterThanPredicate
+	    };
+	};
+
+	Scratch3EventBlocks.prototype.getHats = function () {
+	    return {
+	        'event_whenflagclicked': {
+	            restartExistingThreads: true
+	        },
+	        'event_whenkeypressed': {
+	            restartExistingThreads: false
+	        },
+	        'event_whenthisspriteclicked': {
+	            restartExistingThreads: true
+	        },
+	        'event_whenbackdropswitchesto': {
+	            restartExistingThreads: true
+	        },
+	        'event_whengreaterthan': {
+	            restartExistingThreads: false,
+	            edgeActivated: true
+	        },
+	        'event_whenbroadcastreceived': {
+	            restartExistingThreads: true
+	        }
+	    };
+	};
+
+	Scratch3EventBlocks.prototype.hatGreaterThanPredicate = function (args, util) {
+	    var option = Cast.toString(args.WHENGREATERTHANMENU).toLowerCase();
+	    var value = Cast.toNumber(args.VALUE);
+	    // @todo: Other cases :)
+	    if (option == 'timer') {
+	        return util.ioQuery('clock', 'projectTimer') > value;
+	    }
+	    return false;
+	};
+
+	Scratch3EventBlocks.prototype.broadcast = function(args, util) {
+	    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
+	    util.startHats('event_whenbroadcastreceived', {
+	        'BROADCAST_OPTION': broadcastOption
+	    });
+	};
+
+	Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
+	    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
+	    // Have we run before, starting threads?
+	    if (!util.stackFrame.startedThreads) {
+	        // No - start hats for this broadcast.
+	        util.stackFrame.startedThreads = util.startHats(
+	            'event_whenbroadcastreceived', {
+	                'BROADCAST_OPTION': broadcastOption
+	            }
+	        );
+	        if (util.stackFrame.startedThreads.length == 0) {
+	            // Nothing was started.
+	            return;
+	        }
+	    }
+	    // We've run before; check if the wait is still going on.
+	    var instance = this;
+	    var waiting = util.stackFrame.startedThreads.some(function(thread) {
+	        return instance.runtime.isActiveThread(thread);
+	    });
+	    if (waiting) {
+	        util.yieldFrame();
+	    }
+	};
+
+	module.exports = Scratch3EventBlocks;
+
+
+/***/ },
+/* 29 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+
+	function Scratch3LooksBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3LooksBlocks.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
+	    };
+	};
+
+	Scratch3LooksBlocks.prototype.say = function (args, util) {
+	    util.target.setSay('say', args.MESSAGE);
+	};
+
+	Scratch3LooksBlocks.prototype.sayforsecs = function (args, util) {
+	    util.target.setSay('say', args.MESSAGE);
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            // Clear say bubble and proceed.
+	            util.target.setSay();
+	            resolve();
+	        }, 1000 * args.SECS);
+	    });
+	};
+
+	Scratch3LooksBlocks.prototype.think = function (args, util) {
+	    util.target.setSay('think', args.MESSAGE);
+	};
+
+	Scratch3LooksBlocks.prototype.thinkforsecs = function (args, util) {
+	    util.target.setSay('think', args.MESSAGE);
+	    return new Promise(function(resolve) {
+	        setTimeout(function() {
+	            // Clear say bubble and proceed.
+	            util.target.setSay();
+	            resolve();
+	        }, 1000 * args.SECS);
+	    });
+	};
+
+	Scratch3LooksBlocks.prototype.show = function (args, util) {
+	    util.target.setVisible(true);
+	};
+
+	Scratch3LooksBlocks.prototype.hide = function (args, util) {
+	    util.target.setVisible(false);
+	};
+
+	/**
+	 * Utility function to set the costume or backdrop of a target.
+	 * Matches the behavior of Scratch 2.0 for different types of arguments.
+	 * @param {!Target} target Target to set costume/backdrop to.
+	 * @param {Any} requestedCostume Costume requested, e.g., 0, 'name', etc.
+	 * @param {boolean=} opt_zeroIndex Set to zero-index the requestedCostume.
+	 * @return {Array.<!Thread>} Any threads started by this switch.
+	 */
+	Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target,
+	        requestedCostume, opt_zeroIndex) {
+	    if (typeof requestedCostume === 'number') {
+	        target.setCostume(opt_zeroIndex ?
+	            requestedCostume : requestedCostume - 1);
+	    } else {
+	        var costumeIndex = target.getCostumeIndexByName(requestedCostume);
+	        if (costumeIndex > -1) {
+	            target.setCostume(costumeIndex);
+	        } else if (costumeIndex == 'previous costume' ||
+	                   costumeIndex == 'previous backdrop') {
+	            target.setCostume(target.currentCostume - 1);
+	        } else if (costumeIndex == 'next costume' ||
+	                   costumeIndex == 'next backdrop') {
+	            target.setCostume(target.currentCostume + 1);
+	        } else {
+	            var forcedNumber = Cast.toNumber(requestedCostume);
+	            if (!isNaN(forcedNumber)) {
+	                target.setCostume(opt_zeroIndex ?
+	                    forcedNumber : forcedNumber - 1);
+	            }
+	        }
+	    }
+	    if (target == this.runtime.getTargetForStage()) {
+	        // Target is the stage - start hats.
+	        var newName = target.sprite.costumes[target.currentCostume].name;
+	        return this.runtime.startHats('event_whenbackdropswitchesto', {
+	            'BACKDROP': newName
+	        });
+	    }
+	    return [];
+	};
+
+	Scratch3LooksBlocks.prototype.switchCostume = function (args, util) {
+	    this._setCostumeOrBackdrop(util.target, args.COSTUME);
+	};
+
+	Scratch3LooksBlocks.prototype.nextCostume = function (args, util) {
+	    this._setCostumeOrBackdrop(
+	        util.target, util.target.currentCostume + 1, true
+	    );
+	};
+
+	Scratch3LooksBlocks.prototype.switchBackdrop = function (args) {
+	    this._setCostumeOrBackdrop(this.runtime.getTargetForStage(), args.BACKDROP);
+	};
+
+	Scratch3LooksBlocks.prototype.switchBackdropAndWait = function (args, util) {
+	    // Have we run before, starting threads?
+	    if (!util.stackFrame.startedThreads) {
+	        // No - switch the backdrop.
+	        util.stackFrame.startedThreads = (
+	            this._setCostumeOrBackdrop(
+	                this.runtime.getTargetForStage(),
+	                args.BACKDROP
+	            )
+	        );
+	        if (util.stackFrame.startedThreads.length == 0) {
+	            // Nothing was started.
+	            return;
+	        }
+	    }
+	    // We've run before; check if the wait is still going on.
+	    var instance = this;
+	    var waiting = util.stackFrame.startedThreads.some(function(thread) {
+	        return instance.runtime.isActiveThread(thread);
+	    });
+	    if (waiting) {
+	        util.yieldFrame();
+	    }
+	};
+
+	Scratch3LooksBlocks.prototype.nextBackdrop = function () {
+	    var stage = this.runtime.getTargetForStage();
+	    this._setCostumeOrBackdrop(
+	        stage, stage.currentCostume + 1, true
+	    );
+	};
+
+	Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
+	    var effect = Cast.toString(args.EFFECT).toLowerCase();
+	    var change = Cast.toNumber(args.CHANGE);
+	    if (!util.target.effects.hasOwnProperty(effect)) return;
+	    var newValue = change + util.target.effects[effect];
+	    util.target.setEffect(effect, newValue);
+	};
+
+	Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
+	    var effect = Cast.toString(args.EFFECT).toLowerCase();
+	    var value = Cast.toNumber(args.VALUE);
+	    util.target.setEffect(effect, value);
+	};
+
+	Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
+	    util.target.clearEffects();
+	};
+
+	Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
+	    var change = Cast.toNumber(args.CHANGE);
+	    util.target.setSize(util.target.size + change);
+	};
+
+	Scratch3LooksBlocks.prototype.setSize = function (args, util) {
+	    var size = Cast.toNumber(args.SIZE);
+	    util.target.setSize(size);
+	};
+
+	Scratch3LooksBlocks.prototype.getSize = function (args, util) {
+	    return util.target.size;
+	};
+
+	Scratch3LooksBlocks.prototype.getBackdropIndex = function () {
+	    var stage = this.runtime.getTargetForStage();
+	    return stage.currentCostume + 1;
+	};
+
+	Scratch3LooksBlocks.prototype.getBackdropName = function () {
+	    var stage = this.runtime.getTargetForStage();
+	    return stage.sprite.costumes[stage.currentCostume].name;
+	};
+
+	Scratch3LooksBlocks.prototype.getCostumeIndex = function (args, util) {
+	    return util.target.currentCostume + 1;
+	};
+
+	module.exports = Scratch3LooksBlocks;
+
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+	var MathUtil = __webpack_require__(16);
+	var Timer = __webpack_require__(8);
+
+	function Scratch3MotionBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3MotionBlocks.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
+	    };
+	};
+
+	Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
+	    var steps = Cast.toNumber(args.STEPS);
+	    var radians = MathUtil.degToRad(util.target.direction);
+	    var dx = steps * Math.cos(radians);
+	    var dy = steps * Math.sin(radians);
+	    util.target.setXY(util.target.x + dx, util.target.y + dy);
+	};
+
+	Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
+	    var x = Cast.toNumber(args.X);
+	    var y = Cast.toNumber(args.Y);
+	    util.target.setXY(x, y);
+	};
+
+	Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
+	    var degrees = Cast.toNumber(args.DEGREES);
+	    util.target.setDirection(util.target.direction + degrees);
+	};
+
+	Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
+	    var degrees = Cast.toNumber(args.DEGREES);
+	    util.target.setDirection(util.target.direction - degrees);
+	};
+
+	Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
+	    var direction = Cast.toNumber(args.DIRECTION);
+	    util.target.setDirection(direction);
+	};
+
+	Scratch3MotionBlocks.prototype.glide = function (args, util) {
+	    if (!util.stackFrame.timer) {
+	        // First time: save data for future use.
+	        util.stackFrame.timer = new Timer();
+	        util.stackFrame.timer.start();
+	        util.stackFrame.duration = Cast.toNumber(args.SECS);
+	        util.stackFrame.startX = util.target.x;
+	        util.stackFrame.startY = util.target.y;
+	        util.stackFrame.endX = Cast.toNumber(args.X);
+	        util.stackFrame.endY = Cast.toNumber(args.Y);
+	        if (util.stackFrame.duration <= 0) {
+	            // Duration too short to glide.
+	            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
+	            return;
+	        }
+	        util.yieldFrame();
+	    } else {
+	        var timeElapsed = util.stackFrame.timer.timeElapsed();
+	        if (timeElapsed < util.stackFrame.duration * 1000) {
+	            // In progress: move to intermediate position.
+	            var frac = timeElapsed / (util.stackFrame.duration * 1000);
+	            var dx = frac * (util.stackFrame.endX - util.stackFrame.startX);
+	            var dy = frac * (util.stackFrame.endY - util.stackFrame.startY);
+	            util.target.setXY(
+	                util.stackFrame.startX + dx,
+	                util.stackFrame.startY + dy
+	            );
+	            util.yieldFrame();
+	        } else {
+	            // Finished: move to final position.
+	            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
+	        }
+	    }
+	};
+
+	Scratch3MotionBlocks.prototype.changeX = function (args, util) {
+	    var dx = Cast.toNumber(args.DX);
+	    util.target.setXY(util.target.x + dx, util.target.y);
+	};
+
+	Scratch3MotionBlocks.prototype.setX = function (args, util) {
+	    var x = Cast.toNumber(args.X);
+	    util.target.setXY(x, util.target.y);
+	};
+
+	Scratch3MotionBlocks.prototype.changeY = function (args, util) {
+	    var dy = Cast.toNumber(args.DY);
+	    util.target.setXY(util.target.x, util.target.y + dy);
+	};
+
+	Scratch3MotionBlocks.prototype.setY = function (args, util) {
+	    var y = Cast.toNumber(args.Y);
+	    util.target.setXY(util.target.x, y);
+	};
+
+	Scratch3MotionBlocks.prototype.getX = function (args, util) {
+	    return util.target.x;
+	};
+
+	Scratch3MotionBlocks.prototype.getY = function (args, util) {
+	    return util.target.y;
+	};
+
+	Scratch3MotionBlocks.prototype.getDirection = function (args, util) {
+	    return util.target.direction;
+	};
+
+	module.exports = Scratch3MotionBlocks;
+
+
+/***/ },
+/* 31 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+
+	function Scratch3OperatorsBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3OperatorsBlocks.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
+	    };
+	};
+
+	Scratch3OperatorsBlocks.prototype.add = function (args) {
+	    return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.subtract = function (args) {
+	    return Cast.toNumber(args.NUM1) - Cast.toNumber(args.NUM2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.multiply = function (args) {
+	    return Cast.toNumber(args.NUM1) * Cast.toNumber(args.NUM2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.divide = function (args) {
+	    return Cast.toNumber(args.NUM1) / Cast.toNumber(args.NUM2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.lt = function (args) {
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) < 0;
+	};
+
+	Scratch3OperatorsBlocks.prototype.equals = function (args) {
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) == 0;
+	};
+
+	Scratch3OperatorsBlocks.prototype.gt = function (args) {
+	    return Cast.compare(args.OPERAND1, args.OPERAND2) > 0;
+	};
+
+	Scratch3OperatorsBlocks.prototype.and = function (args) {
+	    return Cast.toBoolean(args.OPERAND1) && Cast.toBoolean(args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.or = function (args) {
+	    return Cast.toBoolean(args.OPERAND1) || Cast.toBoolean(args.OPERAND2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.not = function (args) {
+	    return !Cast.toBoolean(args.OPERAND);
+	};
+
+	Scratch3OperatorsBlocks.prototype.random = function (args) {
+	    var nFrom = Cast.toNumber(args.FROM);
+	    var nTo = Cast.toNumber(args.TO);
+	    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) {
+	        return low + parseInt(Math.random() * ((high + 1) - low));
+	    }
+	    return (Math.random() * (high - low)) + low;
+	};
+
+	Scratch3OperatorsBlocks.prototype.join = function (args) {
+	    return Cast.toString(args.STRING1) + Cast.toString(args.STRING2);
+	};
+
+	Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
+	    var index = Cast.toNumber(args.LETTER) - 1;
+	    var str = Cast.toString(args.STRING);
+	    // Out of bounds?
+	    if (index < 0 || index >= str.length) {
+	        return '';
+	    }
+	    return str.charAt(index);
+	};
+
+	Scratch3OperatorsBlocks.prototype.length = function (args) {
+	    return Cast.toString(args.STRING).length;
+	};
+
+	Scratch3OperatorsBlocks.prototype.mod = function (args) {
+	    var n = Cast.toNumber(args.NUM1);
+	    var modulus = Cast.toNumber(args.NUM2);
+	    var result = n % modulus;
+	    // Scratch mod is kept positive.
+	    if (result / modulus < 0) result += modulus;
+	    return result;
+	};
+
+	Scratch3OperatorsBlocks.prototype.round = function (args) {
+	    return Math.round(Cast.toNumber(args.NUM));
+	};
+
+	Scratch3OperatorsBlocks.prototype.mathop = function (args) {
+	    var operator = Cast.toString(args.OPERATOR).toLowerCase();
+	    var n = Cast.toNumber(args.NUM);
+	    switch (operator) {
+	    case 'abs': return Math.abs(n);
+	    case 'floor': return Math.floor(n);
+	    case 'ceiling': return Math.ceil(n);
+	    case 'sqrt': return Math.sqrt(n);
+	    case 'sin': return Math.sin((Math.PI * n) / 180);
+	    case 'cos': return Math.cos((Math.PI * n) / 180);
+	    case 'tan': return Math.tan((Math.PI * n) / 180);
+	    case 'asin': return (Math.asin(n) * 180) / Math.PI;
+	    case 'acos': return (Math.acos(n) * 180) / Math.PI;
+	    case 'atan': return (Math.atan(n) * 180) / Math.PI;
+	    case 'ln': return Math.log(n);
+	    case 'log': return Math.log(n) / Math.LN10;
+	    case 'e ^': return Math.exp(n);
+	    case '10 ^': return Math.pow(10, n);
+	    }
+	    return 0;
+	};
+
+	module.exports = Scratch3OperatorsBlocks;
+
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var Cast = __webpack_require__(13);
+
+	function Scratch3SensingBlocks(runtime) {
+	    /**
+	     * The runtime instantiating this block package.
+	     * @type {Runtime}
+	     */
+	    this.runtime = runtime;
+	}
+
+	/**
+	 * Retrieve the block primitives implemented by this package.
+	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 */
+	Scratch3SensingBlocks.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
+	    };
+	};
+
+	Scratch3SensingBlocks.prototype.touchingColor = function (args, util) {
+	    var color = Cast.toRgbColorList(args.COLOR);
+	    return util.target.isTouchingColor(color);
+	};
+
+	Scratch3SensingBlocks.prototype.colorTouchingColor = function (args, util) {
+	    var maskColor = Cast.toRgbColorList(args.COLOR);
+	    var targetColor = Cast.toRgbColorList(args.COLOR2);
+	    return util.target.colorIsTouchingColor(targetColor, maskColor);
+	};
+
+	Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
+	    return util.ioQuery('clock', 'projectTimer');
+	};
+
+	Scratch3SensingBlocks.prototype.resetTimer = function (args, util) {
+	    util.ioQuery('clock', 'resetProjectTimer');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseX = function (args, util) {
+	    return util.ioQuery('mouse', 'getX');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseY = function (args, util) {
+	    return util.ioQuery('mouse', 'getY');
+	};
+
+	Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
+	    return util.ioQuery('mouse', 'getIsDown');
+	};
+
+	Scratch3SensingBlocks.prototype.current = function (args) {
+	    var menuOption = Cast.toString(args.CURRENTMENU).toLowerCase();
+	    var date = new Date();
+	    switch (menuOption) {
+	    case 'year': return date.getFullYear();
+	    case 'month': return date.getMonth() + 1; // getMonth is zero-based
+	    case 'date': return date.getDate();
+	    case 'dayofweek': return date.getDay() + 1; // getDay is zero-based, Sun=0
+	    case 'hour': return date.getHours();
+	    case 'minute': return date.getMinutes();
+	    case 'second': return date.getSeconds();
+	    }
+	    return 0;
+	};
+
+	Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
+	    return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTION);
+	};
+
+	module.exports = Scratch3SensingBlocks;
+
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * @fileoverview
+	 * Partial implementation of an SB2 JSON importer.
+	 * Parses provided JSON and then generates all needed
+	 * 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);
+
+	/**
+	 * Top-level handler. Parse provided JSON,
+	 * and process the top-level object (the stage object).
+	 * @param {!string} json SB2-format JSON to load.
+	 * @param {!Runtime} runtime Runtime object to load all structures into.
+	 */
+	function sb2import (json, runtime) {
+	    parseScratchObject(
+	        JSON.parse(json),
+	        runtime,
+	        true
+	    );
+	}
+
+	/**
+	 * Parse a single "Scratch object" and create all its in-memory VM objects.
+	 * @param {!Object} object From-JSON "Scratch object:" sprite, stage, watcher.
+	 * @param {!Runtime} runtime Runtime object to load all structures into.
+	 * @param {boolean} topLevel Whether this is the top-level object (stage).
+	 */
+	function parseScratchObject (object, runtime, topLevel) {
+	    if (!object.hasOwnProperty('objName')) {
+	        // Watcher/monitor - skip this object until those are implemented in VM.
+	        // @todo
+	        return;
+	    }
+	    // 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);
+	    // Sprite/stage name from JSON.
+	    if (object.hasOwnProperty('objName')) {
+	        sprite.name = object.objName;
+	    }
+	    // Costumes from JSON.
+	    if (object.hasOwnProperty('costumes')) {
+	        for (var i = 0; i < object.costumes.length; i++) {
+	            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/' 
+	                    + costume.baseLayerMD5 + '/get/',
+	                name: costume.costumeName,
+	                bitmapResolution: costume.bitmapResolution,
+	                rotationCenterX: costume.rotationCenterX,
+	                rotationCenterY: costume.rotationCenterY
+	            });
+	        }
+	    }
+	    // If included, parse any and all scripts/blocks on the object.
+	    if (object.hasOwnProperty('scripts')) {
+	        parseScripts(object.scripts, blocks);
+	    }
+	    // Create the first clone, and load its run-state from JSON.
+	    var target = sprite.createClone();
+	    // Add it to the runtime's list of targets.
+	    runtime.targets.push(target);
+	    if (object.scratchX) {
+	        target.x = object.scratchX;
+	    }
+	    if (object.scratchY) {
+	        target.y = object.scratchY;
+	    }
+	    if (object.direction) {
+	        target.direction = object.direction;
+	    }
+	    if (object.scale) {
+	        // SB2 stores as 1.0 = 100%; we use % in the VM.
+	        target.size = object.scale * 100;
+	    }
+	    if (object.visible) {
+	        target.visible = object.visible;
+	    }
+	    if (object.currentCostumeIndex) {
+	        target.currentCostume = object.currentCostumeIndex;
+	    }
+	    target.isStage = topLevel;
+	    // 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);
+	        }
+	    }
+	}
+
+	/**
+	 * Parse a Scratch object's scripts into VM blocks.
+	 * This should only handle top-level scripts that include X, Y coordinates.
+	 * @param {!Object} scripts Scripts object from SB2 JSON.
+	 * @param {!Blocks} blocks Blocks object to load parsed blocks into.
+	 */
+	function parseScripts (scripts, blocks) {
+	    for (var i = 0; i < scripts.length; i++) {
+	        var script = scripts[i];
+	        var scriptX = script[0];
+	        var scriptY = script[1];
+	        var blockList = script[2];
+	        var parsedBlockList = parseBlockList(blockList);
+	        if (parsedBlockList[0]) {
+	            // Adjust script coordinates to account for
+	            // larger block size in scratch-blocks.
+	            // @todo: Determine more precisely the right formulas here.
+	            parsedBlockList[0].x = scriptX * 1.1;
+	            parsedBlockList[0].y = scriptY * 1.1;
+	            parsedBlockList[0].topLevel = true;
+	            parsedBlockList[0].parent = null;
+	        }
+	        // Flatten children and create add the blocks.
+	        var convertedBlocks = flatten(parsedBlockList);
+	        for (var j = 0; j < convertedBlocks.length; j++) {
+	            blocks.createBlock(convertedBlocks[j]);
+	        }
+	    }
+	}
+
+	/**
+	 * Parse any list of blocks from SB2 JSON into a list of VM-format blocks.
+	 * Could be used to parse a top-level script,
+	 * a list of blocks in a branch (e.g., in forever),
+	 * or a list of blocks in an argument (e.g., move [pick random...]).
+	 * @param {Array.<Object>} blockList SB2 JSON-format block list.
+	 * @return {Array.<Object>} Scratch VM-format block list.
+	 */
+	function parseBlockList (blockList) {
+	    var resultingList = [];
+	    var previousBlock = null; // For setting next.
+	    for (var i = 0; i < blockList.length; i++) {
+	        var block = blockList[i];
+	        var parsedBlock = parseBlock(block);
+	        if (previousBlock) {
+	            parsedBlock.parent = previousBlock.id;
+	            previousBlock.next = parsedBlock.id;
+	        }
+	        previousBlock = parsedBlock;
+	        resultingList.push(parsedBlock);
+	    }
+	    return resultingList;
+	}
+
+	/**
+	 * Flatten a block tree into a block list.
+	 * Children are temporarily stored on the `block.children` property.
+	 * @param {Array.<Object>} blocks list generated by `parseBlockList`.
+	 * @return {Array.<Object>} Flattened list to be passed to `blocks.createBlock`.
+	 */
+	function flatten (blocks) {
+	    var finalBlocks = [];
+	    for (var i = 0; i < blocks.length; i++) {
+	        var block = blocks[i];
+	        finalBlocks.push(block);
+	        if (block.children) {
+	            finalBlocks = finalBlocks.concat(flatten(block.children));
+	        }
+	        delete block.children;
+	    }
+	    return finalBlocks;
+	}
+
+	/**
+	 * Parse a single SB2 JSON-formatted block and its children.
+	 * @param {!Object} sb2block SB2 JSON-formatted block.
+	 * @return {Object} Scratch VM format block.
+	 */
+	function parseBlock (sb2block) {
+	    // First item in block object is the old opcode (e.g., 'forward:').
+	    var oldOpcode = sb2block[0];
+	    // Convert the block using the specMap. See sb2specmap.js.
+	    if (!oldOpcode || !specMap[oldOpcode]) {
+	        console.warn('Couldn\'t find SB2 block: ', oldOpcode);
+	        return;
+	    }
+	    var blockMetadata = specMap[oldOpcode];
+	    // Block skeleton.
+	    var activeBlock = {
+	        id: uid(), // Generate a new block unique ID.
+	        opcode: blockMetadata.opcode, // Converted, e.g. "motion_movesteps".
+	        inputs: {}, // Inputs to this block and the blocks they point to.
+	        fields: {}, // Fields on this block and their values.
+	        next: null, // Next block.
+	        shadow: false, // No shadow blocks in an SB2 by default.
+	        children: [] // Store any generated children, flattened in `flatten`.
+	    };
+	    // Look at the expected arguments in `blockMetadata.argMap.`
+	    // The basic problem here is to turn positional SB2 arguments into
+	    // non-positional named Scratch VM arguments.
+	    for (var i = 0; i < blockMetadata.argMap.length; i++) {
+	        var expectedArg = blockMetadata.argMap[i];
+	        var providedArg = sb2block[i + 1]; // (i = 0 is opcode)
+	        // Whether the input is obscuring a shadow.
+	        var shadowObscured = false;
+	        // Positional argument is an input.
+	        if (expectedArg.type == 'input') {
+	            // Create a new block and input metadata.
+	            var inputUid = uid();
+	            activeBlock.inputs[expectedArg.inputName] = {
+	                name: expectedArg.inputName,
+	                block: null,
+	                shadow: null
+	            };
+	            if (typeof providedArg == 'object' && providedArg) {
+	                // Block or block list occupies the input.
+	                var innerBlocks;
+	                if (typeof providedArg[0] == 'object' && providedArg[0]) {
+	                    // Block list occupies the input.
+	                    innerBlocks = parseBlockList(providedArg);
+	                } else {
+	                    // Single block occupies the input.
+	                    innerBlocks = [parseBlock(providedArg)];
+	                }
+	                for (var j = 0; j < innerBlocks.length; j++) {
+	                    innerBlocks[j].parent = activeBlock.id;
+	                }
+	                // Obscures any shadow.
+	                shadowObscured = true;
+	                activeBlock.inputs[expectedArg.inputName].block = (
+	                    innerBlocks[0].id
+	                );
+	                activeBlock.children = (
+	                    activeBlock.children.concat(innerBlocks)
+	                );
+	            }
+	            // Generate a shadow block to occupy the input.
+	            if (!expectedArg.inputOp) {
+	                // No editable shadow input; e.g., for a boolean.
+	                continue;
+	            }
+	            // Each shadow has a field generated for it automatically.
+	            // Value to be filled in the field.
+	            var fieldValue = providedArg;
+	            // Shadows' field names match the input name, except for these:
+	            var fieldName = expectedArg.inputName;
+	            if (expectedArg.inputOp == 'math_number' ||
+	                expectedArg.inputOp == 'math_whole_number' ||
+	                expectedArg.inputOp == 'math_positive_number' ||
+	                expectedArg.inputOp == 'math_integer' ||
+	                expectedArg.inputOp == 'math_angle') {
+	                fieldName = 'NUM';
+	                // Fields are given Scratch 2.0 default values if obscured.
+	                if (shadowObscured) {
+	                    fieldValue = 10;
+	                }
+	            } else if (expectedArg.inputOp == 'text') {
+	                fieldName = 'TEXT';
+	                if (shadowObscured) {
+	                    fieldValue = '';
+	                }
+	            } else if (expectedArg.inputOp == 'colour_picker') {
+	                // Convert SB2 color to hex.
+	                fieldValue = Color.decimalToHex(providedArg);
+	                fieldName = 'COLOUR';
+	                if (shadowObscured) {
+	                    fieldValue = '#990000';
+	                }
+	            }
+	            var fields = {};
+	            fields[fieldName] = {
+	                name: fieldName,
+	                value: fieldValue
+	            };
+	            activeBlock.children.push({
+	                id: inputUid,
+	                opcode: expectedArg.inputOp,
+	                inputs: {},
+	                fields: fields,
+	                next: null,
+	                topLevel: false,
+	                parent: activeBlock.id,
+	                shadow: true
+	            });
+	            activeBlock.inputs[expectedArg.inputName].shadow = inputUid;
+	            // If no block occupying the input, alias to the shadow.
+	            if (!activeBlock.inputs[expectedArg.inputName].block) {
+	                activeBlock.inputs[expectedArg.inputName].block = inputUid;
+	            }
+	        } else if (expectedArg.type == 'field') {
+	            // Add as a field on this block.
+	            activeBlock.fields[expectedArg.fieldName] = {
+	                name: expectedArg.fieldName,
+	                value: providedArg
+	            };
+	        }
+	    }
+	    return activeBlock;
+	}
+
+	module.exports = sb2import;
+
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var adapter = __webpack_require__(35);
 
 	/**
 	 * @fileoverview
@@ -1699,68 +5075,80 @@
 	    return inputs;
 	};
 
+	/**
+	 * Get the top-level script for a given block.
+	 * @param {?string} id ID of block to query.
+	 * @return {?string} ID of top-level script block.
+	 */
+	Blocks.prototype.getTopLevelScript = function (id) {
+	    if (typeof this._blocks[id] === 'undefined') return null;
+	    var block = this._blocks[id];
+	    while (block.parent !== null) {
+	        block = this._blocks[block.parent];
+	    }
+	    return block.id;
+	};
+
 	// ---------------------------------------------------------------------
 
 	/**
 	 * Create event listener for blocks. Handles validation and serves as a generic
 	 * adapter between the blocks and the runtime interface.
+	 * @param {Object} e Blockly "block" event
 	 * @param {boolean} isFlyout If true, create a listener for flyout events.
 	 * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
-	 * @return {Function} A generated listener to attach to Blockly instance.
 	 */
 
-	Blocks.prototype.generateBlockListener = function (isFlyout, opt_runtime) {
-	    var instance = this;
-	    /**
-	     * The actual generated block listener.
-	     * @param {Object} e Blockly "block" event
-	     */
-	    return function (e) {
-	        // Validate event
-	        if (typeof e !== 'object') return;
-	        if (typeof e.blockId !== 'string') return;
+	Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
+	    // Validate event
+	    if (typeof e !== 'object') return;
+	    if (typeof e.blockId !== 'string') return;
 
-	        // UI event: clicked scripts toggle in the runtime.
-	        if (e.element === 'stackclick') {
-	            if (opt_runtime) {
-	                opt_runtime.toggleScript(e.blockId);
-	            }
+	    // UI event: clicked scripts toggle in the runtime.
+	    if (e.element === 'stackclick') {
+	        if (opt_runtime) {
+	            opt_runtime.toggleScript(e.blockId);
+	        }
+	        return;
+	    }
+
+	    // Block create/update/destroy
+	    switch (e.type) {
+	    case 'create':
+	        var newBlocks = adapter(e);
+	        // A create event can create many blocks. Add them all.
+	        for (var i = 0; i < newBlocks.length; i++) {
+	            this.createBlock(newBlocks[i], isFlyout);
+	        }
+	        break;
+	    case 'change':
+	        this.changeBlock({
+	            id: e.blockId,
+	            element: e.element,
+	            name: e.name,
+	            value: e.newValue
+	        });
+	        break;
+	    case 'move':
+	        this.moveBlock({
+	            id: e.blockId,
+	            oldParent: e.oldParentId,
+	            oldInput: e.oldInputName,
+	            newParent: e.newParentId,
+	            newInput: e.newInputName,
+	            newCoordinate: e.newCoordinate
+	        });
+	        break;
+	    case 'delete':
+	        // Don't accept delete events for shadow blocks being obscured.
+	        if (this._blocks[e.blockId].shadow) {
 	            return;
 	        }
-
-	        // Block create/update/destroy
-	        switch (e.type) {
-	        case 'create':
-	            var newBlocks = adapter(e);
-	            // A create event can create many blocks. Add them all.
-	            for (var i = 0; i < newBlocks.length; i++) {
-	                instance.createBlock(newBlocks[i], isFlyout);
-	            }
-	            break;
-	        case 'change':
-	            instance.changeBlock({
-	                id: e.blockId,
-	                element: e.element,
-	                name: e.name,
-	                value: e.newValue
-	            });
-	            break;
-	        case 'move':
-	            instance.moveBlock({
-	                id: e.blockId,
-	                oldParent: e.oldParentId,
-	                oldInput: e.oldInputName,
-	                newParent: e.newParentId,
-	                newInput: e.newInputName
-	            });
-	            break;
-	        case 'delete':
-	            instance.deleteBlock({
-	                id: e.blockId
-	            });
-	            break;
-	        }
-	    };
+	        this.deleteBlock({
+	            id: e.blockId
+	        });
+	        break;
+	    }
 	};
 
 	// ---------------------------------------------------------------------
@@ -1771,9 +5159,13 @@
 	 * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
 	 */
 	Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-	    // Create new block
+	    // Does the block already exist?
+	    // Could happen, e.g., for an unobscured shadow.
+	    if (this._blocks.hasOwnProperty(block.id)) {
+	        return;
+	    }
+	    // Create new block.
 	    this._blocks[block.id] = block;
-
 	    // Push block id to scripts array.
 	    // Blocks are added as a top-level stack if they are marked as a top-block
 	    // (if they were top-level XML in the event) and if they are not
@@ -1802,6 +5194,12 @@
 	 * @param {!Object} e Blockly move event to be processed
 	 */
 	Blocks.prototype.moveBlock = function (e) {
+	    // Move coordinate changes.
+	    if (e.newCoordinate) {
+	        this._blocks[e.id].x = e.newCoordinate.x;
+	        this._blocks[e.id].y = e.newCoordinate.y;
+	    }
+
 	    // Remove from any old parent.
 	    if (e.oldParent !== undefined) {
 	        var oldParent = this._blocks[e.oldParent];
@@ -1813,6 +5211,7 @@
 	            // This block was connected to the old parent's next connection.
 	            oldParent.next = null;
 	        }
+	        this._blocks[e.id].parent = null;
 	    }
 
 	    // Has the block become a top-level block?
@@ -1823,15 +5222,22 @@
 	        this._deleteScript(e.id);
 	        // Otherwise, try to connect it in its new place.
 	        if (e.newInput !== undefined) {
-	             // Moved to the new parent's input.
+	            // Moved to the new parent's input.
+	            // Don't obscure the shadow block.
+	            var oldShadow = null;
+	            if (this._blocks[e.newParent].inputs.hasOwnProperty(e.newInput)) {
+	                oldShadow = this._blocks[e.newParent].inputs[e.newInput].shadow;
+	            }
 	            this._blocks[e.newParent].inputs[e.newInput] = {
 	                name: e.newInput,
-	                block: e.id
+	                block: e.id,
+	                shadow: oldShadow
 	            };
 	        } else {
 	            // Moved to the new parent's next connection.
 	            this._blocks[e.newParent].next = e.id;
 	        }
+	        this._blocks[e.id].parent = e.newParent;
 	    }
 	};
 
@@ -1856,6 +5262,11 @@
 	        if (block.inputs[input].block !== null) {
 	            this.deleteBlock({id: block.inputs[input].block});
 	        }
+	        // Delete obscured shadow blocks.
+	        if (block.inputs[input].shadow !== null &&
+	            block.inputs[input].shadow !== block.inputs[input].block) {
+	            this.deleteBlock({id: block.inputs[input].shadow});
+	        }
 	    }
 
 	    // Delete any script starting with this block.
@@ -1867,6 +5278,70 @@
 
 	// ---------------------------------------------------------------------
 
+	/**
+	 * Encode all of `this._blocks` as an XML string usable
+	 * by a Blockly/scratch-blocks workspace.
+	 * @return {string} String of XML representing this object's blocks.
+	 */
+	Blocks.prototype.toXML = function () {
+	    var xmlString = '<xml xmlns="http://www.w3.org/1999/xhtml">';
+	    for (var i = 0; i < this._scripts.length; i++) {
+	        xmlString += this.blockToXML(this._scripts[i]);
+	    }
+	    return xmlString + '</xml>';
+	};
+
+	/**
+	 * Recursively encode an individual block and its children
+	 * into a Blockly/scratch-blocks XML string.
+	 * @param {!string} blockId ID of block to encode.
+	 * @return {string} String of XML representing this block and any children.
+	 */
+	Blocks.prototype.blockToXML = function (blockId) {
+	    var block = this._blocks[blockId];
+	    // Encode properties of this block.
+	    var tagName = (block.shadow) ? 'shadow' : 'block';
+	    var xy = (block.topLevel) ?
+	        ' x="' + block.x +'"' + ' y="' + block.y +'"' :
+	        '';
+	    var xmlString = '';
+	    xmlString += '<' + tagName +
+	        ' id="' + block.id + '"' +
+	        ' type="' + block.opcode + '"' +
+	        xy +
+	        '>';
+	    // Add any inputs on this block.
+	    for (var input in block.inputs) {
+	        var blockInput = block.inputs[input];
+	        // Only encode a value tag if the value input is occupied.
+	        if (blockInput.block || blockInput.shadow) {
+	            xmlString += '<value name="' + blockInput.name + '">';
+	            if (blockInput.block) {
+	                xmlString += this.blockToXML(blockInput.block);
+	            }
+	            if (blockInput.shadow && blockInput.shadow != blockInput.block) {
+	                // Obscured shadow.
+	                xmlString += this.blockToXML(blockInput.shadow);
+	            }
+	            xmlString += '</value>';
+	        }
+	    }
+	    // Add any fields on this block.
+	    for (var field in block.fields) {
+	        var blockField = block.fields[field];
+	        xmlString += '<field name="' + blockField.name + '">' +
+	            blockField.value + '</field>';
+	    }
+	    // Add blocks connected to the next connection.
+	    if (block.next) {
+	        xmlString += '<next>' + this.blockToXML(block.next) + '</next>';
+	    }
+	    xmlString += '</' + tagName + '>';
+	    return xmlString;
+	};
+
+	// ---------------------------------------------------------------------
+
 	/**
 	 * Helper to add a stack to `this._scripts`.
 	 * @param {?string} topBlockId ID of block that starts the script.
@@ -1894,10 +5369,10 @@
 
 
 /***/ },
-/* 11 */
+/* 35 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var html = __webpack_require__(12);
+	var html = __webpack_require__(36);
 
 	/**
 	 * Adapter between block creation events and block representation which can be
@@ -1930,7 +5405,7 @@
 	        }
 	        var tagName = block.name.toLowerCase();
 	        if (tagName == 'block' || tagName == 'shadow') {
-	            domToBlock(block, blocks, true);
+	            domToBlock(block, blocks, true, null);
 	        }
 	    }
 	    // Flatten blocks object into a list.
@@ -1947,8 +5422,9 @@
 	 * @param {Element} blockDOM DOM tree for an individual block.
 	 * @param {Object} blocks Collection of blocks to add to.
 	 * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
+	 * @param {?string} parent Parent block ID.
 	 */
-	function domToBlock (blockDOM, blocks, isTopBlock) {
+	function domToBlock (blockDOM, blocks, isTopBlock, parent) {
 	    // Block skeleton.
 	    var block = {
 	        id: blockDOM.attribs.id, // Block ID
@@ -1956,7 +5432,11 @@
 	        inputs: {}, // Inputs to this block and the blocks they point to.
 	        fields: {}, // Fields on this block and their values.
 	        next: null, // Next block in the stack, if one exists.
-	        topLevel: isTopBlock // If this block starts a stack.
+	        topLevel: isTopBlock, // If this block starts a stack.
+	        parent: parent, // Parent block ID, if available.
+	        shadow: blockDOM.name == 'shadow', // If this represents a shadow/slot.
+	        x: blockDOM.attribs.x, // X position of script, if top-level.
+	        y: blockDOM.attribs.y // Y position of script, if top-level.
 	    };
 
 	    // Add the block to the representation tree.
@@ -2009,12 +5489,17 @@
 	        case 'value':
 	        case 'statement':
 	            // Recursively generate block structure for input block.
-	            domToBlock(childBlockNode, blocks, false);
+	            domToBlock(childBlockNode, blocks, false, block.id);
+	            if (childShadowNode && childBlockNode != childShadowNode) {
+	                // Also generate the shadow block.
+	                domToBlock(childShadowNode, blocks, false, block.id);
+	            }
 	            // Link this block's input to the child block.
 	            var inputName = xmlChild.attribs.name;
 	            block.inputs[inputName] = {
 	                name: inputName,
-	                block: childBlockNode.attribs.id
+	                block: childBlockNode.attribs.id,
+	                shadow: childShadowNode ? childShadowNode.attribs.id : null
 	            };
 	            break;
 	        case 'next':
@@ -2023,7 +5508,7 @@
 	                continue;
 	            }
 	            // Recursively generate block structure for next block.
-	            domToBlock(childBlockNode, blocks, false);
+	            domToBlock(childBlockNode, blocks, false, block.id);
 	            // Link next block to this block.
 	            block.next = childBlockNode.attribs.id;
 	            break;
@@ -2033,11 +5518,11 @@
 
 
 /***/ },
-/* 12 */
+/* 36 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Parser = __webpack_require__(13),
-	    DomHandler = __webpack_require__(20);
+	var Parser = __webpack_require__(37),
+	    DomHandler = __webpack_require__(44);
 
 	function defineProp(name, value){
 		delete module.exports[name];
@@ -2047,26 +5532,26 @@
 
 	module.exports = {
 		Parser: Parser,
-		Tokenizer: __webpack_require__(14),
-		ElementType: __webpack_require__(21),
+		Tokenizer: __webpack_require__(38),
+		ElementType: __webpack_require__(45),
 		DomHandler: DomHandler,
 		get FeedHandler(){
-			return defineProp("FeedHandler", __webpack_require__(24));
+			return defineProp("FeedHandler", __webpack_require__(48));
 		},
 		get Stream(){
-			return defineProp("Stream", __webpack_require__(25));
+			return defineProp("Stream", __webpack_require__(49));
 		},
 		get WritableStream(){
-			return defineProp("WritableStream", __webpack_require__(26));
+			return defineProp("WritableStream", __webpack_require__(50));
 		},
 		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(47));
+			return defineProp("ProxyHandler", __webpack_require__(71));
 		},
 		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(48));
+			return defineProp("DomUtils", __webpack_require__(72));
 		},
 		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(60));
+			return defineProp("CollectingHandler", __webpack_require__(84));
 		},
 		// For legacy support
 		DefaultHandler: DomHandler,
@@ -2107,10 +5592,10 @@
 
 
 /***/ },
-/* 13 */
+/* 37 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var Tokenizer = __webpack_require__(14);
+	var Tokenizer = __webpack_require__(38);
 
 	/*
 		Options:
@@ -2465,15 +5950,15 @@
 
 
 /***/ },
-/* 14 */
+/* 38 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Tokenizer;
 
-	var decodeCodePoint = __webpack_require__(15),
-	    entityMap = __webpack_require__(17),
-	    legacyMap = __webpack_require__(18),
-	    xmlMap    = __webpack_require__(19),
+	var decodeCodePoint = __webpack_require__(39),
+	    entityMap = __webpack_require__(41),
+	    legacyMap = __webpack_require__(42),
+	    xmlMap    = __webpack_require__(43),
 
 	    i = 0,
 
@@ -3377,10 +6862,10 @@
 
 
 /***/ },
-/* 15 */
+/* 39 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var decodeMap = __webpack_require__(16);
+	var decodeMap = __webpack_require__(40);
 
 	module.exports = decodeCodePoint;
 
@@ -3409,7 +6894,7 @@
 
 
 /***/ },
-/* 16 */
+/* 40 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -3444,7 +6929,7 @@
 	};
 
 /***/ },
-/* 17 */
+/* 41 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5576,7 +9061,7 @@
 	};
 
 /***/ },
-/* 18 */
+/* 42 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5689,7 +9174,7 @@
 	};
 
 /***/ },
-/* 19 */
+/* 43 */
 /***/ function(module, exports) {
 
 	module.exports = {
@@ -5701,14 +9186,14 @@
 	};
 
 /***/ },
-/* 20 */
+/* 44 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(21);
+	var ElementType = __webpack_require__(45);
 
 	var re_whitespace = /\s+/g;
-	var NodePrototype = __webpack_require__(22);
-	var ElementPrototype = __webpack_require__(23);
+	var NodePrototype = __webpack_require__(46);
+	var ElementPrototype = __webpack_require__(47);
 
 	function DomHandler(callback, options, elementCB){
 		if(typeof callback === "object"){
@@ -5889,7 +9374,7 @@
 
 
 /***/ },
-/* 21 */
+/* 45 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -5910,7 +9395,7 @@
 
 
 /***/ },
-/* 22 */
+/* 46 */
 /***/ function(module, exports) {
 
 	// This object will be used as the prototype for Nodes when creating a
@@ -5960,11 +9445,11 @@
 
 
 /***/ },
-/* 23 */
+/* 47 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// DOM-Level-1-compliant structure
-	var NodePrototype = __webpack_require__(22);
+	var NodePrototype = __webpack_require__(46);
 	var ElementPrototype = module.exports = Object.create(NodePrototype);
 
 	var domLvl1 = {
@@ -5986,10 +9471,10 @@
 
 
 /***/ },
-/* 24 */
+/* 48 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var index = __webpack_require__(12),
+	var index = __webpack_require__(36),
 	    DomHandler = index.DomHandler,
 		DomUtils = index.DomUtils;
 
@@ -6087,12 +9572,12 @@
 
 
 /***/ },
-/* 25 */
+/* 49 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(26);
+	var Parser = __webpack_require__(50);
 
 	function Stream(options){
 		Parser.call(this, new Cbs(this), options);
@@ -6106,7 +9591,7 @@
 		this.scope = scope;
 	}
 
-	var EVENTS = __webpack_require__(12).EVENTS;
+	var EVENTS = __webpack_require__(36).EVENTS;
 
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
@@ -6127,13 +9612,13 @@
 	});
 
 /***/ },
-/* 26 */
+/* 50 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = Stream;
 
-	var Parser = __webpack_require__(13),
-	    WritableStream = __webpack_require__(27).Writable || __webpack_require__(46).Writable;
+	var Parser = __webpack_require__(37),
+	    WritableStream = __webpack_require__(51).Writable || __webpack_require__(70).Writable;
 
 	function Stream(cbs, options){
 		var parser = this._parser = new Parser(cbs, options);
@@ -6153,7 +9638,7 @@
 	};
 
 /***/ },
-/* 27 */
+/* 51 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -6183,11 +9668,11 @@
 	var inherits = __webpack_require__(5);
 
 	inherits(Stream, EE);
-	Stream.Readable = __webpack_require__(28);
-	Stream.Writable = __webpack_require__(42);
-	Stream.Duplex = __webpack_require__(43);
-	Stream.Transform = __webpack_require__(44);
-	Stream.PassThrough = __webpack_require__(45);
+	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);
 
 	// Backwards-compat with node 0.4.x
 	Stream.Stream = Stream;
@@ -6286,24 +9771,24 @@
 
 
 /***/ },
-/* 28 */
+/* 52 */
 /***/ function(module, exports, __webpack_require__) {
 
-	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(29);
-	exports.Stream = __webpack_require__(27);
+	/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(53);
+	exports.Stream = __webpack_require__(51);
 	exports.Readable = exports;
-	exports.Writable = __webpack_require__(38);
-	exports.Duplex = __webpack_require__(37);
-	exports.Transform = __webpack_require__(40);
-	exports.PassThrough = __webpack_require__(41);
+	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__(27);
+	  module.exports = __webpack_require__(51);
 	}
 
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 29 */
+/* 53 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -6330,12 +9815,12 @@
 	module.exports = Readable;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(30);
+	var isArray = __webpack_require__(54);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(31).Buffer;
+	var Buffer = __webpack_require__(55).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
@@ -6348,10 +9833,10 @@
 	};
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(27);
+	var Stream = __webpack_require__(51);
 
 	/*<replacement>*/
-	var util = __webpack_require__(35);
+	var util = __webpack_require__(59);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -6359,7 +9844,7 @@
 
 
 	/*<replacement>*/
-	var debug = __webpack_require__(36);
+	var debug = __webpack_require__(60);
 	if (debug && debug.debuglog) {
 	  debug = debug.debuglog('stream');
 	} else {
@@ -6371,7 +9856,7 @@
 	util.inherits(Readable, Stream);
 
 	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(37);
+	  var Duplex = __webpack_require__(61);
 
 	  options = options || {};
 
@@ -6432,14 +9917,14 @@
 	  this.encoding = null;
 	  if (options.encoding) {
 	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(39).StringDecoder;
+	      StringDecoder = __webpack_require__(63).StringDecoder;
 	    this.decoder = new StringDecoder(options.encoding);
 	    this.encoding = options.encoding;
 	  }
 	}
 
 	function Readable(options) {
-	  var Duplex = __webpack_require__(37);
+	  var Duplex = __webpack_require__(61);
 
 	  if (!(this instanceof Readable))
 	    return new Readable(options);
@@ -6542,7 +10027,7 @@
 	// backwards compatibility.
 	Readable.prototype.setEncoding = function(enc) {
 	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(39).StringDecoder;
+	    StringDecoder = __webpack_require__(63).StringDecoder;
 	  this._readableState.decoder = new StringDecoder(enc);
 	  this._readableState.encoding = enc;
 	  return this;
@@ -7261,7 +10746,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 30 */
+/* 54 */
 /***/ function(module, exports) {
 
 	module.exports = Array.isArray || function (arr) {
@@ -7270,7 +10755,7 @@
 
 
 /***/ },
-/* 31 */
+/* 55 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
@@ -7283,16 +10768,13 @@
 
 	'use strict'
 
-	var base64 = __webpack_require__(32)
-	var ieee754 = __webpack_require__(33)
-	var isArray = __webpack_require__(34)
+	var base64 = __webpack_require__(56)
+	var ieee754 = __webpack_require__(57)
+	var isArray = __webpack_require__(58)
 
 	exports.Buffer = Buffer
 	exports.SlowBuffer = SlowBuffer
 	exports.INSPECT_MAX_BYTES = 50
-	Buffer.poolSize = 8192 // not used by this implementation
-
-	var rootParent = {}
 
 	/**
 	 * If `Buffer.TYPED_ARRAY_SUPPORT`:
@@ -7310,9 +10792,6 @@
 	 *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
 	 *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
 	 *
-	 *   - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property
-	 *     on objects.
-	 *
 	 *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
 	 *
 	 *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
@@ -7325,14 +10804,16 @@
 	  ? global.TYPED_ARRAY_SUPPORT
 	  : typedArraySupport()
 
+	/*
+	 * Export kMaxLength after typed array support is determined.
+	 */
+	exports.kMaxLength = kMaxLength()
+
 	function typedArraySupport () {
-	  function Bar () {}
 	  try {
 	    var arr = new Uint8Array(1)
-	    arr.foo = function () { return 42 }
-	    arr.constructor = Bar
+	    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
 	    return arr.foo() === 42 && // typed array instances can be augmented
-	        arr.constructor === Bar && // constructor can be set
 	        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
 	        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
 	  } catch (e) {
@@ -7346,184 +10827,252 @@
 	    : 0x3fffffff
 	}
 
-	/**
-	 * Class: Buffer
-	 * =============
-	 *
-	 * The Buffer constructor returns instances of `Uint8Array` that are augmented
-	 * with function properties for all the node `Buffer` API functions. We use
-	 * `Uint8Array` so that square bracket notation works as expected -- it returns
-	 * a single octet.
-	 *
-	 * By augmenting the instances, we can avoid modifying the `Uint8Array`
-	 * prototype.
-	 */
-	function Buffer (arg) {
-	  if (!(this instanceof Buffer)) {
-	    // Avoid going through an ArgumentsAdaptorTrampoline in the common case.
-	    if (arguments.length > 1) return new Buffer(arg, arguments[1])
-	    return new Buffer(arg)
+	function createBuffer (that, length) {
+	  if (kMaxLength() < length) {
+	    throw new RangeError('Invalid typed array length')
+	  }
+	  if (Buffer.TYPED_ARRAY_SUPPORT) {
+	    // Return an augmented `Uint8Array` instance, for best performance
+	    that = new Uint8Array(length)
+	    that.__proto__ = Buffer.prototype
+	  } else {
+	    // Fallback: Return an object instance of the Buffer class
+	    if (that === null) {
+	      that = new Buffer(length)
+	    }
+	    that.length = length
 	  }
 
-	  if (!Buffer.TYPED_ARRAY_SUPPORT) {
-	    this.length = 0
-	    this.parent = undefined
+	  return that
+	}
+
+	/**
+	 * The Buffer constructor returns instances of `Uint8Array` that have their
+	 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+	 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+	 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+	 * returns a single octet.
+	 *
+	 * The `Uint8Array` prototype remains unmodified.
+	 */
+
+	function Buffer (arg, encodingOrOffset, length) {
+	  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+	    return new Buffer(arg, encodingOrOffset, length)
 	  }
 
 	  // Common case.
 	  if (typeof arg === 'number') {
-	    return fromNumber(this, arg)
+	    if (typeof encodingOrOffset === 'string') {
+	      throw new Error(
+	        'If encoding is specified then the first argument must be a string'
+	      )
+	    }
+	    return allocUnsafe(this, arg)
 	  }
-
-	  // Slightly less common case.
-	  if (typeof arg === 'string') {
-	    return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
-	  }
-
-	  // Unusual.
-	  return fromObject(this, arg)
+	  return from(this, arg, encodingOrOffset, length)
 	}
 
-	function fromNumber (that, length) {
-	  that = allocate(that, length < 0 ? 0 : checked(length) | 0)
+	Buffer.poolSize = 8192 // not used by this implementation
+
+	// TODO: Legacy, not needed anymore. Remove in next major version.
+	Buffer._augment = function (arr) {
+	  arr.__proto__ = Buffer.prototype
+	  return arr
+	}
+
+	function from (that, value, encodingOrOffset, length) {
+	  if (typeof value === 'number') {
+	    throw new TypeError('"value" argument must not be a number')
+	  }
+
+	  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+	    return fromArrayBuffer(that, value, encodingOrOffset, length)
+	  }
+
+	  if (typeof value === 'string') {
+	    return fromString(that, value, encodingOrOffset)
+	  }
+
+	  return fromObject(that, value)
+	}
+
+	/**
+	 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+	 * if value is a number.
+	 * Buffer.from(str[, encoding])
+	 * Buffer.from(array)
+	 * Buffer.from(buffer)
+	 * Buffer.from(arrayBuffer[, byteOffset[, length]])
+	 **/
+	Buffer.from = function (value, encodingOrOffset, length) {
+	  return from(null, value, encodingOrOffset, length)
+	}
+
+	if (Buffer.TYPED_ARRAY_SUPPORT) {
+	  Buffer.prototype.__proto__ = Uint8Array.prototype
+	  Buffer.__proto__ = Uint8Array
+	  if (typeof Symbol !== 'undefined' && Symbol.species &&
+	      Buffer[Symbol.species] === Buffer) {
+	    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+	    Object.defineProperty(Buffer, Symbol.species, {
+	      value: null,
+	      configurable: true
+	    })
+	  }
+	}
+
+	function assertSize (size) {
+	  if (typeof size !== 'number') {
+	    throw new TypeError('"size" argument must be a number')
+	  } else if (size < 0) {
+	    throw new RangeError('"size" argument must not be negative')
+	  }
+	}
+
+	function alloc (that, size, fill, encoding) {
+	  assertSize(size)
+	  if (size <= 0) {
+	    return createBuffer(that, size)
+	  }
+	  if (fill !== undefined) {
+	    // Only pay attention to encoding if it's a string. This
+	    // prevents accidentally sending in a number that would
+	    // be interpretted as a start offset.
+	    return typeof encoding === 'string'
+	      ? createBuffer(that, size).fill(fill, encoding)
+	      : createBuffer(that, size).fill(fill)
+	  }
+	  return createBuffer(that, size)
+	}
+
+	/**
+	 * Creates a new filled Buffer instance.
+	 * alloc(size[, fill[, encoding]])
+	 **/
+	Buffer.alloc = function (size, fill, encoding) {
+	  return alloc(null, size, fill, encoding)
+	}
+
+	function allocUnsafe (that, size) {
+	  assertSize(size)
+	  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
 	  if (!Buffer.TYPED_ARRAY_SUPPORT) {
-	    for (var i = 0; i < length; i++) {
+	    for (var i = 0; i < size; ++i) {
 	      that[i] = 0
 	    }
 	  }
 	  return that
 	}
 
+	/**
+	 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+	 * */
+	Buffer.allocUnsafe = function (size) {
+	  return allocUnsafe(null, size)
+	}
+	/**
+	 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+	 */
+	Buffer.allocUnsafeSlow = function (size) {
+	  return allocUnsafe(null, size)
+	}
+
 	function fromString (that, string, encoding) {
-	  if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
+	  if (typeof encoding !== 'string' || encoding === '') {
+	    encoding = 'utf8'
+	  }
+
+	  if (!Buffer.isEncoding(encoding)) {
+	    throw new TypeError('"encoding" must be a valid string encoding')
+	  }
 
-	  // Assumption: byteLength() return value is always < kMaxLength.
 	  var length = byteLength(string, encoding) | 0
-	  that = allocate(that, length)
+	  that = createBuffer(that, length)
 
-	  that.write(string, encoding)
-	  return that
-	}
+	  var actual = that.write(string, encoding)
 
-	function fromObject (that, object) {
-	  if (Buffer.isBuffer(object)) return fromBuffer(that, object)
-
-	  if (isArray(object)) return fromArray(that, object)
-
-	  if (object == null) {
-	    throw new TypeError('must start with number, buffer, array or string')
+	  if (actual !== length) {
+	    // Writing a hex string, for example, that contains invalid characters will
+	    // cause everything after the first invalid character to be ignored. (e.g.
+	    // 'abxxcd' will be treated as 'ab')
+	    that = that.slice(0, actual)
 	  }
 
-	  if (typeof ArrayBuffer !== 'undefined') {
-	    if (object.buffer instanceof ArrayBuffer) {
-	      return fromTypedArray(that, object)
-	    }
-	    if (object instanceof ArrayBuffer) {
-	      return fromArrayBuffer(that, object)
-	    }
-	  }
-
-	  if (object.length) return fromArrayLike(that, object)
-
-	  return fromJsonObject(that, object)
-	}
-
-	function fromBuffer (that, buffer) {
-	  var length = checked(buffer.length) | 0
-	  that = allocate(that, length)
-	  buffer.copy(that, 0, 0, length)
-	  return that
-	}
-
-	function fromArray (that, array) {
-	  var length = checked(array.length) | 0
-	  that = allocate(that, length)
-	  for (var i = 0; i < length; i += 1) {
-	    that[i] = array[i] & 255
-	  }
-	  return that
-	}
-
-	// Duplicate of fromArray() to keep fromArray() monomorphic.
-	function fromTypedArray (that, array) {
-	  var length = checked(array.length) | 0
-	  that = allocate(that, length)
-	  // Truncating the elements is probably not what people expect from typed
-	  // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
-	  // of the old Buffer constructor.
-	  for (var i = 0; i < length; i += 1) {
-	    that[i] = array[i] & 255
-	  }
-	  return that
-	}
-
-	function fromArrayBuffer (that, array) {
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    // Return an augmented `Uint8Array` instance, for best performance
-	    array.byteLength
-	    that = Buffer._augment(new Uint8Array(array))
-	  } else {
-	    // Fallback: Return an object instance of the Buffer class
-	    that = fromTypedArray(that, new Uint8Array(array))
-	  }
 	  return that
 	}
 
 	function fromArrayLike (that, array) {
-	  var length = checked(array.length) | 0
-	  that = allocate(that, length)
+	  var length = array.length < 0 ? 0 : checked(array.length) | 0
+	  that = createBuffer(that, length)
 	  for (var i = 0; i < length; i += 1) {
 	    that[i] = array[i] & 255
 	  }
 	  return that
 	}
 
-	// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
-	// Returns a zero-length buffer for inputs that don't conform to the spec.
-	function fromJsonObject (that, object) {
-	  var array
-	  var length = 0
+	function fromArrayBuffer (that, array, byteOffset, length) {
+	  array.byteLength // this throws if `array` is not a valid ArrayBuffer
 
-	  if (object.type === 'Buffer' && isArray(object.data)) {
-	    array = object.data
-	    length = checked(array.length) | 0
+	  if (byteOffset < 0 || array.byteLength < byteOffset) {
+	    throw new RangeError('\'offset\' is out of bounds')
 	  }
-	  that = allocate(that, length)
 
-	  for (var i = 0; i < length; i += 1) {
-	    that[i] = array[i] & 255
+	  if (array.byteLength < byteOffset + (length || 0)) {
+	    throw new RangeError('\'length\' is out of bounds')
 	  }
-	  return that
-	}
 
-	if (Buffer.TYPED_ARRAY_SUPPORT) {
-	  Buffer.prototype.__proto__ = Uint8Array.prototype
-	  Buffer.__proto__ = Uint8Array
-	} else {
-	  // pre-set for values that may exist in the future
-	  Buffer.prototype.length = undefined
-	  Buffer.prototype.parent = undefined
-	}
+	  if (byteOffset === undefined && length === undefined) {
+	    array = new Uint8Array(array)
+	  } else if (length === undefined) {
+	    array = new Uint8Array(array, byteOffset)
+	  } else {
+	    array = new Uint8Array(array, byteOffset, length)
+	  }
 
-	function allocate (that, length) {
 	  if (Buffer.TYPED_ARRAY_SUPPORT) {
 	    // Return an augmented `Uint8Array` instance, for best performance
-	    that = Buffer._augment(new Uint8Array(length))
+	    that = array
 	    that.__proto__ = Buffer.prototype
 	  } else {
 	    // Fallback: Return an object instance of the Buffer class
-	    that.length = length
-	    that._isBuffer = true
+	    that = fromArrayLike(that, array)
 	  }
-
-	  var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
-	  if (fromPool) that.parent = rootParent
-
 	  return that
 	}
 
+	function fromObject (that, obj) {
+	  if (Buffer.isBuffer(obj)) {
+	    var len = checked(obj.length) | 0
+	    that = createBuffer(that, len)
+
+	    if (that.length === 0) {
+	      return that
+	    }
+
+	    obj.copy(that, 0, 0, len)
+	    return that
+	  }
+
+	  if (obj) {
+	    if ((typeof ArrayBuffer !== 'undefined' &&
+	        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
+	      if (typeof obj.length !== 'number' || isnan(obj.length)) {
+	        return createBuffer(that, 0)
+	      }
+	      return fromArrayLike(that, obj)
+	    }
+
+	    if (obj.type === 'Buffer' && isArray(obj.data)) {
+	      return fromArrayLike(that, obj.data)
+	    }
+	  }
+
+	  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
+	}
+
 	function checked (length) {
-	  // Note: cannot use `length < kMaxLength` here because that fails when
+	  // Note: cannot use `length < kMaxLength()` here because that fails when
 	  // length is NaN (which is otherwise coerced to zero.)
 	  if (length >= kMaxLength()) {
 	    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
@@ -7532,12 +11081,11 @@
 	  return length | 0
 	}
 
-	function SlowBuffer (subject, encoding) {
-	  if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
-
-	  var buf = new Buffer(subject, encoding)
-	  delete buf.parent
-	  return buf
+	function SlowBuffer (length) {
+	  if (+length != length) { // eslint-disable-line eqeqeq
+	    length = 0
+	  }
+	  return Buffer.alloc(+length)
 	}
 
 	Buffer.isBuffer = function isBuffer (b) {
@@ -7554,17 +11102,12 @@
 	  var x = a.length
 	  var y = b.length
 
-	  var i = 0
-	  var len = Math.min(x, y)
-	  while (i < len) {
-	    if (a[i] !== b[i]) break
-
-	    ++i
-	  }
-
-	  if (i !== len) {
-	    x = a[i]
-	    y = b[i]
+	  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+	    if (a[i] !== b[i]) {
+	      x = a[i]
+	      y = b[i]
+	      break
+	    }
 	  }
 
 	  if (x < y) return -1
@@ -7578,9 +11121,9 @@
 	    case 'utf8':
 	    case 'utf-8':
 	    case 'ascii':
+	    case 'latin1':
 	    case 'binary':
 	    case 'base64':
-	    case 'raw':
 	    case 'ucs2':
 	    case 'ucs-2':
 	    case 'utf16le':
@@ -7592,32 +11135,46 @@
 	}
 
 	Buffer.concat = function concat (list, length) {
-	  if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
+	  if (!isArray(list)) {
+	    throw new TypeError('"list" argument must be an Array of Buffers')
+	  }
 
 	  if (list.length === 0) {
-	    return new Buffer(0)
+	    return Buffer.alloc(0)
 	  }
 
 	  var i
 	  if (length === undefined) {
 	    length = 0
-	    for (i = 0; i < list.length; i++) {
+	    for (i = 0; i < list.length; ++i) {
 	      length += list[i].length
 	    }
 	  }
 
-	  var buf = new Buffer(length)
+	  var buffer = Buffer.allocUnsafe(length)
 	  var pos = 0
-	  for (i = 0; i < list.length; i++) {
-	    var item = list[i]
-	    item.copy(buf, pos)
-	    pos += item.length
+	  for (i = 0; i < list.length; ++i) {
+	    var buf = list[i]
+	    if (!Buffer.isBuffer(buf)) {
+	      throw new TypeError('"list" argument must be an Array of Buffers')
+	    }
+	    buf.copy(buffer, pos)
+	    pos += buf.length
 	  }
-	  return buf
+	  return buffer
 	}
 
 	function byteLength (string, encoding) {
-	  if (typeof string !== 'string') string = '' + string
+	  if (Buffer.isBuffer(string)) {
+	    return string.length
+	  }
+	  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
+	      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+	    return string.byteLength
+	  }
+	  if (typeof string !== 'string') {
+	    string = '' + string
+	  }
 
 	  var len = string.length
 	  if (len === 0) return 0
@@ -7627,13 +11184,12 @@
 	  for (;;) {
 	    switch (encoding) {
 	      case 'ascii':
+	      case 'latin1':
 	      case 'binary':
-	      // Deprecated
-	      case 'raw':
-	      case 'raws':
 	        return len
 	      case 'utf8':
 	      case 'utf-8':
+	      case undefined:
 	        return utf8ToBytes(string).length
 	      case 'ucs2':
 	      case 'ucs-2':
@@ -7656,13 +11212,39 @@
 	function slowToString (encoding, start, end) {
 	  var loweredCase = false
 
-	  start = start | 0
-	  end = end === undefined || end === Infinity ? this.length : end | 0
+	  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+	  // property of a typed array.
+
+	  // This behaves neither like String nor Uint8Array in that we set start/end
+	  // to their upper/lower bounds if the value passed is out of range.
+	  // undefined is handled specially as per ECMA-262 6th Edition,
+	  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+	  if (start === undefined || start < 0) {
+	    start = 0
+	  }
+	  // Return early if start > this.length. Done here to prevent potential uint32
+	  // coercion fail below.
+	  if (start > this.length) {
+	    return ''
+	  }
+
+	  if (end === undefined || end > this.length) {
+	    end = this.length
+	  }
+
+	  if (end <= 0) {
+	    return ''
+	  }
+
+	  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+	  end >>>= 0
+	  start >>>= 0
+
+	  if (end <= start) {
+	    return ''
+	  }
 
 	  if (!encoding) encoding = 'utf8'
-	  if (start < 0) start = 0
-	  if (end > this.length) end = this.length
-	  if (end <= start) return ''
 
 	  while (true) {
 	    switch (encoding) {
@@ -7676,8 +11258,9 @@
 	      case 'ascii':
 	        return asciiSlice(this, start, end)
 
+	      case 'latin1':
 	      case 'binary':
-	        return binarySlice(this, start, end)
+	        return latin1Slice(this, start, end)
 
 	      case 'base64':
 	        return base64Slice(this, start, end)
@@ -7696,6 +11279,53 @@
 	  }
 	}
 
+	// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+	// Buffer instances.
+	Buffer.prototype._isBuffer = true
+
+	function swap (b, n, m) {
+	  var i = b[n]
+	  b[n] = b[m]
+	  b[m] = i
+	}
+
+	Buffer.prototype.swap16 = function swap16 () {
+	  var len = this.length
+	  if (len % 2 !== 0) {
+	    throw new RangeError('Buffer size must be a multiple of 16-bits')
+	  }
+	  for (var i = 0; i < len; i += 2) {
+	    swap(this, i, i + 1)
+	  }
+	  return this
+	}
+
+	Buffer.prototype.swap32 = function swap32 () {
+	  var len = this.length
+	  if (len % 4 !== 0) {
+	    throw new RangeError('Buffer size must be a multiple of 32-bits')
+	  }
+	  for (var i = 0; i < len; i += 4) {
+	    swap(this, i, i + 3)
+	    swap(this, i + 1, i + 2)
+	  }
+	  return this
+	}
+
+	Buffer.prototype.swap64 = function swap64 () {
+	  var len = this.length
+	  if (len % 8 !== 0) {
+	    throw new RangeError('Buffer size must be a multiple of 64-bits')
+	  }
+	  for (var i = 0; i < len; i += 8) {
+	    swap(this, i, i + 7)
+	    swap(this, i + 1, i + 6)
+	    swap(this, i + 2, i + 5)
+	    swap(this, i + 3, i + 4)
+	  }
+	  return this
+	}
+
 	Buffer.prototype.toString = function toString () {
 	  var length = this.length | 0
 	  if (length === 0) return ''
@@ -7719,63 +11349,197 @@
 	  return '<Buffer ' + str + '>'
 	}
 
-	Buffer.prototype.compare = function compare (b) {
-	  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
-	  if (this === b) return 0
-	  return Buffer.compare(this, b)
+	Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+	  if (!Buffer.isBuffer(target)) {
+	    throw new TypeError('Argument must be a Buffer')
+	  }
+
+	  if (start === undefined) {
+	    start = 0
+	  }
+	  if (end === undefined) {
+	    end = target ? target.length : 0
+	  }
+	  if (thisStart === undefined) {
+	    thisStart = 0
+	  }
+	  if (thisEnd === undefined) {
+	    thisEnd = this.length
+	  }
+
+	  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+	    throw new RangeError('out of range index')
+	  }
+
+	  if (thisStart >= thisEnd && start >= end) {
+	    return 0
+	  }
+	  if (thisStart >= thisEnd) {
+	    return -1
+	  }
+	  if (start >= end) {
+	    return 1
+	  }
+
+	  start >>>= 0
+	  end >>>= 0
+	  thisStart >>>= 0
+	  thisEnd >>>= 0
+
+	  if (this === target) return 0
+
+	  var x = thisEnd - thisStart
+	  var y = end - start
+	  var len = Math.min(x, y)
+
+	  var thisCopy = this.slice(thisStart, thisEnd)
+	  var targetCopy = target.slice(start, end)
+
+	  for (var i = 0; i < len; ++i) {
+	    if (thisCopy[i] !== targetCopy[i]) {
+	      x = thisCopy[i]
+	      y = targetCopy[i]
+	      break
+	    }
+	  }
+
+	  if (x < y) return -1
+	  if (y < x) return 1
+	  return 0
 	}
 
-	Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
-	  if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
-	  else if (byteOffset < -0x80000000) byteOffset = -0x80000000
-	  byteOffset >>= 0
+	// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+	// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+	//
+	// Arguments:
+	// - buffer - a Buffer to search
+	// - val - a string, Buffer, or number
+	// - byteOffset - an index into `buffer`; will be clamped to an int32
+	// - encoding - an optional encoding, relevant is val is a string
+	// - dir - true for indexOf, false for lastIndexOf
+	function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+	  // Empty buffer means no match
+	  if (buffer.length === 0) return -1
 
-	  if (this.length === 0) return -1
-	  if (byteOffset >= this.length) return -1
+	  // Normalize byteOffset
+	  if (typeof byteOffset === 'string') {
+	    encoding = byteOffset
+	    byteOffset = 0
+	  } else if (byteOffset > 0x7fffffff) {
+	    byteOffset = 0x7fffffff
+	  } else if (byteOffset < -0x80000000) {
+	    byteOffset = -0x80000000
+	  }
+	  byteOffset = +byteOffset  // Coerce to Number.
+	  if (isNaN(byteOffset)) {
+	    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+	    byteOffset = dir ? 0 : (buffer.length - 1)
+	  }
 
-	  // Negative offsets start from the end of the buffer
-	  if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
+	  // Normalize byteOffset: negative offsets start from the end of the buffer
+	  if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+	  if (byteOffset >= buffer.length) {
+	    if (dir) return -1
+	    else byteOffset = buffer.length - 1
+	  } else if (byteOffset < 0) {
+	    if (dir) byteOffset = 0
+	    else return -1
+	  }
 
+	  // Normalize val
 	  if (typeof val === 'string') {
-	    if (val.length === 0) return -1 // special case: looking for empty string always fails
-	    return String.prototype.indexOf.call(this, val, byteOffset)
-	  }
-	  if (Buffer.isBuffer(val)) {
-	    return arrayIndexOf(this, val, byteOffset)
-	  }
-	  if (typeof val === 'number') {
-	    if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
-	      return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
-	    }
-	    return arrayIndexOf(this, [ val ], byteOffset)
+	    val = Buffer.from(val, encoding)
 	  }
 
-	  function arrayIndexOf (arr, val, byteOffset) {
-	    var foundIndex = -1
-	    for (var i = 0; byteOffset + i < arr.length; i++) {
-	      if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
-	        if (foundIndex === -1) foundIndex = i
-	        if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
+	  // Finally, search either indexOf (if dir is true) or lastIndexOf
+	  if (Buffer.isBuffer(val)) {
+	    // Special case: looking for empty string/buffer always fails
+	    if (val.length === 0) {
+	      return -1
+	    }
+	    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+	  } else if (typeof val === 'number') {
+	    val = val & 0xFF // Search for a byte value [0-255]
+	    if (Buffer.TYPED_ARRAY_SUPPORT &&
+	        typeof Uint8Array.prototype.indexOf === 'function') {
+	      if (dir) {
+	        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
 	      } else {
-	        foundIndex = -1
+	        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
 	      }
 	    }
-	    return -1
+	    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
 	  }
 
 	  throw new TypeError('val must be string, number or Buffer')
 	}
 
-	// `get` is deprecated
-	Buffer.prototype.get = function get (offset) {
-	  console.log('.get() is deprecated. Access using array indexes instead.')
-	  return this.readUInt8(offset)
+	function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+	  var indexSize = 1
+	  var arrLength = arr.length
+	  var valLength = val.length
+
+	  if (encoding !== undefined) {
+	    encoding = String(encoding).toLowerCase()
+	    if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+	        encoding === 'utf16le' || encoding === 'utf-16le') {
+	      if (arr.length < 2 || val.length < 2) {
+	        return -1
+	      }
+	      indexSize = 2
+	      arrLength /= 2
+	      valLength /= 2
+	      byteOffset /= 2
+	    }
+	  }
+
+	  function read (buf, i) {
+	    if (indexSize === 1) {
+	      return buf[i]
+	    } else {
+	      return buf.readUInt16BE(i * indexSize)
+	    }
+	  }
+
+	  var i
+	  if (dir) {
+	    var foundIndex = -1
+	    for (i = byteOffset; i < arrLength; i++) {
+	      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+	        if (foundIndex === -1) foundIndex = i
+	        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+	      } else {
+	        if (foundIndex !== -1) i -= i - foundIndex
+	        foundIndex = -1
+	      }
+	    }
+	  } else {
+	    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+	    for (i = byteOffset; i >= 0; i--) {
+	      var found = true
+	      for (var j = 0; j < valLength; j++) {
+	        if (read(arr, i + j) !== read(val, j)) {
+	          found = false
+	          break
+	        }
+	      }
+	      if (found) return i
+	    }
+	  }
+
+	  return -1
 	}
 
-	// `set` is deprecated
-	Buffer.prototype.set = function set (v, offset) {
-	  console.log('.set() is deprecated. Access using array indexes instead.')
-	  return this.writeUInt8(v, offset)
+	Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+	  return this.indexOf(val, byteOffset, encoding) !== -1
+	}
+
+	Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+	  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+	}
+
+	Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+	  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
 	}
 
 	function hexWrite (buf, string, offset, length) {
@@ -7792,14 +11556,14 @@
 
 	  // must be an even number of digits
 	  var strLen = string.length
-	  if (strLen % 2 !== 0) throw new Error('Invalid hex string')
+	  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
 
 	  if (length > strLen / 2) {
 	    length = strLen / 2
 	  }
-	  for (var i = 0; i < length; i++) {
+	  for (var i = 0; i < length; ++i) {
 	    var parsed = parseInt(string.substr(i * 2, 2), 16)
-	    if (isNaN(parsed)) throw new Error('Invalid hex string')
+	    if (isNaN(parsed)) return i
 	    buf[offset + i] = parsed
 	  }
 	  return i
@@ -7813,7 +11577,7 @@
 	  return blitBuffer(asciiToBytes(string), buf, offset, length)
 	}
 
-	function binaryWrite (buf, string, offset, length) {
+	function latin1Write (buf, string, offset, length) {
 	  return asciiWrite(buf, string, offset, length)
 	}
 
@@ -7848,17 +11612,16 @@
 	    }
 	  // legacy write(string, encoding, offset, length) - remove in v0.13
 	  } else {
-	    var swap = encoding
-	    encoding = offset
-	    offset = length | 0
-	    length = swap
+	    throw new Error(
+	      'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+	    )
 	  }
 
 	  var remaining = this.length - offset
 	  if (length === undefined || length > remaining) length = remaining
 
 	  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
-	    throw new RangeError('attempt to write outside buffer bounds')
+	    throw new RangeError('Attempt to write outside buffer bounds')
 	  }
 
 	  if (!encoding) encoding = 'utf8'
@@ -7876,8 +11639,9 @@
 	      case 'ascii':
 	        return asciiWrite(this, string, offset, length)
 
+	      case 'latin1':
 	      case 'binary':
-	        return binaryWrite(this, string, offset, length)
+	        return latin1Write(this, string, offset, length)
 
 	      case 'base64':
 	        // Warning: maxLength not taken into account in base64Write
@@ -8012,17 +11776,17 @@
 	  var ret = ''
 	  end = Math.min(buf.length, end)
 
-	  for (var i = start; i < end; i++) {
+	  for (var i = start; i < end; ++i) {
 	    ret += String.fromCharCode(buf[i] & 0x7F)
 	  }
 	  return ret
 	}
 
-	function binarySlice (buf, start, end) {
+	function latin1Slice (buf, start, end) {
 	  var ret = ''
 	  end = Math.min(buf.length, end)
 
-	  for (var i = start; i < end; i++) {
+	  for (var i = start; i < end; ++i) {
 	    ret += String.fromCharCode(buf[i])
 	  }
 	  return ret
@@ -8035,7 +11799,7 @@
 	  if (!end || end < 0 || end > len) end = len
 
 	  var out = ''
-	  for (var i = start; i < end; i++) {
+	  for (var i = start; i < end; ++i) {
 	    out += toHex(buf[i])
 	  }
 	  return out
@@ -8073,17 +11837,16 @@
 
 	  var newBuf
 	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    newBuf = Buffer._augment(this.subarray(start, end))
+	    newBuf = this.subarray(start, end)
+	    newBuf.__proto__ = Buffer.prototype
 	  } else {
 	    var sliceLen = end - start
 	    newBuf = new Buffer(sliceLen, undefined)
-	    for (var i = 0; i < sliceLen; i++) {
+	    for (var i = 0; i < sliceLen; ++i) {
 	      newBuf[i] = this[i + start]
 	    }
 	  }
 
-	  if (newBuf.length) newBuf.parent = this.parent || this
-
 	  return newBuf
 	}
 
@@ -8252,16 +12015,19 @@
 	}
 
 	function checkInt (buf, value, offset, ext, max, min) {
-	  if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
-	  if (value > max || value < min) throw new RangeError('value is out of bounds')
-	  if (offset + ext > buf.length) throw new RangeError('index out of range')
+	  if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+	  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+	  if (offset + ext > buf.length) throw new RangeError('Index out of range')
 	}
 
 	Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
 	  value = +value
 	  offset = offset | 0
 	  byteLength = byteLength | 0
-	  if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+	  if (!noAssert) {
+	    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+	    checkInt(this, value, offset, byteLength, maxBytes, 0)
+	  }
 
 	  var mul = 1
 	  var i = 0
@@ -8277,7 +12043,10 @@
 	  value = +value
 	  offset = offset | 0
 	  byteLength = byteLength | 0
-	  if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+	  if (!noAssert) {
+	    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+	    checkInt(this, value, offset, byteLength, maxBytes, 0)
+	  }
 
 	  var i = byteLength - 1
 	  var mul = 1
@@ -8300,7 +12069,7 @@
 
 	function objectWriteUInt16 (buf, value, offset, littleEndian) {
 	  if (value < 0) value = 0xffff + value + 1
-	  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
+	  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
 	    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
 	      (littleEndian ? i : 1 - i) * 8
 	  }
@@ -8334,7 +12103,7 @@
 
 	function objectWriteUInt32 (buf, value, offset, littleEndian) {
 	  if (value < 0) value = 0xffffffff + value + 1
-	  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
+	  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
 	    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
 	  }
 	}
@@ -8380,9 +12149,12 @@
 
 	  var i = 0
 	  var mul = 1
-	  var sub = value < 0 ? 1 : 0
+	  var sub = 0
 	  this[offset] = value & 0xFF
 	  while (++i < byteLength && (mul *= 0x100)) {
+	    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+	      sub = 1
+	    }
 	    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
 	  }
 
@@ -8400,9 +12172,12 @@
 
 	  var i = byteLength - 1
 	  var mul = 1
-	  var sub = value < 0 ? 1 : 0
+	  var sub = 0
 	  this[offset + i] = value & 0xFF
 	  while (--i >= 0 && (mul *= 0x100)) {
+	    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+	      sub = 1
+	    }
 	    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
 	  }
 
@@ -8477,9 +12252,8 @@
 	}
 
 	function checkIEEE754 (buf, value, offset, ext, max, min) {
-	  if (value > max || value < min) throw new RangeError('value is out of bounds')
-	  if (offset + ext > buf.length) throw new RangeError('index out of range')
-	  if (offset < 0) throw new RangeError('index out of range')
+	  if (offset + ext > buf.length) throw new RangeError('Index out of range')
+	  if (offset < 0) throw new RangeError('Index out of range')
 	}
 
 	function writeFloat (buf, value, offset, littleEndian, noAssert) {
@@ -8544,143 +12318,91 @@
 
 	  if (this === target && start < targetStart && targetStart < end) {
 	    // descending copy from end
-	    for (i = len - 1; i >= 0; i--) {
+	    for (i = len - 1; i >= 0; --i) {
 	      target[i + targetStart] = this[i + start]
 	    }
 	  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
 	    // ascending copy from start
-	    for (i = 0; i < len; i++) {
+	    for (i = 0; i < len; ++i) {
 	      target[i + targetStart] = this[i + start]
 	    }
 	  } else {
-	    target._set(this.subarray(start, start + len), targetStart)
+	    Uint8Array.prototype.set.call(
+	      target,
+	      this.subarray(start, start + len),
+	      targetStart
+	    )
 	  }
 
 	  return len
 	}
 
-	// fill(value, start=0, end=buffer.length)
-	Buffer.prototype.fill = function fill (value, start, end) {
-	  if (!value) value = 0
-	  if (!start) start = 0
-	  if (!end) end = this.length
+	// Usage:
+	//    buffer.fill(number[, offset[, end]])
+	//    buffer.fill(buffer[, offset[, end]])
+	//    buffer.fill(string[, offset[, end]][, encoding])
+	Buffer.prototype.fill = function fill (val, start, end, encoding) {
+	  // Handle string cases:
+	  if (typeof val === 'string') {
+	    if (typeof start === 'string') {
+	      encoding = start
+	      start = 0
+	      end = this.length
+	    } else if (typeof end === 'string') {
+	      encoding = end
+	      end = this.length
+	    }
+	    if (val.length === 1) {
+	      var code = val.charCodeAt(0)
+	      if (code < 256) {
+	        val = code
+	      }
+	    }
+	    if (encoding !== undefined && typeof encoding !== 'string') {
+	      throw new TypeError('encoding must be a string')
+	    }
+	    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+	      throw new TypeError('Unknown encoding: ' + encoding)
+	    }
+	  } else if (typeof val === 'number') {
+	    val = val & 255
+	  }
 
-	  if (end < start) throw new RangeError('end < start')
+	  // Invalid ranges are not set to a default, so can range check early.
+	  if (start < 0 || this.length < start || this.length < end) {
+	    throw new RangeError('Out of range index')
+	  }
 
-	  // Fill 0 bytes; we're done
-	  if (end === start) return
-	  if (this.length === 0) return
+	  if (end <= start) {
+	    return this
+	  }
 
-	  if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
-	  if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
+	  start = start >>> 0
+	  end = end === undefined ? this.length : end >>> 0
+
+	  if (!val) val = 0
 
 	  var i
-	  if (typeof value === 'number') {
-	    for (i = start; i < end; i++) {
-	      this[i] = value
+	  if (typeof val === 'number') {
+	    for (i = start; i < end; ++i) {
+	      this[i] = val
 	    }
 	  } else {
-	    var bytes = utf8ToBytes(value.toString())
+	    var bytes = Buffer.isBuffer(val)
+	      ? val
+	      : utf8ToBytes(new Buffer(val, encoding).toString())
 	    var len = bytes.length
-	    for (i = start; i < end; i++) {
-	      this[i] = bytes[i % len]
+	    for (i = 0; i < end - start; ++i) {
+	      this[i + start] = bytes[i % len]
 	    }
 	  }
 
 	  return this
 	}
 
-	/**
-	 * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
-	 * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
-	 */
-	Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
-	  if (typeof Uint8Array !== 'undefined') {
-	    if (Buffer.TYPED_ARRAY_SUPPORT) {
-	      return (new Buffer(this)).buffer
-	    } else {
-	      var buf = new Uint8Array(this.length)
-	      for (var i = 0, len = buf.length; i < len; i += 1) {
-	        buf[i] = this[i]
-	      }
-	      return buf.buffer
-	    }
-	  } else {
-	    throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
-	  }
-	}
-
 	// HELPER FUNCTIONS
 	// ================
 
-	var BP = Buffer.prototype
-
-	/**
-	 * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
-	 */
-	Buffer._augment = function _augment (arr) {
-	  arr.constructor = Buffer
-	  arr._isBuffer = true
-
-	  // save reference to original Uint8Array set method before overwriting
-	  arr._set = arr.set
-
-	  // deprecated
-	  arr.get = BP.get
-	  arr.set = BP.set
-
-	  arr.write = BP.write
-	  arr.toString = BP.toString
-	  arr.toLocaleString = BP.toString
-	  arr.toJSON = BP.toJSON
-	  arr.equals = BP.equals
-	  arr.compare = BP.compare
-	  arr.indexOf = BP.indexOf
-	  arr.copy = BP.copy
-	  arr.slice = BP.slice
-	  arr.readUIntLE = BP.readUIntLE
-	  arr.readUIntBE = BP.readUIntBE
-	  arr.readUInt8 = BP.readUInt8
-	  arr.readUInt16LE = BP.readUInt16LE
-	  arr.readUInt16BE = BP.readUInt16BE
-	  arr.readUInt32LE = BP.readUInt32LE
-	  arr.readUInt32BE = BP.readUInt32BE
-	  arr.readIntLE = BP.readIntLE
-	  arr.readIntBE = BP.readIntBE
-	  arr.readInt8 = BP.readInt8
-	  arr.readInt16LE = BP.readInt16LE
-	  arr.readInt16BE = BP.readInt16BE
-	  arr.readInt32LE = BP.readInt32LE
-	  arr.readInt32BE = BP.readInt32BE
-	  arr.readFloatLE = BP.readFloatLE
-	  arr.readFloatBE = BP.readFloatBE
-	  arr.readDoubleLE = BP.readDoubleLE
-	  arr.readDoubleBE = BP.readDoubleBE
-	  arr.writeUInt8 = BP.writeUInt8
-	  arr.writeUIntLE = BP.writeUIntLE
-	  arr.writeUIntBE = BP.writeUIntBE
-	  arr.writeUInt16LE = BP.writeUInt16LE
-	  arr.writeUInt16BE = BP.writeUInt16BE
-	  arr.writeUInt32LE = BP.writeUInt32LE
-	  arr.writeUInt32BE = BP.writeUInt32BE
-	  arr.writeIntLE = BP.writeIntLE
-	  arr.writeIntBE = BP.writeIntBE
-	  arr.writeInt8 = BP.writeInt8
-	  arr.writeInt16LE = BP.writeInt16LE
-	  arr.writeInt16BE = BP.writeInt16BE
-	  arr.writeInt32LE = BP.writeInt32LE
-	  arr.writeInt32BE = BP.writeInt32BE
-	  arr.writeFloatLE = BP.writeFloatLE
-	  arr.writeFloatBE = BP.writeFloatBE
-	  arr.writeDoubleLE = BP.writeDoubleLE
-	  arr.writeDoubleBE = BP.writeDoubleBE
-	  arr.fill = BP.fill
-	  arr.inspect = BP.inspect
-	  arr.toArrayBuffer = BP.toArrayBuffer
-
-	  return arr
-	}
-
 	var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
 
 	function base64clean (str) {
@@ -8712,7 +12434,7 @@
 	  var leadSurrogate = null
 	  var bytes = []
 
-	  for (var i = 0; i < length; i++) {
+	  for (var i = 0; i < length; ++i) {
 	    codePoint = string.charCodeAt(i)
 
 	    // is surrogate component
@@ -8787,7 +12509,7 @@
 
 	function asciiToBytes (str) {
 	  var byteArray = []
-	  for (var i = 0; i < str.length; i++) {
+	  for (var i = 0; i < str.length; ++i) {
 	    // Node's code seems to be doing this and not & 0x7F..
 	    byteArray.push(str.charCodeAt(i) & 0xFF)
 	  }
@@ -8797,7 +12519,7 @@
 	function utf16leToBytes (str, units) {
 	  var c, hi, lo
 	  var byteArray = []
-	  for (var i = 0; i < str.length; i++) {
+	  for (var i = 0; i < str.length; ++i) {
 	    if ((units -= 2) < 0) break
 
 	    c = str.charCodeAt(i)
@@ -8815,147 +12537,136 @@
 	}
 
 	function blitBuffer (src, dst, offset, length) {
-	  for (var i = 0; i < length; i++) {
+	  for (var i = 0; i < length; ++i) {
 	    if ((i + offset >= dst.length) || (i >= src.length)) break
 	    dst[i + offset] = src[i]
 	  }
 	  return i
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31).Buffer, (function() { return this; }())))
+	function isnan (val) {
+	  return val !== val // eslint-disable-line no-self-compare
+	}
+
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55).Buffer, (function() { return this; }())))
 
 /***/ },
-/* 32 */
-/***/ function(module, exports, __webpack_require__) {
+/* 56 */
+/***/ function(module, exports) {
 
-	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+	'use strict'
 
-	;(function (exports) {
-		'use strict';
+	exports.toByteArray = toByteArray
+	exports.fromByteArray = fromByteArray
 
-	  var Arr = (typeof Uint8Array !== 'undefined')
-	    ? Uint8Array
-	    : Array
+	var lookup = []
+	var revLookup = []
+	var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
 
-		var PLUS   = '+'.charCodeAt(0)
-		var SLASH  = '/'.charCodeAt(0)
-		var NUMBER = '0'.charCodeAt(0)
-		var LOWER  = 'a'.charCodeAt(0)
-		var UPPER  = 'A'.charCodeAt(0)
-		var PLUS_URL_SAFE = '-'.charCodeAt(0)
-		var SLASH_URL_SAFE = '_'.charCodeAt(0)
+	function init () {
+	  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+	  for (var i = 0, len = code.length; i < len; ++i) {
+	    lookup[i] = code[i]
+	    revLookup[code.charCodeAt(i)] = i
+	  }
 
-		function decode (elt) {
-			var code = elt.charCodeAt(0)
-			if (code === PLUS ||
-			    code === PLUS_URL_SAFE)
-				return 62 // '+'
-			if (code === SLASH ||
-			    code === SLASH_URL_SAFE)
-				return 63 // '/'
-			if (code < NUMBER)
-				return -1 //no match
-			if (code < NUMBER + 10)
-				return code - NUMBER + 26 + 26
-			if (code < UPPER + 26)
-				return code - UPPER
-			if (code < LOWER + 26)
-				return code - LOWER + 26
-		}
+	  revLookup['-'.charCodeAt(0)] = 62
+	  revLookup['_'.charCodeAt(0)] = 63
+	}
 
-		function b64ToByteArray (b64) {
-			var i, j, l, tmp, placeHolders, arr
+	init()
 
-			if (b64.length % 4 > 0) {
-				throw new Error('Invalid string. Length must be a multiple of 4')
-			}
+	function toByteArray (b64) {
+	  var i, j, l, tmp, placeHolders, arr
+	  var len = b64.length
 
-			// the number of equal signs (place holders)
-			// if there are two placeholders, than the two characters before it
-			// represent one byte
-			// if there is only one, then the three characters before it represent 2 bytes
-			// this is just a cheap hack to not do indexOf twice
-			var len = b64.length
-			placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
+	  if (len % 4 > 0) {
+	    throw new Error('Invalid string. Length must be a multiple of 4')
+	  }
 
-			// base64 is 4/3 + up to two characters of the original data
-			arr = new Arr(b64.length * 3 / 4 - placeHolders)
+	  // the number of equal signs (place holders)
+	  // if there are two placeholders, than the two characters before it
+	  // represent one byte
+	  // if there is only one, then the three characters before it represent 2 bytes
+	  // this is just a cheap hack to not do indexOf twice
+	  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
 
-			// if there are placeholders, only get up to the last complete 4 chars
-			l = placeHolders > 0 ? b64.length - 4 : b64.length
+	  // base64 is 4/3 + up to two characters of the original data
+	  arr = new Arr(len * 3 / 4 - placeHolders)
 
-			var L = 0
+	  // if there are placeholders, only get up to the last complete 4 chars
+	  l = placeHolders > 0 ? len - 4 : len
 
-			function push (v) {
-				arr[L++] = v
-			}
+	  var L = 0
 
-			for (i = 0, j = 0; i < l; i += 4, j += 3) {
-				tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
-				push((tmp & 0xFF0000) >> 16)
-				push((tmp & 0xFF00) >> 8)
-				push(tmp & 0xFF)
-			}
+	  for (i = 0, j = 0; i < l; i += 4, j += 3) {
+	    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
+	    arr[L++] = (tmp >> 16) & 0xFF
+	    arr[L++] = (tmp >> 8) & 0xFF
+	    arr[L++] = tmp & 0xFF
+	  }
 
-			if (placeHolders === 2) {
-				tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
-				push(tmp & 0xFF)
-			} else if (placeHolders === 1) {
-				tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
-				push((tmp >> 8) & 0xFF)
-				push(tmp & 0xFF)
-			}
+	  if (placeHolders === 2) {
+	    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
+	    arr[L++] = tmp & 0xFF
+	  } else if (placeHolders === 1) {
+	    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
+	    arr[L++] = (tmp >> 8) & 0xFF
+	    arr[L++] = tmp & 0xFF
+	  }
 
-			return arr
-		}
+	  return arr
+	}
 
-		function uint8ToBase64 (uint8) {
-			var i,
-				extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
-				output = "",
-				temp, length
+	function tripletToBase64 (num) {
+	  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
+	}
 
-			function encode (num) {
-				return lookup.charAt(num)
-			}
+	function encodeChunk (uint8, start, end) {
+	  var tmp
+	  var output = []
+	  for (var i = start; i < end; i += 3) {
+	    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+	    output.push(tripletToBase64(tmp))
+	  }
+	  return output.join('')
+	}
 
-			function tripletToBase64 (num) {
-				return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
-			}
+	function fromByteArray (uint8) {
+	  var tmp
+	  var len = uint8.length
+	  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+	  var output = ''
+	  var parts = []
+	  var maxChunkLength = 16383 // must be multiple of 3
 
-			// go through the array every three bytes, we'll deal with trailing stuff later
-			for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
-				temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
-				output += tripletToBase64(temp)
-			}
+	  // go through the array every three bytes, we'll deal with trailing stuff later
+	  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+	    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
+	  }
 
-			// pad the end with zeros, but make sure to not forget the extra bytes
-			switch (extraBytes) {
-				case 1:
-					temp = uint8[uint8.length - 1]
-					output += encode(temp >> 2)
-					output += encode((temp << 4) & 0x3F)
-					output += '=='
-					break
-				case 2:
-					temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
-					output += encode(temp >> 10)
-					output += encode((temp >> 4) & 0x3F)
-					output += encode((temp << 2) & 0x3F)
-					output += '='
-					break
-			}
+	  // pad the end with zeros, but make sure to not forget the extra bytes
+	  if (extraBytes === 1) {
+	    tmp = uint8[len - 1]
+	    output += lookup[tmp >> 2]
+	    output += lookup[(tmp << 4) & 0x3F]
+	    output += '=='
+	  } else if (extraBytes === 2) {
+	    tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
+	    output += lookup[tmp >> 10]
+	    output += lookup[(tmp >> 4) & 0x3F]
+	    output += lookup[(tmp << 2) & 0x3F]
+	    output += '='
+	  }
 
-			return output
-		}
+	  parts.push(output)
 
-		exports.toByteArray = b64ToByteArray
-		exports.fromByteArray = uint8ToBase64
-	}( false ? (this.base64js = {}) : exports))
+	  return parts.join('')
+	}
 
 
 /***/ },
-/* 33 */
+/* 57 */
 /***/ function(module, exports) {
 
 	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -9045,7 +12756,7 @@
 
 
 /***/ },
-/* 34 */
+/* 58 */
 /***/ function(module, exports) {
 
 	var toString = {}.toString;
@@ -9056,7 +12767,7 @@
 
 
 /***/ },
-/* 35 */
+/* 59 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9167,16 +12878,16 @@
 	  return Object.prototype.toString.call(o);
 	}
 
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31).Buffer))
+	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55).Buffer))
 
 /***/ },
-/* 36 */
+/* 60 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 37 */
+/* 61 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9217,12 +12928,12 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(35);
+	var util = __webpack_require__(59);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Readable = __webpack_require__(29);
-	var Writable = __webpack_require__(38);
+	var Readable = __webpack_require__(53);
+	var Writable = __webpack_require__(62);
 
 	util.inherits(Duplex, Readable);
 
@@ -9272,7 +12983,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 38 */
+/* 62 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
@@ -9303,18 +13014,18 @@
 	module.exports = Writable;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(31).Buffer;
+	var Buffer = __webpack_require__(55).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(35);
+	var util = __webpack_require__(59);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(27);
+	var Stream = __webpack_require__(51);
 
 	util.inherits(Writable, Stream);
 
@@ -9325,7 +13036,7 @@
 	}
 
 	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(37);
+	  var Duplex = __webpack_require__(61);
 
 	  options = options || {};
 
@@ -9413,7 +13124,7 @@
 	}
 
 	function Writable(options) {
-	  var Duplex = __webpack_require__(37);
+	  var Duplex = __webpack_require__(61);
 
 	  // Writable ctor is applied to Duplexes, though they're not
 	  // instanceof Writable, they're instanceof Readable.
@@ -9756,7 +13467,7 @@
 	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
 
 /***/ },
-/* 39 */
+/* 63 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -9780,7 +13491,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__(31).Buffer;
+	var Buffer = __webpack_require__(55).Buffer;
 
 	var isBufferEncoding = Buffer.isEncoding
 	  || function(encoding) {
@@ -9983,7 +13694,7 @@
 
 
 /***/ },
-/* 40 */
+/* 64 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10052,10 +13763,10 @@
 
 	module.exports = Transform;
 
-	var Duplex = __webpack_require__(37);
+	var Duplex = __webpack_require__(61);
 
 	/*<replacement>*/
-	var util = __webpack_require__(35);
+	var util = __webpack_require__(59);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10198,7 +13909,7 @@
 
 
 /***/ },
-/* 41 */
+/* 65 */
 /***/ function(module, exports, __webpack_require__) {
 
 	// Copyright Joyent, Inc. and other Node contributors.
@@ -10228,10 +13939,10 @@
 
 	module.exports = PassThrough;
 
-	var Transform = __webpack_require__(40);
+	var Transform = __webpack_require__(64);
 
 	/*<replacement>*/
-	var util = __webpack_require__(35);
+	var util = __webpack_require__(59);
 	util.inherits = __webpack_require__(5);
 	/*</replacement>*/
 
@@ -10250,41 +13961,41 @@
 
 
 /***/ },
-/* 42 */
+/* 66 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(38)
+	module.exports = __webpack_require__(62)
 
 
 /***/ },
-/* 43 */
+/* 67 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(37)
+	module.exports = __webpack_require__(61)
 
 
 /***/ },
-/* 44 */
+/* 68 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(40)
+	module.exports = __webpack_require__(64)
 
 
 /***/ },
-/* 45 */
+/* 69 */
 /***/ function(module, exports, __webpack_require__) {
 
-	module.exports = __webpack_require__(41)
+	module.exports = __webpack_require__(65)
 
 
 /***/ },
-/* 46 */
+/* 70 */
 /***/ function(module, exports) {
 
 	/* (ignored) */
 
 /***/ },
-/* 47 */
+/* 71 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = ProxyHandler;
@@ -10293,7 +14004,7 @@
 		this._cbs = cbs || {};
 	}
 
-	var EVENTS = __webpack_require__(12).EVENTS;
+	var EVENTS = __webpack_require__(36).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -10316,18 +14027,18 @@
 	});
 
 /***/ },
-/* 48 */
+/* 72 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var DomUtils = module.exports;
 
 	[
-		__webpack_require__(49),
-		__webpack_require__(55),
-		__webpack_require__(56),
-		__webpack_require__(57),
-		__webpack_require__(58),
-		__webpack_require__(59)
+		__webpack_require__(73),
+		__webpack_require__(79),
+		__webpack_require__(80),
+		__webpack_require__(81),
+		__webpack_require__(82),
+		__webpack_require__(83)
 	].forEach(function(ext){
 		Object.keys(ext).forEach(function(key){
 			DomUtils[key] = ext[key].bind(DomUtils);
@@ -10336,11 +14047,11 @@
 
 
 /***/ },
-/* 49 */
+/* 73 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(21),
-	    getOuterHTML = __webpack_require__(50),
+	var ElementType = __webpack_require__(45),
+	    getOuterHTML = __webpack_require__(74),
 	    isTag = ElementType.isTag;
 
 	module.exports = {
@@ -10364,14 +14075,14 @@
 
 
 /***/ },
-/* 50 */
+/* 74 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/*
 	  Module dependencies
 	*/
-	var ElementType = __webpack_require__(51);
-	var entities = __webpack_require__(52);
+	var ElementType = __webpack_require__(75);
+	var entities = __webpack_require__(76);
 
 	/*
 	  Boolean Attributes
@@ -10548,7 +14259,7 @@
 
 
 /***/ },
-/* 51 */
+/* 75 */
 /***/ function(module, exports) {
 
 	//Types of elements found in the DOM
@@ -10567,11 +14278,11 @@
 	};
 
 /***/ },
-/* 52 */
+/* 76 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var encode = __webpack_require__(53),
-	    decode = __webpack_require__(54);
+	var encode = __webpack_require__(77),
+	    decode = __webpack_require__(78);
 
 	exports.decode = function(data, level){
 		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
@@ -10606,15 +14317,15 @@
 
 
 /***/ },
-/* 53 */
+/* 77 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var inverseXML = getInverseObj(__webpack_require__(19)),
+	var inverseXML = getInverseObj(__webpack_require__(43)),
 	    xmlReplacer = getInverseReplacer(inverseXML);
 
 	exports.XML = getInverse(inverseXML, xmlReplacer);
 
-	var inverseHTML = getInverseObj(__webpack_require__(17)),
+	var inverseHTML = getInverseObj(__webpack_require__(41)),
 	    htmlReplacer = getInverseReplacer(inverseHTML);
 
 	exports.HTML = getInverse(inverseHTML, htmlReplacer);
@@ -10685,13 +14396,13 @@
 
 
 /***/ },
-/* 54 */
+/* 78 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var entityMap = __webpack_require__(17),
-	    legacyMap = __webpack_require__(18),
-	    xmlMap    = __webpack_require__(19),
-	    decodeCodePoint = __webpack_require__(15);
+	var entityMap = __webpack_require__(41),
+	    legacyMap = __webpack_require__(42),
+	    xmlMap    = __webpack_require__(43),
+	    decodeCodePoint = __webpack_require__(39);
 
 	var decodeXMLStrict  = getStrictDecoder(xmlMap),
 	    decodeHTMLStrict = getStrictDecoder(entityMap);
@@ -10762,7 +14473,7 @@
 	};
 
 /***/ },
-/* 55 */
+/* 79 */
 /***/ function(module, exports) {
 
 	var getChildren = exports.getChildren = function(elem){
@@ -10792,7 +14503,7 @@
 
 
 /***/ },
-/* 56 */
+/* 80 */
 /***/ function(module, exports) {
 
 	exports.removeElement = function(elem){
@@ -10875,10 +14586,10 @@
 
 
 /***/ },
-/* 57 */
+/* 81 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var isTag = __webpack_require__(21).isTag;
+	var isTag = __webpack_require__(45).isTag;
 
 	module.exports = {
 		filter: filter,
@@ -10975,10 +14686,10 @@
 
 
 /***/ },
-/* 58 */
+/* 82 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var ElementType = __webpack_require__(21);
+	var ElementType = __webpack_require__(45);
 	var isTag = exports.isTag = ElementType.isTag;
 
 	exports.testElement = function(options, element){
@@ -11068,7 +14779,7 @@
 
 
 /***/ },
-/* 59 */
+/* 83 */
 /***/ function(module, exports) {
 
 	// removeSubsets
@@ -11215,7 +14926,7 @@
 
 
 /***/ },
-/* 60 */
+/* 84 */
 /***/ function(module, exports, __webpack_require__) {
 
 	module.exports = CollectingHandler;
@@ -11225,7 +14936,7 @@
 		this.events = [];
 	}
 
-	var EVENTS = __webpack_require__(12).EVENTS;
+	var EVENTS = __webpack_require__(36).EVENTS;
 	Object.keys(EVENTS).forEach(function(name){
 		if(EVENTS[name] === 0){
 			name = "on" + name;
@@ -11276,2391 +14987,1824 @@
 
 
 /***/ },
-/* 61 */
+/* 85 */
 /***/ function(module, exports, __webpack_require__) {
 
-	var EventEmitter = __webpack_require__(1);
-	var Sequencer = __webpack_require__(62);
-	var Thread = __webpack_require__(64);
-	var util = __webpack_require__(2);
-
-	// Virtual I/O devices.
-	var Clock = __webpack_require__(66);
-	var Mouse = __webpack_require__(67);
-
-	var defaultBlockPackages = {
-	    'scratch3_control': __webpack_require__(68),
-	    'scratch3_event': __webpack_require__(79),
-	    'scratch3_looks': __webpack_require__(80),
-	    'scratch3_motion': __webpack_require__(81),
-	    'scratch3_operators': __webpack_require__(82),
-	    'scratch3_sensing': __webpack_require__(84)
-	};
+	var Clone = __webpack_require__(86);
+	var Blocks = __webpack_require__(34);
 
 	/**
-	 * Manages targets, scripts, and the sequencer.
-	 * @param {!Array.<Target>} targets List of targets for this runtime.
-	 */
-	function Runtime (targets) {
-	    // Bind event emitter
-	    EventEmitter.call(this);
-
-	    // State for the runtime
-
-	    /**
-	     * Target management and storage.
-	     */
-	    this.targets = targets;
-
-	    /**
-	     * A list of threads that are currently running in the VM.
-	     * Threads are added when execution starts and pruned when execution ends.
-	     * @type {Array.<Thread>}
-	     */
-	    this.threads = [];
-
-	    /** @type {!Sequencer} */
-	    this.sequencer = new Sequencer(this);
-
-	    /**
-	     * Map to look up a block primitive's implementation function by its opcode.
-	     * This is a two-step lookup: package name first, then primitive name.
-	     * @type {Object.<string, Function>}
-	     */
-	    this._primitives = {};
-	    this._registerBlockPackages();
-
-	    this.ioDevices = {
-	        'clock': new Clock(),
-	        'mouse': new Mouse()
-	    };
-	}
-
-	/**
-	 * Event name for glowing a stack
-	 * @const {string}
-	 */
-	Runtime.STACK_GLOW_ON = 'STACK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a stack
-	 * @const {string}
-	 */
-	Runtime.STACK_GLOW_OFF = 'STACK_GLOW_OFF';
-
-	/**
-	 * Event name for glowing a block
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a block
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
-
-	/**
-	 * Event name for visual value report.
-	 * @const {string}
-	 */
-	Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
-
-	/**
-	 * Inherit from EventEmitter
-	 */
-	util.inherits(Runtime, EventEmitter);
-
-	/**
-	 * How rapidly we try to step threads, in ms.
-	 */
-	Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
-
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Register default block packages with this runtime.
-	 * @todo Prefix opcodes with package name.
-	 * @private
-	 */
-	Runtime.prototype._registerBlockPackages = function () {
-	    for (var packageName in defaultBlockPackages) {
-	        if (defaultBlockPackages.hasOwnProperty(packageName)) {
-	            // @todo pass a different runtime depending on package privilege?
-	            var packageObject = new (defaultBlockPackages[packageName])(this);
-	            var packageContents = packageObject.getPrimitives();
-	            for (var op in packageContents) {
-	                if (packageContents.hasOwnProperty(op)) {
-	                    this._primitives[op] =
-	                        packageContents[op].bind(packageObject);
-	                }
-	            }
-	        }
-	    }
-	};
-
-	/**
-	 * Retrieve the function associated with the given opcode.
-	 * @param {!string} opcode The opcode to look up.
-	 * @return {Function} The function which implements the opcode.
-	 */
-	Runtime.prototype.getOpcodeFunction = function (opcode) {
-	    return this._primitives[opcode];
-	};
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Create a thread and push it to the list of threads.
-	 * @param {!string} id ID of block that starts the stack
-	 */
-	Runtime.prototype._pushThread = function (id) {
-	    this.emit(Runtime.STACK_GLOW_ON, id);
-	    var thread = new Thread(id);
-	    thread.pushStack(id);
-	    this.threads.push(thread);
-	};
-
-	/**
-	 * Remove a thread from the list of threads.
-	 * @param {?Thread} thread Thread object to remove from actives
-	 */
-	Runtime.prototype._removeThread = function (thread) {
-	    var i = this.threads.indexOf(thread);
-	    if (i > -1) {
-	        this.emit(Runtime.STACK_GLOW_OFF, thread.topBlock);
-	        this.threads.splice(i, 1);
-	    }
-	};
-
-	/**
-	 * Toggle a script.
-	 * @param {!string} topBlockId ID of block that starts the script.
-	 */
-	Runtime.prototype.toggleScript = function (topBlockId) {
-	    // Remove any existing thread.
-	    for (var i = 0; i < this.threads.length; i++) {
-	        if (this.threads[i].topBlock == topBlockId) {
-	            this._removeThread(this.threads[i]);
-	            return;
-	        }
-	    }
-	    // Otherwise add it.
-	    this._pushThread(topBlockId);
-	};
-
-	/**
-	 * Green flag, which stops currently running threads
-	 * and adds all top-level scripts that start with the green flag
-	 */
-	Runtime.prototype.greenFlag = function () {
-	    // Remove all existing threads
-	    for (var i = 0; i < this.threads.length; i++) {
-	        this._removeThread(this.threads[i]);
-	    }
-	    // Add all top scripts with green flag
-	    for (var t = 0; t < this.targets.length; t++) {
-	        var target = this.targets[t];
-	        var scripts = target.blocks.getScripts();
-	        for (var j = 0; j < scripts.length; j++) {
-	            var topBlock = scripts[j];
-	            if (target.blocks.getBlock(topBlock).opcode ===
-	                'event_whenflagclicked') {
-	                this._pushThread(scripts[j]);
-	            }
-	        }
-	    }
-	};
-
-	/**
-	 * Stop "everything"
-	 */
-	Runtime.prototype.stopAll = function () {
-	    var threadsCopy = this.threads.slice();
-	    while (threadsCopy.length > 0) {
-	        var poppedThread = threadsCopy.pop();
-	        // Unglow any blocks on this thread's stack.
-	        for (var i = 0; i < poppedThread.stack.length; i++) {
-	            this.glowBlock(poppedThread.stack[i], false);
-	        }
-	        // Actually remove the thread.
-	        this._removeThread(poppedThread);
-	    }
-	};
-
-	/**
-	 * Repeatedly run `sequencer.stepThreads` and filter out
-	 * inactive threads after each iteration.
-	 */
-	Runtime.prototype._step = function () {
-	    var inactiveThreads = this.sequencer.stepThreads(this.threads);
-	    for (var i = 0; i < inactiveThreads.length; i++) {
-	        this._removeThread(inactiveThreads[i]);
-	    }
-	};
-
-	/**
-	 * Emit feedback for block glowing (used in the sequencer).
-	 * @param {?string} blockId ID for the block to update glow
-	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
-	 */
-	Runtime.prototype.glowBlock = function (blockId, isGlowing) {
-	    if (isGlowing) {
-	        this.emit(Runtime.BLOCK_GLOW_ON, blockId);
-	    } else {
-	        this.emit(Runtime.BLOCK_GLOW_OFF, blockId);
-	    }
-	};
-
-	/**
-	 * Emit value for reporter to show in the blocks.
-	 * @param {string} blockId ID for the block.
-	 * @param {string} value Value to show associated with the block.
-	 */
-	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;
-	        }
-	    }
-	};
-
-	/**
-	 * Handle an animation frame from the main thread.
-	 */
-	Runtime.prototype.animationFrame = function () {
-	    if (self.renderer) {
-	        self.renderer.draw();
-	    }
-	};
-
-	/**
-	 * Set up timers to repeatedly step in a browser
-	 */
-	Runtime.prototype.start = function () {
-	    self.setInterval(function() {
-	        this._step();
-	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
-	};
-
-	module.exports = Runtime;
-
-
-/***/ },
-/* 62 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Timer = __webpack_require__(63);
-	var Thread = __webpack_require__(64);
-	var execute = __webpack_require__(65);
-
-	function Sequencer (runtime) {
-	    /**
-	     * A utility timer for timing thread sequencing.
-	     * @type {!Timer}
-	     */
-	    this.timer = new Timer();
-
-	    /**
-	     * Reference to the runtime owning this sequencer.
-	     * @type {!Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * The sequencer does as much work as it can within WORK_TIME milliseconds,
-	 * then yields. This is essentially a rate-limiter for blocks.
-	 * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
-	 * @const {!number}
-	 */
-	Sequencer.WORK_TIME = 10;
-
-	/**
-	 * Step through all threads in `this.threads`, running them in order.
-	 * @param {Array.<Thread>} threads List of which threads to step.
-	 * @return {Array.<Thread>} All threads which have finished in this iteration.
-	 */
-	Sequencer.prototype.stepThreads = function (threads) {
-	    // Start counting toward WORK_TIME
-	    this.timer.start();
-	    // List of threads which have been killed by this step.
-	    var inactiveThreads = [];
-	    // If all of the threads are yielding, we should yield.
-	    var numYieldingThreads = 0;
-	    // Clear all yield statuses that were for the previous frame.
-	    for (var t = 0; t < threads.length; t++) {
-	        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
-	            threads[t].setStatus(Thread.STATUS_RUNNING);
-	        }
-	    }
-
-	    // While there are still threads to run and we are within WORK_TIME,
-	    // continue executing threads.
-	    while (threads.length > 0 &&
-	           threads.length > numYieldingThreads &&
-	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
-	        // New threads at the end of the iteration.
-	        var newThreads = [];
-	        // Reset yielding thread count.
-	        numYieldingThreads = 0;
-	        // Attempt to run each thread one time
-	        for (var i = 0; i < threads.length; i++) {
-	            var activeThread = threads[i];
-	            if (activeThread.status === Thread.STATUS_RUNNING) {
-	                // Normal-mode thread: step.
-	                this.startThread(activeThread);
-	            } else if (activeThread.status === Thread.STATUS_YIELD ||
-	                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
-	                // Yielding thread: do nothing for this step.
-	                numYieldingThreads++;
-	            }
-	            if (activeThread.stack.length === 0 &&
-	                activeThread.status === Thread.STATUS_DONE) {
-	                // Finished with this thread - tell runtime to clean it up.
-	                inactiveThreads.push(activeThread);
-	            } else {
-	                // Keep this thead in the loop.
-	                newThreads.push(activeThread);
-	            }
-	        }
-	        // Effectively filters out threads that have stopped.
-	        threads = newThreads;
-	    }
-	    return inactiveThreads;
-	};
-
-	/**
-	 * Step the requested thread
-	 * @param {!Thread} thread Thread object to step
-	 */
-	Sequencer.prototype.startThread = function (thread) {
-	    var currentBlockId = thread.peekStack();
-	    if (!currentBlockId) {
-	        // A "null block" - empty branch.
-	        // Yield for the frame.
-	        thread.popStack();
-	        thread.setStatus(Thread.STATUS_YIELD_FRAME);
-	        return;
-	    }
-	    // Execute the current block
-	    execute(this, thread);
-	    // If the block executed without yielding and without doing control flow,
-	    // move to done.
-	    if (thread.status === Thread.STATUS_RUNNING &&
-	        thread.peekStack() === currentBlockId) {
-	        this.proceedThread(thread);
-	    }
-	};
-
-	/**
-	 * Step a thread into a block's branch.
-	 * @param {!Thread} thread Thread object to step to branch.
-	 * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
-	 */
-	Sequencer.prototype.stepToBranch = function (thread, branchNum) {
-	    if (!branchNum) {
-	        branchNum = 1;
-	    }
-	    var currentBlockId = thread.peekStack();
-	    var branchId = this.runtime.targetForThread(thread).blocks.getBranch(
-	        currentBlockId,
-	        branchNum
-	    );
-	    if (branchId) {
-	        // Push branch ID to the thread's stack.
-	        thread.pushStack(branchId);
-	    } else {
-	        // Push null, so we come back to the current block.
-	        thread.pushStack(null);
-	    }
-	};
-
-	/**
-	 * Step a thread into an input reporter, and manage its status appropriately.
-	 * @param {!Thread} thread Thread object to step to reporter.
-	 * @param {!string} blockId ID of reporter block.
-	 * @param {!string} inputName Name of input on parent block.
-	 * @return {boolean} True if yielded, false if it finished immediately.
-	 */
-	Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
-	    var currentStackFrame = thread.peekStackFrame();
-	    // Push to the stack to evaluate the reporter block.
-	    thread.pushStack(blockId);
-	    // Save name of input for `Thread.pushReportedValue`.
-	    currentStackFrame.waitingReporter = inputName;
-	    // Actually execute the block.
-	    this.startThread(thread);
-	    // If a reporter yielded, caller must wait for it to unyield.
-	    // The value will be populated once the reporter unyields,
-	    // and passed up to the currentStackFrame on next execution.
-	    return thread.status === Thread.STATUS_YIELD;
-	};
-
-	/**
-	 * Finish stepping a thread and proceed it to the next block.
-	 * @param {!Thread} thread Thread object to proceed.
-	 */
-	Sequencer.prototype.proceedThread = function (thread) {
-	    var currentBlockId = thread.peekStack();
-	    // Mark the status as done and proceed to the next block.
-	    // 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));
-	    if (nextBlockId) {
-	        thread.pushStack(nextBlockId);
-	    }
-	    // If we can't find a next block to run, mark the thread as done.
-	    if (!thread.peekStack()) {
-	        thread.setStatus(Thread.STATUS_DONE);
-	    }
-	};
-
-	module.exports = Sequencer;
-
-
-/***/ },
-/* 63 */
-/***/ function(module, exports) {
-
-	/**
-	 * Constructor
-	 */
-	function Timer () {
-	    this.startTime = 0;
-	}
-
-	Timer.prototype.time = function () {
-	    return Date.now();
-	};
-
-	Timer.prototype.start = function () {
-	    this.startTime = this.time();
-	};
-
-	Timer.prototype.timeElapsed = function () {
-	    return this.time() - this.startTime;
-	};
-
-	module.exports = Timer;
-
-
-/***/ },
-/* 64 */
-/***/ function(module, exports) {
-
-	/**
-	 * A thread is a running stack context and all the metadata needed.
-	 * @param {?string} firstBlock First block to execute in the thread.
+	 * 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.
 	 * @constructor
 	 */
-	function Thread (firstBlock) {
+	function Sprite (blocks) {
+	    if (!blocks) {
+	        // Shared set of blocks for all clones.
+	        blocks = new Blocks();
+	    }
+	    this.blocks = blocks;
 	    /**
-	     * ID of top block of the thread
-	     * @type {!string}
+	     * Human-readable name for this sprite (and all clones).
+	     * @type {string}
 	     */
-	    this.topBlock = firstBlock;
-
+	    this.name = '';
 	    /**
-	     * Stack for the thread. When the sequencer enters a control structure,
-	     * the block is pushed onto the stack so we know where to exit.
-	     * @type {Array.<string>}
+	     * List of costumes for this sprite.
+	     * Each entry is an object, e.g.,
+	     * {
+	     *      skin: "costume.svg",
+	     *      name: "Costume Name",
+	     *      bitmapResolution: 2,
+	     *      rotationCenterX: 0,
+	     *      rotationCenterY: 0
+	     * }
+	     * @type {Array.<!Object>}
 	     */
-	    this.stack = [];
-
+	    this.costumes = [];
 	    /**
-	     * Stack frames for the thread. Store metadata for the executing blocks.
-	     * @type {Array.<Object>}
+	     * List of clones for this sprite, including the original.
+	     * @type {Array.<!Clone>}
 	     */
-	    this.stackFrames = [];
-
-	    /**
-	     * Status of the thread, one of three states (below)
-	     * @type {number}
-	     */
-	    this.status = 0; /* Thread.STATUS_RUNNING */
+	    this.clones = [];
 	}
 
 	/**
-	 * Thread status for initialized or running thread.
-	 * This is the default state for a thread - execution should run normally,
-	 * stepping from block to block.
-	 * @const
+	 * Create a clone of this sprite.
+	 * @returns {!Clone} Newly created clone.
 	 */
-	Thread.STATUS_RUNNING = 0;
+	Sprite.prototype.createClone = function () {
+	    var newClone = new Clone(this);
+	    this.clones.push(newClone);
+	    return newClone;
+	};
+
+	module.exports = Sprite;
+
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+	var util = __webpack_require__(2);
+	var MathUtil = __webpack_require__(16);
+	var Target = __webpack_require__(87);
 
 	/**
-	 * Thread status for a yielded thread.
-	 * Threads are in this state when a primitive has yielded; execution is paused
-	 * until the relevant primitive unyields.
-	 * @const
+	 * Clone (instance) of a sprite.
+	 * @param {!Sprite} sprite Reference to the sprite.
+	 * @constructor
 	 */
-	Thread.STATUS_YIELD = 1;
+	function Clone(sprite) {
+	    Target.call(this, sprite.blocks);
+	    /**
+	     * Reference to the sprite that this is a clone of.
+	     * @type {!Sprite}
+	     */
+	    this.sprite = sprite;
+	    /**
+	     * Reference to the global renderer for this VM, if one exists.
+	     * @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;
+	    }
+	    /**
+	     * ID of the drawable for this clone returned by the renderer, if rendered.
+	     * @type {?Number}
+	     */
+	    this.drawableID = null;
+
+	    this.initDrawable();
+	}
+	util.inherits(Clone, Target);
 
 	/**
-	 * Thread status for a single-frame yield.
-	 * @const
+	 * Create a clone's drawable with the this.renderer.
 	 */
-	Thread.STATUS_YIELD_FRAME = 2;
-
-	/**
-	 * Thread status for a finished/done thread.
-	 * Thread is in this state when there are no more blocks to execute.
-	 * @const
-	 */
-	Thread.STATUS_DONE = 3;
-
-	/**
-	 * Push stack and update stack frames appropriately.
-	 * @param {string} blockId Block ID to push to stack.
-	 */
-	Thread.prototype.pushStack = function (blockId) {
-	    this.stack.push(blockId);
-	    // Push an empty stack frame, if we need one.
-	    // Might not, if we just popped the stack.
-	    if (this.stack.length > this.stackFrames.length) {
-	        this.stackFrames.push({
-	            reported: {}, // Collects reported input values.
-	            waitingReporter: null, // Name of waiting reporter.
-	            executionContext: {} // A context passed to block implementations.
+	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();
 	        });
 	    }
 	};
 
+	// Clone-level properties.
 	/**
-	 * Pop last block on the stack and its stack frame.
-	 * @return {string} Block ID popped from the stack.
+	 * Whether this clone represents the Scratch stage.
+	 * @type {boolean}
 	 */
-	Thread.prototype.popStack = function () {
-	    this.stackFrames.pop();
-	    return this.stack.pop();
+	Clone.prototype.isStage = false;
+
+	/**
+	 * Scratch X coordinate. Currently should range from -240 to 240.
+	 * @type {Number}
+	 */
+	Clone.prototype.x = 0;
+
+	/**
+	 * Scratch Y coordinate. Currently should range from -180 to 180.
+	 * @type {number}
+	 */
+	Clone.prototype.y = 0;
+
+	/**
+	 * Scratch direction. Currently should range from -179 to 180.
+	 * @type {number}
+	 */
+	Clone.prototype.direction = 90;
+
+	/**
+	 * Whether the clone is currently visible.
+	 * @type {boolean}
+	 */
+	Clone.prototype.visible = true;
+
+	/**
+	 * Size of clone as a percent of costume size. Ranges from 5% to 535%.
+	 * @type {number}
+	 */
+	Clone.prototype.size = 100;
+
+	/**
+	 * Currently selected costume index.
+	 * @type {number}
+	 */
+	Clone.prototype.currentCostume = 0;
+
+	/**
+	 * Map of current graphic effect values.
+	 * @type {!Object.<string, number>}
+	 */
+	Clone.prototype.effects = {
+	    'color': 0,
+	    'fisheye': 0,
+	    'whirl': 0,
+	    'pixelate': 0,
+	    'mosaic': 0,
+	    'brightness': 0,
+	    'ghost': 0
 	};
+	// End clone-level properties.
 
 	/**
-	 * Get top stack item.
-	 * @return {?string} Block ID on top of stack.
+	 * Set the X and Y coordinates of a clone.
+	 * @param {!number} x New X coordinate of clone, in Scratch coordinates.
+	 * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
 	 */
-	Thread.prototype.peekStack = function () {
-	    return this.stack[this.stack.length - 1];
-	};
-
-
-	/**
-	 * Get top stack frame.
-	 * @return {?Object} Last stack frame stored on this thread.
-	 */
-	Thread.prototype.peekStackFrame = function () {
-	    return this.stackFrames[this.stackFrames.length - 1];
-	};
-
-	/**
-	 * Get stack frame above the current top.
-	 * @return {?Object} Second to last stack frame stored on this thread.
-	 */
-	Thread.prototype.peekParentStackFrame = function () {
-	    return this.stackFrames[this.stackFrames.length - 2];
-	};
-
-	/**
-	 * Push a reported value to the parent of the current stack frame.
-	 * @param {!Any} value Reported value to push.
-	 */
-	Thread.prototype.pushReportedValue = function (value) {
-	    var parentStackFrame = this.peekParentStackFrame();
-	    if (parentStackFrame) {
-	        var waitingReporter = parentStackFrame.waitingReporter;
-	        parentStackFrame.reported[waitingReporter] = value;
-	        parentStackFrame.waitingReporter = null;
-	    }
-	};
-
-	/**
-	 * Set thread status.
-	 * @param {number} status Enum representing thread status.
-	 */
-	Thread.prototype.setStatus = function (status) {
-	    this.status = status;
-	};
-
-	module.exports = Thread;
-
-
-/***/ },
-/* 65 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Thread = __webpack_require__(64);
-
-	/**
-	 * Execute a block.
-	 * @param {!Sequencer} sequencer Which sequencer is executing.
-	 * @param {!Thread} thread Thread which to read and execute.
-	 */
-	var execute = function (sequencer, thread) {
-	    var runtime = sequencer.runtime;
-	    var target = runtime.targetForThread(thread);
-
-	    // Current block to execute is the one on the top of the stack.
-	    var currentBlockId = thread.peekStack();
-	    var currentStackFrame = thread.peekStackFrame();
-
-	    var opcode = target.blocks.getOpcode(currentBlockId);
-
-	    if (!opcode) {
-	        console.warn('Could not get opcode for block: ' + currentBlockId);
+	Clone.prototype.setXY = function (x, y) {
+	    if (this.isStage) {
 	        return;
 	    }
+	    this.x = x;
+	    this.y = y;
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            position: [this.x, this.y]
+	        });
+	    }
+	};
 
-	    var blockFunction = runtime.getOpcodeFunction(opcode);
-	    if (!blockFunction) {
-	        console.warn('Could not get implementation for opcode: ' + opcode);
+	/**
+	 * Set the direction of a clone.
+	 * @param {!number} direction New direction of clone.
+	 */
+	Clone.prototype.setDirection = function (direction) {
+	    if (this.isStage) {
 	        return;
 	    }
-
-	    // Generate values for arguments (inputs).
-	    var argValues = {};
-
-	    // Add all fields on this block to the argValues.
-	    var fields = target.blocks.getFields(currentBlockId);
-	    for (var fieldName in fields) {
-	        argValues[fieldName] = fields[fieldName].value;
-	    }
-
-	    // Recursively evaluate input blocks.
-	    var inputs = target.blocks.getInputs(currentBlockId);
-	    for (var inputName in inputs) {
-	        var input = inputs[inputName];
-	        var inputBlockId = input.block;
-	        // Is there no value for this input waiting in the stack frame?
-	        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
-	            // If there's not, we need to evaluate the block.
-	            var reporterYielded = (
-	                sequencer.stepToReporter(thread, inputBlockId, inputName)
-	            );
-	            // If the reporter yielded, return immediately;
-	            // it needs time to finish and report its value.
-	            if (reporterYielded) {
-	                return;
-	            }
-	        }
-	        argValues[inputName] = currentStackFrame.reported[inputName];
-	    }
-
-	    // If we've gotten this far, all of the input blocks are evaluated,
-	    // and `argValues` is fully populated. So, execute the block primitive.
-	    // First, clear `currentStackFrame.reported`, so any subsequent execution
-	    // (e.g., on return from a branch) gets fresh inputs.
-	    currentStackFrame.reported = {};
-
-	    var primitiveReportedValue = null;
-	    primitiveReportedValue = blockFunction(argValues, {
-	        yield: function() {
-	            thread.setStatus(Thread.STATUS_YIELD);
-	        },
-	        yieldFrame: function() {
-	            thread.setStatus(Thread.STATUS_YIELD_FRAME);
-	        },
-	        done: function() {
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	            sequencer.proceedThread(thread);
-	        },
-	        stackFrame: currentStackFrame.executionContext,
-	        startBranch: function (branchNum) {
-	            sequencer.stepToBranch(thread, branchNum);
-	        },
-	        target: target,
-	        ioQuery: function (device, func, args) {
-	            // Find the I/O device and execute the query/function call.
-	            if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
-	                var devObject = runtime.ioDevices[device];
-	                return devObject[func].call(devObject, args);
-	            }
-	        }
-	    });
-
-	    // Deal with any reported value.
-	    // If it's a promise, wait until promise resolves.
-	    var isPromise = (
-	        primitiveReportedValue &&
-	        primitiveReportedValue.then &&
-	        typeof primitiveReportedValue.then === 'function'
-	    );
-	    if (isPromise) {
-	        if (thread.status === Thread.STATUS_RUNNING) {
-	            // Primitive returned a promise; automatically yield thread.
-	            thread.setStatus(Thread.STATUS_YIELD);
-	        }
-	        // Promise handlers
-	        primitiveReportedValue.then(function(resolvedValue) {
-	            // Promise resolved: the primitive reported a value.
-	            thread.pushReportedValue(resolvedValue);
-	            // Report the value visually if necessary.
-	            if (typeof resolvedValue !== 'undefined' &&
-	                thread.peekStack() === thread.topBlock) {
-	                runtime.visualReport(thread.peekStack(), resolvedValue);
-	            }
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	            sequencer.proceedThread(thread);
-	        }, function(rejectionReason) {
-	            // Promise rejected: the primitive had some error.
-	            // Log it and proceed.
-	            console.warn('Primitive rejected promise: ', rejectionReason);
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	            sequencer.proceedThread(thread);
+	    // Keep direction between -179 and +180.
+	    this.direction = MathUtil.wrapClamp(direction, -179, 180);
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            direction: this.direction
 	        });
-	    } else if (thread.status === Thread.STATUS_RUNNING) {
-	        thread.pushReportedValue(primitiveReportedValue);
-	        // Report the value visually if necessary.
-	        if (typeof primitiveReportedValue !== 'undefined' &&
-	            thread.peekStack() === thread.topBlock) {
-	            runtime.visualReport(thread.peekStack(), primitiveReportedValue);
-	        }
 	    }
 	};
 
-	module.exports = execute;
-
-
-/***/ },
-/* 66 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Timer = __webpack_require__(63);
-
-	function Clock () {
-	    this._projectTimer = new Timer();
-	    this._projectTimer.start();
-	}
-
-	Clock.prototype.projectTimer = function () {
-	    return this._projectTimer.timeElapsed() / 1000;
-	};
-
-	Clock.prototype.resetProjectTimer = function () {
-	    this._projectTimer.start();
-	};
-
-	module.exports = Clock;
-
-
-/***/ },
-/* 67 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var MathUtil = __webpack_require__(8);
-
-	function Mouse () {
-	    this._x = 0;
-	    this._y = 0;
-	    this._isDown = false;
-	}
-
-	Mouse.prototype.postData = function(data) {
-	    if (data.x) {
-	        this._x = data.x;
-	    }
-	    if (data.y) {
-	        this._y = data.y;
-	    }
-	    if (typeof data.isDown !== 'undefined') {
-	        this._isDown = data.isDown;
-	    }
-	};
-
-	Mouse.prototype.getX = function () {
-	    return MathUtil.clamp(this._x, -240, 240);
-	};
-
-	Mouse.prototype.getY = function () {
-	    return MathUtil.clamp(-this._y, -180, 180);
-	};
-
-	Mouse.prototype.getIsDown = function () {
-	    return this._isDown;
-	};
-
-	module.exports = Mouse;
-
-
-/***/ },
-/* 68 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Promise = __webpack_require__(69);
-
-	function Scratch3ControlBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
 	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 * Set a say bubble on this clone.
+	 * @param {?string} type Type of say bubble: "say", "think", or null.
+	 * @param {?string} message Message to put in say bubble.
 	 */
-	Scratch3ControlBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'control_repeat': this.repeat,
-	        'control_repeat_until': this.repeatUntil,
-	        'control_forever': this.forever,
-	        'control_wait': this.wait,
-	        'control_if': this.if,
-	        'control_if_else': this.ifElse,
-	        'control_stop': this.stop
-	    };
+	Clone.prototype.setSay = function (type, message) {
+	    if (this.isStage) {
+	        return;
+	    }
+	    // @todo: Render to stage.
+	    if (!type || !message) {
+	        console.log('Clearing say bubble');
+	        return;
+	    }
+	    console.log('Setting say bubble:', type, message);
 	};
 
-	Scratch3ControlBlocks.prototype.repeat = function(args, util) {
-	    // Initialize loop
-	    if (util.stackFrame.loopCounter === undefined) {
-	        util.stackFrame.loopCounter = parseInt(args.TIMES);
-	    }
-	    // Only execute once per frame.
-	    // When the branch finishes, `repeat` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        // Decrease counter
-	        util.stackFrame.loopCounter--;
-	        // If we still have some left, start the branch.
-	        if (util.stackFrame.loopCounter >= 0) {
-	            util.startBranch();
-	        }
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
-	    // Only execute once per frame.
-	    // When the branch finishes, `repeat` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        // If the condition is true, start the branch.
-	        if (!args.CONDITION) {
-	            util.startBranch();
-	        }
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.forever = function(args, util) {
-	    // Only execute once per frame.
-	    // When the branch finishes, `forever` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        util.startBranch();
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.wait = function(args) {
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            resolve();
-	        }, 1000 * args.DURATION);
-	    });
-	};
-
-	Scratch3ControlBlocks.prototype.if = function(args, util) {
-	    // Only execute one time. `if` will be returned to
-	    // when the branch finishes, but it shouldn't execute again.
-	    if (util.stackFrame.executedInFrame === undefined) {
-	        util.stackFrame.executedInFrame = true;
-	        if (args.CONDITION) {
-	            util.startBranch();
-	        }
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
-	    // Only execute one time. `ifElse` will be returned to
-	    // when the branch finishes, but it shouldn't execute again.
-	    if (util.stackFrame.executedInFrame === undefined) {
-	        util.stackFrame.executedInFrame = true;
-	        if (args.CONDITION) {
-	            util.startBranch(1);
-	        } else {
-	            util.startBranch(2);
-	        }
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.stop = function() {
-	    // @todo - don't use this.runtime
-	    this.runtime.stopAll();
-	};
-
-	module.exports = Scratch3ControlBlocks;
-
-
-/***/ },
-/* 69 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(70)
-
-
-/***/ },
-/* 70 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(71);
-	__webpack_require__(73);
-	__webpack_require__(74);
-	__webpack_require__(75);
-	__webpack_require__(76);
-	__webpack_require__(78);
-
-
-/***/ },
-/* 71 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var asap = __webpack_require__(72);
-
-	function noop() {}
-
-	// States:
-	//
-	// 0 - pending
-	// 1 - fulfilled with _value
-	// 2 - rejected with _value
-	// 3 - adopted the state of another promise, _value
-	//
-	// once the state is no longer pending (0) it is immutable
-
-	// All `_` prefixed properties will be reduced to `_{random number}`
-	// at build time to obfuscate them and discourage their use.
-	// We don't use symbols or Object.defineProperty to fully hide them
-	// because the performance isn't good enough.
-
-
-	// to avoid using try/catch inside critical functions, we
-	// extract them to here.
-	var LAST_ERROR = null;
-	var IS_ERROR = {};
-	function getThen(obj) {
-	  try {
-	    return obj.then;
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-
-	function tryCallOne(fn, a) {
-	  try {
-	    return fn(a);
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-	function tryCallTwo(fn, a, b) {
-	  try {
-	    fn(a, b);
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-
-	module.exports = Promise;
-
-	function Promise(fn) {
-	  if (typeof this !== 'object') {
-	    throw new TypeError('Promises must be constructed via new');
-	  }
-	  if (typeof fn !== 'function') {
-	    throw new TypeError('not a function');
-	  }
-	  this._45 = 0;
-	  this._81 = 0;
-	  this._65 = null;
-	  this._54 = null;
-	  if (fn === noop) return;
-	  doResolve(fn, this);
-	}
-	Promise._10 = null;
-	Promise._97 = null;
-	Promise._61 = noop;
-
-	Promise.prototype.then = function(onFulfilled, onRejected) {
-	  if (this.constructor !== Promise) {
-	    return safeThen(this, onFulfilled, onRejected);
-	  }
-	  var res = new Promise(noop);
-	  handle(this, new Handler(onFulfilled, onRejected, res));
-	  return res;
-	};
-
-	function safeThen(self, onFulfilled, onRejected) {
-	  return new self.constructor(function (resolve, reject) {
-	    var res = new Promise(noop);
-	    res.then(resolve, reject);
-	    handle(self, new Handler(onFulfilled, onRejected, res));
-	  });
-	};
-	function handle(self, deferred) {
-	  while (self._81 === 3) {
-	    self = self._65;
-	  }
-	  if (Promise._10) {
-	    Promise._10(self);
-	  }
-	  if (self._81 === 0) {
-	    if (self._45 === 0) {
-	      self._45 = 1;
-	      self._54 = deferred;
-	      return;
-	    }
-	    if (self._45 === 1) {
-	      self._45 = 2;
-	      self._54 = [self._54, deferred];
-	      return;
-	    }
-	    self._54.push(deferred);
-	    return;
-	  }
-	  handleResolved(self, deferred);
-	}
-
-	function handleResolved(self, deferred) {
-	  asap(function() {
-	    var cb = self._81 === 1 ? deferred.onFulfilled : deferred.onRejected;
-	    if (cb === null) {
-	      if (self._81 === 1) {
-	        resolve(deferred.promise, self._65);
-	      } else {
-	        reject(deferred.promise, self._65);
-	      }
-	      return;
-	    }
-	    var ret = tryCallOne(cb, self._65);
-	    if (ret === IS_ERROR) {
-	      reject(deferred.promise, LAST_ERROR);
-	    } else {
-	      resolve(deferred.promise, ret);
-	    }
-	  });
-	}
-	function resolve(self, newValue) {
-	  // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
-	  if (newValue === self) {
-	    return reject(
-	      self,
-	      new TypeError('A promise cannot be resolved with itself.')
-	    );
-	  }
-	  if (
-	    newValue &&
-	    (typeof newValue === 'object' || typeof newValue === 'function')
-	  ) {
-	    var then = getThen(newValue);
-	    if (then === IS_ERROR) {
-	      return reject(self, LAST_ERROR);
-	    }
-	    if (
-	      then === self.then &&
-	      newValue instanceof Promise
-	    ) {
-	      self._81 = 3;
-	      self._65 = newValue;
-	      finale(self);
-	      return;
-	    } else if (typeof then === 'function') {
-	      doResolve(then.bind(newValue), self);
-	      return;
-	    }
-	  }
-	  self._81 = 1;
-	  self._65 = newValue;
-	  finale(self);
-	}
-
-	function reject(self, newValue) {
-	  self._81 = 2;
-	  self._65 = newValue;
-	  if (Promise._97) {
-	    Promise._97(self, newValue);
-	  }
-	  finale(self);
-	}
-	function finale(self) {
-	  if (self._45 === 1) {
-	    handle(self, self._54);
-	    self._54 = null;
-	  }
-	  if (self._45 === 2) {
-	    for (var i = 0; i < self._54.length; i++) {
-	      handle(self, self._54[i]);
-	    }
-	    self._54 = null;
-	  }
-	}
-
-	function Handler(onFulfilled, onRejected, promise){
-	  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
-	  this.onRejected = typeof onRejected === 'function' ? onRejected : null;
-	  this.promise = promise;
-	}
-
 	/**
-	 * Take a potentially misbehaving resolver function and make sure
-	 * onFulfilled and onRejected are only called once.
-	 *
-	 * Makes no guarantees about asynchrony.
+	 * Set visibility of the clone; i.e., whether it's shown or hidden.
+	 * @param {!boolean} visible True if the sprite should be shown.
 	 */
-	function doResolve(fn, promise) {
-	  var done = false;
-	  var res = tryCallTwo(fn, function (value) {
-	    if (done) return;
-	    done = true;
-	    resolve(promise, value);
-	  }, function (reason) {
-	    if (done) return;
-	    done = true;
-	    reject(promise, reason);
-	  })
-	  if (!done && res === IS_ERROR) {
-	    done = true;
-	    reject(promise, LAST_ERROR);
-	  }
-	}
-
-
-/***/ },
-/* 72 */
-/***/ function(module, exports) {
-
-	/* WEBPACK VAR INJECTION */(function(global) {"use strict";
-
-	// Use the fastest means possible to execute a task in its own turn, with
-	// priority over other events including IO, animation, reflow, and redraw
-	// events in browsers.
-	//
-	// An exception thrown by a task will permanently interrupt the processing of
-	// subsequent tasks. The higher level `asap` function ensures that if an
-	// exception is thrown by a task, that the task queue will continue flushing as
-	// soon as possible, but if you use `rawAsap` directly, you are responsible to
-	// either ensure that no exceptions are thrown from your task, or to manually
-	// call `rawAsap.requestFlush` if an exception is thrown.
-	module.exports = rawAsap;
-	function rawAsap(task) {
-	    if (!queue.length) {
-	        requestFlush();
-	        flushing = true;
+	Clone.prototype.setVisible = function (visible) {
+	    if (this.isStage) {
+	        return;
 	    }
-	    // Equivalent to push, but avoids a function call.
-	    queue[queue.length] = task;
-	}
-
-	var queue = [];
-	// Once a flush has been requested, no further calls to `requestFlush` are
-	// necessary until the next `flush` completes.
-	var flushing = false;
-	// `requestFlush` is an implementation-specific method that attempts to kick
-	// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
-	// the event queue before yielding to the browser's own event loop.
-	var requestFlush;
-	// The position of the next task to execute in the task queue. This is
-	// preserved between calls to `flush` so that it can be resumed if
-	// a task throws an exception.
-	var index = 0;
-	// If a task schedules additional tasks recursively, the task queue can grow
-	// unbounded. To prevent memory exhaustion, the task queue will periodically
-	// truncate already-completed tasks.
-	var capacity = 1024;
-
-	// The flush function processes all tasks that have been scheduled with
-	// `rawAsap` unless and until one of those tasks throws an exception.
-	// If a task throws an exception, `flush` ensures that its state will remain
-	// consistent and will resume where it left off when called again.
-	// However, `flush` does not make any arrangements to be called again if an
-	// exception is thrown.
-	function flush() {
-	    while (index < queue.length) {
-	        var currentIndex = index;
-	        // Advance the index before calling the task. This ensures that we will
-	        // begin flushing on the next task the task throws an error.
-	        index = index + 1;
-	        queue[currentIndex].call();
-	        // Prevent leaking memory for long chains of recursive calls to `asap`.
-	        // If we call `asap` within tasks scheduled by `asap`, the queue will
-	        // grow, but to avoid an O(n) walk for every task we execute, we don't
-	        // shift tasks off the queue after they have been executed.
-	        // Instead, we periodically shift 1024 tasks off the queue.
-	        if (index > capacity) {
-	            // Manually shift all values starting at the index back to the
-	            // beginning of the queue.
-	            for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
-	                queue[scan] = queue[scan + index];
-	            }
-	            queue.length -= index;
-	            index = 0;
-	        }
-	    }
-	    queue.length = 0;
-	    index = 0;
-	    flushing = false;
-	}
-
-	// `requestFlush` is implemented using a strategy based on data collected from
-	// every available SauceLabs Selenium web driver worker at time of writing.
-	// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
-
-	// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
-	// have WebKitMutationObserver but not un-prefixed MutationObserver.
-	// Must use `global` instead of `window` to work in both frames and web
-	// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
-	var BrowserMutationObserver = global.MutationObserver || global.WebKitMutationObserver;
-
-	// MutationObservers are desirable because they have high priority and work
-	// reliably everywhere they are implemented.
-	// They are implemented in all modern browsers.
-	//
-	// - Android 4-4.3
-	// - Chrome 26-34
-	// - Firefox 14-29
-	// - Internet Explorer 11
-	// - iPad Safari 6-7.1
-	// - iPhone Safari 7-7.1
-	// - Safari 6-7
-	if (typeof BrowserMutationObserver === "function") {
-	    requestFlush = makeRequestCallFromMutationObserver(flush);
-
-	// MessageChannels are desirable because they give direct access to the HTML
-	// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
-	// 11-12, and in web workers in many engines.
-	// Although message channels yield to any queued rendering and IO tasks, they
-	// would be better than imposing the 4ms delay of timers.
-	// However, they do not work reliably in Internet Explorer or Safari.
-
-	// Internet Explorer 10 is the only browser that has setImmediate but does
-	// not have MutationObservers.
-	// Although setImmediate yields to the browser's renderer, it would be
-	// preferrable to falling back to setTimeout since it does not have
-	// the minimum 4ms penalty.
-	// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
-	// Desktop to a lesser extent) that renders both setImmediate and
-	// MessageChannel useless for the purposes of ASAP.
-	// https://github.com/kriskowal/q/issues/396
-
-	// Timers are implemented universally.
-	// We fall back to timers in workers in most engines, and in foreground
-	// contexts in the following browsers.
-	// However, note that even this simple case requires nuances to operate in a
-	// broad spectrum of browsers.
-	//
-	// - Firefox 3-13
-	// - Internet Explorer 6-9
-	// - iPad Safari 4.3
-	// - Lynx 2.8.7
-	} else {
-	    requestFlush = makeRequestCallFromTimer(flush);
-	}
-
-	// `requestFlush` requests that the high priority event queue be flushed as
-	// soon as possible.
-	// This is useful to prevent an error thrown in a task from stalling the event
-	// queue if the exception handled by Node.js’s
-	// `process.on("uncaughtException")` or by a domain.
-	rawAsap.requestFlush = requestFlush;
-
-	// To request a high priority event, we induce a mutation observer by toggling
-	// the text of a text node between "1" and "-1".
-	function makeRequestCallFromMutationObserver(callback) {
-	    var toggle = 1;
-	    var observer = new BrowserMutationObserver(callback);
-	    var node = document.createTextNode("");
-	    observer.observe(node, {characterData: true});
-	    return function requestCall() {
-	        toggle = -toggle;
-	        node.data = toggle;
-	    };
-	}
-
-	// The message channel technique was discovered by Malte Ubl and was the
-	// original foundation for this library.
-	// http://www.nonblocking.io/2011/06/windownexttick.html
-
-	// Safari 6.0.5 (at least) intermittently fails to create message ports on a
-	// page's first load. Thankfully, this version of Safari supports
-	// MutationObservers, so we don't need to fall back in that case.
-
-	// function makeRequestCallFromMessageChannel(callback) {
-	//     var channel = new MessageChannel();
-	//     channel.port1.onmessage = callback;
-	//     return function requestCall() {
-	//         channel.port2.postMessage(0);
-	//     };
-	// }
-
-	// For reasons explained above, we are also unable to use `setImmediate`
-	// under any circumstances.
-	// Even if we were, there is another bug in Internet Explorer 10.
-	// It is not sufficient to assign `setImmediate` to `requestFlush` because
-	// `setImmediate` must be called *by name* and therefore must be wrapped in a
-	// closure.
-	// Never forget.
-
-	// function makeRequestCallFromSetImmediate(callback) {
-	//     return function requestCall() {
-	//         setImmediate(callback);
-	//     };
-	// }
-
-	// Safari 6.0 has a problem where timers will get lost while the user is
-	// scrolling. This problem does not impact ASAP because Safari 6.0 supports
-	// mutation observers, so that implementation is used instead.
-	// However, if we ever elect to use timers in Safari, the prevalent work-around
-	// is to add a scroll event listener that calls for a flush.
-
-	// `setTimeout` does not call the passed callback if the delay is less than
-	// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
-	// even then.
-
-	function makeRequestCallFromTimer(callback) {
-	    return function requestCall() {
-	        // We dispatch a timeout with a specified delay of 0 for engines that
-	        // can reliably accommodate that request. This will usually be snapped
-	        // to a 4 milisecond delay, but once we're flushing, there's no delay
-	        // between events.
-	        var timeoutHandle = setTimeout(handleTimer, 0);
-	        // However, since this timer gets frequently dropped in Firefox
-	        // workers, we enlist an interval handle that will try to fire
-	        // an event 20 times per second until it succeeds.
-	        var intervalHandle = setInterval(handleTimer, 50);
-
-	        function handleTimer() {
-	            // Whichever timer succeeds will cancel both timers and
-	            // execute the callback.
-	            clearTimeout(timeoutHandle);
-	            clearInterval(intervalHandle);
-	            callback();
-	        }
-	    };
-	}
-
-	// This is for `asap.js` only.
-	// Its name will be periodically randomized to break any code that depends on
-	// its existence.
-	rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
-
-	// ASAP was originally a nextTick shim included in Q. This was factored out
-	// into this ASAP package. It was later adapted to RSVP which made further
-	// amendments. These decisions, particularly to marginalize MessageChannel and
-	// to capture the MutationObserver implementation in a closure, were integrated
-	// back into ASAP proper.
-	// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
-
-	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 73 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var Promise = __webpack_require__(71);
-
-	module.exports = Promise;
-	Promise.prototype.done = function (onFulfilled, onRejected) {
-	  var self = arguments.length ? this.then.apply(this, arguments) : this;
-	  self.then(null, function (err) {
-	    setTimeout(function () {
-	      throw err;
-	    }, 0);
-	  });
-	};
-
-
-/***/ },
-/* 74 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var Promise = __webpack_require__(71);
-
-	module.exports = Promise;
-	Promise.prototype['finally'] = function (f) {
-	  return this.then(function (value) {
-	    return Promise.resolve(f()).then(function () {
-	      return value;
-	    });
-	  }, function (err) {
-	    return Promise.resolve(f()).then(function () {
-	      throw err;
-	    });
-	  });
-	};
-
-
-/***/ },
-/* 75 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	//This file contains the ES6 extensions to the core Promises/A+ API
-
-	var Promise = __webpack_require__(71);
-
-	module.exports = Promise;
-
-	/* Static Functions */
-
-	var TRUE = valuePromise(true);
-	var FALSE = valuePromise(false);
-	var NULL = valuePromise(null);
-	var UNDEFINED = valuePromise(undefined);
-	var ZERO = valuePromise(0);
-	var EMPTYSTRING = valuePromise('');
-
-	function valuePromise(value) {
-	  var p = new Promise(Promise._61);
-	  p._81 = 1;
-	  p._65 = value;
-	  return p;
-	}
-	Promise.resolve = function (value) {
-	  if (value instanceof Promise) return value;
-
-	  if (value === null) return NULL;
-	  if (value === undefined) return UNDEFINED;
-	  if (value === true) return TRUE;
-	  if (value === false) return FALSE;
-	  if (value === 0) return ZERO;
-	  if (value === '') return EMPTYSTRING;
-
-	  if (typeof value === 'object' || typeof value === 'function') {
-	    try {
-	      var then = value.then;
-	      if (typeof then === 'function') {
-	        return new Promise(then.bind(value));
-	      }
-	    } catch (ex) {
-	      return new Promise(function (resolve, reject) {
-	        reject(ex);
-	      });
-	    }
-	  }
-	  return valuePromise(value);
-	};
-
-	Promise.all = function (arr) {
-	  var args = Array.prototype.slice.call(arr);
-
-	  return new Promise(function (resolve, reject) {
-	    if (args.length === 0) return resolve([]);
-	    var remaining = args.length;
-	    function res(i, val) {
-	      if (val && (typeof val === 'object' || typeof val === 'function')) {
-	        if (val instanceof Promise && val.then === Promise.prototype.then) {
-	          while (val._81 === 3) {
-	            val = val._65;
-	          }
-	          if (val._81 === 1) return res(i, val._65);
-	          if (val._81 === 2) reject(val._65);
-	          val.then(function (val) {
-	            res(i, val);
-	          }, reject);
-	          return;
-	        } else {
-	          var then = val.then;
-	          if (typeof then === 'function') {
-	            var p = new Promise(then.bind(val));
-	            p.then(function (val) {
-	              res(i, val);
-	            }, reject);
-	            return;
-	          }
-	        }
-	      }
-	      args[i] = val;
-	      if (--remaining === 0) {
-	        resolve(args);
-	      }
-	    }
-	    for (var i = 0; i < args.length; i++) {
-	      res(i, args[i]);
-	    }
-	  });
-	};
-
-	Promise.reject = function (value) {
-	  return new Promise(function (resolve, reject) {
-	    reject(value);
-	  });
-	};
-
-	Promise.race = function (values) {
-	  return new Promise(function (resolve, reject) {
-	    values.forEach(function(value){
-	      Promise.resolve(value).then(resolve, reject);
-	    });
-	  });
-	};
-
-	/* Prototype Methods */
-
-	Promise.prototype['catch'] = function (onRejected) {
-	  return this.then(null, onRejected);
-	};
-
-
-/***/ },
-/* 76 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	// This file contains then/promise specific extensions that are only useful
-	// for node.js interop
-
-	var Promise = __webpack_require__(71);
-	var asap = __webpack_require__(77);
-
-	module.exports = Promise;
-
-	/* Static Functions */
-
-	Promise.denodeify = function (fn, argumentCount) {
-	  if (
-	    typeof argumentCount === 'number' && argumentCount !== Infinity
-	  ) {
-	    return denodeifyWithCount(fn, argumentCount);
-	  } else {
-	    return denodeifyWithoutCount(fn);
-	  }
-	}
-
-	var callbackFn = (
-	  'function (err, res) {' +
-	  'if (err) { rj(err); } else { rs(res); }' +
-	  '}'
-	);
-	function denodeifyWithCount(fn, argumentCount) {
-	  var args = [];
-	  for (var i = 0; i < argumentCount; i++) {
-	    args.push('a' + i);
-	  }
-	  var body = [
-	    'return function (' + args.join(',') + ') {',
-	    'var self = this;',
-	    'return new Promise(function (rs, rj) {',
-	    'var res = fn.call(',
-	    ['self'].concat(args).concat([callbackFn]).join(','),
-	    ');',
-	    'if (res &&',
-	    '(typeof res === "object" || typeof res === "function") &&',
-	    'typeof res.then === "function"',
-	    ') {rs(res);}',
-	    '});',
-	    '};'
-	  ].join('');
-	  return Function(['Promise', 'fn'], body)(Promise, fn);
-	}
-	function denodeifyWithoutCount(fn) {
-	  var fnLength = Math.max(fn.length - 1, 3);
-	  var args = [];
-	  for (var i = 0; i < fnLength; i++) {
-	    args.push('a' + i);
-	  }
-	  var body = [
-	    'return function (' + args.join(',') + ') {',
-	    'var self = this;',
-	    'var args;',
-	    'var argLength = arguments.length;',
-	    'if (arguments.length > ' + fnLength + ') {',
-	    '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 = ' + callbackFn + ';',
-	    'var res;',
-	    'switch (argLength) {',
-	    args.concat(['extra']).map(function (_, index) {
-	      return (
-	        'case ' + (index) + ':' +
-	        'res = fn.call(' + ['self'].concat(args.slice(0, index)).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'],
-	    body
-	  )(Promise, fn);
-	}
-
-	Promise.nodeify = function (fn) {
-	  return function () {
-	    var args = Array.prototype.slice.call(arguments);
-	    var callback =
-	      typeof args[args.length - 1] === 'function' ? args.pop() : null;
-	    var ctx = this;
-	    try {
-	      return fn.apply(this, arguments).nodeify(callback, ctx);
-	    } catch (ex) {
-	      if (callback === null || typeof callback == 'undefined') {
-	        return new Promise(function (resolve, reject) {
-	          reject(ex);
+	    this.visible = visible;
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            visible: this.visible
 	        });
-	      } else {
-	        asap(function () {
-	          callback.call(ctx, ex);
-	        })
-	      }
 	    }
-	  }
-	}
-
-	Promise.prototype.nodeify = function (callback, ctx) {
-	  if (typeof callback != 'function') return this;
-
-	  this.then(function (value) {
-	    asap(function () {
-	      callback.call(ctx, null, value);
-	    });
-	  }, function (err) {
-	    asap(function () {
-	      callback.call(ctx, err);
-	    });
-	  });
-	}
-
-
-/***/ },
-/* 77 */
-/***/ function(module, exports, __webpack_require__) {
-
-	"use strict";
-
-	// rawAsap provides everything we need except exception management.
-	var rawAsap = __webpack_require__(72);
-	// RawTasks are recycled to reduce GC churn.
-	var freeTasks = [];
-	// We queue errors to ensure they are thrown in right order (FIFO).
-	// Array-as-queue is good enough here, since we are just dealing with exceptions.
-	var pendingErrors = [];
-	var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
-
-	function throwFirstError() {
-	    if (pendingErrors.length) {
-	        throw pendingErrors.shift();
-	    }
-	}
+	};
 
 	/**
-	 * Calls a task as soon as possible after returning, in its own event, with priority
-	 * over other events like animation, reflow, and repaint. An error thrown from an
-	 * event will not interrupt, nor even substantially slow down the processing of
-	 * other events, but will be rather postponed to a lower priority event.
-	 * @param {{call}} task A callable object, typically a function that takes no
-	 * arguments.
+	 * Set size of the clone, as a percentage of the costume size.
+	 * @param {!number} size Size of clone, from 5 to 535.
 	 */
-	module.exports = asap;
-	function asap(task) {
-	    var rawTask;
-	    if (freeTasks.length) {
-	        rawTask = freeTasks.pop();
-	    } else {
-	        rawTask = new RawTask();
+	Clone.prototype.setSize = function (size) {
+	    if (this.isStage) {
+	        return;
 	    }
-	    rawTask.task = task;
-	    rawAsap(rawTask);
-	}
+	    // Keep size between 5% and 535%.
+	    this.size = MathUtil.clamp(size, 5, 535);
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            scale: [this.size, this.size]
+	        });
+	    }
+	};
 
-	// We wrap tasks with recyclable task objects.  A task object implements
-	// `call`, just like a function.
-	function RawTask() {
-	    this.task = null;
-	}
+	/**
+	 * Set a particular graphic effect on this clone.
+	 * @param {!string} effectName Name of effect (see `Clone.prototype.effects`).
+	 * @param {!number} value Numerical magnitude of effect.
+	 */
+	Clone.prototype.setEffect = function (effectName, value) {
+	    if (!this.effects.hasOwnProperty(effectName)) return;
+	    this.effects[effectName] = value;
+	    if (this.renderer) {
+	        var props = {};
+	        props[effectName] = this.effects[effectName];
+	        this.renderer.updateDrawableProperties(this.drawableID, props);
+	    }
+	};
 
-	// The sole purpose of wrapping the task is to catch the exception and recycle
-	// the task object after its single use.
-	RawTask.prototype.call = function () {
-	    try {
-	        this.task.call();
-	    } catch (error) {
-	        if (asap.onerror) {
-	            // This hook exists purely for testing purposes.
-	            // Its name will be periodically randomized to break any code that
-	            // depends on its existence.
-	            asap.onerror(error);
-	        } else {
-	            // In a web browser, exceptions are not fatal. However, to avoid
-	            // slowing down the queue of pending tasks, we rethrow the error in a
-	            // lower priority turn.
-	            pendingErrors.push(error);
-	            requestErrorThrow();
+	/**
+	 * Clear all graphic effects on this clone.
+	 */
+	Clone.prototype.clearEffects = function () {
+	    for (var effectName in this.effects) {
+	        this.effects[effectName] = 0;
+	    }
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, this.effects);
+	    }
+	};
+
+	/**
+	 * Set the current costume of this clone.
+	 * @param {number} index New index of costume.
+	 */
+	Clone.prototype.setCostume = function (index) {
+	    // Keep the costume index within possible values.
+	    this.currentCostume = MathUtil.wrapClamp(
+	        index, 0, this.sprite.costumes.length - 1
+	    );
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            skin: this.sprite.costumes[this.currentCostume].skin
+	        });
+	    }
+	};
+
+	/**
+	 * Get a costume index of this clone, by name of the costume.
+	 * @param {?string} costumeName Name of a costume.
+	 * @return {number} Index of the named costume, or -1 if not present.
+	 */
+	Clone.prototype.getCostumeIndexByName = function (costumeName) {
+	    for (var i = 0; i < this.sprite.costumes.length; i++) {
+	        if (this.sprite.costumes[i].name == costumeName) {
+	            return i;
 	        }
-	    } finally {
-	        this.task = null;
-	        freeTasks[freeTasks.length] = this;
+	    }
+	    return -1;
+	};
+
+	/**
+	 * Update all drawable properties for this clone.
+	 * Use when a batch has changed, e.g., when the drawable is first created.
+	 */
+	Clone.prototype.updateAllDrawableProperties = function () {
+	    if (this.renderer) {
+	        this.renderer.updateDrawableProperties(this.drawableID, {
+	            position: [this.x, this.y],
+	            direction: this.direction,
+	            scale: [this.size, this.size],
+	            visible: this.visible,
+	            skin: this.sprite.costumes[this.currentCostume].skin
+	        });
 	    }
 	};
 
+	/**
+	 * Return the human-readable name for this clone, i.e., the sprite's name.
+	 * @override
+	 * @returns {string} Human-readable name for the clone.
+	 */
+	Clone.prototype.getName = function () {
+	    return this.sprite.name;
+	};
+
+	/**
+	 * Return whether the clone is touching a color.
+	 * @param {Array.<number>} rgb [r,g,b], values between 0-255.
+	 * @return {Promise.<Boolean>} True iff the clone is touching the color.
+	 */
+	Clone.prototype.isTouchingColor = function (rgb) {
+	    if (this.renderer) {
+	        return this.renderer.isTouchingColor(this.drawableID, rgb);
+	    }
+	    return false;
+	};
+
+	/**
+	 * Return whether the clone's color is touching a color.
+	 * @param {Object} targetRgb {Array.<number>} [r,g,b], values between 0-255.
+	 * @param {Object} maskRgb {Array.<number>} [r,g,b], values between 0-255.
+	 * @return {Promise.<Boolean>} True iff the clone's color is touching the color.
+	 */
+	Clone.prototype.colorIsTouchingColor = function (targetRgb, maskRgb) {
+	    if (this.renderer) {
+	        return this.renderer.isTouchingColor(
+	            this.drawableID,
+	            targetRgb,
+	            maskRgb
+	        );
+	    }
+	    return false;
+	};
+
+	module.exports = Clone;
+
 
 /***/ },
-/* 78 */
+/* 87 */
 /***/ function(module, exports, __webpack_require__) {
 
-	'use strict';
-
-	var Promise = __webpack_require__(71);
-
-	module.exports = Promise;
-	Promise.enableSynchronous = function () {
-	  Promise.prototype.isPending = function() {
-	    return this.getState() == 0;
-	  };
-
-	  Promise.prototype.isFulfilled = function() {
-	    return this.getState() == 1;
-	  };
-
-	  Promise.prototype.isRejected = function() {
-	    return this.getState() == 2;
-	  };
-
-	  Promise.prototype.getValue = function () {
-	    if (this._81 === 3) {
-	      return this._65.getValue();
-	    }
-
-	    if (!this.isFulfilled()) {
-	      throw new Error('Cannot get a value of an unfulfilled promise.');
-	    }
-
-	    return this._65;
-	  };
-
-	  Promise.prototype.getReason = function () {
-	    if (this._81 === 3) {
-	      return this._65.getReason();
-	    }
-
-	    if (!this.isRejected()) {
-	      throw new Error('Cannot get a rejection reason of a non-rejected promise.');
-	    }
-
-	    return this._65;
-	  };
-
-	  Promise.prototype.getState = function () {
-	    if (this._81 === 3) {
-	      return this._65.getState();
-	    }
-	    if (this._81 === -1 || this._81 === -2) {
-	      return 0;
-	    }
-
-	    return this._81;
-	  };
-	};
-
-	Promise.disableSynchronous = function() {
-	  Promise.prototype.isPending = undefined;
-	  Promise.prototype.isFulfilled = undefined;
-	  Promise.prototype.isRejected = undefined;
-	  Promise.prototype.getValue = undefined;
-	  Promise.prototype.getReason = undefined;
-	  Promise.prototype.getState = undefined;
-	};
-
-
-/***/ },
-/* 79 */
-/***/ function(module, exports) {
-
-	function Scratch3EventBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3EventBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'event_whenflagclicked': this.whenFlagClicked,
-	        'event_whenbroadcastreceived': this.whenBroadcastReceived,
-	        'event_broadcast': this.broadcast
-	    };
-	};
-
-
-	Scratch3EventBlocks.prototype.whenFlagClicked = function() {
-	    // No-op
-	};
-
-	Scratch3EventBlocks.prototype.whenBroadcastReceived = function() {
-	    // No-op
-	};
-
-	Scratch3EventBlocks.prototype.broadcast = function() {
-	    // @todo
-	};
-
-	module.exports = Scratch3EventBlocks;
-
-
-/***/ },
-/* 80 */
-/***/ function(module, exports) {
-
-	function Scratch3LooksBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3LooksBlocks.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_effectmenu': this.effectMenu,
-	        'looks_changeeffectby': this.changeEffect,
-	        'looks_seteffectto': this.setEffect,
-	        'looks_cleargraphiceffects': this.clearEffects,
-	        'looks_changesizeby': this.changeSize,
-	        'looks_setsizeto': this.setSize,
-	        'looks_size': this.getSize
-	    };
-	};
-
-	Scratch3LooksBlocks.prototype.say = function (args, util) {
-	    util.target.setSay('say', args.MESSAGE);
-	};
-
-	Scratch3LooksBlocks.prototype.sayforsecs = function (args, util) {
-	    util.target.setSay('say', args.MESSAGE);
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            // Clear say bubble and proceed.
-	            util.target.setSay();
-	            resolve();
-	        }, 1000 * args.SECS);
-	    });
-	};
-
-	Scratch3LooksBlocks.prototype.think = function (args, util) {
-	    util.target.setSay('think', args.MESSAGE);
-	};
-
-	Scratch3LooksBlocks.prototype.thinkforsecs = function (args, util) {
-	    util.target.setSay('think', args.MESSAGE);
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            // Clear say bubble and proceed.
-	            util.target.setSay();
-	            resolve();
-	        }, 1000 * args.SECS);
-	    });
-	};
-
-	Scratch3LooksBlocks.prototype.show = function (args, util) {
-	    util.target.setVisible(true);
-	};
-
-	Scratch3LooksBlocks.prototype.hide = function (args, util) {
-	    util.target.setVisible(false);
-	};
-
-	Scratch3LooksBlocks.prototype.effectMenu = function (args) {
-	    return args.EFFECT.toLowerCase();
-	};
-
-	Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
-	    var newValue = args.CHANGE + util.target.effects[args.EFFECT];
-	    util.target.setEffect(args.EFFECT, newValue);
-	};
-
-	Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
-	    util.target.setEffect(args.EFFECT, args.VALUE);
-	};
-
-	Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
-	    util.target.clearEffects();
-	};
-
-	Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
-	    util.target.setSize(util.target.size + args.CHANGE);
-	};
-
-	Scratch3LooksBlocks.prototype.setSize = function (args, util) {
-	    util.target.setSize(args.SIZE);
-	};
-
-	Scratch3LooksBlocks.prototype.getSize = function (args, util) {
-	    return util.target.size;
-	};
-
-	module.exports = Scratch3LooksBlocks;
-
-
-/***/ },
-/* 81 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var MathUtil = __webpack_require__(8);
-
-	function Scratch3MotionBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3MotionBlocks.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_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
-	    };
-	};
-
-	Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
-	    var radians = MathUtil.degToRad(util.target.direction);
-	    var dx = args.STEPS * Math.cos(radians);
-	    var dy = args.STEPS * Math.sin(radians);
-	    util.target.setXY(util.target.x + dx, util.target.y + dy);
-	};
-
-	Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
-	    util.target.setXY(args.X, args.Y);
-	};
-
-	Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
-	    util.target.setDirection(util.target.direction + args.DEGREES);
-	};
-
-	Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
-	    util.target.setDirection(util.target.direction - args.DEGREES);
-	};
-
-	Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
-	    util.target.setDirection(args.DIRECTION);
-	};
-
-	Scratch3MotionBlocks.prototype.changeX = function (args, util) {
-	    util.target.setXY(util.target.x + args.DX, util.target.y);
-	};
-
-	Scratch3MotionBlocks.prototype.setX = function (args, util) {
-	    util.target.setXY(args.X, util.target.y);
-	};
-
-	Scratch3MotionBlocks.prototype.changeY = function (args, util) {
-	    util.target.setXY(util.target.x, util.target.y + args.DY);
-	};
-
-	Scratch3MotionBlocks.prototype.setY = function (args, util) {
-	    util.target.setXY(util.target.x, args.Y);
-	};
-
-	Scratch3MotionBlocks.prototype.getX = function (args, util) {
-	    return util.target.x;
-	};
-
-	Scratch3MotionBlocks.prototype.getY = function (args, util) {
-	    return util.target.y;
-	};
-
-	Scratch3MotionBlocks.prototype.getDirection = function (args, util) {
-	    return util.target.direction;
-	};
-
-	module.exports = Scratch3MotionBlocks;
-
-
-/***/ },
-/* 82 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(83);
-
-	function Scratch3OperatorsBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3OperatorsBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'math_number': this.number,
-	        'math_positive_number': this.number,
-	        'math_whole_number': this.number,
-	        'math_angle': this.number,
-	        'text': this.text,
-	        '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_menu': this.mathopMenu,
-	        'operator_mathop': this.mathop
-	    };
-	};
-
-	Scratch3OperatorsBlocks.prototype.number = function (args) {
-	    return Cast.toNumber(args.NUM);
-	};
-
-	Scratch3OperatorsBlocks.prototype.text = function (args) {
-	    return Cast.toString(args.TEXT);
-	};
-
-	Scratch3OperatorsBlocks.prototype.add = function (args) {
-	    return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.subtract = function (args) {
-	    return Cast.toNumber(args.NUM1) - Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.multiply = function (args) {
-	    return Cast.toNumber(args.NUM1) * Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.divide = function (args) {
-	    return Cast.toNumber(args.NUM1) / Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.lt = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) < 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.equals = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) == 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.gt = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) > 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.and = function (args) {
-	    return Cast.toBoolean(args.OPERAND1 && args.OPERAND2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.or = function (args) {
-	    return Cast.toBoolean(args.OPERAND1 || args.OPERAND2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.not = function (args) {
-	    return Cast.toBoolean(!args.OPERAND);
-	};
-
-	Scratch3OperatorsBlocks.prototype.random = function (args) {
-	    var low = args.FROM <= args.TO ? args.FROM : args.TO;
-	    var high = args.FROM <= args.TO ? args.TO : args.FROM;
-	    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) {
-	        return low + parseInt(Math.random() * ((high + 1) - low));
-	    }
-	    return (Math.random() * (high - low)) + low;
-	};
-
-	Scratch3OperatorsBlocks.prototype.join = function (args) {
-	    return Cast.toString(args.STRING1) + Cast.toString(args.STRING2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
-	    var index = Cast.toNumber(args.LETTER) - 1;
-	    var str = Cast.toString(args.STRING);
-	    // Out of bounds?
-	    if (index < 0 || index >= str.length) {
-	        return '';
-	    }
-	    return str.charAt(index);
-	};
-
-	Scratch3OperatorsBlocks.prototype.length = function (args) {
-	    return Cast.toString(args.STRING).length;
-	};
-
-	Scratch3OperatorsBlocks.prototype.mod = function (args) {
-	    var n = Cast.toNumber(args.NUM1);
-	    var modulus = Cast.toNumber(args.NUM2);
-	    var result = n % modulus;
-	    // Scratch mod is kept positive.
-	    if (result / modulus < 0) result += modulus;
-	    return result;
-	};
-
-	Scratch3OperatorsBlocks.prototype.round = function (args) {
-	    return Math.round(Cast.toNumber(args.NUM));
-	};
-
-	Scratch3OperatorsBlocks.prototype.mathopMenu = function (args) {
-	    return args.OPERATOR;
-	};
-
-	Scratch3OperatorsBlocks.prototype.mathop = function (args) {
-	    var operator = Cast.toString(args.OPERATOR).toLowerCase();
-	    var n = Cast.toNumber(args.NUM);
-	    switch (operator) {
-	    case 'abs': return Math.abs(n);
-	    case 'floor': return Math.floor(n);
-	    case 'ceiling': return Math.ceil(n);
-	    case 'sqrt': return Math.sqrt(n);
-	    case 'sin': return Math.sin((Math.PI * n) / 180);
-	    case 'cos': return Math.cos((Math.PI * n) / 180);
-	    case 'tan': return Math.tan((Math.PI * n) / 180);
-	    case 'asin': return (Math.asin(n) * 180) / Math.PI;
-	    case 'acos': return (Math.acos(n) * 180) / Math.PI;
-	    case 'atan': return (Math.atan(n) * 180) / Math.PI;
-	    case 'ln': return Math.log(n);
-	    case 'log': return Math.log(n) / Math.LN10;
-	    case 'e ^': return Math.exp(n);
-	    case '10 ^': return Math.pow(10, n);
-	    }
-	    return 0;
-	};
-
-	module.exports = Scratch3OperatorsBlocks;
-
-
-/***/ },
-/* 83 */
-/***/ function(module, exports) {
-
-	function Cast () {}
+	var Blocks = __webpack_require__(34);
+	var uid = __webpack_require__(88);
 
 	/**
 	 * @fileoverview
-	 * Utilities for casting and comparing Scratch data-types.
-	 * Scratch behaves slightly differently from JavaScript in many respects,
-	 * and these differences should be encapsulated below.
-	 * For example, in Scratch, add(1, join("hello", world")) -> 1.
-	 * This is because "hello world" is cast to 0.
-	 * In JavaScript, 1 + Number("hello" + "world") would give you NaN.
-	 * Use when coercing a value before computation.
+	 * A Target is an abstract "code-running" object for the Scratch VM.
+	 * Examples include sprites/clones or potentially physical-world devices.
 	 */
 
 	/**
-	 * Scratch cast to number.
-	 * Treats NaN as 0.
-	 * In Scratch 2.0, this is captured by `interp.numArg.`
-	 * @param {*} value Value to cast to number.
-	 * @return {number} The Scratch-casted number value.
+	 * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
+	 * @constructor
 	 */
-	Cast.toNumber = function (value) {
-	    var n = Number(value);
-	    if (isNaN(n)) {
-	        // Scratch treats NaN as 0, when needed as a number.
-	        // E.g., 0 + NaN -> 0.
-	        return 0;
+	function Target (blocks) {
+	    if (!blocks) {
+	        blocks = new Blocks(this);
 	    }
-	    return n;
-	};
-
-	/**
-	 * Scratch cast to boolean.
-	 * In Scratch 2.0, this is captured by `interp.boolArg.`
-	 * Treats some string values differently from JavaScript.
-	 * @param {*} value Value to cast to boolean.
-	 * @return {boolean} The Scratch-casted boolean value.
-	 */
-	Cast.toBoolean = function (value) {
-	    // Already a boolean?
-	    if (typeof value === 'boolean') {
-	        return value;
-	    }
-	    if (typeof value === 'string') {
-	        // These specific strings are treated as false in Scratch.
-	        if ((value == '') ||
-	            (value == '0') ||
-	            (value.toLowerCase() == 'false')) {
-	            return false;
-	        }
-	        // All other strings treated as true.
-	        return true;
-	    }
-	    // Coerce other values and numbers.
-	    return Boolean(value);
-	};
-
-	/**
-	 * Scratch cast to string.
-	 * @param {*} value Value to cast to string.
-	 * @return {string} The Scratch-casted string value.
-	 */
-	Cast.toString = function (value) {
-	    return String(value);
-	};
-
-	/**
-	 * Compare two values, using Scratch cast, case-insensitive string compare, etc.
-	 * In Scratch 2.0, this is captured by `interp.compare.`
-	 * @param {*} v1 First value to compare.
-	 * @param {*} v2 Second value to compare.
-	 * @returns {Number} Negative number if v1 < v2; 0 if equal; positive otherwise.
-	 */
-	Cast.compare = function (v1, v2) {
-	    var n1 = Number(v1);
-	    var n2 = Number(v2);
-	    if (isNaN(n1) || isNaN(n2)) {
-	        // At least one argument can't be converted to a number.
-	        // Scratch compares strings as case insensitive.
-	        var s1 = String(v1).toLowerCase();
-	        var s2 = String(v2).toLowerCase();
-	        return s1.localeCompare(s2);
-	    } else {
-	        // Compare as numbers.
-	        return n1 - n2;
-	    }
-	};
-
-	module.exports = Cast;
-
-
-/***/ },
-/* 84 */
-/***/ function(module, exports) {
-
-	function Scratch3SensingBlocks(runtime) {
 	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
+	     * A unique ID for this target.
+	     * @type {string}
 	     */
-	    this.runtime = runtime;
+	    this.id = uid();
+	    /**
+	     * Blocks run as code for this target.
+	     * @type {!Blocks}
+	     */
+	    this.blocks = blocks;
 	}
 
 	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
+	 * Return a human-readable name for this target.
+	 * Target implementations should override this.
+	 * @abstract
+	 * @returns {string} Human-readable name for the target.
 	 */
-	Scratch3SensingBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'sensing_timer': this.getTimer,
-	        'sensing_resettimer': this.resetTimer,
-	        'sensing_mousex': this.getMouseX,
-	        'sensing_mousey': this.getMouseY,
-	        'sensing_mousedown': this.getMouseDown
-	    };
+	Target.prototype.getName = function () {
+	    return this.id;
 	};
 
-	Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
-	    return util.ioQuery('clock', 'projectTimer');
+	module.exports = Target;
+
+
+/***/ },
+/* 88 */
+/***/ function(module, exports) {
+
+	/**
+	 * @fileoverview UID generator, from Blockly.
+	 */
+
+	/**
+	 * Legal characters for the unique ID.
+	 * Should be all on a US keyboard.  No XML special characters or control codes.
+	 * Removed $ due to issue 251.
+	 * @private
+	 */
+	var soup_ = '!#%()*+,-./:;=?@[]^_`{|}~' +
+	    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+
+	/**
+	 * Generate a unique ID, from Blockly.  This should be globally unique.
+	 * 87 characters ^ 20 length > 128 bits (better than a UUID).
+	 * @return {string} A globally unique ID string.
+	 */
+	var uid = function () {
+	    var length = 20;
+	    var soupLength = soup_.length;
+	    var id = [];
+	    for (var i = 0; i < length; i++) {
+	        id[i] = soup_.charAt(Math.random() * soupLength);
+	    }
+	    return id.join('');
 	};
 
-	Scratch3SensingBlocks.prototype.resetTimer = function (args, util) {
-	    util.ioQuery('clock', 'resetProjectTimer');
-	};
+	module.exports = uid;
 
-	Scratch3SensingBlocks.prototype.getMouseX = function (args, util) {
-	    return util.ioQuery('mouse', 'getX');
-	};
 
-	Scratch3SensingBlocks.prototype.getMouseY = function (args, util) {
-	    return util.ioQuery('mouse', 'getY');
-	};
+/***/ },
+/* 89 */
+/***/ function(module, exports) {
 
-	Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
-	    return util.ioQuery('mouse', 'getIsDown');
+	/**
+	 * @fileoverview
+	 * The specMap below handles a few pieces of "translation" work between
+	 * 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 ordered, unnamed args to unordered, named inputs and fields.
+	 * Keep this up-to-date as 3.0 blocks are renamed, changed, etc.
+	 */
+	var specMap = {
+	    'forward:':{
+	        'opcode':'motion_movesteps',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'STEPS'
+	            }
+	        ]
+	    },
+	    'turnRight:':{
+	        'opcode':'motion_turnright',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'DEGREES'
+	            }
+	        ]
+	    },
+	    'turnLeft:':{
+	        'opcode':'motion_turnleft',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'DEGREES'
+	            }
+	        ]
+	    },
+	    'heading:':{
+	        'opcode':'motion_pointindirection',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_angle',
+	                'inputName':'DIRECTION'
+	            }
+	        ]
+	    },
+	    'pointTowards:':{
+	        'opcode':'motion_pointtowards',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'motion_pointtowards_menu',
+	                'inputName':'TOWARDS'
+	            }
+	        ]
+	    },
+	    'gotoX:y:':{
+	        'opcode':'motion_gotoxy',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'X'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'Y'
+	            }
+	        ]
+	    },
+	    'gotoSpriteOrMouse:':{
+	        'opcode':'motion_goto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'motion_goto_menu',
+	                'inputName':'TO'
+	            }
+	        ]
+	    },
+	    'glideSecs:toX:y:elapsed:from:':{
+	        'opcode':'motion_glidesecstoxy',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SECS'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'X'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'Y'
+	            }
+	        ]
+	    },
+	    'changeXposBy:':{
+	        'opcode':'motion_changexby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'DX'
+	            }
+	        ]
+	    },
+	    'xpos:':{
+	        'opcode':'motion_setx',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'X'
+	            }
+	        ]
+	    },
+	    'changeYposBy:':{
+	        'opcode':'motion_changeyby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'DY'
+	            }
+	        ]
+	    },
+	    'ypos:':{
+	        'opcode':'motion_sety',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'Y'
+	            }
+	        ]
+	    },
+	    'bounceOffEdge':{
+	        'opcode':'motion_ifonedgebounce',
+	        'argMap':[
+	        ]
+	    },
+	    'setRotationStyle':{
+	        'opcode':'motion_setrotationstyle',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'motion_setrotationstyle_menu',
+	                'inputName':'STYLE'
+	            }
+	        ]
+	    },
+	    'xpos':{
+	        'opcode':'motion_xposition',
+	        'argMap':[
+	        ]
+	    },
+	    'ypos':{
+	        'opcode':'motion_yposition',
+	        'argMap':[
+	        ]
+	    },
+	    'heading':{
+	        'opcode':'motion_direction',
+	        'argMap':[
+	        ]
+	    },
+	    'say:duration:elapsed:from:':{
+	        'opcode':'looks_sayforsecs',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'MESSAGE'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SECS'
+	            }
+	        ]
+	    },
+	    'say:':{
+	        'opcode':'looks_say',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'MESSAGE'
+	            }
+	        ]
+	    },
+	    'think:duration:elapsed:from:':{
+	        'opcode':'looks_thinkforsecs',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'MESSAGE'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SECS'
+	            }
+	        ]
+	    },
+	    'think:':{
+	        'opcode':'looks_think',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'MESSAGE'
+	            }
+	        ]
+	    },
+	    'show':{
+	        'opcode':'looks_show',
+	        'argMap':[
+	        ]
+	    },
+	    'hide':{
+	        'opcode':'looks_hide',
+	        'argMap':[
+	        ]
+	    },
+	    'lookLike:':{
+	        'opcode':'looks_switchcostumeto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'looks_costume',
+	                'inputName':'COSTUME'
+	            }
+	        ]
+	    },
+	    'nextCostume':{
+	        'opcode':'looks_nextcostume',
+	        'argMap':[
+	        ]
+	    },
+	    'startScene':{
+	        'opcode':'looks_switchbackdropto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'looks_backdrops',
+	                'inputName':'BACKDROP'
+	            }
+	        ]
+	    },
+	    'changeGraphicEffect:by:':{
+	        'opcode':'looks_changeeffectby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'looks_effectmenu',
+	                'inputName':'EFFECT'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'CHANGE'
+	            }
+	        ]
+	    },
+	    'setGraphicEffect:to:':{
+	        'opcode':'looks_seteffectto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'looks_effectmenu',
+	                'inputName':'EFFECT'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'VALUE'
+	            }
+	        ]
+	    },
+	    'filterReset':{
+	        'opcode':'looks_cleargraphiceffects',
+	        'argMap':[
+	        ]
+	    },
+	    'changeSizeBy:':{
+	        'opcode':'looks_changesizeby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'CHANGE'
+	            }
+	        ]
+	    },
+	    'setSizeTo:':{
+	        'opcode':'looks_setsizeto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SIZE'
+	            }
+	        ]
+	    },
+	    'comeToFront':{
+	        'opcode':'looks_gotofront',
+	        'argMap':[
+	        ]
+	    },
+	    'goBackByLayers:':{
+	        'opcode':'looks_gobacklayers',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_integer',
+	                'inputName':'NUM'
+	            }
+	        ]
+	    },
+	    'costumeIndex':{
+	        'opcode':'looks_costumeorder',
+	        'argMap':[
+	        ]
+	    },
+	    'sceneName':{
+	        'opcode':'looks_backdropname',
+	        'argMap':[
+	        ]
+	    },
+	    'scale':{
+	        'opcode':'looks_size',
+	        'argMap':[
+	        ]
+	    },
+	    'startSceneAndWait':{
+	        'opcode':'looks_switchbackdroptoandwait',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'looks_backdrops',
+	                'inputName':'BACKDROP'
+	            }
+	        ]
+	    },
+	    'nextScene':{
+	        'opcode':'looks_nextbackdrop',
+	        'argMap':[
+	        ]
+	    },
+	    'backgroundIndex':{
+	        'opcode':'looks_backdroporder',
+	        'argMap':[
+	        ]
+	    },
+	    'playSound:':{
+	        'opcode':'sound_play',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sound_sounds_option',
+	                'inputName':'SOUND_MENU'
+	            }
+	        ]
+	    },
+	    'doPlaySoundAndWait':{
+	        'opcode':'sound_playuntildone',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sound_sounds_option',
+	                'inputName':'SOUND_MENU'
+	            }
+	        ]
+	    },
+	    'stopAllSounds':{
+	        'opcode':'sound_stopallsounds',
+	        'argMap':[
+	        ]
+	    },
+	    'playDrum':{
+	        'opcode':'sound_playdrumforbeats',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'DRUMTYPE'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'BEATS'
+	            }
+	        ]
+	    },
+	    'rest:elapsed:from:':{
+	        'opcode':'sound_restforbeats',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'BEATS'
+	            }
+	        ]
+	    },
+	    'noteOn:duration:elapsed:from:':{
+	        'opcode':'sound_playnoteforbeats',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NOTE'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'BEATS'
+	            }
+	        ]
+	    },
+	    'instrument:':{
+	        'opcode':'sound_setinstrumentto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'INSTRUMENT'
+	            }
+	        ]
+	    },
+	    'changeVolumeBy:':{
+	        'opcode':'sound_changevolumeby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'VOLUME'
+	            }
+	        ]
+	    },
+	    'setVolumeTo:':{
+	        'opcode':'sound_setvolumeto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'VOLUME'
+	            }
+	        ]
+	    },
+	    'volume':{
+	        'opcode':'sound_volume',
+	        'argMap':[
+	        ]
+	    },
+	    'changeTempoBy:':{
+	        'opcode':'sound_changetempoby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'TEMPO'
+	            }
+	        ]
+	    },
+	    'setTempoTo:':{
+	        'opcode':'sound_settempotobpm',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'TEMPO'
+	            }
+	        ]
+	    },
+	    'tempo':{
+	        'opcode':'sound_tempo',
+	        'argMap':[
+	        ]
+	    },
+	    'clearPenTrails':{
+	        'opcode':'pen_clear',
+	        'argMap':[
+	        ]
+	    },
+	    'stampCostume':{
+	        'opcode':'pen_stamp',
+	        'argMap':[
+	        ]
+	    },
+	    'putPenDown':{
+	        'opcode':'pen_pendown',
+	        'argMap':[
+	        ]
+	    },
+	    'putPenUp':{
+	        'opcode':'pen_penup',
+	        'argMap':[
+	        ]
+	    },
+	    'penColor:':{
+	        'opcode':'pen_setpencolortocolor',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'colour_picker',
+	                'inputName':'COLOR'
+	            }
+	        ]
+	    },
+	    'changePenHueBy:':{
+	        'opcode':'pen_changepencolorby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'COLOR'
+	            }
+	        ]
+	    },
+	    'setPenHueTo:':{
+	        'opcode':'pen_setpencolortonum',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'COLOR'
+	            }
+	        ]
+	    },
+	    'changePenShadeBy:':{
+	        'opcode':'pen_changepenshadeby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SHADE'
+	            }
+	        ]
+	    },
+	    'setPenShadeTo:':{
+	        'opcode':'pen_changepenshadeby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SHADE'
+	            }
+	        ]
+	    },
+	    'changePenSizeBy:':{
+	        'opcode':'pen_changepensizeby',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SIZE'
+	            }
+	        ]
+	    },
+	    'penSize:':{
+	        'opcode':'pen_setpensizeto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'SIZE'
+	            }
+	        ]
+	    },
+	    'whenGreenFlag':{
+	        'opcode':'event_whenflagclicked',
+	        'argMap':[
+	        ]
+	    },
+	    'whenKeyPressed':{
+	        'opcode':'event_whenkeypressed',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'KEY_OPTION'
+	            }
+	        ]
+	    },
+	    'whenClicked':{
+	        'opcode':'event_whenthisspriteclicked',
+	        'argMap':[
+	        ]
+	    },
+	    'whenSceneStarts':{
+	        'opcode':'event_whenbackdropswitchesto',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'BACKDROP'
+	            }
+	        ]
+	    },
+	    'whenSensorGreaterThan':{
+	        'opcode':'event_whengreaterthan',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'WHENGREATERTHANMENU'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'VALUE'
+	            }
+	        ]
+	    },
+	    'whenIReceive':{
+	        'opcode':'event_whenbroadcastreceived',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'BROADCAST_OPTION'
+	            }
+	        ]
+	    },
+	    'broadcast:':{
+	        'opcode':'event_broadcast',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'BROADCAST_OPTION'
+	            }
+	        ]
+	    },
+	    'doBroadcastAndWait':{
+	        'opcode':'event_broadcastandwait',
+	        'argMap':[
+	            {
+	                'type':'field',
+	                'fieldName':'BROADCAST_OPTION'
+	            }
+	        ]
+	    },
+	    'wait:elapsed:from:':{
+	        'opcode':'control_wait',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_positive_number',
+	                'inputName':'DURATION'
+	            }
+	        ]
+	    },
+	    'doRepeat':{
+	        'opcode':'control_repeat',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_whole_number',
+	                'inputName':'TIMES'
+	            },
+	            {
+	                'type':'input',
+	                'inputName': 'SUBSTACK'
+	            }
+	        ]
+	    },
+	    'doForever':{
+	        'opcode':'control_forever',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputName':'SUBSTACK'
+	            }
+	        ]
+	    },
+	    'doIf':{
+	        'opcode':'control_if',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputName':'CONDITION'
+	            },
+	            {
+	                'type':'input',
+	                'inputName':'SUBSTACK'
+	            }
+	        ]
+	    },
+	    'doIfElse':{
+	        'opcode':'control_if_else',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputName':'CONDITION'
+	            },
+	            {
+	                'type':'input',
+	                'inputName':'SUBSTACK'
+	            },
+	            {
+	                'type':'input',
+	                'inputName':'SUBSTACK2'
+	            }
+	        ]
+	    },
+	    'doWaitUntil':{
+	        'opcode':'control_wait_until',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputName':'CONDITION'
+	            }
+	        ]
+	    },
+	    'doUntil':{
+	        'opcode':'control_repeat_until',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputName':'CONDITION'
+	            },
+	            {
+	                'type':'input',
+	                'inputName':'SUBSTACK'
+	            }
+	        ]
+	    },
+	    'stopScripts':{
+	        'opcode':'control_stop',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'control_stop_menu',
+	                'inputName':'STOP_OPTION'
+	            }
+	        ]
+	    },
+	    'whenCloned':{
+	        'opcode':'control_start_as_clone',
+	        'argMap':[
+	        ]
+	    },
+	    'createCloneOf':{
+	        'opcode':'control_create_clone_of',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'control_create_clone_of_menu',
+	                'inputName':'CLONE_OPTION'
+	            }
+	        ]
+	    },
+	    'deleteClone':{
+	        'opcode':'control_delete_this_clone',
+	        'argMap':[
+	        ]
+	    },
+	    'touching:':{
+	        'opcode':'sensing_touchingobject',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_touchingobjectmenu',
+	                'inputName':'TOUCHINGOBJECTMENU'
+	            }
+	        ]
+	    },
+	    'touchingColor:':{
+	        'opcode':'sensing_touchingcolor',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'colour_picker',
+	                'inputName':'COLOR'
+	            }
+	        ]
+	    },
+	    'color:sees:':{
+	        'opcode':'sensing_coloristouchingcolor',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'colour_picker',
+	                'inputName':'COLOR'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'colour_picker',
+	                'inputName':'COLOR2'
+	            }
+	        ]
+	    },
+	    'distanceTo:':{
+	        'opcode':'sensing_distanceto',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_distancetomenu',
+	                'inputName':'DISTANCETOMENU'
+	            }
+	        ]
+	    },
+	    'doAsk':{
+	        'opcode':'sensing_askandwait',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'QUESTION'
+	            }
+	        ]
+	    },
+	    'answer':{
+	        'opcode':'sensing_answer',
+	        'argMap':[
+	        ]
+	    },
+	    'keyPressed:':{
+	        'opcode':'sensing_keypressed',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_keyoptions',
+	                'inputName':'KEY_OPTION'
+	            }
+	        ]
+	    },
+	    'mousePressed':{
+	        'opcode':'sensing_mousedown',
+	        'argMap':[
+	        ]
+	    },
+	    'mouseX':{
+	        'opcode':'sensing_mousex',
+	        'argMap':[
+	        ]
+	    },
+	    'mouseY':{
+	        'opcode':'sensing_mousey',
+	        'argMap':[
+	        ]
+	    },
+	    'soundLevel':{
+	        'opcode':'sensing_loudness',
+	        'argMap':[
+	        ]
+	    },
+	    'senseVideoMotion':{
+	        'opcode':'sensing_videoon',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_videoonmenuone',
+	                'inputName':'VIDEOONMENU1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_videoonmenutwo',
+	                'inputName':'VIDEOONMENU2'
+	            }
+	        ]
+	    },
+	    'setVideoState':{
+	        'opcode':'sensing_videotoggle',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_videotogglemenu',
+	                'inputName':'VIDEOTOGGLEMENU'
+	            }
+	        ]
+	    },
+	    'setVideoTransparency':{
+	        'opcode':'sensing_setvideotransparency',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'TRANSPARENCY'
+	            }
+	        ]
+	    },
+	    'timer':{
+	        'opcode':'sensing_timer',
+	        'argMap':[
+	        ]
+	    },
+	    'timerReset':{
+	        'opcode':'sensing_resettimer',
+	        'argMap':[
+	        ]
+	    },
+	    'getAttribute:of:':{
+	        'opcode':'sensing_of',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_ofattributemenu',
+	                'inputName':'ATTRIBUTE'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_ofobjectmenu',
+	                'inputName':'OBJECT'
+	            }
+	        ]
+	    },
+	    'timeAndDate':{
+	        'opcode':'sensing_current',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'sensing_currentmenu',
+	                'inputName':'CURRENTMENU'
+	            }
+	        ]
+	    },
+	    'timestamp':{
+	        'opcode':'sensing_dayssince2000',
+	        'argMap':[
+	        ]
+	    },
+	    'getUserName':{
+	        'opcode':'sensing_username',
+	        'argMap':[
+	        ]
+	    },
+	    '+':{
+	        'opcode':'operator_add',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM2'
+	            }
+	        ]
+	    },
+	    '-':{
+	        'opcode':'operator_subtract',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM2'
+	            }
+	        ]
+	    },
+	    '*':{
+	        'opcode':'operator_multiply',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM2'
+	            }
+	        ]
+	    },
+	    '/':{
+	        'opcode':'operator_divide',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'NUM2'
+	            }
+	        ]
+	    },
+	    'randomFrom:to:':{
+	        'opcode':'operator_random',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'FROM'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'math_number',
+	                'inputName':'TO'
+	            }
+	        ]
+	    },
+	    '<':{
+	        'opcode':'operator_lt',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'OPERAND1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'OPERAND2'
+	            }
+	        ]
+	    },
+	    '=':{
+	        'opcode':'operator_equals',
+	        'argMap':[
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'OPERAND1'
+	            },
+	            {
+	                'type':'input',
+	                'inputOp':'text',
+	                'inputName':'OPERAND2'
+	            }
+	        ]
+	    },
+	    '>':{
+	        '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':[]
+	    }
 	};
-
-	module.exports = Scratch3SensingBlocks;
+	module.exports = specMap;
 
 
 /***/ }
diff --git a/vm.min.js b/vm.min.js
index 3b039864b..ce44c7510 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);var e=new s;e.createClone();var r=[e.clones[0]];t.exampleSprite=e,t.runtime=new a(r),t.blockListener=e.blocks.generateBlockListener(!1,t.runtime),t.flyoutBlockListener=e.blocks.generateBlockListener(!0,t.runtime),t.runtime.on(a.STACK_GLOW_ON,function(e){t.emit(a.STACK_GLOW_ON,{id:e})}),t.runtime.on(a.STACK_GLOW_OFF,function(e){t.emit(a.STACK_GLOW_OFF,{id:e})}),t.runtime.on(a.BLOCK_GLOW_ON,function(e){t.emit(a.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(a.BLOCK_GLOW_OFF,function(e){t.emit(a.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(a.VISUAL_REPORT,function(e,r){t.emit(a.VISUAL_REPORT,{id:e,value:r})})}var i=r(1),o=r(2),s=r(6),a=r(61),c="function"==typeof importScripts;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.exampleSprite.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)},c&&(self.importScripts("./node_modules/scratch-render/render-worker.js"),self.renderer=new self.RenderWebGLWorker,self.vmInstance=new n,self.onmessage=function(t){var e=t.data;switch(e.method){case"start":self.vmInstance.runtime.start();break;case"greenFlag":self.vmInstance.runtime.greenFlag();break;case"stopAll":self.vmInstance.runtime.stopAll();break;case"blockListener":self.vmInstance.blockListener(e.args);break;case"flyoutBlockListener":self.vmInstance.flyoutBlockListener(e.args);break;case"getPlaygroundData":self.postMessage({method:"playgroundData",blocks:self.vmInstance.exampleSprite.blocks,threads:self.vmInstance.runtime.threads});break;case"animationFrame":self.vmInstance.animationFrame();break;case"postIOData":self.vmInstance.postIOData(e.device,e.data);break;default:"RendererConnected"==t.data.id,self.renderer.onmessage(t)}},self.vmInstance.runtime.on(a.STACK_GLOW_ON,function(t){self.postMessage({method:a.STACK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.STACK_GLOW_OFF,function(t){self.postMessage({method:a.STACK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_ON,function(t){self.postMessage({method:a.BLOCK_GLOW_ON,id:t})}),self.vmInstance.runtime.on(a.BLOCK_GLOW_OFF,function(t){self.postMessage({method:a.BLOCK_GLOW_OFF,id:t})}),self.vmInstance.runtime.on(a.VISUAL_REPORT,function(t,e){self.postMessage({method:a.VISUAL_REPORT,id:t,value:e})})),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)||0>t||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,c,u;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;throw TypeError('Uncaught, unspecified "error" event.')}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),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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(0>i)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),c(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 c(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var m="",b=!1,v=["{","}"];if(d(r)&&(b=!0,v=["[","]"]),T(r)){var w=r.name?": "+r.name:"";m=" [Function"+w+"]"}if(S(r)&&(m=" "+RegExp.prototype.toString.call(r)),k(r)&&(m=" "+Date.prototype.toUTCString.call(r)),x(r)&&(m=" "+h(r)),0===s.length&&(!b||0==r.length))return v[0]+m+v[1];if(0>n)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var E;return E=b?l(t,r,n,g,s):s.map(function(e){return p(t,r,n,g,e,b)}),t.seen.pop(),f(E,m,v)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)R(e,String(s))?o.push(p(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1),a.indexOf("\n")>-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 _(t){return null===t}function m(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===L(t)}function E(t){return"object"==typeof t&&null!==t}function k(t){return E(t)&&"[object Date]"===L(t)}function x(t){return E(t)&&("[object Error]"===L(t)||t instanceof Error)}function T(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var N=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(N,function(t){if("%%"===t)return"%";if(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];o>r;a=n[++r])s+=_(a)||!E(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var O,B={};e.debuglog=function(t){if(w(O)&&(O=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!B[t])if(new RegExp("\\b"+t+"\\b","i").test(O)){var r=n.pid;B[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else B[t]=function(){};return B[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=_,e.isNullOrUndefined=m,e.isNumber=b,e.isString=y,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=E,e.isDate=k,e.isError=x,e.isFunction=T,e.isPrimitive=A,e.isBuffer=r(4);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",D(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(){u&&s&&(u=!1,s.length?c=s.concat(c):h=-1,c.length&&n())}function n(){if(!u){var t=setTimeout(r);u=!0;for(var e=c.length;e;){for(s=c,c=[];++h<e;)s&&s[h].run();h=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},c=[],u=!1,h=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new i(t,e)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){t||(t=new o),this.blocks=t,this.clones=[]}var i=r(7),o=r(10);n.prototype.createClone=function(){var t=new i(this.blocks);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t),this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(8),s=r(9);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t})}},n.prototype.x=0,n.prototype.y=0,n.prototype.direction=90,n.prototype.visible=!0,n.prototype.size=100,n.prototype.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},n.prototype.setXY=function(t,e){this.x=t,this.y=e,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]})},n.prototype.setDirection=function(t){this.direction=o.wrapClamp(t,-179,180),this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{direction:this.direction})},n.prototype.setSay=function(t,e){return t&&e?void console.log("Setting say bubble:",t,e):void console.log("Clearing say bubble")},n.prototype.setVisible=function(t){this.visible=t,this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible})},n.prototype.setSize=function(t){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[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)},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){t||(t=new i(this)),this.blocks=t}var i=r(10);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(11);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.generateBlockListener=function(t,e){var r=this;return function(n){if("object"==typeof n&&"string"==typeof n.blockId){if("stackclick"===n.element)return void(e&&e.toggleScript(n.blockId));switch(n.type){case"create":for(var o=i(n),s=0;s<o.length;s++)r.createBlock(o[s],t);break;case"change":r.changeBlock({id:n.blockId,element:n.element,name:n.name,value:n.newValue});break;case"move":r.moveBlock({id:n.blockId,oldParent:n.oldParentId,oldInput:n.oldInputName,newParent:n.newParentId,newInput:n.newInputName});break;case"delete":r.deleteBlock({id:n.blockId})}}}},n.prototype.createBlock=function(t,e){this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id)},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null)}void 0===t.newParent?this._addScript(t.id):(this._deleteScript(t.id),void 0!==t.newInput?this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id}:this._blocks[t.newParent].next=t.id)},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block});this._deleteScript(t.id),delete this._blocks[t.id]},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r){var n={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r};e[n.id]=n;for(var o=0;o<t.children.length;o++){for(var s=t.children[o],a=null,c=null,u=0;u<s.children.length;u++){var h=s.children[u];if(h.name){var l=h.name.toLowerCase();"block"==l?a=h:"shadow"==l&&(c=h)}}switch(!a&&c&&(a=c),s.name.toLowerCase()){case"field":var p=s.attribs.name,f="";f=s.children.length>0&&s.children[0].data?s.children[0].data:"",n.fields[p]={name:p,value:f};break;case"value":case"statement":i(a,e,!1);var d=s.attribs.name;n.inputs[d]={name:d,block:a.attribs.id};break;case"next":if(!a||!a.attribs)continue;i(a,e,!1),n.next=a.attribs.id}}}var o=r(12);t.exports=function(t){return"object"==typeof t&&"object"==typeof t.xml?n(o.parseDOM(t.xml.outerHTML)):void 0}},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(13),o=r(20);t.exports={Parser:i,Tokenizer:r(14),ElementType:r(21),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(24))},get Stream(){return n("Stream",r(25))},get WritableStream(){return n("WritableStream",r(26))},get ProxyHandler(){return n("ProxyHandler",r(47))},get DomUtils(){return n("DomUtils",r(48))},get CollectingHandler(){return n("CollectingHandler",r(60))},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(14),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},c=/\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(-1!==e)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(c),r=0>e?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||"\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 c=r(15),u=r(17),h=r(18),l=r(19),p=0,f=p++,d=p++,g=p++,_=p++,m=p++,b=p++,y=p++,v=p++,w=p++,S=p++,E=p++,k=p++,x=p++,T=p++,A=p++,L=p++,I=p++,D=p++,R=p++,N=p++,O=p++,B=p++,C=p++,M=p++,q=p++,P=p++,U=p++,F=p++,j=p++,G=p++,Y=p++,V=p++,z=p++,H=p++,W=p++,X=p++,K=p++,J=p++,Q=p++,Z=p++,$=p++,tt=p++,et=p++,rt=p++,nt=p++,it=p++,ot=p++,st=p++,at=p++,ct=p++,ut=p++,ht=p++,lt=p++,pt=p++,ft=p++,dt=0,gt=dt++,_t=dt++,mt=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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=A,this._sectionStart=this._index+1):"?"===t?(this._state=I,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:Y,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=V:(this._state=f,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,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=_: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=E:"/"===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=k,this._sectionStart=this._index+1):"'"===t?(this._state=x,this._sectionStart=this._index+1):n(t)||(this._state=T,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=ut,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=ut,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=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?B:"-"===t?D:L},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=R,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=N)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=O:this._state=R},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=R)},a.prototype._stateBeforeCdata1=o("C",C,L),a.prototype._stateBeforeCdata2=o("D",M,L),a.prototype._stateBeforeCdata3=o("A",q,L),a.prototype._stateBeforeCdata4=o("T",P,L),a.prototype._stateBeforeCdata5=o("A",U,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=L,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=z:"t"===t||"T"===t?this._state=et:(this._state=g,
-this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=J},a.prototype._stateBeforeScript1=s("R",H),a.prototype._stateBeforeScript2=s("I",W),a.prototype._stateBeforeScript3=s("P",X),a.prototype._stateBeforeScript4=s("T",K),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),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=b,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=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ct,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",ht,lt),a.prototype._stateBeforeNumericEntity=o("X",ft,pt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):("a">t||t>"z")&&("A">t||t>"Z")&&("0">t||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(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):("0">t||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++):("a">t||t>"f")&&("A">t||t>"F")&&("0">t||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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===E?this._stateBeforeAttributeValue(t):this._state===k?this._stateInAttributeValueDoubleQuotes(t):this._state===x?this._stateInAttributeValueSingleQuotes(t):this._state===T?this._stateInAttributeValueNoQuotes(t):this._state===A?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===I?this._stateInProcessingInstruction(t):this._state===D?this._stateBeforeComment(t):this._state===R?this._stateInComment(t):this._state===N?this._stateAfterComment1(t):this._state===O?this._stateAfterComment2(t):this._state===B?this._stateBeforeCdata1(t):this._state===C?this._stateBeforeCdata2(t):this._state===M?this._stateBeforeCdata3(t):this._state===q?this._stateBeforeCdata4(t):this._state===P?this._stateBeforeCdata5(t):this._state===U?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===Y?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===z?this._stateBeforeScript1(t):this._state===H?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===pt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===R||this._state===N||this._state===O?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==E&&this._state!==S&&this._state!==w&&this._state!==x&&this._state!==k&&this._state!==T&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&57343>=t||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(16);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:"	",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=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(21),o=/\s+/g,s=r(22),a=r(23),c={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(22),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 h.getElementsByTagName(t,e,!0)}function o(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var c=r(12),u=c.DomHandler,h=c.DomUtils;r(2).inherits(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(l,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,u.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(26);r(2).inherits(n,o),n.prototype.readable=!0;var s=r(12).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(13),o=r(27).Writable||r(46).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(28),n.Writable=r(42),n.Duplex=r(43),n.Transform=r(44),n.PassThrough=r(45),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},function(t,e,r){(function(n){e=t.exports=r(29),e.Stream=r(27),e.Readable=e,e.Writable=r(38),e.Duplex=r(37),e.Transform=r(40),e.PassThrough=r(41),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(27))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(37);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&&(L||(L=r(39).StringDecoder),this.decoder=new L(t.encoding),this.encoding=t.encoding)}function i(t){r(37);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(A.isNullOrUndefined(r))e.reading=!1,e.ended||h(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&&l(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=D)t=D;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function c(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||A.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return A.isBuffer(e)||A.isString(e)||A.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(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,l(t)}function l(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){p(t)}):p(t))}function p(t){I("emit readable"),t.emit("readable"),b(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<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&x.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function _(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){m(t,r)}))}function m(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function y(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):k.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new k(t);for(var c=0,u=0,h=n.length;h>u&&t>c;u++){var a=n[0],l=Math.min(t-c,a.length);o?r+=a.slice(0,l):a.copy(r,c,0,l),l<a.length?n[0]=a.slice(l):n.shift(),c+=l}}return r}function v(t){var r=t._readableState;if(r.length>0)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;n>r;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}t.exports=i;var E=r(30),k=r(31).Buffer;i.ReadableState=n;var x=r(1).EventEmitter;x.listenerCount||(x.listenerCount=function(t,e){return t.listeners(e).length});var T=r(27),A=r(35);A.inherits=r(5);var L,I=r(36);I=I&&I.debuglog?I.debuglog("stream"):function(){},A.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return A.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new k(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return L||(L=r(39).StringDecoder),this._readableState.decoder=new L(t),this._readableState.encoding=t,this};var D=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!A.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):l(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=c(r,e));var i;return i=t>0?y(t,e):null,A.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),A.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){I("onunpipe"),t===l&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("drain",_),t.removeListener("error",a),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",s),!p.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function a(e){I("onerror",e),h(),t.removeListener("error",a),0===x.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",u),h()}function u(){I("onfinish"),t.removeListener("close",c),h()}function h(){I("unpipe"),l.unpipe(t)}var l=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,I("pipe count=%d opts=%j",p.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;p.endEmitted?e.nextTick(d):l.once("end",d),t.on("unpipe",n);var _=g(l);return t.on("drain",_),l.on("data",s),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",c),t.once("finish",u),t.emit("pipe",l),p.flowing||(I("pipe resume"),l.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;n>i;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),_(this,t)),this},i.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)A.isFunction(t[i])&&A.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=y}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=x,e.isPrimitive=N,e.isBuffer=r(4);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(t){if(u===setTimeout)return setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function n(t){if(c===clearTimeout)return clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function i(){f&&h&&(f=!1,h.length?l=h.concat(l):d=-1,l.length&&o())}function o(){if(!f){var t=r(i);f=!0;for(var e=l.length;e;){for(h=l,l=[];++d<e;)h&&h[d].run();d=-1,e=l.length}h=null,f=!1,n(t)}}function s(t,e){this.fun=t,this.array=e}function a(){}var u,c,p=t.exports={};!function(){try{u=setTimeout}catch(t){u=function(){throw new Error("setTimeout is not defined")}}try{c=clearTimeout}catch(t){c=function(){throw new Error("clearTimeout is not defined")}}}();var h,l=[],f=!1,d=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new s(t,e)),1!==l.length||f||r(o)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=a,p.addListener=a,p.once=a,p.off=a,p.removeListener=a,p.removeAllListeners=a,p.emit=a,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null}var i=r(1),o=r(7),s=r(9),a=r(2),u=r(11),c=r(12),p=r(15),h={scratch3_control:r(17),scratch3_event:r(28),scratch3_looks:r(29),scratch3_motion:r(30),scratch3_operators:r(31),scratch3_sensing:r(32)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype._pushThread=function(t){var e=new s(t);return e.pushStack(t),this.threads.push(e),e},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(r,o){var s=o.blocks.getBlock(r).opcode;if(s===t){var a=o.blocks.getFields(r);if(e)for(var u in e)if(a[u].value!==e[u])return;var c=n._hats[t];if(c.restartExistingThreads)for(var p=0;p<n.threads.length;p++)n.threads[p].topBlock===r&&n._removeThread(n.threads[p]);else for(var h=0;h<n.threads.length;h++)if(n.threads[h].topBlock===r)return;i.push(n._pushThread(r))}},r),i}},n.prototype.greenFlag=function(){this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){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;n<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=this.targetForThread(n);if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},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.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.getTargetById=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<n.runtime.targets.length;e++){var r=n.runtime.targets[e];if(r.hasOwnProperty("drawableID")&&r.drawableID==t)return void n.runtime.startHats("event_whenthisspriteclicked",null,r)}})}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(13),o=r(18);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(21),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(20);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(20);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){
+"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(20);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.scratchX&&(h.x=t.scratchX),t.scratchY&&(h.y=t.scratchY),t.direction&&(h.direction=t.direction),t.scale&&(h.size=100*t.scale),t.visible&&(h.visible=t.visible),t.currentCostumeIndex&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(34),p=r(85),h=r(14),l=r(88),f=r(89);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(35);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+s.name+'">',s.block&&(i+=this.blockToXML(s.block)),s.shadow&&s.shadow!=s.block&&(i+=this.blockToXML(s.shadow)),i+="</value>")}for(var a in e.fields){var u=e.fields[a];i+='<field name="'+u.name+'">'+u.value+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===x?this._stateInAttributeValueNoQuotes(t):this._state===N?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===B?this._stateBeforeCdata3(t):this._state===P?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===V?this._stateBeforeSpecial(t):this._state===H?this._stateBeforeSpecialEnd(t):this._state===Y?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===Q?this._stateAfterScript1(t):this._state===J?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==x&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(54),T=r(55).Buffer;i.ReadableState=n;var E=r(1).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var x=r(51),N=r(59);N.inherits=r(5);var O,A=r(60);A=A&&A.debuglog?A.debuglog("stream"):function(){},N.inherits(i,x),i.prototype.push=function(t,e){var r=this._readableState;return N.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(63).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!N.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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;i<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=x.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)N.isFunction(t[i])&&N.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @license  MIT
 	 */
-"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):c(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=g(e,0>r?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|b(e,r);return t=g(t,n),t.write(e,r),t}function c(e,r){if(t.isBuffer(r))return u(e,r);if(J(r))return h(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return l(e,r);if(r instanceof ArrayBuffer)return p(e,r)}return r.length?f(e,r):d(e,r)}function u(t,e){var r=0|_(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function h(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function p(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=l(e,new Uint8Array(r)),e}function f(t,e){var r=0|_(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|_(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Q),e}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e,r){if(!(this instanceof m))return new m(e,r);var n=new t(e,r);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return Y(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return I(this,e,r);case"binary":return D(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function w(t,e,r,n){return W(Y(e,t.length-r),t,r,n)}function S(t,e,r,n){return W(V(e),t,r,n)}function E(t,e,r,n){return S(t,e,r,n)}function k(t,e,r,n){return W(H(e),t,r,n)}function x(t,e,r,n){return W(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,h,l;switch(a){case 1:128>o&&(s=o);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&o)<<6|63&c,l>127&&(s=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&o)<<12|(63&c)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&1114112>l&&(s=l))}}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 L(n)}function L(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function N(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)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 must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function C(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function P(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function F(t){if(t=j(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"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;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){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(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return X.toByteArray(F(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var X=r(32),K=r(33),J=r(34);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Q={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=b,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"binary":return E(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||O(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||O(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||O(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||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||O(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||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||O(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||O(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||O(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||O(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||O(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||B(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||B(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&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):C(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):C(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):M(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):M(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>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>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>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)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)),0>e&&(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):C(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):C(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):M(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),0>e&&(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):M(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=Y(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(31).Buffer,function(){return this}())},function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===l?62:e===a||e===p?63:c>e?-1:c+10>e?e-c+26+26:h+26>e?e-h:u+26>e?e-u+26:void 0}function r(t){function r(t){u[l++]=t}var n,i,s,a,c,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;c="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,u=new o(3*t.length/4-c),s=c>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===c&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,c="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],c+=r(o);switch(a){case 1:o=t[t.length-1],c+=e(o>>2),c+=e(o<<4&63),c+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],c+=e(o>>10),c+=e(o>>4&63),c+=e(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),h="A".charCodeAt(0),l="-".charCodeAt(0),p="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,p=r?-1:1,f=t[e+l];for(l+=p,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+l],l+=p,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+l>=1?p/c:p*Math.pow(2,1-l),e*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+f]=255&s,f+=d,s/=256,u-=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]"===_(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 c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function p(t){return"[object Date]"===_(t)}function f(t){return"[object Error]"===_(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 _(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=c,e.isUndefined=u,e.isRegExp=h,e.isObject=l,e.isDate=p,e.isError=f,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(31).Buffer)},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(c.call(this,t),u.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;n>r;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(35);a.inherits=r(5);var c=r(29),u=r(38);a.inherits(n,c),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(37);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(37);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function c(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=c(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function l(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function p(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(p(n),r)l(t,n,i,r,o);else{var s=m(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||_(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),y(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=e.objectMode?1:o.length;if(h(t,e,!1,c,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function m(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function y(t,e){var r=m(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function v(t,r,n){r.ending=!0,y(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(31).Buffer;o.WritableState=i;var S=r(35);S.inherits=r(5);var E=r(27);S.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||_(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(31).Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){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&&56319>=n){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},u.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(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.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,c.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(37),c=r(35);c.inherits=r(5),c.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;c.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(40),o=r(35);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(37)},function(t,e,r){t.exports=r(40)},function(t,e,r){t.exports=r(41)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(49),r(55),r(56),r(57),r(58),r(59)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(21),s=r(50),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i
-}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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 p||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=r(51),h=r(52),l={__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},p={__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;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?o(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):s(h,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(53),i=r(54);e.decode=function(t,e){return(!e||0>=e?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||0>=e?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||0>=e?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function c(t){return t.replace(g,o).replace(d,s).replace(f,o)}var u=n(r(19)),h=i(u);e.XML=a(u,h);var l=n(r(17)),p=i(l);e.HTML=a(l,p);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);e.escape=c},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return e>t?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(17),a=r(18),c=r(19),u=r(15),h=n(c),l=n(s),p=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=o(s);return function(e){return String(e).replace(u,t)}}();t.exports={XML:h,HTML:p,HTMLStrict:l}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,c=e.length;c>a&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,0>=n)));a++);return s}function o(t,e){for(var r=0,n=e.length;n>r;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;i>n&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;n>r;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;i>n;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=r(21).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:c}},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(21),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,c,u=[],h=[];if(t===e)return 0;for(n=t;n;)u.unshift(n),n=n.parent;for(n=e;n;)h.unshift(n),n=n.parent;for(c=0;u[c]===h[c];)c++;return 0===c?r.DISCONNECTED:(i=u[c-1],o=i.children,s=u[c],a=h[c],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&&o>i&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(12).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;e>t;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){i.call(this),this.targets=t,this.threads=[],this.sequencer=new o(this),this._primitives={},this._registerBlockPackages(),this.ioDevices={clock:new c,mouse:new u}}var i=r(1),o=r(62),s=r(64),a=r(2),c=r(66),u=r(67),h={scratch3_control:r(68),scratch3_event:r(79),scratch3_looks:r(80),scratch3_motion:r(81),scratch3_operators:r(82),scratch3_sensing:r(84)};n.STACK_GLOW_ON="STACK_GLOW_ON",n.STACK_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this),r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype._pushThread=function(t){this.emit(n.STACK_GLOW_ON,t);var e=new s(t);e.pushStack(t),this.threads.push(e)},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-1&&(this.emit(n.STACK_GLOW_OFF,t.topBlock),this.threads.splice(e,1))},n.prototype.toggleScript=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.greenFlag=function(){for(var t=0;t<this.threads.length;t++)this._removeThread(this.threads[t]);for(var e=0;e<this.targets.length;e++)for(var r=this.targets[e],n=r.blocks.getScripts(),i=0;i<n.length;i++){var o=n[i];"event_whenflagclicked"===r.blocks.getBlock(o).opcode&&this._pushThread(n[i])}},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){for(var e=t.pop(),r=0;r<e.stack.length;r++)this.glowBlock(e.stack[r],!1);this._removeThread(e)}},n.prototype._step=function(){for(var t=this.sequencer.stepThreads(this.threads),e=0;e<t.length;e++)this._removeThread(t[e])},n.prototype.glowBlock=function(t,e){e?this.emit(n.BLOCK_GLOW_ON,t):this.emit(n.BLOCK_GLOW_OFF,t)},n.prototype.visualReport=function(t,e){this.emit(n.VISUAL_REPORT,t,String(e))},n.prototype.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(63),o=r(64),s=r(65);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var c=t[a];c.status===o.STATUS_RUNNING?this.startThread(c):c.status!==o.STATUS_YIELD&&c.status!==o.STATUS_YIELD_FRAME||r++,0===c.stack.length&&c.status===o.STATUS_DONE?e.push(c):s.push(c)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){this.startTime=0}r.prototype.time=function(){return Date.now()},r.prototype.start=function(){this.startTime=this.time()},r.prototype.timeElapsed=function(){return this.time()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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.setStatus=function(t){this.status=t},t.exports=r},function(t,e,r){var n=r(64),i=function(t,e){var r=t.runtime,i=r.targetForThread(e),o=e.peekStack(),s=e.peekStackFrame(),a=i.blocks.getOpcode(o);if(!a)return void console.warn("Could not get opcode for block: "+o);var c=r.getOpcodeFunction(a);if(!c)return void console.warn("Could not get implementation for opcode: "+a);var u={},h=i.blocks.getFields(o);for(var l in h)u[l]=h[l].value;var p=i.blocks.getInputs(o);for(var f in p){var d=p[f],g=d.block;if("undefined"==typeof s.reported[f]){var _=t.stepToReporter(e,g,f);if(_)return}u[f]=s.reported[f]}s.reported={};var m=null;m=c(u,{"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)},stackFrame:s.executionContext,startBranch:function(r){t.stepToBranch(e,r)},target:i,ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}});var b=m&&m.then&&"function"==typeof m.then;b?(e.status===n.STATUS_RUNNING&&e.setStatus(n.STATUS_YIELD),m.then(function(i){e.pushReportedValue(i),"undefined"!=typeof i&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),i),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)},function(r){console.warn("Primitive rejected promise: ",r),e.setStatus(n.STATUS_RUNNING),t.proceedThread(e)})):e.status===n.STATUS_RUNNING&&(e.pushReportedValue(m),"undefined"!=typeof m&&e.peekStack()===e.topBlock&&r.visualReport(e.peekStack(),m))};t.exports=i},function(t,e,r){function n(){this._projectTimer=new i,this._projectTimer.start()}var i=r(63);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(){this._x=0,this._y=0,this._isDown=!1}var i=r(8);n.prototype.postData=function(t){t.x&&(this._x=t.x),t.y&&(this._y=t.y),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown)},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e,r){function n(t){this.runtime=t}var i=r(69);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=parseInt(t.TIMES)),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch())},n.prototype.repeatUntil=function(t,e){e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,t.CONDITION||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){return new i(function(e){setTimeout(function(){e()},1e3*t.DURATION)})},n.prototype["if"]=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION&&e.startBranch())},n.prototype.ifElse=function(t,e){void 0===e.stackFrame.executedInFrame&&(e.stackFrame.executedInFrame=!0,t.CONDITION?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(70)},function(t,e,r){"use strict";t.exports=r(71),r(73),r(74),r(75),r(76),r(78)},function(t,e,r){"use strict";function n(){}function i(t){try{return t.then}catch(e){return m=e,b}}function o(t,e){try{return t(e)}catch(r){return m=r,b}}function s(t,e,r){try{t(e,r)}catch(n){return m=n,b}}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 c(t,e,r){return new t.constructor(function(i,o){var s=new a(n);s.then(i,o),u(t,new d(e,r,s))})}function u(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 h(t,e)}function h(t,e){_(function(){var r=1===t._81?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._81?l(e.promise,t._65):p(e.promise,t._65));var n=o(r,t._65);n===b?p(e.promise,m):l(e.promise,n)})}function l(t,e){if(e===t)return p(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=i(e);if(r===b)return p(t,m);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 p(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),f(t)}function f(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,l(e,t))},function(t){r||(r=!0,p(e,t))});r||n!==b||(r=!0,p(e,m))}var _=r(72),m=null,b={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return c(this,t,e);var r=new a(n);return u(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),c=!0),a[a.length]=t}function n(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>h){for(var e=0,r=a.length-u;r>e;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,c=!1}function i(t){var e=1,r=new l(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],c=!1,u=0,h=1024,l=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof l?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(71);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(71);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(71);t.exports=i;var o=n(!0),s=n(!1),a=n(null),c=n(void 0),u=n(0),h=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return c;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return h;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var c=a.then;if("function"==typeof c){var u=new i(c.bind(a));return void u.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;e>n;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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(71),s=r(77);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(c.length)throw c.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(72),a=[],c=[],u=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(c.push(t),u())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";var n=r(71);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():-1===this._81||-2===this._81?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){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{event_whenflagclicked:this.whenFlagClicked,event_whenbroadcastreceived:this.whenBroadcastReceived,event_broadcast:this.broadcast}},r.prototype.whenFlagClicked=function(){},r.prototype.whenBroadcastReceived=function(){},r.prototype.broadcast=function(){},t.exports=r},function(t,e){function r(t){this.runtime=t}r.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_effectmenu:this.effectMenu,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_size:this.getSize}},r.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},r.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)})},r.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},r.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)})},r.prototype.show=function(t,e){e.target.setVisible(!0)},r.prototype.hide=function(t,e){e.target.setVisible(!1)},r.prototype.effectMenu=function(t){return t.EFFECT.toLowerCase()},r.prototype.changeEffect=function(t,e){var r=t.CHANGE+e.target.effects[t.EFFECT];e.target.setEffect(t.EFFECT,r)},r.prototype.setEffect=function(t,e){e.target.setEffect(t.EFFECT,t.VALUE)},r.prototype.clearEffects=function(t,e){e.target.clearEffects()},r.prototype.changeSize=function(t,e){e.target.setSize(e.target.size+t.CHANGE)},r.prototype.setSize=function(t,e){e.target.setSize(t.SIZE)},r.prototype.getSize=function(t,e){return e.target.size},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=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_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.degToRad(e.target.direction),n=t.STEPS*Math.cos(r),o=t.STEPS*Math.sin(r);e.target.setXY(e.target.x+n,e.target.y+o)},n.prototype.goToXY=function(t,e){e.target.setXY(t.X,t.Y)},n.prototype.turnRight=function(t,e){e.target.setDirection(e.target.direction+t.DEGREES)},n.prototype.turnLeft=function(t,e){e.target.setDirection(e.target.direction-t.DEGREES)},n.prototype.pointInDirection=function(t,e){e.target.setDirection(t.DIRECTION)},n.prototype.changeX=function(t,e){e.target.setXY(e.target.x+t.DX,e.target.y)},n.prototype.setX=function(t,e){e.target.setXY(t.X,e.target.y)},n.prototype.changeY=function(t,e){e.target.setXY(e.target.x,e.target.y+t.DY)},n.prototype.setY=function(t,e){e.target.setXY(e.target.x,t.Y)},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(83);n.prototype.getPrimitives=function(){return{math_number:this.number,math_positive_number:this.number,math_whole_number:this.number,math_angle:this.number,text:this.text,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_menu:this.mathopMenu,operator_mathop:this.mathop}},n.prototype.number=function(t){return i.toNumber(t.NUM)},n.prototype.text=function(t){return i.toString(t.TEXT)},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&&t.OPERAND2)},n.prototype.or=function(t){return i.toBoolean(t.OPERAND1||t.OPERAND2)},n.prototype.not=function(t){return i.toBoolean(!t.OPERAND)},n.prototype.random=function(t){var e=t.FROM<=t.TO?t.FROM:t.TO,r=t.FROM<=t.TO?t.TO:t.FROM;if(e==r)return e;var n=e==parseInt(e),i=r==parseInt(r);return n&&i?e+parseInt(Math.random()*(r+1-e)):Math.random()*(r-e)+e},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 0>e||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 0>n/r&&(n+=r),n},n.prototype.round=function(t){return Math.round(i.toNumber(t.NUM))},n.prototype.mathopMenu=function(t){return t.OPERATOR},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){function r(){}r.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},r.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!=t&&"0"!=t&&"false"!=t.toLowerCase():Boolean(t)},r.toString=function(t){return String(t)},r.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=r},function(t,e){function r(t){this.runtime=t}r.prototype.getPrimitives=function(){return{sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown}},r.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},r.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},r.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},r.prototype.getMouseY=function(t,e){
-return e.ioQuery("mouse","getY")},r.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},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()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function p(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Q(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=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;c<a;c++)if(o(t,c)===o(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===u)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;l<u;l++)if(o(t,c+l)!==o(e,l)){h=!1;break}if(h)return c}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function k(t,e,r,n){return K(Y(e,t.length-r),t,r,n)}function T(t,e,r,n){return K(z(e),t,r,n)}function E(t,e,r,n){return T(t,e,r,n)}function x(t,e,r,n){return K(W(e),t,r,n)}function N(t,e,r,n){return K(X(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?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;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)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||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.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<o;++i)t[r+i]=(e&255<<8*(n?i:1-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<o;++i)t[r+i]=e>>>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;s<n;++s){if(r=t.charCodeAt(s),r>55295&&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<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=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<n&&!(i+r>=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);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=_,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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;h<u;++h)if(c[h]!==p[h]){s=c[h],a=p[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=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<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(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<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=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<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=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=r-1,s=1;for(this[e+o]=255&t;--o>=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<r&&(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.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<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:Y(new t(e,i).toString()),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(55).Buffer,function(){return this}())},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)a[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,s,a=t.length;if(a%4>0)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<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[p++]=i>>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;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",s=[],u=16383,c=0,p=r-n;c<p;c+=u)s.push(o(t,c,c+u>p?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<<a)-1,c=u>>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<<c)-1,h=p>>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<<i|a,c+=i;c>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;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(59);a.inherits=r(5);var u=r(53),c=r(62);a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(61);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void k.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):p(t,e,!1,s,r,i,o),a}function p(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=_(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),b(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,p(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(p(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function _(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=_(t,e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function v(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(55).Buffer;o.WritableState=i;var S=r(59);S.inherits=r(5);var k=r(51);S.inherits(o,k),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||m(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(55).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=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<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(61),u=r(59);u.inherits=r(5),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform));
+}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(64),o=r(59);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(62)},function(t,e,r){t.exports=r(61)},function(t,e,r){t.exports=r(64)},function(t,e,r){t.exports=r(65)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(36).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(73),r(79),r(80),r(81),r(82),r(83)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(45),s=r(74),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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"<![CDATA["+t.children[0].data+"]]>"}function u(t){return"<!--"+t.data+"-->"}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;n<t.length;n++){var p=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(77),i=r(78);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function u(t){return t.replace(g,o).replace(d,s).replace(f,o)}var c=n(r(43)),p=i(c);e.XML=a(c,p);var h=n(r(41)),l=i(h);e.HTML=a(h,l);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(c);e.escape=u},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?c("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(41),a=r(42),u=r(43),c=r(39),p=n(u),h=n(s),l=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),p(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,u=0;n<r.length;n++)e[u]===r[n]?(r[n]+=";?",u++):r[n]+=";";var c=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),p=o(s);return function(e){return String(e).replace(c,t)}}();t.exports={XML:p,HTML:l,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,u=e.length;a<u&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(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;r<n;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)c(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(c(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n<i;n++)c(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(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<o&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(36).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){t||(t=new o),this.blocks=t,this.name="",this.costumes=[],this.clones=[]}var i=r(86),o=r(34);n.prototype.createClone=function(){var t=new i(this);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t.blocks),this.sprite=t,this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(16),s=r(87);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t,e.updateAllDrawableProperties()})}},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<this.sprite.costumes.length;e++)if(this.sprite.costumes[e].name==t)return e;return-1},n.prototype.updateAllDrawableProperties=function(){this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y],direction:this.direction,scale:[this.size,this.size],visible:this.visible,skin:this.sprite.costumes[this.currentCostume].skin})},n.prototype.getName=function(){return this.sprite.name},n.prototype.isTouchingColor=function(t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t)},n.prototype.colorIsTouchingColor=function(t,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t,e)},t.exports=n},function(t,e,r){function n(t){t||(t=new i(this)),this.id=o(),this.blocks=t}var i=r(34),o=r(88);n.prototype.getName=function(){return this.id},t.exports=n},function(t,e){var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=function(){for(var t=20,e=r.length,n=[],i=0;i<t;i++)n[i]=r.charAt(Math.random()*e);return n.join("")};t.exports=n},function(t,e){var r={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"input",inputOp:"motion_setrotationstyle_menu",inputName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},comeToFront:{opcode:"looks_gotofront",argMap:[]},"goBackByLayers:":{opcode:"looks_gobacklayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumeorder",argMap:[]},sceneName:{opcode:"looks_backdropname",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdroporder",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"sound_playdrumforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUMTYPE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"sound_restforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"sound_playnoteforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"sound_setinstrumentto",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"sound_changetempoby",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"sound_settempotobpm",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"sound_tempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_pendown",argMap:[]},putPenUp:{opcode:"pen_penup",argMap:[]},"penColor:":{opcode:"pen_setpencolortocolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changepencolorby",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"setPenHueTo:":{opcode:"pen_setpencolortonum",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"changePenShadeBy:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changepensizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setpensizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"},{type:"input",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"input",inputOp:"control_stop_menu",inputName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},senseVideoMotion:{opcode:"sensing_videoon",argMap:[{type:"input",inputOp:"sensing_videoonmenuone",inputName:"VIDEOONMENU1"},{type:"input",inputOp:"sensing_videoonmenutwo",inputName:"VIDEOONMENU2"}]},setVideoState:{opcode:"sensing_videotoggle",argMap:[{type:"input",inputOp:"sensing_videotogglemenu",inputName:"VIDEOTOGGLEMENU"}]},setVideoTransparency:{opcode:"sensing_setvideotransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"input",inputOp:"sensing_ofattributemenu",inputName:"ATTRIBUTE"},{type:"input",inputOp:"sensing_ofobjectmenu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"input",inputOp:"sensing_currentmenu",inputName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{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
diff --git a/vm.worker.js b/vm.worker.js
deleted file mode 100644
index efdd8771a..000000000
--- a/vm.worker.js
+++ /dev/null
@@ -1,1169 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId])
-/******/ 			return installedModules[moduleId].exports;
-
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			exports: {},
-/******/ 			id: moduleId,
-/******/ 			loaded: false
-/******/ 		};
-
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ 		// Flag the module as loaded
-/******/ 		module.loaded = true;
-
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-
-
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "";
-
-/******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var EventEmitter = __webpack_require__(1);
-	var util = __webpack_require__(2);
-
-	function VirtualMachine () {
-	    if (!window.Worker) {
-	        console.error('WebWorkers not supported in this environment.' +
-	            ' Please use the non-worker version (vm.js or vm.min.js).');
-	        return;
-	    }
-	    var instance = this;
-	    EventEmitter.call(instance);
-	    instance.vmWorker = new Worker('../vm.js');
-
-	    // onmessage calls are converted into emitted events.
-	    instance.vmWorker.onmessage = function (e) {
-	        instance.emit(e.data.method, e.data);
-	    };
-
-	    instance.blockListener = function (e) {
-	        // Messages from Blockly are not serializable by default.
-	        // Pull out the necessary, serializable components to pass across.
-	        var serializableE = {
-	            blockId: e.blockId,
-	            element: e.element,
-	            type: e.type,
-	            name: e.name,
-	            newValue: e.newValue,
-	            oldParentId: e.oldParentId,
-	            oldInputName: e.oldInputName,
-	            newParentId: e.newParentId,
-	            newInputName: e.newInputName,
-	            xml: {
-	                outerHTML: (e.xml) ? e.xml.outerHTML : null
-	            }
-	        };
-	        instance.vmWorker.postMessage({
-	            method: 'blockListener',
-	            args: serializableE
-	        });
-	    };
-	}
-
-	/**
-	 * Inherit from EventEmitter
-	 */
-	util.inherits(VirtualMachine, EventEmitter);
-
-	// For documentation, please see index.js.
-	// These mirror the functionality provided there, with the worker wrapper.
-	VirtualMachine.prototype.getPlaygroundData = function () {
-	    this.vmWorker.postMessage({method: 'getPlaygroundData'});
-	};
-
-	VirtualMachine.prototype.postIOData = function (device, data) {
-	    this.vmWorker.postMessage({
-	        method: 'postIOData',
-	        device: device,
-	        data: data
-	    });
-	};
-
-	VirtualMachine.prototype.start = function () {
-	    this.vmWorker.postMessage({method: 'start'});
-	};
-
-	VirtualMachine.prototype.greenFlag = function () {
-	    this.vmWorker.postMessage({method: 'greenFlag'});
-	};
-
-	VirtualMachine.prototype.stopAll = function () {
-	    this.vmWorker.postMessage({method: 'stopAll'});
-	};
-
-	VirtualMachine.prototype.animationFrame = function () {
-	    this.vmWorker.postMessage({method: 'animationFrame'});
-	};
-
-	/**
-	 * Export and bind to `window`
-	 */
-	module.exports = VirtualMachine;
-	if (typeof window !== 'undefined') window.VirtualMachine = module.exports;
-
-
-/***/ },
-/* 1 */
-/***/ function(module, exports) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	function EventEmitter() {
-	  this._events = this._events || {};
-	  this._maxListeners = this._maxListeners || undefined;
-	}
-	module.exports = EventEmitter;
-
-	// Backwards-compat with node 0.10.x
-	EventEmitter.EventEmitter = EventEmitter;
-
-	EventEmitter.prototype._events = undefined;
-	EventEmitter.prototype._maxListeners = undefined;
-
-	// By default EventEmitters will print a warning if more than 10 listeners are
-	// added to it. This is a useful default which helps finding memory leaks.
-	EventEmitter.defaultMaxListeners = 10;
-
-	// Obviously not all Emitters should be limited to 10. This function allows
-	// that to be increased. Set to zero for unlimited.
-	EventEmitter.prototype.setMaxListeners = function(n) {
-	  if (!isNumber(n) || n < 0 || isNaN(n))
-	    throw TypeError('n must be a positive number');
-	  this._maxListeners = n;
-	  return this;
-	};
-
-	EventEmitter.prototype.emit = function(type) {
-	  var er, handler, len, args, i, listeners;
-
-	  if (!this._events)
-	    this._events = {};
-
-	  // If there is no 'error' event listener then throw.
-	  if (type === 'error') {
-	    if (!this._events.error ||
-	        (isObject(this._events.error) && !this._events.error.length)) {
-	      er = arguments[1];
-	      if (er instanceof Error) {
-	        throw er; // Unhandled 'error' event
-	      }
-	      throw TypeError('Uncaught, unspecified "error" event.');
-	    }
-	  }
-
-	  handler = this._events[type];
-
-	  if (isUndefined(handler))
-	    return false;
-
-	  if (isFunction(handler)) {
-	    switch (arguments.length) {
-	      // fast cases
-	      case 1:
-	        handler.call(this);
-	        break;
-	      case 2:
-	        handler.call(this, arguments[1]);
-	        break;
-	      case 3:
-	        handler.call(this, arguments[1], arguments[2]);
-	        break;
-	      // slower
-	      default:
-	        args = Array.prototype.slice.call(arguments, 1);
-	        handler.apply(this, args);
-	    }
-	  } else if (isObject(handler)) {
-	    args = Array.prototype.slice.call(arguments, 1);
-	    listeners = handler.slice();
-	    len = listeners.length;
-	    for (i = 0; i < len; i++)
-	      listeners[i].apply(this, args);
-	  }
-
-	  return true;
-	};
-
-	EventEmitter.prototype.addListener = function(type, listener) {
-	  var m;
-
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  if (!this._events)
-	    this._events = {};
-
-	  // To avoid recursion in the case that type === "newListener"! Before
-	  // adding it to the listeners, first emit "newListener".
-	  if (this._events.newListener)
-	    this.emit('newListener', type,
-	              isFunction(listener.listener) ?
-	              listener.listener : listener);
-
-	  if (!this._events[type])
-	    // Optimize the case of one listener. Don't need the extra array object.
-	    this._events[type] = listener;
-	  else if (isObject(this._events[type]))
-	    // If we've already got an array, just append.
-	    this._events[type].push(listener);
-	  else
-	    // Adding the second element, need to change to array.
-	    this._events[type] = [this._events[type], listener];
-
-	  // Check for listener leak
-	  if (isObject(this._events[type]) && !this._events[type].warned) {
-	    if (!isUndefined(this._maxListeners)) {
-	      m = this._maxListeners;
-	    } else {
-	      m = EventEmitter.defaultMaxListeners;
-	    }
-
-	    if (m && m > 0 && this._events[type].length > m) {
-	      this._events[type].warned = true;
-	      console.error('(node) warning: possible EventEmitter memory ' +
-	                    'leak detected. %d listeners added. ' +
-	                    'Use emitter.setMaxListeners() to increase limit.',
-	                    this._events[type].length);
-	      if (typeof console.trace === 'function') {
-	        // not supported in IE 10
-	        console.trace();
-	      }
-	    }
-	  }
-
-	  return this;
-	};
-
-	EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-
-	EventEmitter.prototype.once = function(type, listener) {
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  var fired = false;
-
-	  function g() {
-	    this.removeListener(type, g);
-
-	    if (!fired) {
-	      fired = true;
-	      listener.apply(this, arguments);
-	    }
-	  }
-
-	  g.listener = listener;
-	  this.on(type, g);
-
-	  return this;
-	};
-
-	// emits a 'removeListener' event iff the listener was removed
-	EventEmitter.prototype.removeListener = function(type, listener) {
-	  var list, position, length, i;
-
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  if (!this._events || !this._events[type])
-	    return this;
-
-	  list = this._events[type];
-	  length = list.length;
-	  position = -1;
-
-	  if (list === listener ||
-	      (isFunction(list.listener) && list.listener === listener)) {
-	    delete this._events[type];
-	    if (this._events.removeListener)
-	      this.emit('removeListener', type, listener);
-
-	  } else if (isObject(list)) {
-	    for (i = length; i-- > 0;) {
-	      if (list[i] === listener ||
-	          (list[i].listener && list[i].listener === listener)) {
-	        position = i;
-	        break;
-	      }
-	    }
-
-	    if (position < 0)
-	      return this;
-
-	    if (list.length === 1) {
-	      list.length = 0;
-	      delete this._events[type];
-	    } else {
-	      list.splice(position, 1);
-	    }
-
-	    if (this._events.removeListener)
-	      this.emit('removeListener', type, listener);
-	  }
-
-	  return this;
-	};
-
-	EventEmitter.prototype.removeAllListeners = function(type) {
-	  var key, listeners;
-
-	  if (!this._events)
-	    return this;
-
-	  // not listening for removeListener, no need to emit
-	  if (!this._events.removeListener) {
-	    if (arguments.length === 0)
-	      this._events = {};
-	    else if (this._events[type])
-	      delete this._events[type];
-	    return this;
-	  }
-
-	  // emit removeListener for all listeners on all events
-	  if (arguments.length === 0) {
-	    for (key in this._events) {
-	      if (key === 'removeListener') continue;
-	      this.removeAllListeners(key);
-	    }
-	    this.removeAllListeners('removeListener');
-	    this._events = {};
-	    return this;
-	  }
-
-	  listeners = this._events[type];
-
-	  if (isFunction(listeners)) {
-	    this.removeListener(type, listeners);
-	  } else if (listeners) {
-	    // LIFO order
-	    while (listeners.length)
-	      this.removeListener(type, listeners[listeners.length - 1]);
-	  }
-	  delete this._events[type];
-
-	  return this;
-	};
-
-	EventEmitter.prototype.listeners = function(type) {
-	  var ret;
-	  if (!this._events || !this._events[type])
-	    ret = [];
-	  else if (isFunction(this._events[type]))
-	    ret = [this._events[type]];
-	  else
-	    ret = this._events[type].slice();
-	  return ret;
-	};
-
-	EventEmitter.prototype.listenerCount = function(type) {
-	  if (this._events) {
-	    var evlistener = this._events[type];
-
-	    if (isFunction(evlistener))
-	      return 1;
-	    else if (evlistener)
-	      return evlistener.length;
-	  }
-	  return 0;
-	};
-
-	EventEmitter.listenerCount = function(emitter, type) {
-	  return emitter.listenerCount(type);
-	};
-
-	function isFunction(arg) {
-	  return typeof arg === 'function';
-	}
-
-	function isNumber(arg) {
-	  return typeof arg === 'number';
-	}
-
-	function isObject(arg) {
-	  return typeof arg === 'object' && arg !== null;
-	}
-
-	function isUndefined(arg) {
-	  return arg === void 0;
-	}
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	var formatRegExp = /%[sdj%]/g;
-	exports.format = function(f) {
-	  if (!isString(f)) {
-	    var objects = [];
-	    for (var i = 0; i < arguments.length; i++) {
-	      objects.push(inspect(arguments[i]));
-	    }
-	    return objects.join(' ');
-	  }
-
-	  var i = 1;
-	  var args = arguments;
-	  var len = args.length;
-	  var str = String(f).replace(formatRegExp, function(x) {
-	    if (x === '%%') return '%';
-	    if (i >= len) return x;
-	    switch (x) {
-	      case '%s': return String(args[i++]);
-	      case '%d': return Number(args[i++]);
-	      case '%j':
-	        try {
-	          return JSON.stringify(args[i++]);
-	        } catch (_) {
-	          return '[Circular]';
-	        }
-	      default:
-	        return x;
-	    }
-	  });
-	  for (var x = args[i]; i < len; x = args[++i]) {
-	    if (isNull(x) || !isObject(x)) {
-	      str += ' ' + x;
-	    } else {
-	      str += ' ' + inspect(x);
-	    }
-	  }
-	  return str;
-	};
-
-
-	// Mark that a method should not be used.
-	// Returns a modified function which warns once by default.
-	// If --no-deprecation is set, then it is a no-op.
-	exports.deprecate = function(fn, msg) {
-	  // Allow for deprecating things in the process of starting up.
-	  if (isUndefined(global.process)) {
-	    return function() {
-	      return exports.deprecate(fn, msg).apply(this, arguments);
-	    };
-	  }
-
-	  if (process.noDeprecation === true) {
-	    return fn;
-	  }
-
-	  var warned = false;
-	  function deprecated() {
-	    if (!warned) {
-	      if (process.throwDeprecation) {
-	        throw new Error(msg);
-	      } else if (process.traceDeprecation) {
-	        console.trace(msg);
-	      } else {
-	        console.error(msg);
-	      }
-	      warned = true;
-	    }
-	    return fn.apply(this, arguments);
-	  }
-
-	  return deprecated;
-	};
-
-
-	var debugs = {};
-	var debugEnviron;
-	exports.debuglog = function(set) {
-	  if (isUndefined(debugEnviron))
-	    debugEnviron = process.env.NODE_DEBUG || '';
-	  set = set.toUpperCase();
-	  if (!debugs[set]) {
-	    if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
-	      var pid = process.pid;
-	      debugs[set] = function() {
-	        var msg = exports.format.apply(exports, arguments);
-	        console.error('%s %d: %s', set, pid, msg);
-	      };
-	    } else {
-	      debugs[set] = function() {};
-	    }
-	  }
-	  return debugs[set];
-	};
-
-
-	/**
-	 * Echos the value of a value. Trys to print the value out
-	 * in the best way possible given the different types.
-	 *
-	 * @param {Object} obj The object to print out.
-	 * @param {Object} opts Optional options object that alters the output.
-	 */
-	/* legacy: obj, showHidden, depth, colors*/
-	function inspect(obj, opts) {
-	  // default options
-	  var ctx = {
-	    seen: [],
-	    stylize: stylizeNoColor
-	  };
-	  // legacy...
-	  if (arguments.length >= 3) ctx.depth = arguments[2];
-	  if (arguments.length >= 4) ctx.colors = arguments[3];
-	  if (isBoolean(opts)) {
-	    // legacy...
-	    ctx.showHidden = opts;
-	  } else if (opts) {
-	    // got an "options" object
-	    exports._extend(ctx, opts);
-	  }
-	  // set default options
-	  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
-	  if (isUndefined(ctx.depth)) ctx.depth = 2;
-	  if (isUndefined(ctx.colors)) ctx.colors = false;
-	  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
-	  if (ctx.colors) ctx.stylize = stylizeWithColor;
-	  return formatValue(ctx, obj, ctx.depth);
-	}
-	exports.inspect = inspect;
-
-
-	// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
-	inspect.colors = {
-	  'bold' : [1, 22],
-	  'italic' : [3, 23],
-	  'underline' : [4, 24],
-	  'inverse' : [7, 27],
-	  'white' : [37, 39],
-	  'grey' : [90, 39],
-	  'black' : [30, 39],
-	  'blue' : [34, 39],
-	  'cyan' : [36, 39],
-	  'green' : [32, 39],
-	  'magenta' : [35, 39],
-	  'red' : [31, 39],
-	  'yellow' : [33, 39]
-	};
-
-	// Don't use 'blue' not visible on cmd.exe
-	inspect.styles = {
-	  'special': 'cyan',
-	  'number': 'yellow',
-	  'boolean': 'yellow',
-	  'undefined': 'grey',
-	  'null': 'bold',
-	  'string': 'green',
-	  'date': 'magenta',
-	  // "name": intentionally not styling
-	  'regexp': 'red'
-	};
-
-
-	function stylizeWithColor(str, styleType) {
-	  var style = inspect.styles[styleType];
-
-	  if (style) {
-	    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
-	           '\u001b[' + inspect.colors[style][1] + 'm';
-	  } else {
-	    return str;
-	  }
-	}
-
-
-	function stylizeNoColor(str, styleType) {
-	  return str;
-	}
-
-
-	function arrayToHash(array) {
-	  var hash = {};
-
-	  array.forEach(function(val, idx) {
-	    hash[val] = true;
-	  });
-
-	  return hash;
-	}
-
-
-	function formatValue(ctx, value, recurseTimes) {
-	  // Provide a hook for user-specified inspect functions.
-	  // Check that value is an object with an inspect function on it
-	  if (ctx.customInspect &&
-	      value &&
-	      isFunction(value.inspect) &&
-	      // Filter out the util module, it's inspect function is special
-	      value.inspect !== exports.inspect &&
-	      // Also filter out any prototype objects using the circular check.
-	      !(value.constructor && value.constructor.prototype === value)) {
-	    var ret = value.inspect(recurseTimes, ctx);
-	    if (!isString(ret)) {
-	      ret = formatValue(ctx, ret, recurseTimes);
-	    }
-	    return ret;
-	  }
-
-	  // Primitive types cannot have properties
-	  var primitive = formatPrimitive(ctx, value);
-	  if (primitive) {
-	    return primitive;
-	  }
-
-	  // Look up the keys of the object.
-	  var keys = Object.keys(value);
-	  var visibleKeys = arrayToHash(keys);
-
-	  if (ctx.showHidden) {
-	    keys = Object.getOwnPropertyNames(value);
-	  }
-
-	  // IE doesn't make error fields non-enumerable
-	  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
-	  if (isError(value)
-	      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
-	    return formatError(value);
-	  }
-
-	  // Some type of object without properties can be shortcutted.
-	  if (keys.length === 0) {
-	    if (isFunction(value)) {
-	      var name = value.name ? ': ' + value.name : '';
-	      return ctx.stylize('[Function' + name + ']', 'special');
-	    }
-	    if (isRegExp(value)) {
-	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-	    }
-	    if (isDate(value)) {
-	      return ctx.stylize(Date.prototype.toString.call(value), 'date');
-	    }
-	    if (isError(value)) {
-	      return formatError(value);
-	    }
-	  }
-
-	  var base = '', array = false, braces = ['{', '}'];
-
-	  // Make Array say that they are Array
-	  if (isArray(value)) {
-	    array = true;
-	    braces = ['[', ']'];
-	  }
-
-	  // Make functions say that they are functions
-	  if (isFunction(value)) {
-	    var n = value.name ? ': ' + value.name : '';
-	    base = ' [Function' + n + ']';
-	  }
-
-	  // Make RegExps say that they are RegExps
-	  if (isRegExp(value)) {
-	    base = ' ' + RegExp.prototype.toString.call(value);
-	  }
-
-	  // Make dates with properties first say the date
-	  if (isDate(value)) {
-	    base = ' ' + Date.prototype.toUTCString.call(value);
-	  }
-
-	  // Make error with message first say the error
-	  if (isError(value)) {
-	    base = ' ' + formatError(value);
-	  }
-
-	  if (keys.length === 0 && (!array || value.length == 0)) {
-	    return braces[0] + base + braces[1];
-	  }
-
-	  if (recurseTimes < 0) {
-	    if (isRegExp(value)) {
-	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-	    } else {
-	      return ctx.stylize('[Object]', 'special');
-	    }
-	  }
-
-	  ctx.seen.push(value);
-
-	  var output;
-	  if (array) {
-	    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
-	  } else {
-	    output = keys.map(function(key) {
-	      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
-	    });
-	  }
-
-	  ctx.seen.pop();
-
-	  return reduceToSingleString(output, base, braces);
-	}
-
-
-	function formatPrimitive(ctx, value) {
-	  if (isUndefined(value))
-	    return ctx.stylize('undefined', 'undefined');
-	  if (isString(value)) {
-	    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
-	                                             .replace(/'/g, "\\'")
-	                                             .replace(/\\"/g, '"') + '\'';
-	    return ctx.stylize(simple, 'string');
-	  }
-	  if (isNumber(value))
-	    return ctx.stylize('' + value, 'number');
-	  if (isBoolean(value))
-	    return ctx.stylize('' + value, 'boolean');
-	  // For some reason typeof null is "object", so special case here.
-	  if (isNull(value))
-	    return ctx.stylize('null', 'null');
-	}
-
-
-	function formatError(value) {
-	  return '[' + Error.prototype.toString.call(value) + ']';
-	}
-
-
-	function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
-	  var output = [];
-	  for (var i = 0, l = value.length; i < l; ++i) {
-	    if (hasOwnProperty(value, String(i))) {
-	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-	          String(i), true));
-	    } else {
-	      output.push('');
-	    }
-	  }
-	  keys.forEach(function(key) {
-	    if (!key.match(/^\d+$/)) {
-	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-	          key, true));
-	    }
-	  });
-	  return output;
-	}
-
-
-	function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
-	  var name, str, desc;
-	  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
-	  if (desc.get) {
-	    if (desc.set) {
-	      str = ctx.stylize('[Getter/Setter]', 'special');
-	    } else {
-	      str = ctx.stylize('[Getter]', 'special');
-	    }
-	  } else {
-	    if (desc.set) {
-	      str = ctx.stylize('[Setter]', 'special');
-	    }
-	  }
-	  if (!hasOwnProperty(visibleKeys, key)) {
-	    name = '[' + key + ']';
-	  }
-	  if (!str) {
-	    if (ctx.seen.indexOf(desc.value) < 0) {
-	      if (isNull(recurseTimes)) {
-	        str = formatValue(ctx, desc.value, null);
-	      } else {
-	        str = formatValue(ctx, desc.value, recurseTimes - 1);
-	      }
-	      if (str.indexOf('\n') > -1) {
-	        if (array) {
-	          str = str.split('\n').map(function(line) {
-	            return '  ' + line;
-	          }).join('\n').substr(2);
-	        } else {
-	          str = '\n' + str.split('\n').map(function(line) {
-	            return '   ' + line;
-	          }).join('\n');
-	        }
-	      }
-	    } else {
-	      str = ctx.stylize('[Circular]', 'special');
-	    }
-	  }
-	  if (isUndefined(name)) {
-	    if (array && key.match(/^\d+$/)) {
-	      return str;
-	    }
-	    name = JSON.stringify('' + key);
-	    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
-	      name = name.substr(1, name.length - 2);
-	      name = ctx.stylize(name, 'name');
-	    } else {
-	      name = name.replace(/'/g, "\\'")
-	                 .replace(/\\"/g, '"')
-	                 .replace(/(^"|"$)/g, "'");
-	      name = ctx.stylize(name, 'string');
-	    }
-	  }
-
-	  return name + ': ' + str;
-	}
-
-
-	function reduceToSingleString(output, base, braces) {
-	  var numLinesEst = 0;
-	  var length = output.reduce(function(prev, cur) {
-	    numLinesEst++;
-	    if (cur.indexOf('\n') >= 0) numLinesEst++;
-	    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
-	  }, 0);
-
-	  if (length > 60) {
-	    return braces[0] +
-	           (base === '' ? '' : base + '\n ') +
-	           ' ' +
-	           output.join(',\n  ') +
-	           ' ' +
-	           braces[1];
-	  }
-
-	  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-	}
-
-
-	// NOTE: These type checking functions intentionally don't use `instanceof`
-	// because it is fragile and can be easily faked with `Object.create()`.
-	function isArray(ar) {
-	  return Array.isArray(ar);
-	}
-	exports.isArray = isArray;
-
-	function isBoolean(arg) {
-	  return typeof arg === 'boolean';
-	}
-	exports.isBoolean = isBoolean;
-
-	function isNull(arg) {
-	  return arg === null;
-	}
-	exports.isNull = isNull;
-
-	function isNullOrUndefined(arg) {
-	  return arg == null;
-	}
-	exports.isNullOrUndefined = isNullOrUndefined;
-
-	function isNumber(arg) {
-	  return typeof arg === 'number';
-	}
-	exports.isNumber = isNumber;
-
-	function isString(arg) {
-	  return typeof arg === 'string';
-	}
-	exports.isString = isString;
-
-	function isSymbol(arg) {
-	  return typeof arg === 'symbol';
-	}
-	exports.isSymbol = isSymbol;
-
-	function isUndefined(arg) {
-	  return arg === void 0;
-	}
-	exports.isUndefined = isUndefined;
-
-	function isRegExp(re) {
-	  return isObject(re) && objectToString(re) === '[object RegExp]';
-	}
-	exports.isRegExp = isRegExp;
-
-	function isObject(arg) {
-	  return typeof arg === 'object' && arg !== null;
-	}
-	exports.isObject = isObject;
-
-	function isDate(d) {
-	  return isObject(d) && objectToString(d) === '[object Date]';
-	}
-	exports.isDate = isDate;
-
-	function isError(e) {
-	  return isObject(e) &&
-	      (objectToString(e) === '[object Error]' || e instanceof Error);
-	}
-	exports.isError = isError;
-
-	function isFunction(arg) {
-	  return typeof arg === 'function';
-	}
-	exports.isFunction = isFunction;
-
-	function isPrimitive(arg) {
-	  return arg === null ||
-	         typeof arg === 'boolean' ||
-	         typeof arg === 'number' ||
-	         typeof arg === 'string' ||
-	         typeof arg === 'symbol' ||  // ES6 symbol
-	         typeof arg === 'undefined';
-	}
-	exports.isPrimitive = isPrimitive;
-
-	exports.isBuffer = __webpack_require__(4);
-
-	function objectToString(o) {
-	  return Object.prototype.toString.call(o);
-	}
-
-
-	function pad(n) {
-	  return n < 10 ? '0' + n.toString(10) : n.toString(10);
-	}
-
-
-	var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
-	              'Oct', 'Nov', 'Dec'];
-
-	// 26 Feb 16:19:34
-	function timestamp() {
-	  var d = new Date();
-	  var time = [pad(d.getHours()),
-	              pad(d.getMinutes()),
-	              pad(d.getSeconds())].join(':');
-	  return [d.getDate(), months[d.getMonth()], time].join(' ');
-	}
-
-
-	// log is just a thin wrapper to console.log that prepends a timestamp
-	exports.log = function() {
-	  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
-	};
-
-
-	/**
-	 * Inherit the prototype methods from one constructor into another.
-	 *
-	 * The Function.prototype.inherits from lang.js rewritten as a standalone
-	 * function (not on Function.prototype). NOTE: If this file is to be loaded
-	 * during bootstrapping this function needs to be rewritten using some native
-	 * functions as prototype setup using normal JavaScript does not work as
-	 * expected during bootstrapping (see mirror.js in r114903).
-	 *
-	 * @param {function} ctor Constructor function which needs to inherit the
-	 *     prototype.
-	 * @param {function} superCtor Constructor function to inherit prototype from.
-	 */
-	exports.inherits = __webpack_require__(5);
-
-	exports._extend = function(origin, add) {
-	  // Don't do anything if add isn't an object
-	  if (!add || !isObject(add)) return origin;
-
-	  var keys = Object.keys(add);
-	  var i = keys.length;
-	  while (i--) {
-	    origin[keys[i]] = add[keys[i]];
-	  }
-	  return origin;
-	};
-
-	function hasOwnProperty(obj, prop) {
-	  return Object.prototype.hasOwnProperty.call(obj, prop);
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(3)))
-
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
-
-	// shim for using process in browser
-
-	var process = module.exports = {};
-	var queue = [];
-	var draining = false;
-	var currentQueue;
-	var queueIndex = -1;
-
-	function cleanUpNextTick() {
-	    if (!draining || !currentQueue) {
-	        return;
-	    }
-	    draining = false;
-	    if (currentQueue.length) {
-	        queue = currentQueue.concat(queue);
-	    } else {
-	        queueIndex = -1;
-	    }
-	    if (queue.length) {
-	        drainQueue();
-	    }
-	}
-
-	function drainQueue() {
-	    if (draining) {
-	        return;
-	    }
-	    var timeout = setTimeout(cleanUpNextTick);
-	    draining = true;
-
-	    var len = queue.length;
-	    while(len) {
-	        currentQueue = queue;
-	        queue = [];
-	        while (++queueIndex < len) {
-	            if (currentQueue) {
-	                currentQueue[queueIndex].run();
-	            }
-	        }
-	        queueIndex = -1;
-	        len = queue.length;
-	    }
-	    currentQueue = null;
-	    draining = false;
-	    clearTimeout(timeout);
-	}
-
-	process.nextTick = function (fun) {
-	    var args = new Array(arguments.length - 1);
-	    if (arguments.length > 1) {
-	        for (var i = 1; i < arguments.length; i++) {
-	            args[i - 1] = arguments[i];
-	        }
-	    }
-	    queue.push(new Item(fun, args));
-	    if (queue.length === 1 && !draining) {
-	        setTimeout(drainQueue, 0);
-	    }
-	};
-
-	// v8 likes predictible objects
-	function Item(fun, array) {
-	    this.fun = fun;
-	    this.array = array;
-	}
-	Item.prototype.run = function () {
-	    this.fun.apply(null, this.array);
-	};
-	process.title = 'browser';
-	process.browser = true;
-	process.env = {};
-	process.argv = [];
-	process.version = ''; // empty string to avoid regexp issues
-	process.versions = {};
-
-	function noop() {}
-
-	process.on = noop;
-	process.addListener = noop;
-	process.once = noop;
-	process.off = noop;
-	process.removeListener = noop;
-	process.removeAllListeners = noop;
-	process.emit = noop;
-
-	process.binding = function (name) {
-	    throw new Error('process.binding is not supported');
-	};
-
-	process.cwd = function () { return '/' };
-	process.chdir = function (dir) {
-	    throw new Error('process.chdir is not supported');
-	};
-	process.umask = function() { return 0; };
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports) {
-
-	module.exports = function isBuffer(arg) {
-	  return arg && typeof arg === 'object'
-	    && typeof arg.copy === 'function'
-	    && typeof arg.fill === 'function'
-	    && typeof arg.readUInt8 === 'function';
-	}
-
-/***/ },
-/* 5 */
-/***/ 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
-	  }
-	}
-
-
-/***/ }
-/******/ ]);
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
index 46a89c67c..6badafd2f 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,8 +3,7 @@ var webpack = require('webpack');
 module.exports = {
     entry: {
         'vm': './src/index.js',
-        'vm.min': './src/index.js',
-        'vm.worker': './src/worker.js'
+        'vm.min': './src/index.js'
     },
     output: {
         path: __dirname,

From 6b08b95b97103d9d188629508328f4ba44c50e50 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 13 Sep 2016 17:51:17 -0400
Subject: [PATCH 230/302] Escape field values for XML-unsafe characters (#177)

* Escape field values for XML-unsafe characters

* String equality check ===
---
 src/engine/blocks.js   |  7 ++++++-
 src/util/xml-escape.js | 21 +++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 src/util/xml-escape.js

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index ba9aac5bb..b3d87e49f 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -1,4 +1,5 @@
 var adapter = require('./adapter');
+var xmlEscape = require('../util/xml-escape');
 
 /**
  * @fileoverview
@@ -369,8 +370,12 @@ Blocks.prototype.blockToXML = function (blockId) {
     // 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 += '<field name="' + blockField.name + '">' +
-            blockField.value + '</field>';
+            value + '</field>';
     }
     // Add blocks connected to the next connection.
     if (block.next) {
diff --git a/src/util/xml-escape.js b/src/util/xml-escape.js
new file mode 100644
index 000000000..00ce5bff6
--- /dev/null
+++ b/src/util/xml-escape.js
@@ -0,0 +1,21 @@
+/**
+ * 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 '&lt;';
+        case '>': return '&gt;';
+        case '&': return '&amp;';
+        case '\'': return '&apos;';
+        case '"': return '&quot;';
+        }
+    });
+};
+
+module.exports = xmlEscape;

From dec5d054c842b49b1e323eda1589ff313b1a7111 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 13 Sep 2016 17:53:17 -0400
Subject: [PATCH 231/302] Better handling of float values (fix #172) (#176)

* Better handling of float values (fix #172)

* Stricter equality in Cast.isInt
---
 src/blocks/scratch3_operators.js |  6 ++----
 src/util/cast.js                 | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/blocks/scratch3_operators.js b/src/blocks/scratch3_operators.js
index ddd9e3837..0d5531778 100644
--- a/src/blocks/scratch3_operators.js
+++ b/src/blocks/scratch3_operators.js
@@ -80,10 +80,8 @@ Scratch3OperatorsBlocks.prototype.random = function (args) {
     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;
diff --git a/src/util/cast.js b/src/util/cast.js
index 8c1e534ab..ff3cf042d 100644
--- a/src/util/cast.js
+++ b/src/util/cast.js
@@ -102,4 +102,27 @@ Cast.compare = function (v1, v2) {
     }
 };
 
+/**
+ * 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;

From b6e30a7b23e5ebad5e6f2c89c4158593ef4b4fd7 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Tue, 13 Sep 2016 22:04:44 -0400
Subject: [PATCH 232/302] Added 'New Project' Button (#171)

* Added 'New Project' Button

* Added 'New Project' Button Functionality

* Changed To addEventListener

* Move To Import/Export
---
 playground/index.html    | 1 +
 playground/playground.js | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/playground/index.html b/playground/index.html
index 67ac05cd1..12a545d99 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -35,6 +35,7 @@
             <pre id="blockexplorer"></pre>
         </div>
         <div id="tab-importexport">
+            <button id="createEmptyProject">New Project</button><br />
             Import/Export<br />
             Project ID: <input id="projectId" value="119615668" />
             <button id="projectLoadButton">Load</button><br />
diff --git a/playground/playground.js b/playground/playground.js
index 9561173b3..9c3f00690 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -30,6 +30,10 @@ window.onload = function() {
         document.location = '#' + document.getElementById('projectId').value;
         location.reload();
     };
+    document.getElementById('createEmptyProject').addEventListener('click', function() {
+        document.location = '#' + 'createEmptyProject';
+        location.reload();
+    });
     loadProject();
 
     // Instantiate the renderer and connect it to the VM.

From 1ebee14eb0f6f6b6922b1e76caf526c1daae2423 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 14 Sep 2016 16:43:21 -0400
Subject: [PATCH 233/302] Update sb2specmap.js for droppable broadcast (#182)

---
 src/import/sb2specmap.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js
index 219265ede..9cb60d203 100644
--- a/src/import/sb2specmap.js
+++ b/src/import/sb2specmap.js
@@ -634,8 +634,9 @@ var specMap = {
         'opcode':'event_broadcast',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'BROADCAST_OPTION'
+                'type':'input',
+                'inputOp':'event_broadcast_menu',
+                'inputName':'BROADCAST_OPTION'
             }
         ]
     },
@@ -643,8 +644,9 @@ var specMap = {
         'opcode':'event_broadcastandwait',
         'argMap':[
             {
-                'type':'field',
-                'fieldName':'BROADCAST_OPTION'
+                'type':'input',
+                'inputOp':'event_broadcast_menu',
+                'inputName':'BROADCAST_OPTION'
             }
         ]
     },

From 9b4433069e4d20cf210ee3849b1f5508e0576544 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 14 Sep 2016 17:00:17 -0400
Subject: [PATCH 234/302] Update README.md

---
 README.md | 46 +++++++++++++++++++++-------------------------
 1 file changed, 21 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md
index 1c9afbb93..55cf93f9e 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ npm install
 ## Development Server
 This requires Node.js to be installed.
 
-For convenience, we've included a development server with the VM. This is useful because the VM can take advantage of executing in a WebWorker, which is not permitted in a local file.
+For convenience, we've included a development server with the VM. This is sometimes useful when running in an environment that's loading remote resources (e.g., SVGs from the Scratch server).
 
 ## Running the Development Server
 Open a Command Prompt or Terminal in the repository and run:
@@ -61,48 +61,44 @@ var vm = new VirtualMachine();
 
 // Block events
 workspace.addChangeListener(vm.blockListener);
-var flyoutWorkspace = workspace.toolbox_.flyout_.workspace_;
-flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 
 // Run threads
-vm.runtime.start();
+vm.start();
 ```
 
 ## Abstract Syntax Tree
 
 #### Overview
-The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/LLK/scratch-blocks) workspace via the `blockListener`. At any time, the current state of the AST can be viewed by inspecting the `vm.runtime.blocks` object.
+The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/LLK/scratch-blocks) workspace via the `blockListener`. Each target (code-running object, for example, a sprite) keeps an AST for its blocks. At any time, the current state of an AST can be viewed by inspecting the `vm.runtime.targets[...].blocks` object.
 
 #### Anatomy of a Block
+The VM's block representation contains all the important information for execution and storage. Here's an example representing the "when key pressed" script on a workspace:
 ```json
 {
-    "7AJZR#NA;m*b}R]pdq63": {
-      "id": "7AJZR#NA;m*b}R]pdq63",
-      "opcode": "control_wait",
+  "_blocks": {
+    "Q]PK~yJ@BTV8Y~FfISeo": {
+      "id": "Q]PK~yJ@BTV8Y~FfISeo",
+      "opcode": "event_whenkeypressed",
       "inputs": {
-        "DURATION": {
-          "name": "DURATION",
-          "block": ",xA8/S!Z6+kR,9dph.rO"
-        }
       },
-      "fields": {},
-      "next": null,
-      "topLevel": true
-    },
-    ",xA8/S!Z6+kR,9dph.rO": {
-      "id": ",xA8/S!Z6+kR,9dph.rO",
-      "opcode": "math_number",
-      "inputs": {},
       "fields": {
-        "NUM": {
-          "name": "NUM",
-          "value": "1"
+        "KEY_OPTION": {
+          "name": "KEY_OPTION",
+          "value": "space"
         }
       },
       "next": null,
-      "topLevel": false
+      "topLevel": true,
+      "parent": null,
+      "shadow": false,
+      "x": -69.333333333333,
+      "y": 174
     }
-  }
+  },
+  "_scripts": [
+    "Q]PK~yJ@BTV8Y~FfISeo"
+  ]
+}
 ```
 
 ## Testing

From 89873308531b8be701292fbbe8af65546fc17279 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 15 Sep 2016 13:51:40 -0400
Subject: [PATCH 235/302] Cleanly handle deleting running scripts (#162)

* Cleanly handle deleting running scripts

* Turn off glow request on retire thread; add null check
---
 src/engine/blocks.js    |  4 ++++
 src/engine/execute.js   |  7 +++++++
 src/engine/runtime.js   | 17 ++++++++++++++++-
 src/engine/sequencer.js |  1 +
 4 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index b3d87e49f..99f52477d 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -185,6 +185,10 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
         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
         });
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 2dfc075f5..7754852e9 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -22,6 +22,13 @@ var execute = function (sequencer, thread) {
     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);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 6c5f36eb1..b085dd3d9 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -383,7 +383,9 @@ Runtime.prototype._updateScriptGlows = function () {
         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.
@@ -408,6 +410,19 @@ Runtime.prototype._updateScriptGlows = function () {
     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
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 11b134b53..a515095bc 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -173,6 +173,7 @@ Sequencer.prototype.proceedThread = function (thread) {
 Sequencer.prototype.retireThread = function (thread) {
     thread.stack = [];
     thread.stackFrame = [];
+    thread.requestScriptGlowInFrame = false;
     thread.setStatus(Thread.STATUS_DONE);
 };
 

From 6b3f0d3d8af7f487856d3b28753921d9bbb2ebe6 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 15 Sep 2016 17:10:32 -0400
Subject: [PATCH 236/302] 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 @@
 
     <xml id="toolbox" style="display: none">
         <category name="Motion" colour="#4C97FF">
-            <block type="motion_movesteps">
-              <value name="STEPS">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_turnright">
-              <value name="DEGREES">
-                <shadow type="math_number">
-                  <field name="NUM">15</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_turnleft">
-              <value name="DEGREES">
-                <shadow type="math_number">
-                  <field name="NUM">15</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_pointindirection">
-              <value name="DIRECTION">
-                <shadow type="math_angle">
-                  <field name="NUM">90</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_pointtowards">
-              <value name="TOWARDS">
-                <shadow type="motion_pointtowards_menu">
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_gotoxy">
-              <value name="X">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-              <value name="Y">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_goto">
-              <value name="TO">
-                <shadow type="motion_goto_menu">
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_glidesecstoxy">
-              <value name="SECS">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="X">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-              <value name="Y">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_changexby">
-              <value name="DX">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_setx">
-              <value name="X">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_changeyby">
-              <value name="DY">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_sety">
-              <value name="Y">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="motion_ifonedgebounce"></block>
-            <block type="motion_setrotationstyle">
-              <value name="STYLE">
-                <shadow type="motion_setrotationstyle_menu"></shadow>
-              </value>
-            </block>
-            <block type="motion_xposition"></block>
-            <block type="motion_yposition"></block>
-            <block type="motion_direction"></block>
-          </category>
-          <category name="Looks" colour="#9966FF">
-            <block type="looks_sayforsecs">
-              <value name="MESSAGE">
-                <shadow type="text">
-                  <field name="TEXT">Hello!</field>
-                </shadow>
-              </value>
-              <value name="SECS">
-                <shadow type="math_number">
-                  <field name="NUM">2</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_say">
-              <value name="MESSAGE">
-                <shadow type="text">
-                  <field name="TEXT">Hello!</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_thinkforsecs">
-              <value name="MESSAGE">
-                <shadow type="text">
-                  <field name="TEXT">Hmm...</field>
-                </shadow>
-              </value>
-              <value name="SECS">
-                <shadow type="math_number">
-                  <field name="NUM">2</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_think">
-              <value name="MESSAGE">
-                <shadow type="text">
-                  <field name="TEXT">Hmm...</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_show"></block>
-            <block type="looks_hide"></block>
-            <block type="looks_switchcostumeto">
-              <value name="COSTUME">
-                <shadow type="looks_costume"></shadow>
-              </value>
-    		    </block>
-            <block type="looks_nextcostume"></block>
-            <block type="looks_nextbackdrop"></block>
-            <block type="looks_switchbackdropto">
-              <value name="BACKDROP">
-                <shadow type="looks_backdrops"></shadow>
-              </value>
-    		    </block>
-            <block type="looks_switchbackdroptoandwait">
-              <value name="BACKDROP">
-                <shadow type="looks_backdrops"></shadow>
-              </value>
-    		    </block>
-            <block type="looks_changeeffectby">
-              <value name="EFFECT">
-                <shadow type="looks_effectmenu"></shadow>
-              </value>
-              <value name="CHANGE">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_seteffectto">
-              <value name="EFFECT">
-                <shadow type="looks_effectmenu"></shadow>
-              </value>
-              <value name="VALUE">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_cleargraphiceffects"></block>
-            <block type="looks_changesizeby">
-              <value name="CHANGE">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_setsizeto">
-              <value name="SIZE">
-                <shadow type="math_number">
-                  <field name="NUM">100</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_gotofront"></block>
-            <block type="looks_gobacklayers">
-              <value name="NUM">
-                <shadow type="math_integer">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="looks_costumeorder"></block>
-            <block type="looks_backdroporder"></block>
-            <block type="looks_backdropname"></block>
-            <block type="looks_size"></block>
-          </category>
-          <category name="Sound" colour="#D65CD6">
-            <block type="sound_play">
-              <value name="SOUND_MENU">
-                <shadow type="sound_sounds_option"></shadow>
-              </value>
-            </block>
-            <block type="sound_playuntildone">
-              <value name="SOUND_MENU">
-                <shadow type="sound_sounds_option"></shadow>
-              </value>
-            </block>
-            <block type="sound_stopallsounds"></block>
-            <block type="sound_playdrumforbeats">
-              <value name="DRUMTYPE">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="BEATS">
-                <shadow type="math_number">
-                  <field name="NUM">0.25</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_restforbeats">
-              <value name="BEATS">
-                <shadow type="math_number">
-                  <field name="NUM">0.25</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_playnoteforbeats">
-              <value name="NOTE">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="BEATS">
-                <shadow type="math_number">
-                  <field name="NUM">0.5</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_setinstrumentto">
-              <value name="INSTRUMENT">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_changevolumeby">
-              <value name="VOLUME">
-                <shadow type="math_number">
-                  <field name="NUM">-10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_setvolumeto">
-              <value name="VOLUME">
-                <shadow type="math_number">
-                  <field name="NUM">100</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_volume"></block>
-            <block type="sound_changetempoby">
-              <value name="TEMPO">
-                <shadow type="math_number">
-                  <field name="NUM">20</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_settempotobpm">
-              <value name="TEMPO">
-                <shadow type="math_number">
-                  <field name="NUM">60</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="sound_tempo"></block>
-          </category>
-          <category name="Pen" colour="#00B295">
-            <block type="pen_clear"></block>
-            <block type="pen_stamp"></block>
-            <block type="pen_pendown"></block>
-            <block type="pen_penup"></block>
-            <block type="pen_setpencolortocolor">
-              <value name="COLOR">
-                <shadow type="colour_picker">
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_changepencolorby">
-              <value name="COLOR">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_setpencolortonum">
-              <value name="COLOR">
-                <shadow type="math_number">
-                  <field name="NUM">0</field>
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_changepenshadeby">
-              <value name="SHADE">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_setpenshadeto">
-              <value name="SHADE">
-                <shadow type="math_number">
-                  <field name="NUM">50</field>
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_changepensizeby">
-              <value name="SIZE">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-    		    </block>
-            <block type="pen_setpensizeto">
-              <value name="SIZE">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-    		    </block>
-          </category>
-          <category name="Data" colour="#FF8C1A" custom="VARIABLE"></category>
-          <category name="Events" colour="#FFD500">
-            <block type="event_whenflagclicked"></block>
-            <block type="event_whenkeypressed">
-              <value name="KEY_OPTION">
-                <shadow type="event_keyoptions"></shadow>
-              </value>
-            </block>
-            <block type="event_whenthisspriteclicked"></block>
-            <block type="event_whenbackdropswitchesto">
-              <value name="BACKDROP">
-                <shadow type="event_backdrops"></shadow>
-              </value>
-            </block>
-            <block type="event_whengreaterthan">
-              <value name="WHENGREATERTHANMENU">
-                <shadow type="event_whengreaterthanmenu"></shadow>
-              </value>
-              <value name="VALUE">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="event_whenbroadcastreceived">
-              <value name="BROADCAST_OPTION">
-                <shadow type="event_broadcast_menu"></shadow>
-              </value>
-            </block>
-            <block type="event_broadcast">
-              <value name="BROADCAST_OPTION">
-                <shadow type="event_broadcast_menu"></shadow>
-              </value>
-            </block>
-            <block type="event_broadcastandwait">
-              <value name="BROADCAST_OPTION">
-                <shadow type="event_broadcast_menu"></shadow>
-              </value>
-            </block>
-          </category>
-          <category name="Control" colour="#FFAB19">
-            <block type="control_wait">
-              <value name="DURATION">
-                <shadow type="math_positive_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="control_repeat">
-              <value name="TIMES">
-                <shadow type="math_whole_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="control_forever"></block>
-            <block type="control_if"></block>
-            <block type="control_if_else"></block>
-            <block type="control_wait_until"></block>
-            <block type="control_repeat_until"></block>
-            <block type="control_stop">
-              <value name="STOP_OPTION">
-                <shadow type="control_stop_menu"></shadow>
-              </value>
-            </block>
-            <block type="control_start_as_clone"></block>
-            <block type="control_create_clone_of">
-              <value name="CLONE_OPTION">
-                <shadow type="control_create_clone_of_menu"></shadow>
-              </value>
-            </block>
-            <block type="control_delete_this_clone"></block>
-          </category>
-          <category name="Sensing" colour="#4CBFE6">
-            <block type="sensing_touchingobject">
-              <value name="TOUCHINGOBJECTMENU">
-                <shadow type="sensing_touchingobjectmenu"></shadow>
-              </value>
-            </block>
-            <block type="sensing_touchingcolor">
-              <value name="COLOR">
-                <shadow type="colour_picker"></shadow>
-              </value>
-            </block>
-            <block type="sensing_coloristouchingcolor">
-              <value name="COLOR">
-                <shadow type="colour_picker"></shadow>
-              </value>
-              <value name="COLOR2">
-                <shadow type="colour_picker"></shadow>
-              </value>
-            </block>
-            <block type="sensing_distanceto">
-              <value name="DISTANCETOMENU">
-                <shadow type="sensing_distancetomenu"></shadow>
-              </value>
-            </block>
-            <block type="sensing_askandwait">
-              <value name="QUESTION">
-                <shadow type="text">
-                  <field name="TEXT">What's your name?</field>
-                </shadow>
-              </value>
-            </block>
-      		<block type="sensing_answer"></block>
-    	    <block type="sensing_keypressed">
-              <value name="KEY_OPTION">
-                <shadow type="sensing_keyoptions"></shadow>
-              </value>
-          </block>
-      		<block type="sensing_mousedown"></block>
-      		<block type="sensing_mousex"></block>
-      		<block type="sensing_mousey"></block>
-      		<block type="sensing_loudness"></block>
-    	    <block type="sensing_videoon">
-              <value name="VIDEOONMENU1">
-                <shadow type="sensing_videoonmenuone"></shadow>
-              </value>
-              <value name="VIDEOONMENU2">
-                <shadow type="sensing_videoonmenutwo"></shadow>
-              </value>
-          </block>
-    	    <block type="sensing_videotoggle">
-              <value name="VIDEOTOGGLEMENU">
-                <shadow type="sensing_videotogglemenu"></shadow>
-              </value>
-          </block>
-          <block type="sensing_setvideotransparency">
-            <value name="TRANSPARENCY">
-              <shadow type="math_number">
-                <field name="NUM">50</field>
-              </shadow>
-            </value>
-      		</block>
-      		<block type="sensing_timer"></block>
-      		<block type="sensing_resettimer"></block>
-      	    <block type="sensing_current">
-                <value name="CURRENTMENU">
-                  <shadow type="sensing_currentmenu"></shadow>
-                </value>
-              </block>
-      		<block type="sensing_dayssince2000"></block>
-      		<block type="sensing_username"></block>
-    	  </category>
-        <category name="Operators" colour="#40BF4A">
-            <block type="operator_add">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_subtract">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_multiply">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_divide">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_random">
-              <value name="FROM">
-                <shadow type="math_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="TO">
-                <shadow type="math_number">
-                  <field name="NUM">10</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_lt">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_equals">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_gt">
-              <value name="OPERAND1">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-              <value name="OPERAND2">
-                <shadow type="text">
-                  <field name="TEXT"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_and"></block>
-            <block type="operator_or"></block>
-            <block type="operator_not"></block>
-            <block type="operator_join">
-              <value name="STRING1">
-                <shadow type="text">
-                  <field name="TEXT">hello</field>
-                </shadow>
-              </value>
-              <value name="STRING2">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_letter_of">
-              <value name="LETTER">
-                <shadow type="math_whole_number">
-                  <field name="NUM">1</field>
-                </shadow>
-              </value>
-              <value name="STRING">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_length">
-              <value name="STRING">
-                <shadow type="text">
-                  <field name="TEXT">world</field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_mod">
-              <value name="NUM1">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-              <value name="NUM2">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_round">
-              <value name="NUM">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-            <block type="operator_mathop">
-              <value name="OPERATOR">
-                <shadow type="operator_mathop_menu"></shadow>
-              </value>
-              <value name="NUM">
-                <shadow type="math_number">
-                  <field name="NUM"></field>
-                </shadow>
-              </value>
-            </block>
-          </category>
-          <category name="More Blocks" colour="#FF6680"></category>
-  </xml>
+        <block type="motion_movesteps">
+          <value name="STEPS">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_turnright">
+          <value name="DEGREES">
+            <shadow type="math_number">
+              <field name="NUM">15</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_turnleft">
+          <value name="DEGREES">
+            <shadow type="math_number">
+              <field name="NUM">15</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_pointindirection">
+          <value name="DIRECTION">
+            <shadow type="math_angle">
+              <field name="NUM">90</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_pointtowards">
+          <value name="TOWARDS">
+            <shadow type="motion_pointtowards_menu">
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_gotoxy">
+          <value name="X">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+          <value name="Y">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_goto">
+          <value name="TO">
+            <shadow type="motion_goto_menu">
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_glidesecstoxy">
+          <value name="SECS">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="X">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+          <value name="Y">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_changexby">
+          <value name="DX">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_setx">
+          <value name="X">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_changeyby">
+          <value name="DY">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_sety">
+          <value name="Y">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="motion_ifonedgebounce"></block>
+        <block type="motion_setrotationstyle">
+          <value name="STYLE">
+            <shadow type="motion_setrotationstyle_menu"></shadow>
+          </value>
+        </block>
+        <block type="motion_xposition"></block>
+        <block type="motion_yposition"></block>
+        <block type="motion_direction"></block>
+      </category>
+      <category name="Looks" colour="#9966FF">
+        <block type="looks_sayforsecs">
+          <value name="MESSAGE">
+            <shadow type="text">
+              <field name="TEXT">Hello!</field>
+            </shadow>
+          </value>
+          <value name="SECS">
+            <shadow type="math_number">
+              <field name="NUM">2</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_say">
+          <value name="MESSAGE">
+            <shadow type="text">
+              <field name="TEXT">Hello!</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_thinkforsecs">
+          <value name="MESSAGE">
+            <shadow type="text">
+              <field name="TEXT">Hmm...</field>
+            </shadow>
+          </value>
+          <value name="SECS">
+            <shadow type="math_number">
+              <field name="NUM">2</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_think">
+          <value name="MESSAGE">
+            <shadow type="text">
+              <field name="TEXT">Hmm...</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_show"></block>
+        <block type="looks_hide"></block>
+        <block type="looks_switchcostumeto">
+          <value name="COSTUME">
+            <shadow type="looks_costume"></shadow>
+          </value>
+		    </block>
+        <block type="looks_nextcostume"></block>
+        <block type="looks_nextbackdrop"></block>
+        <block type="looks_switchbackdropto">
+          <value name="BACKDROP">
+            <shadow type="looks_backdrops"></shadow>
+          </value>
+		    </block>
+        <block type="looks_switchbackdroptoandwait">
+          <value name="BACKDROP">
+            <shadow type="looks_backdrops"></shadow>
+          </value>
+		    </block>
+        <block type="looks_changeeffectby">
+          <value name="EFFECT">
+            <shadow type="looks_effectmenu"></shadow>
+          </value>
+          <value name="CHANGE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_seteffectto">
+          <value name="EFFECT">
+            <shadow type="looks_effectmenu"></shadow>
+          </value>
+          <value name="VALUE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_cleargraphiceffects"></block>
+        <block type="looks_changesizeby">
+          <value name="CHANGE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_setsizeto">
+          <value name="SIZE">
+            <shadow type="math_number">
+              <field name="NUM">100</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_gotofront"></block>
+        <block type="looks_gobacklayers">
+          <value name="NUM">
+            <shadow type="math_integer">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="looks_costumeorder"></block>
+        <block type="looks_backdroporder"></block>
+        <block type="looks_backdropname"></block>
+        <block type="looks_size"></block>
+      </category>
+      <category name="Sound" colour="#D65CD6">
+        <block type="sound_play">
+          <value name="SOUND_MENU">
+            <shadow type="sound_sounds_option"></shadow>
+          </value>
+        </block>
+        <block type="sound_playuntildone">
+          <value name="SOUND_MENU">
+            <shadow type="sound_sounds_option"></shadow>
+          </value>
+        </block>
+        <block type="sound_stopallsounds"></block>
+        <block type="sound_playdrumforbeats">
+          <value name="DRUMTYPE">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="BEATS">
+            <shadow type="math_number">
+              <field name="NUM">0.25</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_restforbeats">
+          <value name="BEATS">
+            <shadow type="math_number">
+              <field name="NUM">0.25</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_playnoteforbeats">
+          <value name="NOTE">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="BEATS">
+            <shadow type="math_number">
+              <field name="NUM">0.5</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_setinstrumentto">
+          <value name="INSTRUMENT">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_changevolumeby">
+          <value name="VOLUME">
+            <shadow type="math_number">
+              <field name="NUM">-10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_setvolumeto">
+          <value name="VOLUME">
+            <shadow type="math_number">
+              <field name="NUM">100</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_volume"></block>
+        <block type="sound_changetempoby">
+          <value name="TEMPO">
+            <shadow type="math_number">
+              <field name="NUM">20</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_settempotobpm">
+          <value name="TEMPO">
+            <shadow type="math_number">
+              <field name="NUM">60</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="sound_tempo"></block>
+      </category>
+      <category name="Pen" colour="#00B295">
+        <block type="pen_clear"></block>
+        <block type="pen_stamp"></block>
+        <block type="pen_pendown"></block>
+        <block type="pen_penup"></block>
+        <block type="pen_setpencolortocolor">
+          <value name="COLOR">
+            <shadow type="colour_picker">
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_changepencolorby">
+          <value name="COLOR">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_setpencolortonum">
+          <value name="COLOR">
+            <shadow type="math_number">
+              <field name="NUM">0</field>
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_changepenshadeby">
+          <value name="SHADE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_setpenshadeto">
+          <value name="SHADE">
+            <shadow type="math_number">
+              <field name="NUM">50</field>
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_changepensizeby">
+          <value name="SIZE">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+		    </block>
+        <block type="pen_setpensizeto">
+          <value name="SIZE">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+		    </block>
+      </category>
+      <category name="Data" colour="#FF8C1A" custom="VARIABLE">
+      </category>
+      <category name="Lists" colour="#FF8C1A">
+        <block type="data_list"></block>
+        <block type="data_addtolist">
+          <value name="ITEM">
+            <shadow type="text">
+              <field name="TEXT">thing</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_deleteoflist">
+          <value name="INDEX">
+            <shadow type="math_integer">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_insertatlist">
+          <value name="INDEX">
+            <shadow type="math_integer">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="ITEM">
+            <shadow type="text">
+              <field name="TEXT">thing</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_replaceitemoflist">
+          <value name="INDEX">
+            <shadow type="math_integer">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="ITEM">
+            <shadow type="text">
+              <field name="TEXT">thing</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_itemoflist">
+          <value name="INDEX">
+            <shadow type="math_integer">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_lengthoflist"></block>
+        <block type="data_listcontainsitem">
+          <value name="ITEM">
+            <shadow type="text">
+              <field name="TEXT">thing</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="data_showlist"></block>
+        <block type="data_hidelist"></block>
+      </category>
+      <category name="Events" colour="#FFD500">
+        <block type="event_whenflagclicked"></block>
+        <block type="event_whenkeypressed">
+        </block>
+        <block type="event_whenthisspriteclicked"></block>
+        <block type="event_whenbackdropswitchesto">
+        </block>
+        <block type="event_whengreaterthan">
+          <value name="VALUE">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="event_whenbroadcastreceived">
+        </block>
+        <block type="event_broadcast">
+          <value name="BROADCAST_OPTION">
+            <shadow type="event_broadcast_menu"></shadow>
+          </value>
+        </block>
+        <block type="event_broadcastandwait">
+          <value name="BROADCAST_OPTION">
+            <shadow type="event_broadcast_menu"></shadow>
+          </value>
+        </block>
+      </category>
+      <category name="Control" colour="#FFAB19">
+        <block type="control_wait">
+          <value name="DURATION">
+            <shadow type="math_positive_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="control_repeat">
+          <value name="TIMES">
+            <shadow type="math_whole_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="control_forever"></block>
+        <block type="control_if"></block>
+        <block type="control_if_else"></block>
+        <block type="control_wait_until"></block>
+        <block type="control_repeat_until"></block>
+        <block type="control_stop">
+          <value name="STOP_OPTION">
+            <shadow type="control_stop_menu"></shadow>
+          </value>
+        </block>
+        <block type="control_start_as_clone"></block>
+        <block type="control_create_clone_of">
+          <value name="CLONE_OPTION">
+            <shadow type="control_create_clone_of_menu"></shadow>
+          </value>
+        </block>
+        <block type="control_delete_this_clone"></block>
+      </category>
+      <category name="Sensing" colour="#4CBFE6">
+        <block type="sensing_touchingobject">
+          <value name="TOUCHINGOBJECTMENU">
+            <shadow type="sensing_touchingobjectmenu"></shadow>
+          </value>
+        </block>
+        <block type="sensing_touchingcolor">
+          <value name="COLOR">
+            <shadow type="colour_picker"></shadow>
+          </value>
+        </block>
+        <block type="sensing_coloristouchingcolor">
+          <value name="COLOR">
+            <shadow type="colour_picker"></shadow>
+          </value>
+          <value name="COLOR2">
+            <shadow type="colour_picker"></shadow>
+          </value>
+        </block>
+        <block type="sensing_distanceto">
+          <value name="DISTANCETOMENU">
+            <shadow type="sensing_distancetomenu"></shadow>
+          </value>
+        </block>
+        <block type="sensing_askandwait">
+          <value name="QUESTION">
+            <shadow type="text">
+              <field name="TEXT">What's your name?</field>
+            </shadow>
+          </value>
+        </block>
+  		<block type="sensing_answer"></block>
+	    <block type="sensing_keypressed">
+          <value name="KEY_OPTION">
+            <shadow type="sensing_keyoptions"></shadow>
+          </value>
+      </block>
+  		<block type="sensing_mousedown"></block>
+  		<block type="sensing_mousex"></block>
+  		<block type="sensing_mousey"></block>
+  		<block type="sensing_loudness"></block>
+	    <block type="sensing_videoon">
+          <value name="VIDEOONMENU1">
+            <shadow type="sensing_videoonmenuone"></shadow>
+          </value>
+          <value name="VIDEOONMENU2">
+            <shadow type="sensing_videoonmenutwo"></shadow>
+          </value>
+      </block>
+	    <block type="sensing_videotoggle">
+          <value name="VIDEOTOGGLEMENU">
+            <shadow type="sensing_videotogglemenu"></shadow>
+          </value>
+      </block>
+      <block type="sensing_setvideotransparency">
+        <value name="TRANSPARENCY">
+          <shadow type="math_number">
+            <field name="NUM">50</field>
+          </shadow>
+        </value>
+  		</block>
+  		<block type="sensing_timer"></block>
+  		<block type="sensing_resettimer"></block>
+      <block type="sensing_of">
+        <value name="PROPERTY">
+          <shadow type="sensing_of_property_menu"></shadow>
+        </value>
+        <value name="OBJECT">
+          <shadow type="sensing_of_object_menu"></shadow>
+        </value>
+      </block>
+  	  <block type="sensing_current">
+        <value name="CURRENTMENU">
+          <shadow type="sensing_currentmenu"></shadow>
+        </value>
+      </block>
+  		<block type="sensing_dayssince2000"></block>
+  		<block type="sensing_username"></block>
+	  </category>
+    <category name="Operators" colour="#40BF4A">
+        <block type="operator_add">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_subtract">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_multiply">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_divide">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_random">
+          <value name="FROM">
+            <shadow type="math_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="TO">
+            <shadow type="math_number">
+              <field name="NUM">10</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_lt">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_equals">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_gt">
+          <value name="OPERAND1">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+          <value name="OPERAND2">
+            <shadow type="text">
+              <field name="TEXT"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_and"></block>
+        <block type="operator_or"></block>
+        <block type="operator_not"></block>
+        <block type="operator_join">
+          <value name="STRING1">
+            <shadow type="text">
+              <field name="TEXT">hello</field>
+            </shadow>
+          </value>
+          <value name="STRING2">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_letter_of">
+          <value name="LETTER">
+            <shadow type="math_whole_number">
+              <field name="NUM">1</field>
+            </shadow>
+          </value>
+          <value name="STRING">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_length">
+          <value name="STRING">
+            <shadow type="text">
+              <field name="TEXT">world</field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_mod">
+          <value name="NUM1">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+          <value name="NUM2">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_round">
+          <value name="NUM">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+        <block type="operator_mathop">
+          <value name="OPERATOR">
+            <shadow type="operator_mathop_menu"></shadow>
+          </value>
+          <value name="NUM">
+            <shadow type="math_number">
+              <field name="NUM"></field>
+            </shadow>
+          </value>
+        </block>
+      </category>
+      <category name="More Blocks" colour="#FF6680"></category>
+    </xml>
     <!-- FPS counter -->
     <script src="../node_modules/stats.js/build/stats.min.js"></script>
     <!-- Syntax highlighter -->
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 <tim.mickel@gmail.com>
Date: Thu, 15 Sep 2016 19:02:03 -0400
Subject: [PATCH 237/302] 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 @@
             <pre id="blockexplorer"></pre>
         </div>
         <div id="tab-importexport">
-            <button id="createEmptyProject">New Project</button><br />
             Import/Export<br />
             Project ID: <input id="projectId" value="119615668" />
-            <button id="projectLoadButton">Load</button><br />
+            <button id="projectLoadButton">Load</button>
+            <button id="createEmptyProject">New Project</button><br />
             <p>
                 <input type="button" value="Export to XML" onclick="toXml()">
                 &nbsp;
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 <tim.mickel@gmail.com>
Date: Thu, 15 Sep 2016 19:37:12 -0400
Subject: [PATCH 238/302] 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 <connor24nolan@live.com>
Date: Sun, 18 Sep 2016 11:32:24 -0400
Subject: [PATCH 239/302] 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 @@
           </value>
         </block>
       </category>
-      <category name="More Blocks" colour="#FF6680"></category>
+      <category name="More Blocks" colour="#FF6680" custom="PROCEDURE"></category>
     </xml>
     <!-- FPS counter -->
     <script src="../node_modules/stats.js/build/stats.min.js"></script>

From 13f287e8712fdd2cfeed31a0d61893f4279385a3 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 19 Sep 2016 14:40:01 -0400
Subject: [PATCH 240/302] 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 <tim.mickel@gmail.com>
Date: Mon, 19 Sep 2016 15:24:46 -0400
Subject: [PATCH 241/302] 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 <ray@scratch.mit.edu>
Date: Tue, 20 Sep 2016 02:42:05 -0400
Subject: [PATCH 242/302] 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.<!Target>}
@@ -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 <ascii@media.mit.edu>
+ * @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 <ray@scratch.mit.edu>
Date: Tue, 20 Sep 2016 10:29:47 -0400
Subject: [PATCH 243/302] 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 <ascii@media.mit.edu>
+	 * @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.<!Target>}
@@ -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 += '<field name="' + blockField.name + '">' +
-	            blockField.value + '</field>';
+	            value + '</field>';
 	    }
 	    // 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;
 
 	/*<replacement>*/
-	var isArray = __webpack_require__(54);
+	var isArray = __webpack_require__(56);
 	/*</replacement>*/
 
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(55).Buffer;
+	var Buffer = __webpack_require__(57).Buffer;
 	/*</replacement>*/
 
 	Readable.ReadableState = ReadableState;
 
-	var EE = __webpack_require__(1).EventEmitter;
+	var EE = __webpack_require__(2).EventEmitter;
 
 	/*<replacement>*/
 	if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
@@ -9833,18 +10073,18 @@
 	};
 	/*</replacement>*/
 
-	var Stream = __webpack_require__(51);
+	var Stream = __webpack_require__(52);
 
 	/*<replacement>*/
-	var util = __webpack_require__(59);
-	util.inherits = __webpack_require__(5);
+	var util = __webpack_require__(61);
+	util.inherits = __webpack_require__(62);
 	/*</replacement>*/
 
 	var StringDecoder;
 
 
 	/*<replacement>*/
-	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 @@
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(59);
-	util.inherits = __webpack_require__(5);
+	var util = __webpack_require__(61);
+	util.inherits = __webpack_require__(62);
 	/*</replacement>*/
 
-	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;
 
 	/*<replacement>*/
-	var Buffer = __webpack_require__(55).Buffer;
+	var Buffer = __webpack_require__(57).Buffer;
 	/*</replacement>*/
 
 	Writable.WritableState = WritableState;
 
 
 	/*<replacement>*/
-	var util = __webpack_require__(59);
-	util.inherits = __webpack_require__(5);
+	var util = __webpack_require__(61);
+	util.inherits = __webpack_require__(62);
 	/*</replacement>*/
 
-	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);
 
 	/*<replacement>*/
-	var util = __webpack_require__(59);
-	util.inherits = __webpack_require__(5);
+	var util = __webpack_require__(61);
+	util.inherits = __webpack_require__(62);
 	/*</replacement>*/
 
 	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);
 
 	/*<replacement>*/
-	var util = __webpack_require__(59);
-	util.inherits = __webpack_require__(5);
+	var util = __webpack_require__(61);
+	util.inherits = __webpack_require__(62);
 	/*</replacement>*/
 
 	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 '&lt;';
+	        case '>': return '&gt;';
+	        case '&': return '&amp;';
+	        case '\'': return '&apos;';
+	        case '"': return '&quot;';
+	        }
+	    });
+	};
+
+	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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=x,e.isPrimitive=N,e.isBuffer=r(4);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(5),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){function r(t){if(u===setTimeout)return setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function n(t){if(c===clearTimeout)return clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function i(){f&&h&&(f=!1,h.length?l=h.concat(l):d=-1,l.length&&o())}function o(){if(!f){var t=r(i);f=!0;for(var e=l.length;e;){for(h=l,l=[];++d<e;)h&&h[d].run();d=-1,e=l.length}h=null,f=!1,n(t)}}function s(t,e){this.fun=t,this.array=e}function a(){}var u,c,p=t.exports={};!function(){try{u=setTimeout}catch(t){u=function(){throw new Error("setTimeout is not defined")}}try{c=clearTimeout}catch(t){c=function(){throw new Error("clearTimeout is not defined")}}}();var h,l=[],f=!1,d=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new s(t,e)),1!==l.length||f||r(o)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=a,p.addListener=a,p.once=a,p.off=a,p.removeListener=a,p.removeAllListeners=a,p.emit=a,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null}var i=r(1),o=r(7),s=r(9),a=r(2),u=r(11),c=r(12),p=r(15),h={scratch3_control:r(17),scratch3_event:r(28),scratch3_looks:r(29),scratch3_motion:r(30),scratch3_operators:r(31),scratch3_sensing:r(32)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype._pushThread=function(t){var e=new s(t);return e.pushStack(t),this.threads.push(e),e},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(r,o){var s=o.blocks.getBlock(r).opcode;if(s===t){var a=o.blocks.getFields(r);if(e)for(var u in e)if(a[u].value!==e[u])return;var c=n._hats[t];if(c.restartExistingThreads)for(var p=0;p<n.threads.length;p++)n.threads[p].topBlock===r&&n._removeThread(n.threads[p]);else for(var h=0;h<n.threads.length;h++)if(n.threads[h].topBlock===r)return;i.push(n._pushThread(r))}},r),i}},n.prototype.greenFlag=function(){this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=this.threads.slice();t.length>0;){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;n<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=this.targetForThread(n);if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},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.targetForThread=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.blocks.getBlock(t.topBlock))return r}},n.prototype.getTargetById=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){self.renderer&&self.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(8),o=r(9),s=r(10);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=this.runtime.targetForThread(t).blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=this.runtime.targetForThread(t).blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<n.runtime.targets.length;e++){var r=n.runtime.targets[e];if(r.hasOwnProperty("drawableID")&&r.drawableID==t)return void n.runtime.startHats("event_whenthisspriteclicked",null,r)}})}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(13),o=r(18);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(21),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(20);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(20);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){
-"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(20);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.scratchX&&(h.x=t.scratchX),t.scratchY&&(h.y=t.scratchY),t.direction&&(h.direction=t.direction),t.scale&&(h.size=100*t.scale),t.visible&&(h.visible=t.visible),t.currentCostumeIndex&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(34),p=r(85),h=r(14),l=r(88),f=r(89);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(35);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+s.name+'">',s.block&&(i+=this.blockToXML(s.block)),s.shadow&&s.shadow!=s.block&&(i+=this.blockToXML(s.shadow)),i+="</value>")}for(var a in e.fields){var u=e.fields[a];i+='<field name="'+u.name+'">'+u.value+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===x?this._stateInAttributeValueNoQuotes(t):this._state===N?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===B?this._stateBeforeCdata3(t):this._state===P?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===V?this._stateBeforeSpecial(t):this._state===H?this._stateBeforeSpecialEnd(t):this._state===Y?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===Q?this._stateAfterScript1(t):this._state===J?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==x&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(54),T=r(55).Buffer;i.ReadableState=n;var E=r(1).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var x=r(51),N=r(59);N.inherits=r(5);var O,A=r(60);A=A&&A.debuglog?A.debuglog("stream"):function(){},N.inherits(i,x),i.prototype.push=function(t,e){var r=this._readableState;return N.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(63).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!N.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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;i<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=x.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)N.isFunction(t[i])&&N.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=N,e.isPrimitive=x,e.isBuffer=r(5);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(6),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(p===setTimeout)return setTimeout(t,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!g){var t=i(s);g=!0;for(var e=d.length;e;){for(f=d,d=[];++m<e;)f&&f[m].run();m=-1,e=d.length}f=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,l=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],g=!1,m=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||g||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){i.call(this),this.renderer=t,this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null,this._cloneCounter=0}var i=r(2),o=r(8),s=r(10),a=r(3),u=r(12),c=r(13),p=r(16),h={scratch3_control:r(18),scratch3_event:r(29),scratch3_looks:r(30),scratch3_motion:r(31),scratch3_operators:r(32),scratch3_sensing:r(33)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.MAX_CLONES=300,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype._pushThread=function(t,e){var r=new s(t);return r.setTarget(e),r.pushStack(t),this.threads.push(r),r},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t,this._editingTarget)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(o,s){var a=s.blocks.getBlock(o).opcode;if(a===t){var u=s.blocks.getFields(o);if(e)for(var c in e)if(u[c].value!==e[c])return;var p=n._hats[t];if(p.restartExistingThreads)for(var h=0;h<n.threads.length;h++)n.threads[h].topBlock!==o||r&&n.threads[h].target!=r||n._removeThread(n.threads[h]);else for(var l=0;l<n.threads.length;l++)if(n.threads[l].topBlock===o&&(!r||n.threads[l].target==r))return;i.push(n._pushThread(o,s))}},r),i}},n.prototype.disposeTarget=function(t){t.dispose();var e=this.targets.indexOf(t);e>-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e<this.threads.length;e++)this.threads[e].target==t&&this._removeThread(this.threads[e])},n.prototype.greenFlag=function(){this.stopAll(),this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=[],e=0;e<this.targets.length;e++)this.targets[e].hasOwnProperty("isOriginal")&&!this.targets[e].isOriginal?this.targets[e].dispose():t.push(this.targets[e]);this.targets=t;for(var r=this.threads.slice();r.length>0;){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<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=n.target;if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);s&&t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},n.prototype.quietGlow=function(t){var e=this._scriptGlowsPreviousFrame.indexOf(t);e>-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;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getSpriteTargetByName=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.sprite&&r.sprite.name==t)return r}},n.prototype.changeCloneCounter=function(t){this._cloneCounter+=t},n.prototype.clonesAvailable=function(){return this._cloneCounter<n.MAX_CLONES},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){this.renderer&&this.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=t.target.blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=t.target.blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.requestScriptGlowInFrame=!1,t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.target=null,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<this.runtime.targets.length;n++){var i=this.runtime.targets[n];if(i.hasOwnProperty("drawableID")&&i.drawableID==r)return void this.runtime.startHats("event_whenthisspriteclicked",null,i)}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(19);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of_menu:this.createCloneMenu,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone}},n.prototype.getHats=function(){return{control_start_as_clone:{restartExistingThreads:!1}}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(22),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(21);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.hasOwnProperty("scratchX")&&(h.x=t.scratchX),t.hasOwnProperty("scratchY")&&(h.y=t.scratchY),t.hasOwnProperty("direction")&&(h.direction=t.direction),t.hasOwnProperty("scale")&&(h.size=100*t.scale),t.hasOwnProperty("visible")&&(h.visible=t.visible),t.hasOwnProperty("currentCostumeIndex")&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,h.updateAllDrawableProperties(),t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(35),p=r(89),h=r(15),l=r(92),f=r(93);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(36),o=r(88);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;r&&this._blocks[t.blockId].topLevel&&r.quietGlow(t.blockId),this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+a.name+'">',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="</value>")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+='<field name="'+c.name+'">'+p+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===N?this._stateInAttributeValueNoQuotes(t):this._state===x?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===P?this._stateBeforeCdata3(t):this._state===B?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===V?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==N&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(56),T=r(57).Buffer;i.ReadableState=n;var E=r(2).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var N=r(52),x=r(61);x.inherits=r(62);var O,A=r(63);A=A&&A.debuglog?A.debuglog("stream"):function(){},x.inherits(i,N),i.prototype.push=function(t,e){var r=this._readableState;return x.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(66).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!x.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=N.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)x.isFunction(t[i])&&x.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(4))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 	 * @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()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function p(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Q(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=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;c<a;c++)if(o(t,c)===o(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===u)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;l<u;l++)if(o(t,c+l)!==o(e,l)){h=!1;break}if(h)return c}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function k(t,e,r,n){return K(Y(e,t.length-r),t,r,n)}function T(t,e,r,n){return K(z(e),t,r,n)}function E(t,e,r,n){return T(t,e,r,n)}function x(t,e,r,n){return K(W(e),t,r,n)}function N(t,e,r,n){return K(X(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?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;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)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||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.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<o;++i)t[r+i]=(e&255<<8*(n?i:1-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<o;++i)t[r+i]=e>>>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;s<n;++s){if(r=t.charCodeAt(s),r>55295&&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<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=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<n&&!(i+r>=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);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=_,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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;h<u;++h)if(c[h]!==p[h]){s=c[h],a=p[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=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<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(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<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=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<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=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=r-1,s=1;for(this[e+o]=255&t;--o>=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<r&&(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.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<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:Y(new t(e,i).toString()),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(55).Buffer,function(){return this}())},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)a[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,s,a=t.length;if(a%4>0)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<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[p++]=i>>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;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",s=[],u=16383,c=0,p=r-n;c<p;c+=u)s.push(o(t,c,c+u>p?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<<a)-1,c=u>>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<<c)-1,h=p>>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<<i|a,c+=i;c>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;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(59);a.inherits=r(5);var u=r(53),c=r(62);a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(61);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void k.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):p(t,e,!1,s,r,i,o),a}function p(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=_(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),b(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,p(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(p(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function _(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=_(t,e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function v(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(55).Buffer;o.WritableState=i;var S=r(59);S.inherits=r(5);var k=r(51);S.inherits(o,k),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||m(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(55).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=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<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(61),u=r(59);u.inherits=r(5),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform));
-}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(64),o=r(59);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(62)},function(t,e,r){t.exports=r(61)},function(t,e,r){t.exports=r(64)},function(t,e,r){t.exports=r(65)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(36).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(73),r(79),r(80),r(81),r(82),r(83)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(45),s=r(74),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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"<![CDATA["+t.children[0].data+"]]>"}function u(t){return"<!--"+t.data+"-->"}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;n<t.length;n++){var p=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(77),i=r(78);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function u(t){return t.replace(g,o).replace(d,s).replace(f,o)}var c=n(r(43)),p=i(c);e.XML=a(c,p);var h=n(r(41)),l=i(h);e.HTML=a(h,l);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(c);e.escape=u},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?c("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(41),a=r(42),u=r(43),c=r(39),p=n(u),h=n(s),l=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),p(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,u=0;n<r.length;n++)e[u]===r[n]?(r[n]+=";?",u++):r[n]+=";";var c=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),p=o(s);return function(e){return String(e).replace(c,t)}}();t.exports={XML:p,HTML:l,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,u=e.length;a<u&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(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;r<n;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)c(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(c(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n<i;n++)c(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(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<o&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(36).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e,r){function n(t){t||(t=new o),this.blocks=t,this.name="",this.costumes=[],this.clones=[]}var i=r(86),o=r(34);n.prototype.createClone=function(){var t=new i(this);return this.clones.push(t),t},t.exports=n},function(t,e,r){function n(t){s.call(this,t.blocks),this.sprite=t,this.renderer=null,"undefined"!=typeof self&&self.renderer&&(this.renderer=self.renderer),this.drawableID=null,this.initDrawable()}var i=r(2),o=r(16),s=r(87);i.inherits(n,s),n.prototype.initDrawable=function(){if(this.renderer){var t=this.renderer.createDrawable(),e=this;t.then(function(t){e.drawableID=t,e.updateAllDrawableProperties()})}},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<this.sprite.costumes.length;e++)if(this.sprite.costumes[e].name==t)return e;return-1},n.prototype.updateAllDrawableProperties=function(){this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y],direction:this.direction,scale:[this.size,this.size],visible:this.visible,skin:this.sprite.costumes[this.currentCostume].skin})},n.prototype.getName=function(){return this.sprite.name},n.prototype.isTouchingColor=function(t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t)},n.prototype.colorIsTouchingColor=function(t,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t,e)},t.exports=n},function(t,e,r){function n(t){t||(t=new i(this)),this.id=o(),this.blocks=t}var i=r(34),o=r(88);n.prototype.getName=function(){return this.id},t.exports=n},function(t,e){var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=function(){for(var t=20,e=r.length,n=[],i=0;i<t;i++)n[i]=r.charAt(Math.random()*e);return n.join("")};t.exports=n},function(t,e){var r={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"input",inputOp:"motion_setrotationstyle_menu",inputName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},comeToFront:{opcode:"looks_gotofront",argMap:[]},"goBackByLayers:":{opcode:"looks_gobacklayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumeorder",argMap:[]},sceneName:{opcode:"looks_backdropname",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdroporder",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"sound_playdrumforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUMTYPE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"sound_restforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"sound_playnoteforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"sound_setinstrumentto",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"sound_changetempoby",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"sound_settempotobpm",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"sound_tempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_pendown",argMap:[]},putPenUp:{opcode:"pen_penup",argMap:[]},"penColor:":{opcode:"pen_setpencolortocolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changepencolorby",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"setPenHueTo:":{opcode:"pen_setpencolortonum",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"changePenShadeBy:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changepensizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setpensizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"},{type:"input",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"input",inputOp:"control_stop_menu",inputName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},senseVideoMotion:{opcode:"sensing_videoon",argMap:[{type:"input",inputOp:"sensing_videoonmenuone",inputName:"VIDEOONMENU1"},{type:"input",inputOp:"sensing_videoonmenutwo",inputName:"VIDEOONMENU2"}]},setVideoState:{opcode:"sensing_videotoggle",argMap:[{type:"input",inputOp:"sensing_videotogglemenu",inputName:"VIDEOTOGGLEMENU"}]},setVideoTransparency:{opcode:"sensing_setvideotransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"input",inputOp:"sensing_ofattributemenu",inputName:"ATTRIBUTE"},{type:"input",inputOp:"sensing_ofobjectmenu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"input",inputOp:"sensing_currentmenu",inputName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{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()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function p(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||J(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=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;c<a;c++)if(o(t,c)===o(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===u)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;l<u;l++)if(o(t,c+l)!==o(e,l)){h=!1;break}if(h)return c}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function k(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function T(t,e,r,n){return K(z(e),t,r,n)}function E(t,e,r,n){return T(t,e,r,n)}function N(t,e,r,n){return K(W(e),t,r,n)}function x(t,e,r,n){return K(X(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?Q.fromByteArray(t):Q.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?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;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=Y(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)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||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.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<o;++i)t[r+i]=(e&255<<8*(n?i:1-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<o;++i)t[r+i]=e>>>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;s<n;++s){if(r=t.charCodeAt(s),r>55295&&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<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=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<n&&!(i+r>=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);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=_,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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;h<u;++h)if(c[h]!==p[h]){s=c[h],a=p[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=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<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(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<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=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<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=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=r-1,s=1;for(this[e+o]=255&t;--o>=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<r&&(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.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<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:V(new t(e,i).toString()),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(57).Buffer,function(){return this}())},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)a[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,s,a=t.length;if(a%4>0)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<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[p++]=i>>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;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",s=[],u=16383,c=0,p=r-n;c<p;c+=u)s.push(o(t,c,c+u>p?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<<a)-1,c=u>>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<<c)-1,h=p>>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<<i|a,c+=i;c>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;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(61);a.inherits=r(62);var u=r(55),c=r(65);a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(64);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void k.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):p(t,e,!1,s,r,i,o),a}function p(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=_(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),b(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,p(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(p(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function _(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=_(t,e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function v(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(57).Buffer;o.WritableState=i;var S=r(61);S.inherits=r(62);var k=r(52);S.inherits(o,k),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||m(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(4))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(57).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=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<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(64),u=r(61);u.inherits=r(62),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,
+n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(67),o=r(61);o.inherits=r(62),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(65)},function(t,e,r){t.exports=r(64)},function(t,e,r){t.exports=r(67)},function(t,e,r){t.exports=r(68)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(37).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(76),r(82),r(83),r(84),r(85),r(86)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(46),s=r(77),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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"<![CDATA["+t.children[0].data+"]]>"}function u(t){return"<!--"+t.data+"-->"}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;n<t.length;n++){var p=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(80),i=r(81);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function u(t){return t.replace(g,o).replace(d,s).replace(f,o)}var c=n(r(44)),p=i(c);e.XML=a(c,p);var h=n(r(42)),l=i(h);e.HTML=a(h,l);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(c);e.escape=u},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?c("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(42),a=r(43),u=r(44),c=r(40),p=n(u),h=n(s),l=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),p(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,u=0;n<r.length;n++)e[u]===r[n]?(r[n]+=";?",u++):r[n]+=";";var c=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),p=o(s);return function(e){return String(e).replace(c,t)}}();t.exports={XML:p,HTML:l,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,u=e.length;a<u&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(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;r<n;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)c(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(c(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n<i;n++)c(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(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<o&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(37).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e){var r=function(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&apos;";case'"':return"&quot;"}})};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<this.sprite.costumes.length;e++)if(this.sprite.costumes[e].name==t)return e;return-1},n.prototype.updateAllDrawableProperties=function(){this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y],direction:this.direction,scale:[this.size,this.size],visible:this.visible,skin:this.sprite.costumes[this.currentCostume].skin})},n.prototype.getName=function(){return this.sprite.name},n.prototype.isTouchingColor=function(t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t)},n.prototype.colorIsTouchingColor=function(t,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t,e)},n.prototype.makeClone=function(){if(this.runtime.clonesAvailable()){this.runtime.changeCloneCounter(1);var t=this.sprite.createClone();return t.x=this.x,t.y=this.y,t.direction=this.direction,t.visible=this.visible,t.size=this.size,t.currentCostume=this.currentCostume,t.effects=JSON.parse(JSON.stringify(this.effects)),t.initDrawable(),t.updateAllDrawableProperties(),t}},n.prototype.dispose=function(){this.isOriginal||(this.runtime.changeCloneCounter(-1),this.renderer&&null!==this.drawableID&&this.renderer.destroyDrawable(this.drawableID))},t.exports=n},function(t,e,r){function n(t){t||(t=new i(this)),this.id=o(),this.blocks=t}var i=r(35),o=r(92);n.prototype.getName=function(){return this.id},n.prototype.dispose=function(){},t.exports=n},function(t,e){var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=function(){for(var t=20,e=r.length,n=[],i=0;i<t;i++)n[i]=r.charAt(Math.random()*e);return n.join("")};t.exports=n},function(t,e){var r={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"input",inputOp:"motion_setrotationstyle_menu",inputName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},comeToFront:{opcode:"looks_gotofront",argMap:[]},"goBackByLayers:":{opcode:"looks_gobacklayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumeorder",argMap:[]},sceneName:{opcode:"looks_backdropname",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdroporder",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"sound_playdrumforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUMTYPE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"sound_restforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"sound_playnoteforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"sound_setinstrumentto",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"sound_changetempoby",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"sound_settempotobpm",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"sound_tempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_pendown",argMap:[]},putPenUp:{opcode:"pen_penup",argMap:[]},"penColor:":{opcode:"pen_setpencolortocolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changepencolorby",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"setPenHueTo:":{opcode:"pen_setpencolortonum",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"changePenShadeBy:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changepensizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setpensizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"},{type:"input",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"input",inputOp:"control_stop_menu",inputName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},senseVideoMotion:{opcode:"sensing_videoon",argMap:[{type:"input",inputOp:"sensing_videoonmenuone",inputName:"VIDEOONMENU1"},{type:"input",inputOp:"sensing_videoonmenutwo",inputName:"VIDEOONMENU2"}]},setVideoState:{opcode:"sensing_videotoggle",argMap:[{type:"input",inputOp:"sensing_videotogglemenu",inputName:"VIDEOTOGGLEMENU"}]},setVideoTransparency:{opcode:"sensing_setvideotransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"input",inputOp:"sensing_of_property_menu",inputName:"PROPERTY"},{type:"input",inputOp:"sensing_of_object_menu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"input",inputOp:"sensing_currentmenu",inputName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{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 <ray@scratch.mit.edu>
Date: Tue, 20 Sep 2016 15:07:05 -0400
Subject: [PATCH 244/302] 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.<!Target>}
@@ -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 <ascii@media.mit.edu>
- * @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 <ray@scratch.mit.edu>
Date: Tue, 20 Sep 2016 15:52:35 -0400
Subject: [PATCH 245/302] 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 <ray@scratch.mit.edu>
Date: Tue, 20 Sep 2016 16:50:48 -0400
Subject: [PATCH 246/302] 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 <ascii@media.mit.edu>
-	 * @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.<!Target>}
@@ -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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=N,e.isPrimitive=x,e.isBuffer=r(5);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(6),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(p===setTimeout)return setTimeout(t,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!g){var t=i(s);g=!0;for(var e=d.length;e;){for(f=d,d=[];++m<e;)f&&f[m].run();m=-1,e=d.length}f=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,l=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],g=!1,m=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||g||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(t){i.call(this),this.renderer=t,this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null,this._cloneCounter=0}var i=r(2),o=r(8),s=r(10),a=r(3),u=r(12),c=r(13),p=r(16),h={scratch3_control:r(18),scratch3_event:r(29),scratch3_looks:r(30),scratch3_motion:r(31),scratch3_operators:r(32),scratch3_sensing:r(33)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.MAX_CLONES=300,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype._pushThread=function(t,e){var r=new s(t);return r.setTarget(e),r.pushStack(t),this.threads.push(r),r},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t,this._editingTarget)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(o,s){var a=s.blocks.getBlock(o).opcode;if(a===t){var u=s.blocks.getFields(o);if(e)for(var c in e)if(u[c].value!==e[c])return;var p=n._hats[t];if(p.restartExistingThreads)for(var h=0;h<n.threads.length;h++)n.threads[h].topBlock!==o||r&&n.threads[h].target!=r||n._removeThread(n.threads[h]);else for(var l=0;l<n.threads.length;l++)if(n.threads[l].topBlock===o&&(!r||n.threads[l].target==r))return;i.push(n._pushThread(o,s))}},r),i}},n.prototype.disposeTarget=function(t){t.dispose();var e=this.targets.indexOf(t);e>-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e<this.threads.length;e++)this.threads[e].target==t&&this._removeThread(this.threads[e])},n.prototype.greenFlag=function(){this.stopAll(),this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=[],e=0;e<this.targets.length;e++)this.targets[e].hasOwnProperty("isOriginal")&&!this.targets[e].isOriginal?this.targets[e].dispose():t.push(this.targets[e]);this.targets=t;for(var r=this.threads.slice();r.length>0;){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<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=n.target;if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);s&&t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},n.prototype.quietGlow=function(t){var e=this._scriptGlowsPreviousFrame.indexOf(t);e>-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;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getSpriteTargetByName=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.sprite&&r.sprite.name==t)return r}},n.prototype.changeCloneCounter=function(t){this._cloneCounter+=t},n.prototype.clonesAvailable=function(){return this._cloneCounter<n.MAX_CLONES},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){this.renderer&&this.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=t.target.blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=t.target.blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.requestScriptGlowInFrame=!1,t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.target=null,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<this.runtime.targets.length;n++){var i=this.runtime.targets[n];if(i.hasOwnProperty("drawableID")&&i.drawableID==r)return void this.runtime.startHats("event_whenthisspriteclicked",null,i)}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(19);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of_menu:this.createCloneMenu,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone}},n.prototype.getHats=function(){return{control_start_as_clone:{restartExistingThreads:!1}}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(22),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(21);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.hasOwnProperty("scratchX")&&(h.x=t.scratchX),t.hasOwnProperty("scratchY")&&(h.y=t.scratchY),t.hasOwnProperty("direction")&&(h.direction=t.direction),t.hasOwnProperty("scale")&&(h.size=100*t.scale),t.hasOwnProperty("visible")&&(h.visible=t.visible),t.hasOwnProperty("currentCostumeIndex")&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,h.updateAllDrawableProperties(),t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(35),p=r(89),h=r(15),l=r(92),f=r(93);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(36),o=r(88);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;r&&this._blocks[t.blockId].topLevel&&r.quietGlow(t.blockId),this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+a.name+'">',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="</value>")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+='<field name="'+c.name+'">'+p+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===N?this._stateInAttributeValueNoQuotes(t):this._state===x?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===P?this._stateBeforeCdata3(t):this._state===B?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===V?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==N&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(56),T=r(57).Buffer;i.ReadableState=n;var E=r(2).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var N=r(52),x=r(61);x.inherits=r(62);var O,A=r(63);A=A&&A.debuglog?A.debuglog("stream"):function(){},x.inherits(i,N),i.prototype.push=function(t,e){var r=this._readableState;return x.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(66).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!x.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=N.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)x.isFunction(t[i])&&x.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(4))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
+!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(){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(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.attachRenderer=function(t){this.runtime.attachRenderer(t)},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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=N,e.isPrimitive=x,e.isBuffer=r(5);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(6),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(p===setTimeout)return setTimeout(t,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!g){var t=i(s);g=!0;for(var e=d.length;e;){for(f=d,d=[];++m<e;)f&&f[m].run();m=-1,e=d.length}f=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,l=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],g=!1,m=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||g||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null,this._cloneCounter=0}var i=r(2),o=r(8),s=r(10),a=r(3),u=r(12),c=r(13),p=r(16),h={scratch3_control:r(18),scratch3_event:r(29),scratch3_looks:r(30),scratch3_motion:r(31),scratch3_operators:r(32),scratch3_sensing:r(33)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.MAX_CLONES=300,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype.attachRenderer=function(t){this.renderer=t},n.prototype._pushThread=function(t,e){var r=new s(t);return r.setTarget(e),r.pushStack(t),this.threads.push(r),r},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t,this._editingTarget)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(o,s){var a=s.blocks.getBlock(o).opcode;if(a===t){var u=s.blocks.getFields(o);if(e)for(var c in e)if(u[c].value!==e[c])return;var p=n._hats[t];if(p.restartExistingThreads)for(var h=0;h<n.threads.length;h++)n.threads[h].topBlock!==o||r&&n.threads[h].target!=r||n._removeThread(n.threads[h]);else for(var l=0;l<n.threads.length;l++)if(n.threads[l].topBlock===o&&(!r||n.threads[l].target==r))return;i.push(n._pushThread(o,s))}},r),i}},n.prototype.disposeTarget=function(t){t.dispose();var e=this.targets.indexOf(t);e>-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e<this.threads.length;e++)this.threads[e].target==t&&this._removeThread(this.threads[e])},n.prototype.greenFlag=function(){this.stopAll(),this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=[],e=0;e<this.targets.length;e++)this.targets[e].hasOwnProperty("isOriginal")&&!this.targets[e].isOriginal?this.targets[e].dispose():t.push(this.targets[e]);this.targets=t;for(var r=this.threads.slice();r.length>0;){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<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=n.target;if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);s&&t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},n.prototype.quietGlow=function(t){var e=this._scriptGlowsPreviousFrame.indexOf(t);e>-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;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getSpriteTargetByName=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.sprite&&r.sprite.name==t)return r}},n.prototype.changeCloneCounter=function(t){this._cloneCounter+=t},n.prototype.clonesAvailable=function(){return this._cloneCounter<n.MAX_CLONES},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){this.renderer&&this.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=t.target.blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=t.target.blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.requestScriptGlowInFrame=!1,t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.target=null,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<this.runtime.targets.length;n++){var i=this.runtime.targets[n];if(i.hasOwnProperty("drawableID")&&i.drawableID==r)return void this.runtime.startHats("event_whenthisspriteclicked",null,i)}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(19);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of_menu:this.createCloneMenu,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone}},n.prototype.getHats=function(){return{control_start_as_clone:{restartExistingThreads:!1}}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(22),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(21);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.hasOwnProperty("scratchX")&&(h.x=t.scratchX),t.hasOwnProperty("scratchY")&&(h.y=t.scratchY),t.hasOwnProperty("direction")&&(h.direction=t.direction),t.hasOwnProperty("scale")&&(h.size=100*t.scale),t.hasOwnProperty("visible")&&(h.visible=t.visible),t.hasOwnProperty("currentCostumeIndex")&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,h.updateAllDrawableProperties(),t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(35),p=r(89),h=r(15),l=r(92),f=r(93);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(36),o=r(88);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;r&&this._blocks[t.blockId].topLevel&&r.quietGlow(t.blockId),this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+a.name+'">',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="</value>")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+='<field name="'+c.name+'">'+p+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===N?this._stateInAttributeValueNoQuotes(t):this._state===x?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===P?this._stateBeforeCdata3(t):this._state===B?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===V?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==N&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(56),T=r(57).Buffer;i.ReadableState=n;var E=r(2).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var N=r(52),x=r(61);x.inherits=r(62);var O,A=r(63);A=A&&A.debuglog?A.debuglog("stream"):function(){},x.inherits(i,N),i.prototype.push=function(t,e){var r=this._readableState;return x.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(66).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!x.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=N.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)x.isFunction(t[i])&&x.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(4))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
 	 * The buffer module from node.js, for the browser.
 	 *
 	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>

From aa5e8d264888bcdd8ed6d090b5d0b05e94ded8ca Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 21 Sep 2016 16:31:07 -0400
Subject: [PATCH 247/302] 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 <tim.mickel@gmail.com>
Date: Wed, 21 Sep 2016 16:31:23 -0400
Subject: [PATCH 248/302] 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 <tim.mickel@gmail.com>
Date: Wed, 21 Sep 2016 16:38:33 -0400
Subject: [PATCH 249/302] 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.<string, Function>} 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.<string,*>}
+     */
+    this.variables = {};
+    /**
+     * Dictionary of lists and their contents for this target.
+     * Key is the list name.
+     * @type {Object.<string,*>}
+     */
+    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 <tim.mickel@gmail.com>
Date: Thu, 22 Sep 2016 17:00:38 -0400
Subject: [PATCH 250/302] "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 <ray@scratch.mit.edu>
Date: Sat, 24 Sep 2016 18:11:01 -0400
Subject: [PATCH 251/302] 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 @@
     <meta charset="utf-8">
     <title>Scratch VM Playground</title>
     <link rel="stylesheet" href="playground.css">
-    <link rel="stylesheet" href="../node_modules/highlightjs/styles/zenburn.css">
+    <link rel="stylesheet" href="zenburn.css">
 </head>
 <body>
     <div id="vm-devtools">
@@ -763,20 +763,10 @@
       </category>
       <category name="More Blocks" colour="#FF6680" custom="PROCEDURE"></category>
     </xml>
-    <!-- FPS counter -->
-    <script src="../node_modules/stats.js/build/stats.min.js"></script>
-    <!-- Syntax highlighter -->
-    <script src="../node_modules/highlightjs/highlight.pack.min.js"></script>
-    <!-- Scratch Blocks -->
-    <!-- For easier development between the two, use `npm link` -->
-    <script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
-    <script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
-    <script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
-    <script src="../node_modules/scratch-blocks/msg/messages.js"></script>
-    <!-- Renderer -->
-    <script src="../node_modules/scratch-render/render.js"></script>
+    <!-- FPS counter, Syntax highlighter, Blocks, Renderer -->
+    <script src="./vendor.js"></script>
     <!-- VM Worker -->
-    <script src="../vm.js"></script>
+    <script src="./vm.js"></script>
     <!-- Playground -->
     <script src="./playground.js"></script>
     <script>
diff --git a/playground/playground.js b/playground/playground.js
index ee28c55a9..053f6e925 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -47,7 +47,7 @@ window.onload = function() {
     var toolbox = document.getElementById('toolbox');
     var workspace = window.Blockly.inject('blocks', {
         toolbox: toolbox,
-        media: '../node_modules/scratch-blocks/media/',
+        media: './media/',
         zoom: {
             controls: true,
             wheel: true,
diff --git a/webpack.config.js b/webpack.config.js
index 376ccd25d..aa2e50f7b 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,3 +1,5 @@
+var CopyWebpackPlugin = require('copy-webpack-plugin');
+var defaultsDeep = require('lodash.defaultsdeep');
 var webpack = require('webpack');
 
 var base = {
@@ -6,9 +8,6 @@ var base = {
             {
                 test: /\.json$/,
                 loader: 'json-loader'
-            }, {
-                test: require.resolve('./src/index.js'),
-                loader: 'expose?VirtualMachine'
             }
         ]
     },
@@ -23,23 +22,89 @@ var base = {
     ]
 };
 
-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'
-    }
-})];
+module.exports = [
+    // Web-compatible, playground
+    defaultsDeep({}, base, {
+        entry: {
+            'vm': './src/index.js',
+            'vm.min': './src/index.js'
+        },
+        output: {
+            path: __dirname,
+            filename: '[name].js'
+        },
+        module: {
+            loaders: base.module.loaders.concat([
+                {
+                    test: require.resolve('./src/index.js'),
+                    loader: 'expose?VirtualMachine'
+                }
+            ])
+        }
+    }),
+    // Webpack-compatible
+    defaultsDeep({}, base, {
+        entry: {
+            'dist': './src/index.js'
+        },
+        output: {
+            library: 'VirtualMachine',
+            libraryTarget: 'commonjs2',
+            path: __dirname,
+            filename: '[name].js'
+        }
+    }),
+    // Playground
+    defaultsDeep({}, base, {
+        entry: {
+            'playground/vm': './src/index.js',
+            'playground/vendor': [
+                // FPS counter
+                'stats.js/build/stats.min.js',
+                // Syntax highlighter
+                'highlightjs/highlight.pack.min.js',
+                // Scratch Blocks
+                'scratch-blocks/dist/vertical.js',
+                // Renderer
+                'scratch-render'
+            ]
+        },
+        output: {
+            path: __dirname,
+            filename: '[name].js'
+        },
+        module: {
+            loaders: base.module.loaders.concat([
+                {
+                    test: require.resolve('./src/index.js'),
+                    loader: 'expose?VirtualMachine'
+                },
+                {
+                    test: require.resolve('stats.js/build/stats.min.js'),
+                    loader: 'script'
+                },
+                {
+                    test: require.resolve('highlightjs/highlight.pack.min.js'),
+                    loader: 'script'
+                },
+                {
+                    test: require.resolve('scratch-blocks/dist/vertical.js'),
+                    loader: 'expose?Blockly'
+                },
+                {
+                    test: require.resolve('scratch-render'),
+                    loader: 'expose?RenderWebGL'
+                }
+            ])
+        },
+        plugins: base.plugins.concat([
+            new CopyWebpackPlugin([{
+                from: 'node_modules/scratch-blocks/media',
+                to: 'playground/media'
+            }, {
+                from: 'node_modules/highlightjs/styles/zenburn.css',
+                to: 'playground'
+            }])
+        ])
+    })
+];

From 89f751e651324a04bc7e4c3b35746d97bbdc1854 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Sat, 24 Sep 2016 18:14:52 -0400
Subject: [PATCH 252/302] Publish playground to gh-pages

---
 .travis.yml  | 16 ++++++++++++++++
 package.json |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 00dd791d5..e256250e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,3 +6,19 @@ sudo: false
 cache:
   directories:
   - node_modules
+after_script:
+- |
+  # RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel
+  declare exitCode
+  $(npm bin)/travis-after-all
+  exitCode=$?
+  if [[
+    $exitCode = 0 &&
+    $RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
+    $TRAVIS_PULL_REQUEST = "false"
+  ]]; then
+    ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Travis build ${TRAVIS_BUILD_NUMBER}"
+    git config --global user.email $(git log --pretty=format:"%ce" -n1)
+    git config --global user.name $(git log --pretty=format:"%cn" -n1)
+    ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Build for $(git log --pretty=format:%H)"
+  fi
diff --git a/package.json b/package.json
index f4edc1d90..9be088a02 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
     "copy-webpack-plugin": "3.0.1",
     "eslint": "2.7.0",
     "expose-loader": "0.7.1",
+    "gh-pages": "0.11.0",
     "highlightjs": "8.7.0",
     "htmlparser2": "3.9.0",
     "json-loader": "0.5.4",
@@ -30,6 +31,7 @@
     "script-loader": "0.7.0",
     "stats.js": "0.16.0",
     "tap": "5.7.1",
+    "travis-after-all": "1.4.4",
     "webpack": "1.13.0",
     "webpack-dev-server": "1.14.1"
   }

From 7eb2e58a38c2ad6d8820142640c505087048f172 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Sun, 25 Sep 2016 13:59:16 -0400
Subject: [PATCH 253/302] Publish to NPM

Authenticate with NPM via .npmrc and publish the package version + "-[git sha]".

Remove vm and vm.min.js, they'll be built before the package is published to NPM and available on installation. When installing from git, the build step will run on npm install.
---
 .gitignore   |     2 +
 .npmignore   |     2 +
 .travis.yml  |     4 +-
 package.json |     2 +-
 vm.js        | 17196 -------------------------------------------------
 vm.min.js    |    11 -
 6 files changed, 8 insertions(+), 17209 deletions(-)
 create mode 100644 .npmignore
 delete mode 100644 vm.js
 delete mode 100644 vm.min.js

diff --git a/.gitignore b/.gitignore
index 4c1329820..b896c5ade 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ npm-*
 /.nyc_output
 /coverage
 /dist.js
+/vm.js
+/vm.min.js
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 000000000..bd86c446a
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,2 @@
+/.nyc_output
+/coverage
diff --git a/.travis.yml b/.travis.yml
index e256250e0..54b75299c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,9 @@ after_script:
     $RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
     $TRAVIS_PULL_REQUEST = "false"
   ]]; then
-    ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Travis build ${TRAVIS_BUILD_NUMBER}"
+    echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
+    npm --no-git-tag-version version $(node -p -e "require('./package.json').version")-${TRAVIS_COMMIT:0:5}
+    npm publish
     git config --global user.email $(git log --pretty=format:"%ce" -n1)
     git config --global user.name $(git log --pretty=format:"%cn" -n1)
     ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Build for $(git log --pretty=format:%H)"
diff --git a/package.json b/package.json
index 9be088a02..02b23a0c8 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
   },
   "main": "./dist.js",
   "scripts": {
-    "postinstall": "./node_modules/.bin/webpack",
+    "prepublish": "./node_modules/.bin/webpack --bail",
     "start": "webpack-dev-server --host 0.0.0.0 --content-base .",
     "test": "make test"
   },
diff --git a/vm.js b/vm.js
deleted file mode 100644
index f9efc15ed..000000000
--- a/vm.js
+++ /dev/null
@@ -1,17196 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId])
-/******/ 			return installedModules[moduleId].exports;
-
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			exports: {},
-/******/ 			id: moduleId,
-/******/ 			loaded: false
-/******/ 		};
-
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ 		// Flag the module as loaded
-/******/ 		module.loaded = true;
-
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-
-
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "";
-
-/******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["VirtualMachine"] = __webpack_require__(1);
-	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 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 <ascii@media.mit.edu>
-	 */
-	function VirtualMachine () {
-	    var instance = this;
-	    // Bind event emitter and runtime to VM instance
-	    EventEmitter.call(instance);
-	    /**
-	     * VM runtime, to store blocks, I/O devices, sprites/targets, etc.
-	     * @type {!Runtime}
-	     */
-	    instance.runtime = new Runtime();
-	    /**
-	     * The "currently editing"/selected target ID for the VM.
-	     * Block events from any Blockly workspace are routed to this target.
-	     * @type {!string}
-	     */
-	    instance.editingTarget = null;
-	    // Runtime emits are passed along as VM emits.
-	    instance.runtime.on(Runtime.SCRIPT_GLOW_ON, function (id) {
-	        instance.emit(Runtime.SCRIPT_GLOW_ON, {id: id});
-	    });
-	    instance.runtime.on(Runtime.SCRIPT_GLOW_OFF, function (id) {
-	        instance.emit(Runtime.SCRIPT_GLOW_OFF, {id: id});
-	    });
-	    instance.runtime.on(Runtime.BLOCK_GLOW_ON, function (id) {
-	        instance.emit(Runtime.BLOCK_GLOW_ON, {id: id});
-	    });
-	    instance.runtime.on(Runtime.BLOCK_GLOW_OFF, function (id) {
-	        instance.emit(Runtime.BLOCK_GLOW_OFF, {id: id});
-	    });
-	    instance.runtime.on(Runtime.VISUAL_REPORT, function (id, value) {
-	        instance.emit(Runtime.VISUAL_REPORT, {id: id, value: value});
-	    });
-
-	    this.blockListener = this.blockListener.bind(this);
-	}
-
-	/**
-	 * Inherit from EventEmitter
-	 */
-	util.inherits(VirtualMachine, EventEmitter);
-
-	/**
-	 * Start running the VM - do this before anything else.
-	 */
-	VirtualMachine.prototype.start = function () {
-	    this.runtime.start();
-	};
-
-	/**
-	 * "Green flag" handler - start all threads starting with a green flag.
-	 */
-	VirtualMachine.prototype.greenFlag = function () {
-	    this.runtime.greenFlag();
-	};
-
-	/**
-	 * Stop all threads and running activities.
-	 */
-	VirtualMachine.prototype.stopAll = function () {
-	    this.runtime.stopAll();
-	};
-
-	/**
-	 * Get data for playground. Data comes back in an emitted event.
-	 */
-	VirtualMachine.prototype.getPlaygroundData = function () {
-	    this.emit('playgroundData', {
-	        blocks: this.editingTarget.blocks,
-	        threads: this.runtime.threads
-	    });
-	};
-
-	/**
-	 * Handle an animation frame.
-	 */
-	VirtualMachine.prototype.animationFrame = function () {
-	    this.runtime.animationFrame();
-	};
-
-	/**
-	 * Post I/O data to the virtual devices.
-	 * @param {?string} device Name of virtual I/O device.
-	 * @param {Object} data Any data object to post to the I/O device.
-	 */
-	VirtualMachine.prototype.postIOData = function (device, data) {
-	    if (this.runtime.ioDevices[device]) {
-	        this.runtime.ioDevices[device].postData(data);
-	    }
-	};
-
-	/**
-	 * Load a project from a Scratch 2.0 JSON representation.
-	 * @param {?string} json JSON string representing the project.
-	 */
-	VirtualMachine.prototype.loadProject = function (json) {
-	    // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
-	    sb2import(json, this.runtime);
-	    // Select the first target for editing, e.g., the stage.
-	    this.editingTarget = this.runtime.targets[0];
-	    // Update the VM user's knowledge of targets and blocks on the workspace.
-	    this.emitTargetsUpdate();
-	    this.emitWorkspaceUpdate();
-	    this.runtime.setEditingTarget(this.editingTarget);
-	};
-
-	/**
-	 * Temporary way to make an empty project, in case the desired project
-	 * cannot be loaded from the online server.
-	 */
-	VirtualMachine.prototype.createEmptyProject = function () {
-	    // Stage.
-	    var blocks2 = new Blocks();
-	    var stage = new Sprite(blocks2);
-	    stage.name = 'Stage';
-	    stage.costumes.push({
-	        skin: '/assets/stage.png',
-	        name: 'backdrop1',
-	        bitmapResolution: 1,
-	        rotationCenterX: 240,
-	        rotationCenterY: 180
-	    });
-	    var target2 = stage.createClone();
-	    this.runtime.targets.push(target2);
-	    target2.x = 0;
-	    target2.y = 0;
-	    target2.direction = 90;
-	    target2.size = 200;
-	    target2.visible = true;
-	    target2.isStage = true;
-	    // Sprite1 (cat).
-	    var blocks1 = new Blocks();
-	    var sprite = new Sprite(blocks1);
-	    sprite.name = 'Sprite1';
-	    sprite.costumes.push({
-	        skin: '/assets/scratch_cat.svg',
-	        name: 'costume1',
-	        bitmapResolution: 1,
-	        rotationCenterX: 47,
-	        rotationCenterY: 55
-	    });
-	    var target1 = sprite.createClone();
-	    this.runtime.targets.push(target1);
-	    target1.x = 0;
-	    target1.y = 0;
-	    target1.direction = 90;
-	    target1.size = 100;
-	    target1.visible = true;
-	    this.editingTarget = this.runtime.targets[0];
-	    this.emitTargetsUpdate();
-	    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.
-	 */
-	VirtualMachine.prototype.blockListener = function (e) {
-	    if (this.editingTarget) {
-	        this.editingTarget.blocks.blocklyListen(
-	            e,
-	            false,
-	            this.runtime
-	        );
-	    }
-	};
-
-	/**
-	 * Set an editing target. An editor UI can use this function to switch
-	 * between editing different targets, sprites, etc.
-	 * After switching the editing target, the VM may emit updates
-	 * to the list of targets and any attached workspace blocks
-	 * (see `emitTargetsUpdate` and `emitWorkspaceUpdate`).
-	 * @param {string} targetId Id of target to set as editing.
-	 */
-	VirtualMachine.prototype.setEditingTarget = function (targetId) {
-	    // Has the target id changed? If not, exit.
-	    if (targetId == this.editingTarget.id) {
-	        return;
-	    }
-	    var target = this.runtime.getTargetById(targetId);
-	    if (target) {
-	        this.editingTarget = target;
-	        // Emit appropriate UI updates.
-	        this.emitTargetsUpdate();
-	        this.emitWorkspaceUpdate();
-	        this.runtime.setEditingTarget(target);
-	    }
-	};
-
-	/**
-	 * Emit metadata about available targets.
-	 * An editor UI could use this to display a list of targets and show
-	 * the currently editing one.
-	 */
-	VirtualMachine.prototype.emitTargetsUpdate = function () {
-	    this.emit('targetsUpdate', {
-	        // [[target id, human readable target name], ...].
-	        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.
-	        editingTarget: this.editingTarget.id
-	    });
-	};
-
-	/**
-	 * Emit an Blockly/scratch-blocks compatible XML representation
-	 * of the current editing target's blocks.
-	 */
-	VirtualMachine.prototype.emitWorkspaceUpdate = function () {
-	    this.emit('workspaceUpdate', {
-	        'xml': this.editingTarget.blocks.toXML()
-	    });
-	};
-
-	module.exports = VirtualMachine;
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	function EventEmitter() {
-	  this._events = this._events || {};
-	  this._maxListeners = this._maxListeners || undefined;
-	}
-	module.exports = EventEmitter;
-
-	// Backwards-compat with node 0.10.x
-	EventEmitter.EventEmitter = EventEmitter;
-
-	EventEmitter.prototype._events = undefined;
-	EventEmitter.prototype._maxListeners = undefined;
-
-	// By default EventEmitters will print a warning if more than 10 listeners are
-	// added to it. This is a useful default which helps finding memory leaks.
-	EventEmitter.defaultMaxListeners = 10;
-
-	// Obviously not all Emitters should be limited to 10. This function allows
-	// that to be increased. Set to zero for unlimited.
-	EventEmitter.prototype.setMaxListeners = function(n) {
-	  if (!isNumber(n) || n < 0 || isNaN(n))
-	    throw TypeError('n must be a positive number');
-	  this._maxListeners = n;
-	  return this;
-	};
-
-	EventEmitter.prototype.emit = function(type) {
-	  var er, handler, len, args, i, listeners;
-
-	  if (!this._events)
-	    this._events = {};
-
-	  // If there is no 'error' event listener then throw.
-	  if (type === 'error') {
-	    if (!this._events.error ||
-	        (isObject(this._events.error) && !this._events.error.length)) {
-	      er = arguments[1];
-	      if (er instanceof Error) {
-	        throw er; // Unhandled 'error' event
-	      } else {
-	        // At least give some kind of context to the user
-	        var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
-	        err.context = er;
-	        throw err;
-	      }
-	    }
-	  }
-
-	  handler = this._events[type];
-
-	  if (isUndefined(handler))
-	    return false;
-
-	  if (isFunction(handler)) {
-	    switch (arguments.length) {
-	      // fast cases
-	      case 1:
-	        handler.call(this);
-	        break;
-	      case 2:
-	        handler.call(this, arguments[1]);
-	        break;
-	      case 3:
-	        handler.call(this, arguments[1], arguments[2]);
-	        break;
-	      // slower
-	      default:
-	        args = Array.prototype.slice.call(arguments, 1);
-	        handler.apply(this, args);
-	    }
-	  } else if (isObject(handler)) {
-	    args = Array.prototype.slice.call(arguments, 1);
-	    listeners = handler.slice();
-	    len = listeners.length;
-	    for (i = 0; i < len; i++)
-	      listeners[i].apply(this, args);
-	  }
-
-	  return true;
-	};
-
-	EventEmitter.prototype.addListener = function(type, listener) {
-	  var m;
-
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  if (!this._events)
-	    this._events = {};
-
-	  // To avoid recursion in the case that type === "newListener"! Before
-	  // adding it to the listeners, first emit "newListener".
-	  if (this._events.newListener)
-	    this.emit('newListener', type,
-	              isFunction(listener.listener) ?
-	              listener.listener : listener);
-
-	  if (!this._events[type])
-	    // Optimize the case of one listener. Don't need the extra array object.
-	    this._events[type] = listener;
-	  else if (isObject(this._events[type]))
-	    // If we've already got an array, just append.
-	    this._events[type].push(listener);
-	  else
-	    // Adding the second element, need to change to array.
-	    this._events[type] = [this._events[type], listener];
-
-	  // Check for listener leak
-	  if (isObject(this._events[type]) && !this._events[type].warned) {
-	    if (!isUndefined(this._maxListeners)) {
-	      m = this._maxListeners;
-	    } else {
-	      m = EventEmitter.defaultMaxListeners;
-	    }
-
-	    if (m && m > 0 && this._events[type].length > m) {
-	      this._events[type].warned = true;
-	      console.error('(node) warning: possible EventEmitter memory ' +
-	                    'leak detected. %d listeners added. ' +
-	                    'Use emitter.setMaxListeners() to increase limit.',
-	                    this._events[type].length);
-	      if (typeof console.trace === 'function') {
-	        // not supported in IE 10
-	        console.trace();
-	      }
-	    }
-	  }
-
-	  return this;
-	};
-
-	EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-
-	EventEmitter.prototype.once = function(type, listener) {
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  var fired = false;
-
-	  function g() {
-	    this.removeListener(type, g);
-
-	    if (!fired) {
-	      fired = true;
-	      listener.apply(this, arguments);
-	    }
-	  }
-
-	  g.listener = listener;
-	  this.on(type, g);
-
-	  return this;
-	};
-
-	// emits a 'removeListener' event iff the listener was removed
-	EventEmitter.prototype.removeListener = function(type, listener) {
-	  var list, position, length, i;
-
-	  if (!isFunction(listener))
-	    throw TypeError('listener must be a function');
-
-	  if (!this._events || !this._events[type])
-	    return this;
-
-	  list = this._events[type];
-	  length = list.length;
-	  position = -1;
-
-	  if (list === listener ||
-	      (isFunction(list.listener) && list.listener === listener)) {
-	    delete this._events[type];
-	    if (this._events.removeListener)
-	      this.emit('removeListener', type, listener);
-
-	  } else if (isObject(list)) {
-	    for (i = length; i-- > 0;) {
-	      if (list[i] === listener ||
-	          (list[i].listener && list[i].listener === listener)) {
-	        position = i;
-	        break;
-	      }
-	    }
-
-	    if (position < 0)
-	      return this;
-
-	    if (list.length === 1) {
-	      list.length = 0;
-	      delete this._events[type];
-	    } else {
-	      list.splice(position, 1);
-	    }
-
-	    if (this._events.removeListener)
-	      this.emit('removeListener', type, listener);
-	  }
-
-	  return this;
-	};
-
-	EventEmitter.prototype.removeAllListeners = function(type) {
-	  var key, listeners;
-
-	  if (!this._events)
-	    return this;
-
-	  // not listening for removeListener, no need to emit
-	  if (!this._events.removeListener) {
-	    if (arguments.length === 0)
-	      this._events = {};
-	    else if (this._events[type])
-	      delete this._events[type];
-	    return this;
-	  }
-
-	  // emit removeListener for all listeners on all events
-	  if (arguments.length === 0) {
-	    for (key in this._events) {
-	      if (key === 'removeListener') continue;
-	      this.removeAllListeners(key);
-	    }
-	    this.removeAllListeners('removeListener');
-	    this._events = {};
-	    return this;
-	  }
-
-	  listeners = this._events[type];
-
-	  if (isFunction(listeners)) {
-	    this.removeListener(type, listeners);
-	  } else if (listeners) {
-	    // LIFO order
-	    while (listeners.length)
-	      this.removeListener(type, listeners[listeners.length - 1]);
-	  }
-	  delete this._events[type];
-
-	  return this;
-	};
-
-	EventEmitter.prototype.listeners = function(type) {
-	  var ret;
-	  if (!this._events || !this._events[type])
-	    ret = [];
-	  else if (isFunction(this._events[type]))
-	    ret = [this._events[type]];
-	  else
-	    ret = this._events[type].slice();
-	  return ret;
-	};
-
-	EventEmitter.prototype.listenerCount = function(type) {
-	  if (this._events) {
-	    var evlistener = this._events[type];
-
-	    if (isFunction(evlistener))
-	      return 1;
-	    else if (evlistener)
-	      return evlistener.length;
-	  }
-	  return 0;
-	};
-
-	EventEmitter.listenerCount = function(emitter, type) {
-	  return emitter.listenerCount(type);
-	};
-
-	function isFunction(arg) {
-	  return typeof arg === 'function';
-	}
-
-	function isNumber(arg) {
-	  return typeof arg === 'number';
-	}
-
-	function isObject(arg) {
-	  return typeof arg === 'object' && arg !== null;
-	}
-
-	function isUndefined(arg) {
-	  return arg === void 0;
-	}
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	var formatRegExp = /%[sdj%]/g;
-	exports.format = function(f) {
-	  if (!isString(f)) {
-	    var objects = [];
-	    for (var i = 0; i < arguments.length; i++) {
-	      objects.push(inspect(arguments[i]));
-	    }
-	    return objects.join(' ');
-	  }
-
-	  var i = 1;
-	  var args = arguments;
-	  var len = args.length;
-	  var str = String(f).replace(formatRegExp, function(x) {
-	    if (x === '%%') return '%';
-	    if (i >= len) return x;
-	    switch (x) {
-	      case '%s': return String(args[i++]);
-	      case '%d': return Number(args[i++]);
-	      case '%j':
-	        try {
-	          return JSON.stringify(args[i++]);
-	        } catch (_) {
-	          return '[Circular]';
-	        }
-	      default:
-	        return x;
-	    }
-	  });
-	  for (var x = args[i]; i < len; x = args[++i]) {
-	    if (isNull(x) || !isObject(x)) {
-	      str += ' ' + x;
-	    } else {
-	      str += ' ' + inspect(x);
-	    }
-	  }
-	  return str;
-	};
-
-
-	// Mark that a method should not be used.
-	// Returns a modified function which warns once by default.
-	// If --no-deprecation is set, then it is a no-op.
-	exports.deprecate = function(fn, msg) {
-	  // Allow for deprecating things in the process of starting up.
-	  if (isUndefined(global.process)) {
-	    return function() {
-	      return exports.deprecate(fn, msg).apply(this, arguments);
-	    };
-	  }
-
-	  if (process.noDeprecation === true) {
-	    return fn;
-	  }
-
-	  var warned = false;
-	  function deprecated() {
-	    if (!warned) {
-	      if (process.throwDeprecation) {
-	        throw new Error(msg);
-	      } else if (process.traceDeprecation) {
-	        console.trace(msg);
-	      } else {
-	        console.error(msg);
-	      }
-	      warned = true;
-	    }
-	    return fn.apply(this, arguments);
-	  }
-
-	  return deprecated;
-	};
-
-
-	var debugs = {};
-	var debugEnviron;
-	exports.debuglog = function(set) {
-	  if (isUndefined(debugEnviron))
-	    debugEnviron = process.env.NODE_DEBUG || '';
-	  set = set.toUpperCase();
-	  if (!debugs[set]) {
-	    if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
-	      var pid = process.pid;
-	      debugs[set] = function() {
-	        var msg = exports.format.apply(exports, arguments);
-	        console.error('%s %d: %s', set, pid, msg);
-	      };
-	    } else {
-	      debugs[set] = function() {};
-	    }
-	  }
-	  return debugs[set];
-	};
-
-
-	/**
-	 * Echos the value of a value. Trys to print the value out
-	 * in the best way possible given the different types.
-	 *
-	 * @param {Object} obj The object to print out.
-	 * @param {Object} opts Optional options object that alters the output.
-	 */
-	/* legacy: obj, showHidden, depth, colors*/
-	function inspect(obj, opts) {
-	  // default options
-	  var ctx = {
-	    seen: [],
-	    stylize: stylizeNoColor
-	  };
-	  // legacy...
-	  if (arguments.length >= 3) ctx.depth = arguments[2];
-	  if (arguments.length >= 4) ctx.colors = arguments[3];
-	  if (isBoolean(opts)) {
-	    // legacy...
-	    ctx.showHidden = opts;
-	  } else if (opts) {
-	    // got an "options" object
-	    exports._extend(ctx, opts);
-	  }
-	  // set default options
-	  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
-	  if (isUndefined(ctx.depth)) ctx.depth = 2;
-	  if (isUndefined(ctx.colors)) ctx.colors = false;
-	  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
-	  if (ctx.colors) ctx.stylize = stylizeWithColor;
-	  return formatValue(ctx, obj, ctx.depth);
-	}
-	exports.inspect = inspect;
-
-
-	// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
-	inspect.colors = {
-	  'bold' : [1, 22],
-	  'italic' : [3, 23],
-	  'underline' : [4, 24],
-	  'inverse' : [7, 27],
-	  'white' : [37, 39],
-	  'grey' : [90, 39],
-	  'black' : [30, 39],
-	  'blue' : [34, 39],
-	  'cyan' : [36, 39],
-	  'green' : [32, 39],
-	  'magenta' : [35, 39],
-	  'red' : [31, 39],
-	  'yellow' : [33, 39]
-	};
-
-	// Don't use 'blue' not visible on cmd.exe
-	inspect.styles = {
-	  'special': 'cyan',
-	  'number': 'yellow',
-	  'boolean': 'yellow',
-	  'undefined': 'grey',
-	  'null': 'bold',
-	  'string': 'green',
-	  'date': 'magenta',
-	  // "name": intentionally not styling
-	  'regexp': 'red'
-	};
-
-
-	function stylizeWithColor(str, styleType) {
-	  var style = inspect.styles[styleType];
-
-	  if (style) {
-	    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
-	           '\u001b[' + inspect.colors[style][1] + 'm';
-	  } else {
-	    return str;
-	  }
-	}
-
-
-	function stylizeNoColor(str, styleType) {
-	  return str;
-	}
-
-
-	function arrayToHash(array) {
-	  var hash = {};
-
-	  array.forEach(function(val, idx) {
-	    hash[val] = true;
-	  });
-
-	  return hash;
-	}
-
-
-	function formatValue(ctx, value, recurseTimes) {
-	  // Provide a hook for user-specified inspect functions.
-	  // Check that value is an object with an inspect function on it
-	  if (ctx.customInspect &&
-	      value &&
-	      isFunction(value.inspect) &&
-	      // Filter out the util module, it's inspect function is special
-	      value.inspect !== exports.inspect &&
-	      // Also filter out any prototype objects using the circular check.
-	      !(value.constructor && value.constructor.prototype === value)) {
-	    var ret = value.inspect(recurseTimes, ctx);
-	    if (!isString(ret)) {
-	      ret = formatValue(ctx, ret, recurseTimes);
-	    }
-	    return ret;
-	  }
-
-	  // Primitive types cannot have properties
-	  var primitive = formatPrimitive(ctx, value);
-	  if (primitive) {
-	    return primitive;
-	  }
-
-	  // Look up the keys of the object.
-	  var keys = Object.keys(value);
-	  var visibleKeys = arrayToHash(keys);
-
-	  if (ctx.showHidden) {
-	    keys = Object.getOwnPropertyNames(value);
-	  }
-
-	  // IE doesn't make error fields non-enumerable
-	  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
-	  if (isError(value)
-	      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
-	    return formatError(value);
-	  }
-
-	  // Some type of object without properties can be shortcutted.
-	  if (keys.length === 0) {
-	    if (isFunction(value)) {
-	      var name = value.name ? ': ' + value.name : '';
-	      return ctx.stylize('[Function' + name + ']', 'special');
-	    }
-	    if (isRegExp(value)) {
-	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-	    }
-	    if (isDate(value)) {
-	      return ctx.stylize(Date.prototype.toString.call(value), 'date');
-	    }
-	    if (isError(value)) {
-	      return formatError(value);
-	    }
-	  }
-
-	  var base = '', array = false, braces = ['{', '}'];
-
-	  // Make Array say that they are Array
-	  if (isArray(value)) {
-	    array = true;
-	    braces = ['[', ']'];
-	  }
-
-	  // Make functions say that they are functions
-	  if (isFunction(value)) {
-	    var n = value.name ? ': ' + value.name : '';
-	    base = ' [Function' + n + ']';
-	  }
-
-	  // Make RegExps say that they are RegExps
-	  if (isRegExp(value)) {
-	    base = ' ' + RegExp.prototype.toString.call(value);
-	  }
-
-	  // Make dates with properties first say the date
-	  if (isDate(value)) {
-	    base = ' ' + Date.prototype.toUTCString.call(value);
-	  }
-
-	  // Make error with message first say the error
-	  if (isError(value)) {
-	    base = ' ' + formatError(value);
-	  }
-
-	  if (keys.length === 0 && (!array || value.length == 0)) {
-	    return braces[0] + base + braces[1];
-	  }
-
-	  if (recurseTimes < 0) {
-	    if (isRegExp(value)) {
-	      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-	    } else {
-	      return ctx.stylize('[Object]', 'special');
-	    }
-	  }
-
-	  ctx.seen.push(value);
-
-	  var output;
-	  if (array) {
-	    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
-	  } else {
-	    output = keys.map(function(key) {
-	      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
-	    });
-	  }
-
-	  ctx.seen.pop();
-
-	  return reduceToSingleString(output, base, braces);
-	}
-
-
-	function formatPrimitive(ctx, value) {
-	  if (isUndefined(value))
-	    return ctx.stylize('undefined', 'undefined');
-	  if (isString(value)) {
-	    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
-	                                             .replace(/'/g, "\\'")
-	                                             .replace(/\\"/g, '"') + '\'';
-	    return ctx.stylize(simple, 'string');
-	  }
-	  if (isNumber(value))
-	    return ctx.stylize('' + value, 'number');
-	  if (isBoolean(value))
-	    return ctx.stylize('' + value, 'boolean');
-	  // For some reason typeof null is "object", so special case here.
-	  if (isNull(value))
-	    return ctx.stylize('null', 'null');
-	}
-
-
-	function formatError(value) {
-	  return '[' + Error.prototype.toString.call(value) + ']';
-	}
-
-
-	function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
-	  var output = [];
-	  for (var i = 0, l = value.length; i < l; ++i) {
-	    if (hasOwnProperty(value, String(i))) {
-	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-	          String(i), true));
-	    } else {
-	      output.push('');
-	    }
-	  }
-	  keys.forEach(function(key) {
-	    if (!key.match(/^\d+$/)) {
-	      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-	          key, true));
-	    }
-	  });
-	  return output;
-	}
-
-
-	function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
-	  var name, str, desc;
-	  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
-	  if (desc.get) {
-	    if (desc.set) {
-	      str = ctx.stylize('[Getter/Setter]', 'special');
-	    } else {
-	      str = ctx.stylize('[Getter]', 'special');
-	    }
-	  } else {
-	    if (desc.set) {
-	      str = ctx.stylize('[Setter]', 'special');
-	    }
-	  }
-	  if (!hasOwnProperty(visibleKeys, key)) {
-	    name = '[' + key + ']';
-	  }
-	  if (!str) {
-	    if (ctx.seen.indexOf(desc.value) < 0) {
-	      if (isNull(recurseTimes)) {
-	        str = formatValue(ctx, desc.value, null);
-	      } else {
-	        str = formatValue(ctx, desc.value, recurseTimes - 1);
-	      }
-	      if (str.indexOf('\n') > -1) {
-	        if (array) {
-	          str = str.split('\n').map(function(line) {
-	            return '  ' + line;
-	          }).join('\n').substr(2);
-	        } else {
-	          str = '\n' + str.split('\n').map(function(line) {
-	            return '   ' + line;
-	          }).join('\n');
-	        }
-	      }
-	    } else {
-	      str = ctx.stylize('[Circular]', 'special');
-	    }
-	  }
-	  if (isUndefined(name)) {
-	    if (array && key.match(/^\d+$/)) {
-	      return str;
-	    }
-	    name = JSON.stringify('' + key);
-	    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
-	      name = name.substr(1, name.length - 2);
-	      name = ctx.stylize(name, 'name');
-	    } else {
-	      name = name.replace(/'/g, "\\'")
-	                 .replace(/\\"/g, '"')
-	                 .replace(/(^"|"$)/g, "'");
-	      name = ctx.stylize(name, 'string');
-	    }
-	  }
-
-	  return name + ': ' + str;
-	}
-
-
-	function reduceToSingleString(output, base, braces) {
-	  var numLinesEst = 0;
-	  var length = output.reduce(function(prev, cur) {
-	    numLinesEst++;
-	    if (cur.indexOf('\n') >= 0) numLinesEst++;
-	    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
-	  }, 0);
-
-	  if (length > 60) {
-	    return braces[0] +
-	           (base === '' ? '' : base + '\n ') +
-	           ' ' +
-	           output.join(',\n  ') +
-	           ' ' +
-	           braces[1];
-	  }
-
-	  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-	}
-
-
-	// NOTE: These type checking functions intentionally don't use `instanceof`
-	// because it is fragile and can be easily faked with `Object.create()`.
-	function isArray(ar) {
-	  return Array.isArray(ar);
-	}
-	exports.isArray = isArray;
-
-	function isBoolean(arg) {
-	  return typeof arg === 'boolean';
-	}
-	exports.isBoolean = isBoolean;
-
-	function isNull(arg) {
-	  return arg === null;
-	}
-	exports.isNull = isNull;
-
-	function isNullOrUndefined(arg) {
-	  return arg == null;
-	}
-	exports.isNullOrUndefined = isNullOrUndefined;
-
-	function isNumber(arg) {
-	  return typeof arg === 'number';
-	}
-	exports.isNumber = isNumber;
-
-	function isString(arg) {
-	  return typeof arg === 'string';
-	}
-	exports.isString = isString;
-
-	function isSymbol(arg) {
-	  return typeof arg === 'symbol';
-	}
-	exports.isSymbol = isSymbol;
-
-	function isUndefined(arg) {
-	  return arg === void 0;
-	}
-	exports.isUndefined = isUndefined;
-
-	function isRegExp(re) {
-	  return isObject(re) && objectToString(re) === '[object RegExp]';
-	}
-	exports.isRegExp = isRegExp;
-
-	function isObject(arg) {
-	  return typeof arg === 'object' && arg !== null;
-	}
-	exports.isObject = isObject;
-
-	function isDate(d) {
-	  return isObject(d) && objectToString(d) === '[object Date]';
-	}
-	exports.isDate = isDate;
-
-	function isError(e) {
-	  return isObject(e) &&
-	      (objectToString(e) === '[object Error]' || e instanceof Error);
-	}
-	exports.isError = isError;
-
-	function isFunction(arg) {
-	  return typeof arg === 'function';
-	}
-	exports.isFunction = isFunction;
-
-	function isPrimitive(arg) {
-	  return arg === null ||
-	         typeof arg === 'boolean' ||
-	         typeof arg === 'number' ||
-	         typeof arg === 'string' ||
-	         typeof arg === 'symbol' ||  // ES6 symbol
-	         typeof arg === 'undefined';
-	}
-	exports.isPrimitive = isPrimitive;
-
-	exports.isBuffer = __webpack_require__(5);
-
-	function objectToString(o) {
-	  return Object.prototype.toString.call(o);
-	}
-
-
-	function pad(n) {
-	  return n < 10 ? '0' + n.toString(10) : n.toString(10);
-	}
-
-
-	var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
-	              'Oct', 'Nov', 'Dec'];
-
-	// 26 Feb 16:19:34
-	function timestamp() {
-	  var d = new Date();
-	  var time = [pad(d.getHours()),
-	              pad(d.getMinutes()),
-	              pad(d.getSeconds())].join(':');
-	  return [d.getDate(), months[d.getMonth()], time].join(' ');
-	}
-
-
-	// log is just a thin wrapper to console.log that prepends a timestamp
-	exports.log = function() {
-	  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
-	};
-
-
-	/**
-	 * Inherit the prototype methods from one constructor into another.
-	 *
-	 * The Function.prototype.inherits from lang.js rewritten as a standalone
-	 * function (not on Function.prototype). NOTE: If this file is to be loaded
-	 * during bootstrapping this function needs to be rewritten using some native
-	 * functions as prototype setup using normal JavaScript does not work as
-	 * expected during bootstrapping (see mirror.js in r114903).
-	 *
-	 * @param {function} ctor Constructor function which needs to inherit the
-	 *     prototype.
-	 * @param {function} superCtor Constructor function to inherit prototype from.
-	 */
-	exports.inherits = __webpack_require__(6);
-
-	exports._extend = function(origin, add) {
-	  // Don't do anything if add isn't an object
-	  if (!add || !isObject(add)) return origin;
-
-	  var keys = Object.keys(add);
-	  var i = keys.length;
-	  while (i--) {
-	    origin[keys[i]] = add[keys[i]];
-	  }
-	  return origin;
-	};
-
-	function hasOwnProperty(obj, prop) {
-	  return Object.prototype.hasOwnProperty.call(obj, prop);
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(4)))
-
-/***/ },
-/* 4 */
-/***/ function(module, exports) {
-
-	// shim for using process in browser
-	var process = module.exports = {};
-
-	// cached from whatever global is present so that test runners that stub it
-	// don't break things.  But we need to wrap it in a try catch in case it is
-	// wrapped in strict mode code which doesn't define any globals.  It's inside a
-	// function because try/catches deoptimize in certain engines.
-
-	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 {
-	        if (typeof setTimeout === 'function') {
-	            cachedSetTimeout = setTimeout;
-	        } else {
-	            cachedSetTimeout = defaultSetTimout;
-	        }
-	    } catch (e) {
-	        cachedSetTimeout = defaultSetTimout;
-	    }
-	    try {
-	        if (typeof clearTimeout === 'function') {
-	            cachedClearTimeout = clearTimeout;
-	        } else {
-	            cachedClearTimeout = defaultClearTimeout;
-	        }
-	    } catch (e) {
-	        cachedClearTimeout = defaultClearTimeout;
-	    }
-	} ())
-	function runTimeout(fun) {
-	    if (cachedSetTimeout === setTimeout) {
-	        //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);
-	    } catch(e){
-	        try {
-	            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
-	            return cachedSetTimeout.call(null, fun, 0);
-	        } catch(e){
-	            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
-	            return cachedSetTimeout.call(this, fun, 0);
-	        }
-	    }
-
-
-	}
-	function runClearTimeout(marker) {
-	    if (cachedClearTimeout === clearTimeout) {
-	        //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);
-	    } catch (e){
-	        try {
-	            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
-	            return cachedClearTimeout.call(null, marker);
-	        } catch (e){
-	            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
-	            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
-	            return cachedClearTimeout.call(this, marker);
-	        }
-	    }
-
-
-
-	}
-	var queue = [];
-	var draining = false;
-	var currentQueue;
-	var queueIndex = -1;
-
-	function cleanUpNextTick() {
-	    if (!draining || !currentQueue) {
-	        return;
-	    }
-	    draining = false;
-	    if (currentQueue.length) {
-	        queue = currentQueue.concat(queue);
-	    } else {
-	        queueIndex = -1;
-	    }
-	    if (queue.length) {
-	        drainQueue();
-	    }
-	}
-
-	function drainQueue() {
-	    if (draining) {
-	        return;
-	    }
-	    var timeout = runTimeout(cleanUpNextTick);
-	    draining = true;
-
-	    var len = queue.length;
-	    while(len) {
-	        currentQueue = queue;
-	        queue = [];
-	        while (++queueIndex < len) {
-	            if (currentQueue) {
-	                currentQueue[queueIndex].run();
-	            }
-	        }
-	        queueIndex = -1;
-	        len = queue.length;
-	    }
-	    currentQueue = null;
-	    draining = false;
-	    runClearTimeout(timeout);
-	}
-
-	process.nextTick = function (fun) {
-	    var args = new Array(arguments.length - 1);
-	    if (arguments.length > 1) {
-	        for (var i = 1; i < arguments.length; i++) {
-	            args[i - 1] = arguments[i];
-	        }
-	    }
-	    queue.push(new Item(fun, args));
-	    if (queue.length === 1 && !draining) {
-	        runTimeout(drainQueue);
-	    }
-	};
-
-	// v8 likes predictible objects
-	function Item(fun, array) {
-	    this.fun = fun;
-	    this.array = array;
-	}
-	Item.prototype.run = function () {
-	    this.fun.apply(null, this.array);
-	};
-	process.title = 'browser';
-	process.browser = true;
-	process.env = {};
-	process.argv = [];
-	process.version = ''; // empty string to avoid regexp issues
-	process.versions = {};
-
-	function noop() {}
-
-	process.on = noop;
-	process.addListener = noop;
-	process.once = noop;
-	process.off = noop;
-	process.removeListener = noop;
-	process.removeAllListeners = noop;
-	process.emit = noop;
-
-	process.binding = function (name) {
-	    throw new Error('process.binding is not supported');
-	};
-
-	process.cwd = function () { return '/' };
-	process.chdir = function (dir) {
-	    throw new Error('process.chdir is not supported');
-	};
-	process.umask = function() { return 0; };
-
-
-/***/ },
-/* 5 */
-/***/ function(module, exports) {
-
-	module.exports = function isBuffer(arg) {
-	  return arg && typeof arg === 'object'
-	    && typeof arg.copy === 'function'
-	    && typeof arg.fill === 'function'
-	    && typeof arg.readUInt8 === 'function';
-	}
-
-/***/ },
-/* 6 */
-/***/ 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
-	  }
-	}
-
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
-	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__(12);
-	var Keyboard = __webpack_require__(13);
-	var Mouse = __webpack_require__(16);
-
-	var defaultBlockPackages = {
-	    '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.
-	 */
-	function Runtime () {
-	    // Bind event emitter
-	    EventEmitter.call(this);
-
-	    // State for the runtime
-
-	    /**
-	     * Target management and storage.
-	     * @type {Array.<!Target>}
-	     */
-	    this.targets = [];
-
-	    /**
-	     * A list of threads that are currently running in the VM.
-	     * Threads are added when execution starts and pruned when execution ends.
-	     * @type {Array.<Thread>}
-	     */
-	    this.threads = [];
-
-	    /** @type {!Sequencer} */
-	    this.sequencer = new Sequencer(this);
-
-	    /**
-	     * Map to look up a block primitive's implementation function by its opcode.
-	     * This is a two-step lookup: package name first, then primitive name.
-	     * @type {Object.<string, Function>}
-	     */
-	    this._primitives = {};
-	    this._hats = {};
-	    this._edgeActivatedHatValues = {};
-	    this._registerBlockPackages();
-
-	    this.ioDevices = {
-	        'clock': new Clock(),
-	        'keyboard': new Keyboard(this),
-	        'mouse': new Mouse(this)
-	    };
-
-	    this._scriptGlowsPreviousFrame = [];
-	    this._editingTarget = null;
-	    /**
-	     * Currently known number of clones.
-	     * @type {number}
-	     */
-	    this._cloneCounter = 0;
-	}
-
-	/**
-	 * Event name for glowing a script.
-	 * @const {string}
-	 */
-	Runtime.SCRIPT_GLOW_ON = 'STACK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a script.
-	 * @const {string}
-	 */
-	Runtime.SCRIPT_GLOW_OFF = 'STACK_GLOW_OFF';
-
-	/**
-	 * Event name for glowing a block.
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_ON = 'BLOCK_GLOW_ON';
-
-	/**
-	 * Event name for unglowing a block.
-	 * @const {string}
-	 */
-	Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
-
-	/**
-	 * Event name for visual value report.
-	 * @const {string}
-	 */
-	Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
-
-	/**
-	 * Inherit from EventEmitter
-	 */
-	util.inherits(Runtime, EventEmitter);
-
-	/**
-	 * How rapidly we try to step threads, in ms.
-	 */
-	Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
-
-	/**
-	 * How many clones can be created at a time.
-	 * @const {number}
-	 */
-	Runtime.MAX_CLONES = 300;
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Register default block packages with this runtime.
-	 * @todo Prefix opcodes with package name.
-	 * @private
-	 */
-	Runtime.prototype._registerBlockPackages = function () {
-	    for (var packageName in defaultBlockPackages) {
-	        if (defaultBlockPackages.hasOwnProperty(packageName)) {
-	            // @todo pass a different runtime depending on package privilege?
-	            var packageObject = new (defaultBlockPackages[packageName])(this);
-	            // Collect primitives from package.
-	            if (packageObject.getPrimitives) {
-	                var packagePrimitives = packageObject.getPrimitives();
-	                for (var op in packagePrimitives) {
-	                    if (packagePrimitives.hasOwnProperty(op)) {
-	                        this._primitives[op] =
-	                            packagePrimitives[op].bind(packageObject);
-	                    }
-	                }
-	            }
-	            // Collect hat metadata from package.
-	            if (packageObject.getHats) {
-	                var packageHats = packageObject.getHats();
-	                for (var hatName in packageHats) {
-	                    if (packageHats.hasOwnProperty(hatName)) {
-	                        this._hats[hatName] = packageHats[hatName];
-	                    }
-	                }
-	            }
-	        }
-	    }
-	};
-
-	/**
-	 * Retrieve the function associated with the given opcode.
-	 * @param {!string} opcode The opcode to look up.
-	 * @return {Function} The function which implements the opcode.
-	 */
-	Runtime.prototype.getOpcodeFunction = function (opcode) {
-	    return this._primitives[opcode];
-	};
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Return whether an opcode represents a hat block.
-	 * @param {!string} opcode The opcode to look up.
-	 * @return {Boolean} True if the op is known to be a hat.
-	 */
-	Runtime.prototype.getIsHat = function (opcode) {
-	    return this._hats.hasOwnProperty(opcode);
-	};
-
-	/**
-	 * Return whether an opcode represents an edge-activated hat block.
-	 * @param {!string} opcode The opcode to look up.
-	 * @return {Boolean} True if the op is known to be a edge-activated hat.
-	 */
-	Runtime.prototype.getIsEdgeActivatedHat = function (opcode) {
-	    return this._hats.hasOwnProperty(opcode) &&
-	        this._hats[opcode].edgeActivated;
-	};
-
-	/**
-	 * Update an edge-activated hat block value.
-	 * @param {!string} blockId ID of hat to store value for.
-	 * @param {*} newValue Value to store for edge-activated hat.
-	 * @return {*} The old value for the edge-activated hat.
-	 */
-	Runtime.prototype.updateEdgeActivatedValue = function (blockId, newValue) {
-	    var oldValue = this._edgeActivatedHatValues[blockId];
-	    this._edgeActivatedHatValues[blockId] = newValue;
-	    return oldValue;
-	};
-
-	/**
-	 * Clear all edge-activaed hat values.
-	 */
-	Runtime.prototype.clearEdgeActivatedValues = function () {
-	    this._edgeActivatedHatValues = {};
-	};
-
-	/**
-	 * Attach the renderer
-	 * @param {!RenderWebGL} renderer The renderer to attach
-	 */
-	Runtime.prototype.attachRenderer = function (renderer) {
-	    this.renderer = renderer;
-	};
-
-	// -----------------------------------------------------------------------------
-	// -----------------------------------------------------------------------------
-
-	/**
-	 * Create a thread and push it to the list of threads.
-	 * @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, target) {
-	    var thread = new Thread(id);
-	    thread.setTarget(target);
-	    thread.pushStack(id);
-	    this.threads.push(thread);
-	    return thread;
-	};
-
-	/**
-	 * Remove a thread from the list of threads.
-	 * @param {?Thread} thread Thread object to remove from actives
-	 */
-	Runtime.prototype._removeThread = function (thread) {
-	    var i = this.threads.indexOf(thread);
-	    if (i > -1) {
-	        this.threads.splice(i, 1);
-	    }
-	};
-
-	/**
-	 * Return whether a thread is currently active/running.
-	 * @param {?Thread} thread Thread object to check.
-	 * @return {Boolean} True if the thread is active/running.
-	 */
-	Runtime.prototype.isActiveThread = function (thread) {
-	    return this.threads.indexOf(thread) > -1;
-	};
-
-	/**
-	 * Toggle a script.
-	 * @param {!string} topBlockId ID of block that starts the script.
-	 */
-	Runtime.prototype.toggleScript = function (topBlockId) {
-	    // Remove any existing thread.
-	    for (var i = 0; i < this.threads.length; i++) {
-	        if (this.threads[i].topBlock == topBlockId) {
-	            this._removeThread(this.threads[i]);
-	            return;
-	        }
-	    }
-	    // Otherwise add it.
-	    this._pushThread(topBlockId, this._editingTarget);
-	};
-
-	/**
-	 * Run a function `f` for all scripts in a workspace.
-	 * `f` will be called with two parameters:
-	 *  - the top block ID of the script.
-	 *  - the target that owns the script.
-	 * @param {!Function} f Function to call for each script.
-	 * @param {Target=} opt_target Optionally, a target to restrict to.
-	 */
-	Runtime.prototype.allScriptsDo = function (f, opt_target) {
-	    var targets = this.targets;
-	    if (opt_target) {
-	        targets = [opt_target];
-	    }
-	    for (var t = 0; t < targets.length; t++) {
-	        var target = targets[t];
-	        var scripts = target.blocks.getScripts();
-	        for (var j = 0; j < scripts.length; j++) {
-	            var topBlockId = scripts[j];
-	            f(topBlockId, target);
-	        }
-	    }
-	};
-
-	/**
-	 * Start all relevant hats.
-	 * @param {!string} requestedHatOpcode Opcode of hats to start.
-	 * @param {Object=} opt_matchFields Optionally, fields to match on the hat.
-	 * @param {Target=} opt_target Optionally, a target to restrict to.
-	 * @return {Array.<Thread>} List of threads started by this function.
-	 */
-	Runtime.prototype.startHats = function (requestedHatOpcode,
-	    opt_matchFields, opt_target) {
-	    if (!this._hats.hasOwnProperty(requestedHatOpcode)) {
-	        // No known hat with this opcode.
-	        return;
-	    }
-	    var instance = this;
-	    var newThreads = [];
-	    // Consider all scripts, looking for hats with opcode `requestedHatOpcode`.
-	    this.allScriptsDo(function(topBlockId, target) {
-	        var potentialHatOpcode = target.blocks.getBlock(topBlockId).opcode;
-	        if (potentialHatOpcode !== requestedHatOpcode) {
-	            // Not the right hat.
-	            return;
-	        }
-	        // Match any requested fields.
-	        // For example: ensures that broadcasts match.
-	        // This needs to happen before the block is evaluated
-	        // (i.e., before the predicate can be run) because "broadcast and wait"
-	        // needs to have a precise collection of started threads.
-	        var hatFields = target.blocks.getFields(topBlockId);
-	        if (opt_matchFields) {
-	            for (var matchField in opt_matchFields) {
-	                if (hatFields[matchField].value !==
-	                    opt_matchFields[matchField]) {
-	                    // Field mismatch.
-	                    return;
-	                }
-	            }
-	        }
-	        // Look up metadata for the relevant hat.
-	        var hatMeta = instance._hats[requestedHatOpcode];
-	        if (hatMeta.restartExistingThreads) {
-	            // 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 &&
-	                    (!opt_target || instance.threads[i].target == opt_target)) {
-	                    instance._removeThread(instance.threads[i]);
-	                }
-	            }
-	        } else {
-	            // 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 &&
-	                    (!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, 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."
-	 */
-	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();
-	        this._removeThread(poppedThread);
-	    }
-	};
-
-	/**
-	 * Repeatedly run `sequencer.stepThreads` and filter out
-	 * inactive threads after each iteration.
-	 */
-	Runtime.prototype._step = function () {
-	    // Find all edge-activated hats, and add them to threads to be evaluated.
-	    for (var hatType in this._hats) {
-	        var hat = this._hats[hatType];
-	        if (hat.edgeActivated) {
-	            this.startHats(hatType);
-	        }
-	    }
-	    var inactiveThreads = this.sequencer.stepThreads(this.threads);
-	    this._updateScriptGlows();
-	    for (var i = 0; i < inactiveThreads.length; i++) {
-	        this._removeThread(inactiveThreads[i]);
-	    }
-	};
-
-	Runtime.prototype.setEditingTarget = function (editingTarget) {
-	    this._scriptGlowsPreviousFrame = [];
-	    this._editingTarget = editingTarget;
-	    this._updateScriptGlows();
-	};
-
-	Runtime.prototype._updateScriptGlows = function () {
-	    // Set of scripts that request a glow this frame.
-	    var requestedGlowsThisFrame = [];
-	    // Final set of scripts glowing during this frame.
-	    var finalScriptGlows = [];
-	    // Find all scripts that should be glowing.
-	    for (var i = 0; i < this.threads.length; i++) {
-	        var thread = this.threads[i];
-	        var target = thread.target;
-	        if (thread.requestScriptGlowInFrame && target == this._editingTarget) {
-	            var blockForThread = thread.peekStack() || thread.topBlock;
-	            var script = target.blocks.getTopLevelScript(blockForThread);
-	            if (script) {
-	                requestedGlowsThisFrame.push(script);
-	            }
-	        }
-	    }
-	    // Compare to previous frame.
-	    for (var j = 0; j < this._scriptGlowsPreviousFrame.length; j++) {
-	        var previousFrameGlow = this._scriptGlowsPreviousFrame[j];
-	        if (requestedGlowsThisFrame.indexOf(previousFrameGlow) < 0) {
-	            // Glow turned off.
-	            this.glowScript(previousFrameGlow, false);
-	        } else {
-	            // Still glowing.
-	            finalScriptGlows.push(previousFrameGlow);
-	        }
-	    }
-	    for (var k = 0; k < requestedGlowsThisFrame.length; k++) {
-	        var currentFrameGlow = requestedGlowsThisFrame[k];
-	        if (this._scriptGlowsPreviousFrame.indexOf(currentFrameGlow) < 0) {
-	            // Glow turned on.
-	            this.glowScript(currentFrameGlow, true);
-	            finalScriptGlows.push(currentFrameGlow);
-	        }
-	    }
-	    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
-	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
-	 */
-	Runtime.prototype.glowBlock = function (blockId, isGlowing) {
-	    if (isGlowing) {
-	        this.emit(Runtime.BLOCK_GLOW_ON, blockId);
-	    } else {
-	        this.emit(Runtime.BLOCK_GLOW_OFF, blockId);
-	    }
-	};
-
-	/**
-	 * Emit feedback for script glowing.
-	 * @param {?string} topBlockId ID for the top block to update glow
-	 * @param {boolean} isGlowing True to turn on glow; false to turn off.
-	 */
-	Runtime.prototype.glowScript = function (topBlockId, isGlowing) {
-	    if (isGlowing) {
-	        this.emit(Runtime.SCRIPT_GLOW_ON, topBlockId);
-	    } else {
-	        this.emit(Runtime.SCRIPT_GLOW_OFF, topBlockId);
-	    }
-	};
-
-	/**
-	 * Emit value for reporter to show in the blocks.
-	 * @param {string} blockId ID for the block.
-	 * @param {string} value Value to show associated with the block.
-	 */
-	Runtime.prototype.visualReport = function (blockId, value) {
-	    this.emit(Runtime.VISUAL_REPORT, blockId, String(value));
-	};
-
-	/**
-	 * Get a target by its id.
-	 * @param {string} targetId Id of target to find.
-	 * @return {?Target} The target, if found.
-	 */
-	Runtime.prototype.getTargetById = function (targetId) {
-	    for (var i = 0; i < this.targets.length; i++) {
-	        var target = this.targets[i];
-	        if (target.id == targetId) {
-	            return target;
-	        }
-	    }
-	};
-
-	/**
-	 * 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.
-	 */
-	Runtime.prototype.getTargetForStage = function () {
-	    for (var i = 0; i < this.targets.length; i++) {
-	        var target = this.targets[i];
-	        if (target.isStage) {
-	            return target;
-	        }
-	    }
-	};
-
-	/**
-	 * Handle an animation frame from the main thread.
-	 */
-	Runtime.prototype.animationFrame = function () {
-	    if (this.renderer) {
-	        this.renderer.draw();
-	    }
-	};
-
-	/**
-	 * Set up timers to repeatedly step in a browser
-	 */
-	Runtime.prototype.start = function () {
-	    self.setInterval(function() {
-	        this._step();
-	    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
-	};
-
-	module.exports = Runtime;
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Timer = __webpack_require__(9);
-	var Thread = __webpack_require__(10);
-	var execute = __webpack_require__(11);
-
-	function Sequencer (runtime) {
-	    /**
-	     * A utility timer for timing thread sequencing.
-	     * @type {!Timer}
-	     */
-	    this.timer = new Timer();
-
-	    /**
-	     * Reference to the runtime owning this sequencer.
-	     * @type {!Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * The sequencer does as much work as it can within WORK_TIME milliseconds,
-	 * then yields. This is essentially a rate-limiter for blocks.
-	 * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
-	 * @const {!number}
-	 */
-	Sequencer.WORK_TIME = 10;
-
-	/**
-	 * Step through all threads in `this.threads`, running them in order.
-	 * @param {Array.<Thread>} threads List of which threads to step.
-	 * @return {Array.<Thread>} All threads which have finished in this iteration.
-	 */
-	Sequencer.prototype.stepThreads = function (threads) {
-	    // Start counting toward WORK_TIME
-	    this.timer.start();
-	    // List of threads which have been killed by this step.
-	    var inactiveThreads = [];
-	    // If all of the threads are yielding, we should yield.
-	    var numYieldingThreads = 0;
-	    // Clear all yield statuses that were for the previous frame.
-	    for (var t = 0; t < threads.length; t++) {
-	        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
-	            threads[t].setStatus(Thread.STATUS_RUNNING);
-	        }
-	    }
-
-	    // While there are still threads to run and we are within WORK_TIME,
-	    // continue executing threads.
-	    while (threads.length > 0 &&
-	           threads.length > numYieldingThreads &&
-	           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
-	        // New threads at the end of the iteration.
-	        var newThreads = [];
-	        // Reset yielding thread count.
-	        numYieldingThreads = 0;
-	        // Attempt to run each thread one time
-	        for (var i = 0; i < threads.length; i++) {
-	            var activeThread = threads[i];
-	            if (activeThread.status === Thread.STATUS_RUNNING) {
-	                // Normal-mode thread: step.
-	                this.startThread(activeThread);
-	            } else if (activeThread.status === Thread.STATUS_YIELD ||
-	                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
-	                // Yielding thread: do nothing for this step.
-	                numYieldingThreads++;
-	            }
-	            if (activeThread.stack.length === 0 &&
-	                activeThread.status === Thread.STATUS_DONE) {
-	                // Finished with this thread - tell runtime to clean it up.
-	                inactiveThreads.push(activeThread);
-	            } else {
-	                // Keep this thead in the loop.
-	                newThreads.push(activeThread);
-	            }
-	        }
-	        // Effectively filters out threads that have stopped.
-	        threads = newThreads;
-	    }
-	    return inactiveThreads;
-	};
-
-	/**
-	 * Step the requested thread
-	 * @param {!Thread} thread Thread object to step
-	 */
-	Sequencer.prototype.startThread = function (thread) {
-	    var currentBlockId = thread.peekStack();
-	    if (!currentBlockId) {
-	        // A "null block" - empty branch.
-	        // Yield for the frame.
-	        thread.popStack();
-	        thread.setStatus(Thread.STATUS_YIELD_FRAME);
-	        return;
-	    }
-	    // Execute the current block
-	    execute(this, thread);
-	    // If the block executed without yielding and without doing control flow,
-	    // move to done.
-	    if (thread.status === Thread.STATUS_RUNNING &&
-	        thread.peekStack() === currentBlockId) {
-	        this.proceedThread(thread);
-	    }
-	};
-
-	/**
-	 * Step a thread into a block's branch.
-	 * @param {!Thread} thread Thread object to step to branch.
-	 * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
-	 */
-	Sequencer.prototype.stepToBranch = function (thread, branchNum) {
-	    if (!branchNum) {
-	        branchNum = 1;
-	    }
-	    var currentBlockId = thread.peekStack();
-	    var branchId = thread.target.blocks.getBranch(
-	        currentBlockId,
-	        branchNum
-	    );
-	    if (branchId) {
-	        // Push branch ID to the thread's stack.
-	        thread.pushStack(branchId);
-	    } else {
-	        // Push null, so we come back to the current block.
-	        thread.pushStack(null);
-	    }
-	};
-
-	/**
-	 * Step a thread into an input reporter, and manage its status appropriately.
-	 * @param {!Thread} thread Thread object to step to reporter.
-	 * @param {!string} blockId ID of reporter block.
-	 * @param {!string} inputName Name of input on parent block.
-	 * @return {boolean} True if yielded, false if it finished immediately.
-	 */
-	Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
-	    var currentStackFrame = thread.peekStackFrame();
-	    // Push to the stack to evaluate the reporter block.
-	    thread.pushStack(blockId);
-	    // Save name of input for `Thread.pushReportedValue`.
-	    currentStackFrame.waitingReporter = inputName;
-	    // Actually execute the block.
-	    this.startThread(thread);
-	    // If a reporter yielded, caller must wait for it to unyield.
-	    // The value will be populated once the reporter unyields,
-	    // and passed up to the currentStackFrame on next execution.
-	    return thread.status === Thread.STATUS_YIELD;
-	};
-
-	/**
-	 * Finish stepping a thread and proceed it to the next block.
-	 * @param {!Thread} thread Thread object to proceed.
-	 */
-	Sequencer.prototype.proceedThread = function (thread) {
-	    var currentBlockId = thread.peekStack();
-	    // Mark the status as done and proceed to the next block.
-	    // Pop from the stack - finished this level of execution.
-	    thread.popStack();
-	    // Push next connected block, if there is one.
-	    var nextBlockId = thread.target.blocks.getNextBlock(currentBlockId);
-	    if (nextBlockId) {
-	        thread.pushStack(nextBlockId);
-	    }
-	    // If we can't find a next block to run, mark the thread as done.
-	    if (!thread.peekStack()) {
-	        thread.setStatus(Thread.STATUS_DONE);
-	    }
-	};
-
-	/**
-	 * Retire a thread in the middle, without considering further blocks.
-	 * @param {!Thread} thread Thread object to retire.
-	 */
-	Sequencer.prototype.retireThread = function (thread) {
-	    thread.stack = [];
-	    thread.stackFrame = [];
-	    thread.requestScriptGlowInFrame = false;
-	    thread.setStatus(Thread.STATUS_DONE);
-	};
-
-	module.exports = Sequencer;
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports) {
-
-	/**
-	 * @fileoverview
-	 * A utility for accurately measuring time.
-	 * To use:
-	 * ---
-	 * var timer = new Timer();
-	 * timer.start();
-	 * ... pass some time ...
-	 * var timeDifference = timer.timeElapsed();
-	 * ---
-	 * Or, you can use the `time` and `relativeTime`
-	 * to do some measurement yourself.
-	 */
-
-	/**
-	 * @constructor
-	 */
-	function Timer () {}
-
-	/**
-	 * Used to store the start time of a timer action.
-	 * Updated when calling `timer.start`.
-	 */
-	Timer.prototype.startTime = 0;
-
-	/**
-	 * Return the currently known absolute time, in ms precision.
-	 * @returns {number} ms elapsed since 1 January 1970 00:00:00 UTC.
-	 */
-	Timer.prototype.time = function () {
-	    if (Date.now) {
-	        return Date.now();
-	    } else {
-	        return new Date().getTime();
-	    }
-	};
-
-	/**
-	 * Returns a time accurate relative to other times produced by this function.
-	 * If possible, will use sub-millisecond precision.
-	 * If not, will use millisecond precision.
-	 * Not guaranteed to produce the same absolute values per-system.
-	 * @returns {number} ms-scale accurate time relative to other relative times.
-	 */
-	Timer.prototype.relativeTime = function () {
-	    if (typeof self !== 'undefined' &&
-	        self.performance && 'now' in self.performance) {
-	        return self.performance.now();
-	    } else {
-	        return this.time();
-	    }
-	};
-
-	/**
-	 * Start a timer for measuring elapsed time,
-	 * at the most accurate precision possible.
-	 */
-	Timer.prototype.start = function () {
-	    this.startTime = this.relativeTime();
-	};
-
-	/**
-	 * Check time elapsed since `timer.start` was called.
-	 * @returns {number} Time elapsed, in ms (possibly sub-ms precision).
-	 */
-	Timer.prototype.timeElapsed = function () {
-	    return this.relativeTime() - this.startTime;
-	};
-
-	module.exports = Timer;
-
-
-/***/ },
-/* 10 */
-/***/ function(module, exports) {
-
-	/**
-	 * A thread is a running stack context and all the metadata needed.
-	 * @param {?string} firstBlock First block to execute in the thread.
-	 * @constructor
-	 */
-	function Thread (firstBlock) {
-	    /**
-	     * ID of top block of the thread
-	     * @type {!string}
-	     */
-	    this.topBlock = firstBlock;
-
-	    /**
-	     * Stack for the thread. When the sequencer enters a control structure,
-	     * the block is pushed onto the stack so we know where to exit.
-	     * @type {Array.<string>}
-	     */
-	    this.stack = [];
-
-	    /**
-	     * Stack frames for the thread. Store metadata for the executing blocks.
-	     * @type {Array.<Object>}
-	     */
-	    this.stackFrames = [];
-
-	    /**
-	     * Status of the thread, one of three states (below)
-	     * @type {number}
-	     */
-	    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}
-	     */
-	    this.requestScriptGlowInFrame = false;
-	}
-
-	/**
-	 * Thread status for initialized or running thread.
-	 * This is the default state for a thread - execution should run normally,
-	 * stepping from block to block.
-	 * @const
-	 */
-	Thread.STATUS_RUNNING = 0;
-
-	/**
-	 * Thread status for a yielded thread.
-	 * Threads are in this state when a primitive has yielded; execution is paused
-	 * until the relevant primitive unyields.
-	 * @const
-	 */
-	Thread.STATUS_YIELD = 1;
-
-	/**
-	 * Thread status for a single-frame yield.
-	 * @const
-	 */
-	Thread.STATUS_YIELD_FRAME = 2;
-
-	/**
-	 * Thread status for a finished/done thread.
-	 * Thread is in this state when there are no more blocks to execute.
-	 * @const
-	 */
-	Thread.STATUS_DONE = 3;
-
-	/**
-	 * Push stack and update stack frames appropriately.
-	 * @param {string} blockId Block ID to push to stack.
-	 */
-	Thread.prototype.pushStack = function (blockId) {
-	    this.stack.push(blockId);
-	    // Push an empty stack frame, if we need one.
-	    // Might not, if we just popped the stack.
-	    if (this.stack.length > this.stackFrames.length) {
-	        this.stackFrames.push({
-	            reported: {}, // Collects reported input values.
-	            waitingReporter: null, // Name of waiting reporter.
-	            executionContext: {} // A context passed to block implementations.
-	        });
-	    }
-	};
-
-	/**
-	 * Pop last block on the stack and its stack frame.
-	 * @return {string} Block ID popped from the stack.
-	 */
-	Thread.prototype.popStack = function () {
-	    this.stackFrames.pop();
-	    return this.stack.pop();
-	};
-
-	/**
-	 * Get top stack item.
-	 * @return {?string} Block ID on top of stack.
-	 */
-	Thread.prototype.peekStack = function () {
-	    return this.stack[this.stack.length - 1];
-	};
-
-
-	/**
-	 * Get top stack frame.
-	 * @return {?Object} Last stack frame stored on this thread.
-	 */
-	Thread.prototype.peekStackFrame = function () {
-	    return this.stackFrames[this.stackFrames.length - 1];
-	};
-
-	/**
-	 * Get stack frame above the current top.
-	 * @return {?Object} Second to last stack frame stored on this thread.
-	 */
-	Thread.prototype.peekParentStackFrame = function () {
-	    return this.stackFrames[this.stackFrames.length - 2];
-	};
-
-	/**
-	 * Push a reported value to the parent of the current stack frame.
-	 * @param {!Any} value Reported value to push.
-	 */
-	Thread.prototype.pushReportedValue = function (value) {
-	    var parentStackFrame = this.peekParentStackFrame();
-	    if (parentStackFrame) {
-	        var waitingReporter = parentStackFrame.waitingReporter;
-	        parentStackFrame.reported[waitingReporter] = value;
-	        parentStackFrame.waitingReporter = null;
-	    }
-	};
-
-	/**
-	 * Whether the current execution of a thread is at the top of the stack.
-	 * @return {Boolean} True if execution is at top of the stack.
-	 */
-	Thread.prototype.atStackTop = function () {
-	    return this.peekStack() === this.topBlock;
-	};
-
-	/**
-	 * Set thread status.
-	 * @param {number} status Enum representing thread status.
-	 */
-	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;
-
-
-/***/ },
-/* 11 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Thread = __webpack_require__(10);
-
-	/**
-	 * Utility function to determine if a value is a Promise.
-	 * @param {*} value Value to check for a Promise.
-	 * @return {Boolean} True if the value appears to be a Promise.
-	 */
-	var isPromise = function (value) {
-	    return value && value.then && typeof value.then === 'function';
-	};
-
-	/**
-	 * Execute a block.
-	 * @param {!Sequencer} sequencer Which sequencer is executing.
-	 * @param {!Thread} thread Thread which to read and execute.
-	 */
-	var execute = function (sequencer, thread) {
-	    var runtime = sequencer.runtime;
-	    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);
-	    var isHat = runtime.getIsHat(opcode);
-	    var fields = target.blocks.getFields(currentBlockId);
-	    var inputs = target.blocks.getInputs(currentBlockId);
-
-	    if (!opcode) {
-	        console.warn('Could not get opcode for block: ' + currentBlockId);
-	        return;
-	    }
-
-	    /**
-	     * Handle any reported value from the primitive, either directly returned
-	     * or after a promise resolves.
-	     * @param {*} resolvedValue Value eventually returned from the primitive.
-	     */
-	    var handleReport = function (resolvedValue) {
-	        thread.pushReportedValue(resolvedValue);
-	        if (isHat) {
-	            // Hat predicate was evaluated.
-	            if (runtime.getIsEdgeActivatedHat(opcode)) {
-	                // If this is an edge-activated hat, only proceed if
-	                // the value is true and used to be false.
-	                var oldEdgeValue = runtime.updateEdgeActivatedValue(
-	                    currentBlockId,
-	                    resolvedValue
-	                );
-	                var edgeWasActivated = !oldEdgeValue && resolvedValue;
-	                if (!edgeWasActivated) {
-	                    sequencer.retireThread(thread);
-	                }
-	            } else {
-	                // Not an edge-activated hat: retire the thread
-	                // if predicate was false.
-	                if (!resolvedValue) {
-	                    sequencer.retireThread(thread);
-	                }
-	            }
-	        } else {
-	            // In a non-hat, report the value visually if necessary if
-	            // at the top of the thread stack.
-	            if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
-	                runtime.visualReport(currentBlockId, resolvedValue);
-	            }
-	            // Finished any yields.
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	        }
-	    };
-
-	    // Hats and single-field shadows are implemented slightly differently
-	    // from regular blocks.
-	    // For hats: if they have an associated block function,
-	    // it's treated as a predicate; if not, execution will proceed as a no-op.
-	    // For single-field shadows: If the block has a single field, and no inputs,
-	    // immediately return the value of the field.
-	    if (!blockFunction) {
-	        if (isHat) {
-	            // Skip through the block (hat with no predicate).
-	            return;
-	        } else {
-	            if (Object.keys(fields).length == 1 &&
-	                Object.keys(inputs).length == 0) {
-	                // One field and no inputs - treat as arg.
-	                for (var fieldKey in fields) { // One iteration.
-	                    handleReport(fields[fieldKey].value);
-	                }
-	            } else {
-	                console.warn('Could not get implementation for opcode: ' +
-	                    opcode);
-	            }
-	            thread.requestScriptGlowInFrame = true;
-	            return;
-	        }
-	    }
-
-	    // Generate values for arguments (inputs).
-	    var argValues = {};
-
-	    // Add all fields on this block to the argValues.
-	    for (var fieldName in fields) {
-	        argValues[fieldName] = fields[fieldName].value;
-	    }
-
-	    // Recursively evaluate input blocks.
-	    for (var inputName in inputs) {
-	        var input = inputs[inputName];
-	        var inputBlockId = input.block;
-	        // Is there no value for this input waiting in the stack frame?
-	        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
-	            // If there's not, we need to evaluate the block.
-	            var reporterYielded = (
-	                sequencer.stepToReporter(thread, inputBlockId, inputName)
-	            );
-	            // If the reporter yielded, return immediately;
-	            // it needs time to finish and report its value.
-	            if (reporterYielded) {
-	                return;
-	            }
-	        }
-	        argValues[inputName] = currentStackFrame.reported[inputName];
-	    }
-
-	    // If we've gotten this far, all of the input blocks are evaluated,
-	    // and `argValues` is fully populated. So, execute the block primitive.
-	    // First, clear `currentStackFrame.reported`, so any subsequent execution
-	    // (e.g., on return from a branch) gets fresh inputs.
-	    currentStackFrame.reported = {};
-
-	    var primitiveReportedValue = null;
-	    primitiveReportedValue = blockFunction(argValues, {
-	        stackFrame: currentStackFrame.executionContext,
-	        target: target,
-	        yield: function() {
-	            thread.setStatus(Thread.STATUS_YIELD);
-	        },
-	        yieldFrame: function() {
-	            thread.setStatus(Thread.STATUS_YIELD_FRAME);
-	        },
-	        done: function() {
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	            sequencer.proceedThread(thread);
-	        },
-	        startBranch: function (branchNum) {
-	            sequencer.stepToBranch(thread, branchNum);
-	        },
-	        startHats: function(requestedHat, opt_matchFields, opt_target) {
-	            return (
-	                runtime.startHats(requestedHat, opt_matchFields, opt_target)
-	            );
-	        },
-	        ioQuery: function (device, func, args) {
-	            // Find the I/O device and execute the query/function call.
-	            if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
-	                var devObject = runtime.ioDevices[device];
-	                return devObject[func].call(devObject, args);
-	            }
-	        }
-	    });
-
-	    if (typeof primitiveReportedValue === 'undefined') {
-	        // No value reported - potentially a command block.
-	        // Edge-activated hats don't request a glow; all commands do.
-	        thread.requestScriptGlowInFrame = true;
-	    }
-
-	    // If it's a promise, wait until promise resolves.
-	    if (isPromise(primitiveReportedValue)) {
-	        if (thread.status === Thread.STATUS_RUNNING) {
-	            // Primitive returned a promise; automatically yield thread.
-	            thread.setStatus(Thread.STATUS_YIELD);
-	        }
-	        // Promise handlers
-	        primitiveReportedValue.then(function(resolvedValue) {
-	            handleReport(resolvedValue);
-	            sequencer.proceedThread(thread);
-	        }, function(rejectionReason) {
-	            // Promise rejected: the primitive had some error.
-	            // Log it and proceed.
-	            console.warn('Primitive rejected promise: ', rejectionReason);
-	            thread.setStatus(Thread.STATUS_RUNNING);
-	            sequencer.proceedThread(thread);
-	        });
-	    } else if (thread.status === Thread.STATUS_RUNNING) {
-	        handleReport(primitiveReportedValue);
-	    }
-	};
-
-	module.exports = execute;
-
-
-/***/ },
-/* 12 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Timer = __webpack_require__(9);
-
-	function Clock () {
-	    this._projectTimer = new Timer();
-	    this._projectTimer.start();
-	}
-
-	Clock.prototype.projectTimer = function () {
-	    return this._projectTimer.timeElapsed() / 1000;
-	};
-
-	Clock.prototype.resetProjectTimer = function () {
-	    this._projectTimer.start();
-	};
-
-	module.exports = Clock;
-
-
-/***/ },
-/* 13 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-
-	function Keyboard (runtime) {
-	    /**
-	     * List of currently pressed keys.
-	     * @type{Array.<number>}
-	     */
-	    this._keysPressed = [];
-	    /**
-	     * Reference to the owning Runtime.
-	     * Can be used, for example, to activate hats.
-	     * @type{!Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Convert a Scratch key name to a DOM keyCode.
-	 * @param {Any} keyName Scratch key argument.
-	 * @return {number} Key code corresponding to a DOM event.
-	 */
-	Keyboard.prototype._scratchKeyToKeyCode = function (keyName) {
-	    if (typeof keyName == 'number') {
-	        // Key codes placed in with number blocks.
-	        return keyName;
-	    }
-	    var keyString = Cast.toString(keyName);
-	    switch (keyString) {
-	    case 'space': return 32;
-	    case 'left arrow': return 37;
-	    case 'up arrow': return 38;
-	    case 'right arrow': return 39;
-	    case 'down arrow': return 40;
-	    // @todo: Consider adding other special keys here.
-	    }
-	    // Keys reported by DOM keyCode are upper case.
-	    return keyString.toUpperCase().charCodeAt(0);
-	};
-
-	Keyboard.prototype._keyCodeToScratchKey = function (keyCode) {
-	    if (keyCode >= 48 && keyCode <= 90) {
-	        // Standard letter.
-	        return String.fromCharCode(keyCode).toLowerCase();
-	    }
-	    switch (keyCode) {
-	    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;
-	};
-
-	Keyboard.prototype.postData = function (data) {
-	    if (data.keyCode) {
-	        var index = this._keysPressed.indexOf(data.keyCode);
-	        if (data.isDown) {
-	            // If not already present, add to the list.
-	            if (index < 0) {
-	                this._keysPressed.push(data.keyCode);
-	            }
-	            // Always trigger hats, even if it was already pressed.
-	            this.runtime.startHats('event_whenkeypressed', {
-	                'KEY_OPTION': this._keyCodeToScratchKey(data.keyCode)
-	            });
-	            this.runtime.startHats('event_whenkeypressed', {
-	                'KEY_OPTION': 'any'
-	            });
-	        } else if (index > -1) {
-	            // If already present, remove from the list.
-	            this._keysPressed.splice(index, 1);
-	        }
-	    }
-	};
-
-	Keyboard.prototype.getKeyIsDown = function (key) {
-	    if (key == 'any') {
-	        return this._keysPressed.length > 0;
-	    }
-	    var keyCode = this._scratchKeyToKeyCode(key);
-	    return this._keysPressed.indexOf(keyCode) > -1;
-	};
-
-	module.exports = Keyboard;
-
-
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Color = __webpack_require__(15);
-
-	function Cast () {}
-
-	/**
-	 * @fileoverview
-	 * Utilities for casting and comparing Scratch data-types.
-	 * Scratch behaves slightly differently from JavaScript in many respects,
-	 * and these differences should be encapsulated below.
-	 * For example, in Scratch, add(1, join("hello", world")) -> 1.
-	 * This is because "hello world" is cast to 0.
-	 * In JavaScript, 1 + Number("hello" + "world") would give you NaN.
-	 * Use when coercing a value before computation.
-	 */
-
-	/**
-	 * Scratch cast to number.
-	 * Treats NaN as 0.
-	 * In Scratch 2.0, this is captured by `interp.numArg.`
-	 * @param {*} value Value to cast to number.
-	 * @return {number} The Scratch-casted number value.
-	 */
-	Cast.toNumber = function (value) {
-	    var n = Number(value);
-	    if (isNaN(n)) {
-	        // Scratch treats NaN as 0, when needed as a number.
-	        // E.g., 0 + NaN -> 0.
-	        return 0;
-	    }
-	    return n;
-	};
-
-	/**
-	 * Scratch cast to boolean.
-	 * In Scratch 2.0, this is captured by `interp.boolArg.`
-	 * Treats some string values differently from JavaScript.
-	 * @param {*} value Value to cast to boolean.
-	 * @return {boolean} The Scratch-casted boolean value.
-	 */
-	Cast.toBoolean = function (value) {
-	    // Already a boolean?
-	    if (typeof value === 'boolean') {
-	        return value;
-	    }
-	    if (typeof value === 'string') {
-	        // These specific strings are treated as false in Scratch.
-	        if ((value == '') ||
-	            (value == '0') ||
-	            (value.toLowerCase() == 'false')) {
-	            return false;
-	        }
-	        // All other strings treated as true.
-	        return true;
-	    }
-	    // Coerce other values and numbers.
-	    return Boolean(value);
-	};
-
-	/**
-	 * Scratch cast to string.
-	 * @param {*} value Value to cast to string.
-	 * @return {string} The Scratch-casted string value.
-	 */
-	Cast.toString = function (value) {
-	    return String(value);
-	};
-
-	/**
-	 * Cast any Scratch argument to an RGB color object to be used for the renderer.
-	 * @param {*} value Value to convert to RGB color object.
-	 * @return {Array.<number>} [r,g,b], values between 0-255.
-	 */
-	Cast.toRgbColorList = function (value) {
-	    var color;
-	    if (typeof value == 'string' && value.substring(0, 1) == '#') {
-	        color = Color.hexToRgb(value);
-	    } else {
-	        color = Color.decimalToRgb(Cast.toNumber(value));
-	    }
-	    return [color.r, color.g, color.b];
-	};
-
-	/**
-	 * Compare two values, using Scratch cast, case-insensitive string compare, etc.
-	 * In Scratch 2.0, this is captured by `interp.compare.`
-	 * @param {*} v1 First value to compare.
-	 * @param {*} v2 Second value to compare.
-	 * @returns {Number} Negative number if v1 < v2; 0 if equal; positive otherwise.
-	 */
-	Cast.compare = function (v1, v2) {
-	    var n1 = Number(v1);
-	    var n2 = Number(v2);
-	    if (isNaN(n1) || isNaN(n2)) {
-	        // At least one argument can't be converted to a number.
-	        // Scratch compares strings as case insensitive.
-	        var s1 = String(v1).toLowerCase();
-	        var s2 = String(v2).toLowerCase();
-	        return s1.localeCompare(s2);
-	    } else {
-	        // Compare as numbers.
-	        return n1 - n2;
-	    }
-	};
-
-	/**
-	 * 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;
-
-
-/***/ },
-/* 15 */
-/***/ function(module, exports) {
-
-	function Color () {}
-
-	/**
-	 * Convert a Scratch decimal color to a hex string, #RRGGBB.
-	 * @param {number} decimal RGB color as a decimal.
-	 * @return {string} RGB color as #RRGGBB hex string.
-	 */
-	Color.decimalToHex = function (decimal) {
-	    if (decimal < 0) {
-	        decimal += 0xFFFFFF + 1;
-	    }
-	    var hex = Number(decimal).toString(16);
-	    hex = '#' + '000000'.substr(0, 6 - hex.length) + hex;
-	    return hex;
-	};
-
-	/**
-	 * Convert a Scratch decimal color to an RGB color object.
-	 * @param {number} decimal RGB color as decimal.
-	 * @returns {Object} {r: R, g: G, b: B}, values between 0-255
-	 */
-	Color.decimalToRgb = function (decimal) {
-	    var r = (decimal >> 16) & 0xFF;
-	    var g = (decimal >> 8) & 0xFF;
-	    var b = decimal & 0xFF;
-	    return {r: r, g: g, b: b};
-	};
-
-	/**
-	 * Convert a hex color (e.g., F00, #03F, #0033FF) to an RGB color object.
-	 * CC-BY-SA Tim Down:
-	 * https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
-	 * @param {!string} hex Hex representation of the color.
-	 * @return {Object} {r: R, g: G, b: B}, 0-255, or null.
-	 */
-	Color.hexToRgb = function (hex) {
-	    var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
-	    hex = hex.replace(shorthandRegex, function(m, r, g, b) {
-	        return r + r + g + g + b + b;
-	    });
-	    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
-	    return result ? {
-	        r: parseInt(result[1], 16),
-	        g: parseInt(result[2], 16),
-	        b: parseInt(result[3], 16)
-	    } : null;
-	};
-
-	/**
-	 * Convert an RGB color object to a hex color.
-	 * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
-	 * @return {!string} Hex representation of the color.
-	 */
-	Color.rgbToHex = function (rgb) {
-	    return Color.decimalToHex(Color.rgbToDecimal(rgb));
-	};
-
-	/**
-	 * Convert an RGB color object to a Scratch decimal color.
-	 * @param {Object} rgb {r: R, g: G, b: B}, values between 0-255.
-	 * @return {!number} Number representing the color.
-	 */
-	Color.rgbToDecimal = function (rgb) {
-	    return (rgb.r << 16) + (rgb.g << 8) + rgb.b;
-	};
-
-	/**
-	* Convert a hex color (e.g., F00, #03F, #0033FF) to a decimal color number.
-	* @param {!string} hex Hex representation of the color.
-	* @return {!number} Number representing the color.
-	*/
-	Color.hexToDecimal = function (hex) {
-	    return Color.rgbToDecimal(Color.hexToRgb(hex));
-	};
-
-	module.exports = Color;
-
-
-/***/ },
-/* 16 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var MathUtil = __webpack_require__(17);
-
-	function Mouse (runtime) {
-	    this._x = 0;
-	    this._y = 0;
-	    this._isDown = false;
-	    /**
-	     * Reference to the owning Runtime.
-	     * Can be used, for example, to activate hats.
-	     * @type{!Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	Mouse.prototype.postData = function(data) {
-	    if (data.x) {
-	        this._x = data.x - data.canvasWidth / 2;
-	    }
-	    if (data.y) {
-	        this._y = data.y - data.canvasHeight / 2;
-	    }
-	    if (typeof data.isDown !== 'undefined') {
-	        this._isDown = data.isDown;
-	        if (this._isDown) {
-	            this._activateClickHats(data.x, data.y);
-	        }
-	    }
-	};
-
-	Mouse.prototype._activateClickHats = function (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') &&
-	                target.drawableID == drawableID) {
-	                this.runtime.startHats('event_whenthisspriteclicked',
-	                    null, target);
-	                return;
-	            }
-	        }
-	    }
-	};
-
-	Mouse.prototype.getX = function () {
-	    return MathUtil.clamp(this._x, -240, 240);
-	};
-
-	Mouse.prototype.getY = function () {
-	    return MathUtil.clamp(-this._y, -180, 180);
-	};
-
-	Mouse.prototype.getIsDown = function () {
-	    return this._isDown;
-	};
-
-	module.exports = Mouse;
-
-
-/***/ },
-/* 17 */
-/***/ function(module, exports) {
-
-	function MathUtil () {}
-
-	/**
-	 * Convert a value from degrees to radians.
-	 * @param {!number} deg Value in degrees.
-	 * @return {!number} Equivalent value in radians.
-	 */
-	MathUtil.degToRad = function (deg) {
-	    return (Math.PI * (90 - deg)) / 180;
-	};
-
-	/**
-	 * Convert a value from radians to degrees.
-	 * @param {!number} rad Value in radians.
-	 * @return {!number} Equivalent value in degrees.
-	 */
-	MathUtil.radToDeg = function (rad) {
-	    return rad * 180 / Math.PI;
-	};
-
-	/**
-	 * Clamp a number between two limits.
-	 * If n < min, return min. If n > max, return max. Else, return n.
-	 * @param {!number} n Number to clamp.
-	 * @param {!number} min Minimum limit.
-	 * @param {!number} max Maximum limit.
-	 * @return {!number} Value of n clamped to min and max.
-	 */
-	MathUtil.clamp = function (n, min, max) {
-	    return Math.min(Math.max(n, min), max);
-	};
-
-	/**
-	 * Keep a number between two limits, wrapping "extra" into the range.
-	 * e.g., wrapClamp(7, 1, 5) == 2
-	 * wrapClamp(0, 1, 5) == 5
-	 * wrapClamp(-11, -10, 6) == 6, etc.
-	 * @param {!number} n Number to wrap.
-	 * @param {!number} min Minimum limit.
-	 * @param {!number} max Maximum limit.
-	 * @return {!number} Value of n wrapped between min and max.
-	 */
-	MathUtil.wrapClamp = function (n, min, max) {
-	    var range = (max - min) + 1;
-	    return n - Math.floor((n - min) / range) * range;
-	};
-
-	module.exports = MathUtil;
-
-
-/***/ },
-/* 18 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-	var Promise = __webpack_require__(19);
-
-	function Scratch3ControlBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3ControlBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'control_repeat': this.repeat,
-	        'control_repeat_until': this.repeatUntil,
-	        'control_forever': this.forever,
-	        'control_wait': this.wait,
-	        'control_if': this.if,
-	        'control_if_else': this.ifElse,
-	        '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
-	        }
-	    };
-	};
-
-	Scratch3ControlBlocks.prototype.repeat = function(args, util) {
-	    var times = Math.floor(Cast.toNumber(args.TIMES));
-	    // Initialize loop
-	    if (util.stackFrame.loopCounter === undefined) {
-	        util.stackFrame.loopCounter = times;
-	    }
-	    // Only execute once per frame.
-	    // When the branch finishes, `repeat` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        // Decrease counter
-	        util.stackFrame.loopCounter--;
-	        // If we still have some left, start the branch.
-	        if (util.stackFrame.loopCounter >= 0) {
-	            util.startBranch();
-	        }
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
-	    var condition = Cast.toBoolean(args.CONDITION);
-	    // Only execute once per frame.
-	    // When the branch finishes, `repeat` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        // If the condition is true, start the branch.
-	        if (!condition) {
-	            util.startBranch();
-	        }
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.forever = function(args, util) {
-	    // Only execute once per frame.
-	    // When the branch finishes, `forever` will be executed again and
-	    // the second branch will be taken, yielding for the rest of the frame.
-	    if (!util.stackFrame.executedInFrame) {
-	        util.stackFrame.executedInFrame = true;
-	        util.startBranch();
-	    } else {
-	        util.stackFrame.executedInFrame = false;
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.wait = function(args) {
-	    var duration = Cast.toNumber(args.DURATION);
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            resolve();
-	        }, 1000 * duration);
-	    });
-	};
-
-	Scratch3ControlBlocks.prototype.if = function(args, util) {
-	    var condition = Cast.toBoolean(args.CONDITION);
-	    // Only execute one time. `if` will be returned to
-	    // when the branch finishes, but it shouldn't execute again.
-	    if (util.stackFrame.executedInFrame === undefined) {
-	        util.stackFrame.executedInFrame = true;
-	        if (condition) {
-	            util.startBranch();
-	        }
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
-	    var condition = Cast.toBoolean(args.CONDITION);
-	    // Only execute one time. `ifElse` will be returned to
-	    // when the branch finishes, but it shouldn't execute again.
-	    if (util.stackFrame.executedInFrame === undefined) {
-	        util.stackFrame.executedInFrame = true;
-	        if (condition) {
-	            util.startBranch(1);
-	        } else {
-	            util.startBranch(2);
-	        }
-	    }
-	};
-
-	Scratch3ControlBlocks.prototype.stop = function() {
-	    // @todo - don't use this.runtime
-	    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;
-
-
-/***/ },
-/* 19 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	module.exports = __webpack_require__(20)
-
-
-/***/ },
-/* 20 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	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() {}
-
-	// States:
-	//
-	// 0 - pending
-	// 1 - fulfilled with _value
-	// 2 - rejected with _value
-	// 3 - adopted the state of another promise, _value
-	//
-	// once the state is no longer pending (0) it is immutable
-
-	// All `_` prefixed properties will be reduced to `_{random number}`
-	// at build time to obfuscate them and discourage their use.
-	// We don't use symbols or Object.defineProperty to fully hide them
-	// because the performance isn't good enough.
-
-
-	// to avoid using try/catch inside critical functions, we
-	// extract them to here.
-	var LAST_ERROR = null;
-	var IS_ERROR = {};
-	function getThen(obj) {
-	  try {
-	    return obj.then;
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-
-	function tryCallOne(fn, a) {
-	  try {
-	    return fn(a);
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-	function tryCallTwo(fn, a, b) {
-	  try {
-	    fn(a, b);
-	  } catch (ex) {
-	    LAST_ERROR = ex;
-	    return IS_ERROR;
-	  }
-	}
-
-	module.exports = Promise;
-
-	function Promise(fn) {
-	  if (typeof this !== 'object') {
-	    throw new TypeError('Promises must be constructed via new');
-	  }
-	  if (typeof fn !== 'function') {
-	    throw new TypeError('not a function');
-	  }
-	  this._45 = 0;
-	  this._81 = 0;
-	  this._65 = null;
-	  this._54 = null;
-	  if (fn === noop) return;
-	  doResolve(fn, this);
-	}
-	Promise._10 = null;
-	Promise._97 = null;
-	Promise._61 = noop;
-
-	Promise.prototype.then = function(onFulfilled, onRejected) {
-	  if (this.constructor !== Promise) {
-	    return safeThen(this, onFulfilled, onRejected);
-	  }
-	  var res = new Promise(noop);
-	  handle(this, new Handler(onFulfilled, onRejected, res));
-	  return res;
-	};
-
-	function safeThen(self, onFulfilled, onRejected) {
-	  return new self.constructor(function (resolve, reject) {
-	    var res = new Promise(noop);
-	    res.then(resolve, reject);
-	    handle(self, new Handler(onFulfilled, onRejected, res));
-	  });
-	};
-	function handle(self, deferred) {
-	  while (self._81 === 3) {
-	    self = self._65;
-	  }
-	  if (Promise._10) {
-	    Promise._10(self);
-	  }
-	  if (self._81 === 0) {
-	    if (self._45 === 0) {
-	      self._45 = 1;
-	      self._54 = deferred;
-	      return;
-	    }
-	    if (self._45 === 1) {
-	      self._45 = 2;
-	      self._54 = [self._54, deferred];
-	      return;
-	    }
-	    self._54.push(deferred);
-	    return;
-	  }
-	  handleResolved(self, deferred);
-	}
-
-	function handleResolved(self, deferred) {
-	  asap(function() {
-	    var cb = self._81 === 1 ? deferred.onFulfilled : deferred.onRejected;
-	    if (cb === null) {
-	      if (self._81 === 1) {
-	        resolve(deferred.promise, self._65);
-	      } else {
-	        reject(deferred.promise, self._65);
-	      }
-	      return;
-	    }
-	    var ret = tryCallOne(cb, self._65);
-	    if (ret === IS_ERROR) {
-	      reject(deferred.promise, LAST_ERROR);
-	    } else {
-	      resolve(deferred.promise, ret);
-	    }
-	  });
-	}
-	function resolve(self, newValue) {
-	  // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
-	  if (newValue === self) {
-	    return reject(
-	      self,
-	      new TypeError('A promise cannot be resolved with itself.')
-	    );
-	  }
-	  if (
-	    newValue &&
-	    (typeof newValue === 'object' || typeof newValue === 'function')
-	  ) {
-	    var then = getThen(newValue);
-	    if (then === IS_ERROR) {
-	      return reject(self, LAST_ERROR);
-	    }
-	    if (
-	      then === self.then &&
-	      newValue instanceof Promise
-	    ) {
-	      self._81 = 3;
-	      self._65 = newValue;
-	      finale(self);
-	      return;
-	    } else if (typeof then === 'function') {
-	      doResolve(then.bind(newValue), self);
-	      return;
-	    }
-	  }
-	  self._81 = 1;
-	  self._65 = newValue;
-	  finale(self);
-	}
-
-	function reject(self, newValue) {
-	  self._81 = 2;
-	  self._65 = newValue;
-	  if (Promise._97) {
-	    Promise._97(self, newValue);
-	  }
-	  finale(self);
-	}
-	function finale(self) {
-	  if (self._45 === 1) {
-	    handle(self, self._54);
-	    self._54 = null;
-	  }
-	  if (self._45 === 2) {
-	    for (var i = 0; i < self._54.length; i++) {
-	      handle(self, self._54[i]);
-	    }
-	    self._54 = null;
-	  }
-	}
-
-	function Handler(onFulfilled, onRejected, promise){
-	  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
-	  this.onRejected = typeof onRejected === 'function' ? onRejected : null;
-	  this.promise = promise;
-	}
-
-	/**
-	 * Take a potentially misbehaving resolver function and make sure
-	 * onFulfilled and onRejected are only called once.
-	 *
-	 * Makes no guarantees about asynchrony.
-	 */
-	function doResolve(fn, promise) {
-	  var done = false;
-	  var res = tryCallTwo(fn, function (value) {
-	    if (done) return;
-	    done = true;
-	    resolve(promise, value);
-	  }, function (reason) {
-	    if (done) return;
-	    done = true;
-	    reject(promise, reason);
-	  })
-	  if (!done && res === IS_ERROR) {
-	    done = true;
-	    reject(promise, LAST_ERROR);
-	  }
-	}
-
-
-/***/ },
-/* 22 */
-/***/ function(module, exports) {
-
-	/* WEBPACK VAR INJECTION */(function(global) {"use strict";
-
-	// Use the fastest means possible to execute a task in its own turn, with
-	// priority over other events including IO, animation, reflow, and redraw
-	// events in browsers.
-	//
-	// An exception thrown by a task will permanently interrupt the processing of
-	// subsequent tasks. The higher level `asap` function ensures that if an
-	// exception is thrown by a task, that the task queue will continue flushing as
-	// soon as possible, but if you use `rawAsap` directly, you are responsible to
-	// either ensure that no exceptions are thrown from your task, or to manually
-	// call `rawAsap.requestFlush` if an exception is thrown.
-	module.exports = rawAsap;
-	function rawAsap(task) {
-	    if (!queue.length) {
-	        requestFlush();
-	        flushing = true;
-	    }
-	    // Equivalent to push, but avoids a function call.
-	    queue[queue.length] = task;
-	}
-
-	var queue = [];
-	// Once a flush has been requested, no further calls to `requestFlush` are
-	// necessary until the next `flush` completes.
-	var flushing = false;
-	// `requestFlush` is an implementation-specific method that attempts to kick
-	// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
-	// the event queue before yielding to the browser's own event loop.
-	var requestFlush;
-	// The position of the next task to execute in the task queue. This is
-	// preserved between calls to `flush` so that it can be resumed if
-	// a task throws an exception.
-	var index = 0;
-	// If a task schedules additional tasks recursively, the task queue can grow
-	// unbounded. To prevent memory exhaustion, the task queue will periodically
-	// truncate already-completed tasks.
-	var capacity = 1024;
-
-	// The flush function processes all tasks that have been scheduled with
-	// `rawAsap` unless and until one of those tasks throws an exception.
-	// If a task throws an exception, `flush` ensures that its state will remain
-	// consistent and will resume where it left off when called again.
-	// However, `flush` does not make any arrangements to be called again if an
-	// exception is thrown.
-	function flush() {
-	    while (index < queue.length) {
-	        var currentIndex = index;
-	        // Advance the index before calling the task. This ensures that we will
-	        // begin flushing on the next task the task throws an error.
-	        index = index + 1;
-	        queue[currentIndex].call();
-	        // Prevent leaking memory for long chains of recursive calls to `asap`.
-	        // If we call `asap` within tasks scheduled by `asap`, the queue will
-	        // grow, but to avoid an O(n) walk for every task we execute, we don't
-	        // shift tasks off the queue after they have been executed.
-	        // Instead, we periodically shift 1024 tasks off the queue.
-	        if (index > capacity) {
-	            // Manually shift all values starting at the index back to the
-	            // beginning of the queue.
-	            for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
-	                queue[scan] = queue[scan + index];
-	            }
-	            queue.length -= index;
-	            index = 0;
-	        }
-	    }
-	    queue.length = 0;
-	    index = 0;
-	    flushing = false;
-	}
-
-	// `requestFlush` is implemented using a strategy based on data collected from
-	// every available SauceLabs Selenium web driver worker at time of writing.
-	// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
-
-	// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
-	// have WebKitMutationObserver but not un-prefixed MutationObserver.
-	// Must use `global` instead of `window` to work in both frames and web
-	// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
-	var BrowserMutationObserver = global.MutationObserver || global.WebKitMutationObserver;
-
-	// MutationObservers are desirable because they have high priority and work
-	// reliably everywhere they are implemented.
-	// They are implemented in all modern browsers.
-	//
-	// - Android 4-4.3
-	// - Chrome 26-34
-	// - Firefox 14-29
-	// - Internet Explorer 11
-	// - iPad Safari 6-7.1
-	// - iPhone Safari 7-7.1
-	// - Safari 6-7
-	if (typeof BrowserMutationObserver === "function") {
-	    requestFlush = makeRequestCallFromMutationObserver(flush);
-
-	// MessageChannels are desirable because they give direct access to the HTML
-	// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
-	// 11-12, and in web workers in many engines.
-	// Although message channels yield to any queued rendering and IO tasks, they
-	// would be better than imposing the 4ms delay of timers.
-	// However, they do not work reliably in Internet Explorer or Safari.
-
-	// Internet Explorer 10 is the only browser that has setImmediate but does
-	// not have MutationObservers.
-	// Although setImmediate yields to the browser's renderer, it would be
-	// preferrable to falling back to setTimeout since it does not have
-	// the minimum 4ms penalty.
-	// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
-	// Desktop to a lesser extent) that renders both setImmediate and
-	// MessageChannel useless for the purposes of ASAP.
-	// https://github.com/kriskowal/q/issues/396
-
-	// Timers are implemented universally.
-	// We fall back to timers in workers in most engines, and in foreground
-	// contexts in the following browsers.
-	// However, note that even this simple case requires nuances to operate in a
-	// broad spectrum of browsers.
-	//
-	// - Firefox 3-13
-	// - Internet Explorer 6-9
-	// - iPad Safari 4.3
-	// - Lynx 2.8.7
-	} else {
-	    requestFlush = makeRequestCallFromTimer(flush);
-	}
-
-	// `requestFlush` requests that the high priority event queue be flushed as
-	// soon as possible.
-	// This is useful to prevent an error thrown in a task from stalling the event
-	// queue if the exception handled by Node.js’s
-	// `process.on("uncaughtException")` or by a domain.
-	rawAsap.requestFlush = requestFlush;
-
-	// To request a high priority event, we induce a mutation observer by toggling
-	// the text of a text node between "1" and "-1".
-	function makeRequestCallFromMutationObserver(callback) {
-	    var toggle = 1;
-	    var observer = new BrowserMutationObserver(callback);
-	    var node = document.createTextNode("");
-	    observer.observe(node, {characterData: true});
-	    return function requestCall() {
-	        toggle = -toggle;
-	        node.data = toggle;
-	    };
-	}
-
-	// The message channel technique was discovered by Malte Ubl and was the
-	// original foundation for this library.
-	// http://www.nonblocking.io/2011/06/windownexttick.html
-
-	// Safari 6.0.5 (at least) intermittently fails to create message ports on a
-	// page's first load. Thankfully, this version of Safari supports
-	// MutationObservers, so we don't need to fall back in that case.
-
-	// function makeRequestCallFromMessageChannel(callback) {
-	//     var channel = new MessageChannel();
-	//     channel.port1.onmessage = callback;
-	//     return function requestCall() {
-	//         channel.port2.postMessage(0);
-	//     };
-	// }
-
-	// For reasons explained above, we are also unable to use `setImmediate`
-	// under any circumstances.
-	// Even if we were, there is another bug in Internet Explorer 10.
-	// It is not sufficient to assign `setImmediate` to `requestFlush` because
-	// `setImmediate` must be called *by name* and therefore must be wrapped in a
-	// closure.
-	// Never forget.
-
-	// function makeRequestCallFromSetImmediate(callback) {
-	//     return function requestCall() {
-	//         setImmediate(callback);
-	//     };
-	// }
-
-	// Safari 6.0 has a problem where timers will get lost while the user is
-	// scrolling. This problem does not impact ASAP because Safari 6.0 supports
-	// mutation observers, so that implementation is used instead.
-	// However, if we ever elect to use timers in Safari, the prevalent work-around
-	// is to add a scroll event listener that calls for a flush.
-
-	// `setTimeout` does not call the passed callback if the delay is less than
-	// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
-	// even then.
-
-	function makeRequestCallFromTimer(callback) {
-	    return function requestCall() {
-	        // We dispatch a timeout with a specified delay of 0 for engines that
-	        // can reliably accommodate that request. This will usually be snapped
-	        // to a 4 milisecond delay, but once we're flushing, there's no delay
-	        // between events.
-	        var timeoutHandle = setTimeout(handleTimer, 0);
-	        // However, since this timer gets frequently dropped in Firefox
-	        // workers, we enlist an interval handle that will try to fire
-	        // an event 20 times per second until it succeeds.
-	        var intervalHandle = setInterval(handleTimer, 50);
-
-	        function handleTimer() {
-	            // Whichever timer succeeds will cancel both timers and
-	            // execute the callback.
-	            clearTimeout(timeoutHandle);
-	            clearInterval(intervalHandle);
-	            callback();
-	        }
-	    };
-	}
-
-	// This is for `asap.js` only.
-	// Its name will be periodically randomized to break any code that depends on
-	// its existence.
-	rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
-
-	// ASAP was originally a nextTick shim included in Q. This was factored out
-	// into this ASAP package. It was later adapted to RSVP which made further
-	// amendments. These decisions, particularly to marginalize MessageChannel and
-	// to capture the MutationObserver implementation in a closure, were integrated
-	// back into ASAP proper.
-	// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
-
-	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 23 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var Promise = __webpack_require__(21);
-
-	module.exports = Promise;
-	Promise.prototype.done = function (onFulfilled, onRejected) {
-	  var self = arguments.length ? this.then.apply(this, arguments) : this;
-	  self.then(null, function (err) {
-	    setTimeout(function () {
-	      throw err;
-	    }, 0);
-	  });
-	};
-
-
-/***/ },
-/* 24 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var Promise = __webpack_require__(21);
-
-	module.exports = Promise;
-	Promise.prototype['finally'] = function (f) {
-	  return this.then(function (value) {
-	    return Promise.resolve(f()).then(function () {
-	      return value;
-	    });
-	  }, function (err) {
-	    return Promise.resolve(f()).then(function () {
-	      throw err;
-	    });
-	  });
-	};
-
-
-/***/ },
-/* 25 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	//This file contains the ES6 extensions to the core Promises/A+ API
-
-	var Promise = __webpack_require__(21);
-
-	module.exports = Promise;
-
-	/* Static Functions */
-
-	var TRUE = valuePromise(true);
-	var FALSE = valuePromise(false);
-	var NULL = valuePromise(null);
-	var UNDEFINED = valuePromise(undefined);
-	var ZERO = valuePromise(0);
-	var EMPTYSTRING = valuePromise('');
-
-	function valuePromise(value) {
-	  var p = new Promise(Promise._61);
-	  p._81 = 1;
-	  p._65 = value;
-	  return p;
-	}
-	Promise.resolve = function (value) {
-	  if (value instanceof Promise) return value;
-
-	  if (value === null) return NULL;
-	  if (value === undefined) return UNDEFINED;
-	  if (value === true) return TRUE;
-	  if (value === false) return FALSE;
-	  if (value === 0) return ZERO;
-	  if (value === '') return EMPTYSTRING;
-
-	  if (typeof value === 'object' || typeof value === 'function') {
-	    try {
-	      var then = value.then;
-	      if (typeof then === 'function') {
-	        return new Promise(then.bind(value));
-	      }
-	    } catch (ex) {
-	      return new Promise(function (resolve, reject) {
-	        reject(ex);
-	      });
-	    }
-	  }
-	  return valuePromise(value);
-	};
-
-	Promise.all = function (arr) {
-	  var args = Array.prototype.slice.call(arr);
-
-	  return new Promise(function (resolve, reject) {
-	    if (args.length === 0) return resolve([]);
-	    var remaining = args.length;
-	    function res(i, val) {
-	      if (val && (typeof val === 'object' || typeof val === 'function')) {
-	        if (val instanceof Promise && val.then === Promise.prototype.then) {
-	          while (val._81 === 3) {
-	            val = val._65;
-	          }
-	          if (val._81 === 1) return res(i, val._65);
-	          if (val._81 === 2) reject(val._65);
-	          val.then(function (val) {
-	            res(i, val);
-	          }, reject);
-	          return;
-	        } else {
-	          var then = val.then;
-	          if (typeof then === 'function') {
-	            var p = new Promise(then.bind(val));
-	            p.then(function (val) {
-	              res(i, val);
-	            }, reject);
-	            return;
-	          }
-	        }
-	      }
-	      args[i] = val;
-	      if (--remaining === 0) {
-	        resolve(args);
-	      }
-	    }
-	    for (var i = 0; i < args.length; i++) {
-	      res(i, args[i]);
-	    }
-	  });
-	};
-
-	Promise.reject = function (value) {
-	  return new Promise(function (resolve, reject) {
-	    reject(value);
-	  });
-	};
-
-	Promise.race = function (values) {
-	  return new Promise(function (resolve, reject) {
-	    values.forEach(function(value){
-	      Promise.resolve(value).then(resolve, reject);
-	    });
-	  });
-	};
-
-	/* Prototype Methods */
-
-	Promise.prototype['catch'] = function (onRejected) {
-	  return this.then(null, onRejected);
-	};
-
-
-/***/ },
-/* 26 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	// This file contains then/promise specific extensions that are only useful
-	// for node.js interop
-
-	var Promise = __webpack_require__(21);
-	var asap = __webpack_require__(27);
-
-	module.exports = Promise;
-
-	/* Static Functions */
-
-	Promise.denodeify = function (fn, argumentCount) {
-	  if (
-	    typeof argumentCount === 'number' && argumentCount !== Infinity
-	  ) {
-	    return denodeifyWithCount(fn, argumentCount);
-	  } else {
-	    return denodeifyWithoutCount(fn);
-	  }
-	}
-
-	var callbackFn = (
-	  'function (err, res) {' +
-	  'if (err) { rj(err); } else { rs(res); }' +
-	  '}'
-	);
-	function denodeifyWithCount(fn, argumentCount) {
-	  var args = [];
-	  for (var i = 0; i < argumentCount; i++) {
-	    args.push('a' + i);
-	  }
-	  var body = [
-	    'return function (' + args.join(',') + ') {',
-	    'var self = this;',
-	    'return new Promise(function (rs, rj) {',
-	    'var res = fn.call(',
-	    ['self'].concat(args).concat([callbackFn]).join(','),
-	    ');',
-	    'if (res &&',
-	    '(typeof res === "object" || typeof res === "function") &&',
-	    'typeof res.then === "function"',
-	    ') {rs(res);}',
-	    '});',
-	    '};'
-	  ].join('');
-	  return Function(['Promise', 'fn'], body)(Promise, fn);
-	}
-	function denodeifyWithoutCount(fn) {
-	  var fnLength = Math.max(fn.length - 1, 3);
-	  var args = [];
-	  for (var i = 0; i < fnLength; i++) {
-	    args.push('a' + i);
-	  }
-	  var body = [
-	    'return function (' + args.join(',') + ') {',
-	    'var self = this;',
-	    'var args;',
-	    'var argLength = arguments.length;',
-	    'if (arguments.length > ' + fnLength + ') {',
-	    '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 = ' + callbackFn + ';',
-	    'var res;',
-	    'switch (argLength) {',
-	    args.concat(['extra']).map(function (_, index) {
-	      return (
-	        'case ' + (index) + ':' +
-	        'res = fn.call(' + ['self'].concat(args.slice(0, index)).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'],
-	    body
-	  )(Promise, fn);
-	}
-
-	Promise.nodeify = function (fn) {
-	  return function () {
-	    var args = Array.prototype.slice.call(arguments);
-	    var callback =
-	      typeof args[args.length - 1] === 'function' ? args.pop() : null;
-	    var ctx = this;
-	    try {
-	      return fn.apply(this, arguments).nodeify(callback, ctx);
-	    } catch (ex) {
-	      if (callback === null || typeof callback == 'undefined') {
-	        return new Promise(function (resolve, reject) {
-	          reject(ex);
-	        });
-	      } else {
-	        asap(function () {
-	          callback.call(ctx, ex);
-	        })
-	      }
-	    }
-	  }
-	}
-
-	Promise.prototype.nodeify = function (callback, ctx) {
-	  if (typeof callback != 'function') return this;
-
-	  this.then(function (value) {
-	    asap(function () {
-	      callback.call(ctx, null, value);
-	    });
-	  }, function (err) {
-	    asap(function () {
-	      callback.call(ctx, err);
-	    });
-	  });
-	}
-
-
-/***/ },
-/* 27 */
-/***/ function(module, exports, __webpack_require__) {
-
-	"use strict";
-
-	// rawAsap provides everything we need except exception management.
-	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).
-	// Array-as-queue is good enough here, since we are just dealing with exceptions.
-	var pendingErrors = [];
-	var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
-
-	function throwFirstError() {
-	    if (pendingErrors.length) {
-	        throw pendingErrors.shift();
-	    }
-	}
-
-	/**
-	 * Calls a task as soon as possible after returning, in its own event, with priority
-	 * over other events like animation, reflow, and repaint. An error thrown from an
-	 * event will not interrupt, nor even substantially slow down the processing of
-	 * other events, but will be rather postponed to a lower priority event.
-	 * @param {{call}} task A callable object, typically a function that takes no
-	 * arguments.
-	 */
-	module.exports = asap;
-	function asap(task) {
-	    var rawTask;
-	    if (freeTasks.length) {
-	        rawTask = freeTasks.pop();
-	    } else {
-	        rawTask = new RawTask();
-	    }
-	    rawTask.task = task;
-	    rawAsap(rawTask);
-	}
-
-	// We wrap tasks with recyclable task objects.  A task object implements
-	// `call`, just like a function.
-	function RawTask() {
-	    this.task = null;
-	}
-
-	// The sole purpose of wrapping the task is to catch the exception and recycle
-	// the task object after its single use.
-	RawTask.prototype.call = function () {
-	    try {
-	        this.task.call();
-	    } catch (error) {
-	        if (asap.onerror) {
-	            // This hook exists purely for testing purposes.
-	            // Its name will be periodically randomized to break any code that
-	            // depends on its existence.
-	            asap.onerror(error);
-	        } else {
-	            // In a web browser, exceptions are not fatal. However, to avoid
-	            // slowing down the queue of pending tasks, we rethrow the error in a
-	            // lower priority turn.
-	            pendingErrors.push(error);
-	            requestErrorThrow();
-	        }
-	    } finally {
-	        this.task = null;
-	        freeTasks[freeTasks.length] = this;
-	    }
-	};
-
-
-/***/ },
-/* 28 */
-/***/ function(module, exports, __webpack_require__) {
-
-	'use strict';
-
-	var Promise = __webpack_require__(21);
-
-	module.exports = Promise;
-	Promise.enableSynchronous = function () {
-	  Promise.prototype.isPending = function() {
-	    return this.getState() == 0;
-	  };
-
-	  Promise.prototype.isFulfilled = function() {
-	    return this.getState() == 1;
-	  };
-
-	  Promise.prototype.isRejected = function() {
-	    return this.getState() == 2;
-	  };
-
-	  Promise.prototype.getValue = function () {
-	    if (this._81 === 3) {
-	      return this._65.getValue();
-	    }
-
-	    if (!this.isFulfilled()) {
-	      throw new Error('Cannot get a value of an unfulfilled promise.');
-	    }
-
-	    return this._65;
-	  };
-
-	  Promise.prototype.getReason = function () {
-	    if (this._81 === 3) {
-	      return this._65.getReason();
-	    }
-
-	    if (!this.isRejected()) {
-	      throw new Error('Cannot get a rejection reason of a non-rejected promise.');
-	    }
-
-	    return this._65;
-	  };
-
-	  Promise.prototype.getState = function () {
-	    if (this._81 === 3) {
-	      return this._65.getState();
-	    }
-	    if (this._81 === -1 || this._81 === -2) {
-	      return 0;
-	    }
-
-	    return this._81;
-	  };
-	};
-
-	Promise.disableSynchronous = function() {
-	  Promise.prototype.isPending = undefined;
-	  Promise.prototype.isFulfilled = undefined;
-	  Promise.prototype.isRejected = undefined;
-	  Promise.prototype.getValue = undefined;
-	  Promise.prototype.getReason = undefined;
-	  Promise.prototype.getState = undefined;
-	};
-
-
-/***/ },
-/* 29 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-
-	function Scratch3EventBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3EventBlocks.prototype.getPrimitives = function() {
-	    return {
-	        'event_broadcast': this.broadcast,
-	        'event_broadcastandwait': this.broadcastAndWait,
-	        'event_whengreaterthan': this.hatGreaterThanPredicate
-	    };
-	};
-
-	Scratch3EventBlocks.prototype.getHats = function () {
-	    return {
-	        'event_whenflagclicked': {
-	            restartExistingThreads: true
-	        },
-	        'event_whenkeypressed': {
-	            restartExistingThreads: false
-	        },
-	        'event_whenthisspriteclicked': {
-	            restartExistingThreads: true
-	        },
-	        'event_whenbackdropswitchesto': {
-	            restartExistingThreads: true
-	        },
-	        'event_whengreaterthan': {
-	            restartExistingThreads: false,
-	            edgeActivated: true
-	        },
-	        'event_whenbroadcastreceived': {
-	            restartExistingThreads: true
-	        }
-	    };
-	};
-
-	Scratch3EventBlocks.prototype.hatGreaterThanPredicate = function (args, util) {
-	    var option = Cast.toString(args.WHENGREATERTHANMENU).toLowerCase();
-	    var value = Cast.toNumber(args.VALUE);
-	    // @todo: Other cases :)
-	    if (option == 'timer') {
-	        return util.ioQuery('clock', 'projectTimer') > value;
-	    }
-	    return false;
-	};
-
-	Scratch3EventBlocks.prototype.broadcast = function(args, util) {
-	    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
-	    util.startHats('event_whenbroadcastreceived', {
-	        'BROADCAST_OPTION': broadcastOption
-	    });
-	};
-
-	Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
-	    var broadcastOption = Cast.toString(args.BROADCAST_OPTION);
-	    // Have we run before, starting threads?
-	    if (!util.stackFrame.startedThreads) {
-	        // No - start hats for this broadcast.
-	        util.stackFrame.startedThreads = util.startHats(
-	            'event_whenbroadcastreceived', {
-	                'BROADCAST_OPTION': broadcastOption
-	            }
-	        );
-	        if (util.stackFrame.startedThreads.length == 0) {
-	            // Nothing was started.
-	            return;
-	        }
-	    }
-	    // We've run before; check if the wait is still going on.
-	    var instance = this;
-	    var waiting = util.stackFrame.startedThreads.some(function(thread) {
-	        return instance.runtime.isActiveThread(thread);
-	    });
-	    if (waiting) {
-	        util.yieldFrame();
-	    }
-	};
-
-	module.exports = Scratch3EventBlocks;
-
-
-/***/ },
-/* 30 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-
-	function Scratch3LooksBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3LooksBlocks.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
-	    };
-	};
-
-	Scratch3LooksBlocks.prototype.say = function (args, util) {
-	    util.target.setSay('say', args.MESSAGE);
-	};
-
-	Scratch3LooksBlocks.prototype.sayforsecs = function (args, util) {
-	    util.target.setSay('say', args.MESSAGE);
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            // Clear say bubble and proceed.
-	            util.target.setSay();
-	            resolve();
-	        }, 1000 * args.SECS);
-	    });
-	};
-
-	Scratch3LooksBlocks.prototype.think = function (args, util) {
-	    util.target.setSay('think', args.MESSAGE);
-	};
-
-	Scratch3LooksBlocks.prototype.thinkforsecs = function (args, util) {
-	    util.target.setSay('think', args.MESSAGE);
-	    return new Promise(function(resolve) {
-	        setTimeout(function() {
-	            // Clear say bubble and proceed.
-	            util.target.setSay();
-	            resolve();
-	        }, 1000 * args.SECS);
-	    });
-	};
-
-	Scratch3LooksBlocks.prototype.show = function (args, util) {
-	    util.target.setVisible(true);
-	};
-
-	Scratch3LooksBlocks.prototype.hide = function (args, util) {
-	    util.target.setVisible(false);
-	};
-
-	/**
-	 * Utility function to set the costume or backdrop of a target.
-	 * Matches the behavior of Scratch 2.0 for different types of arguments.
-	 * @param {!Target} target Target to set costume/backdrop to.
-	 * @param {Any} requestedCostume Costume requested, e.g., 0, 'name', etc.
-	 * @param {boolean=} opt_zeroIndex Set to zero-index the requestedCostume.
-	 * @return {Array.<!Thread>} Any threads started by this switch.
-	 */
-	Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target,
-	        requestedCostume, opt_zeroIndex) {
-	    if (typeof requestedCostume === 'number') {
-	        target.setCostume(opt_zeroIndex ?
-	            requestedCostume : requestedCostume - 1);
-	    } else {
-	        var costumeIndex = target.getCostumeIndexByName(requestedCostume);
-	        if (costumeIndex > -1) {
-	            target.setCostume(costumeIndex);
-	        } else if (costumeIndex == 'previous costume' ||
-	                   costumeIndex == 'previous backdrop') {
-	            target.setCostume(target.currentCostume - 1);
-	        } else if (costumeIndex == 'next costume' ||
-	                   costumeIndex == 'next backdrop') {
-	            target.setCostume(target.currentCostume + 1);
-	        } else {
-	            var forcedNumber = Cast.toNumber(requestedCostume);
-	            if (!isNaN(forcedNumber)) {
-	                target.setCostume(opt_zeroIndex ?
-	                    forcedNumber : forcedNumber - 1);
-	            }
-	        }
-	    }
-	    if (target == this.runtime.getTargetForStage()) {
-	        // Target is the stage - start hats.
-	        var newName = target.sprite.costumes[target.currentCostume].name;
-	        return this.runtime.startHats('event_whenbackdropswitchesto', {
-	            'BACKDROP': newName
-	        });
-	    }
-	    return [];
-	};
-
-	Scratch3LooksBlocks.prototype.switchCostume = function (args, util) {
-	    this._setCostumeOrBackdrop(util.target, args.COSTUME);
-	};
-
-	Scratch3LooksBlocks.prototype.nextCostume = function (args, util) {
-	    this._setCostumeOrBackdrop(
-	        util.target, util.target.currentCostume + 1, true
-	    );
-	};
-
-	Scratch3LooksBlocks.prototype.switchBackdrop = function (args) {
-	    this._setCostumeOrBackdrop(this.runtime.getTargetForStage(), args.BACKDROP);
-	};
-
-	Scratch3LooksBlocks.prototype.switchBackdropAndWait = function (args, util) {
-	    // Have we run before, starting threads?
-	    if (!util.stackFrame.startedThreads) {
-	        // No - switch the backdrop.
-	        util.stackFrame.startedThreads = (
-	            this._setCostumeOrBackdrop(
-	                this.runtime.getTargetForStage(),
-	                args.BACKDROP
-	            )
-	        );
-	        if (util.stackFrame.startedThreads.length == 0) {
-	            // Nothing was started.
-	            return;
-	        }
-	    }
-	    // We've run before; check if the wait is still going on.
-	    var instance = this;
-	    var waiting = util.stackFrame.startedThreads.some(function(thread) {
-	        return instance.runtime.isActiveThread(thread);
-	    });
-	    if (waiting) {
-	        util.yieldFrame();
-	    }
-	};
-
-	Scratch3LooksBlocks.prototype.nextBackdrop = function () {
-	    var stage = this.runtime.getTargetForStage();
-	    this._setCostumeOrBackdrop(
-	        stage, stage.currentCostume + 1, true
-	    );
-	};
-
-	Scratch3LooksBlocks.prototype.changeEffect = function (args, util) {
-	    var effect = Cast.toString(args.EFFECT).toLowerCase();
-	    var change = Cast.toNumber(args.CHANGE);
-	    if (!util.target.effects.hasOwnProperty(effect)) return;
-	    var newValue = change + util.target.effects[effect];
-	    util.target.setEffect(effect, newValue);
-	};
-
-	Scratch3LooksBlocks.prototype.setEffect = function (args, util) {
-	    var effect = Cast.toString(args.EFFECT).toLowerCase();
-	    var value = Cast.toNumber(args.VALUE);
-	    util.target.setEffect(effect, value);
-	};
-
-	Scratch3LooksBlocks.prototype.clearEffects = function (args, util) {
-	    util.target.clearEffects();
-	};
-
-	Scratch3LooksBlocks.prototype.changeSize = function (args, util) {
-	    var change = Cast.toNumber(args.CHANGE);
-	    util.target.setSize(util.target.size + change);
-	};
-
-	Scratch3LooksBlocks.prototype.setSize = function (args, util) {
-	    var size = Cast.toNumber(args.SIZE);
-	    util.target.setSize(size);
-	};
-
-	Scratch3LooksBlocks.prototype.getSize = function (args, util) {
-	    return util.target.size;
-	};
-
-	Scratch3LooksBlocks.prototype.getBackdropIndex = function () {
-	    var stage = this.runtime.getTargetForStage();
-	    return stage.currentCostume + 1;
-	};
-
-	Scratch3LooksBlocks.prototype.getBackdropName = function () {
-	    var stage = this.runtime.getTargetForStage();
-	    return stage.sprite.costumes[stage.currentCostume].name;
-	};
-
-	Scratch3LooksBlocks.prototype.getCostumeIndex = function (args, util) {
-	    return util.target.currentCostume + 1;
-	};
-
-	module.exports = Scratch3LooksBlocks;
-
-
-/***/ },
-/* 31 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-	var MathUtil = __webpack_require__(17);
-	var Timer = __webpack_require__(9);
-
-	function Scratch3MotionBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3MotionBlocks.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
-	    };
-	};
-
-	Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
-	    var steps = Cast.toNumber(args.STEPS);
-	    var radians = MathUtil.degToRad(util.target.direction);
-	    var dx = steps * Math.cos(radians);
-	    var dy = steps * Math.sin(radians);
-	    util.target.setXY(util.target.x + dx, util.target.y + dy);
-	};
-
-	Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
-	    var x = Cast.toNumber(args.X);
-	    var y = Cast.toNumber(args.Y);
-	    util.target.setXY(x, y);
-	};
-
-	Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
-	    var degrees = Cast.toNumber(args.DEGREES);
-	    util.target.setDirection(util.target.direction + degrees);
-	};
-
-	Scratch3MotionBlocks.prototype.turnLeft = function (args, util) {
-	    var degrees = Cast.toNumber(args.DEGREES);
-	    util.target.setDirection(util.target.direction - degrees);
-	};
-
-	Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
-	    var direction = Cast.toNumber(args.DIRECTION);
-	    util.target.setDirection(direction);
-	};
-
-	Scratch3MotionBlocks.prototype.glide = function (args, util) {
-	    if (!util.stackFrame.timer) {
-	        // First time: save data for future use.
-	        util.stackFrame.timer = new Timer();
-	        util.stackFrame.timer.start();
-	        util.stackFrame.duration = Cast.toNumber(args.SECS);
-	        util.stackFrame.startX = util.target.x;
-	        util.stackFrame.startY = util.target.y;
-	        util.stackFrame.endX = Cast.toNumber(args.X);
-	        util.stackFrame.endY = Cast.toNumber(args.Y);
-	        if (util.stackFrame.duration <= 0) {
-	            // Duration too short to glide.
-	            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
-	            return;
-	        }
-	        util.yieldFrame();
-	    } else {
-	        var timeElapsed = util.stackFrame.timer.timeElapsed();
-	        if (timeElapsed < util.stackFrame.duration * 1000) {
-	            // In progress: move to intermediate position.
-	            var frac = timeElapsed / (util.stackFrame.duration * 1000);
-	            var dx = frac * (util.stackFrame.endX - util.stackFrame.startX);
-	            var dy = frac * (util.stackFrame.endY - util.stackFrame.startY);
-	            util.target.setXY(
-	                util.stackFrame.startX + dx,
-	                util.stackFrame.startY + dy
-	            );
-	            util.yieldFrame();
-	        } else {
-	            // Finished: move to final position.
-	            util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
-	        }
-	    }
-	};
-
-	Scratch3MotionBlocks.prototype.changeX = function (args, util) {
-	    var dx = Cast.toNumber(args.DX);
-	    util.target.setXY(util.target.x + dx, util.target.y);
-	};
-
-	Scratch3MotionBlocks.prototype.setX = function (args, util) {
-	    var x = Cast.toNumber(args.X);
-	    util.target.setXY(x, util.target.y);
-	};
-
-	Scratch3MotionBlocks.prototype.changeY = function (args, util) {
-	    var dy = Cast.toNumber(args.DY);
-	    util.target.setXY(util.target.x, util.target.y + dy);
-	};
-
-	Scratch3MotionBlocks.prototype.setY = function (args, util) {
-	    var y = Cast.toNumber(args.Y);
-	    util.target.setXY(util.target.x, y);
-	};
-
-	Scratch3MotionBlocks.prototype.getX = function (args, util) {
-	    return util.target.x;
-	};
-
-	Scratch3MotionBlocks.prototype.getY = function (args, util) {
-	    return util.target.y;
-	};
-
-	Scratch3MotionBlocks.prototype.getDirection = function (args, util) {
-	    return util.target.direction;
-	};
-
-	module.exports = Scratch3MotionBlocks;
-
-
-/***/ },
-/* 32 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-
-	function Scratch3OperatorsBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3OperatorsBlocks.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
-	    };
-	};
-
-	Scratch3OperatorsBlocks.prototype.add = function (args) {
-	    return Cast.toNumber(args.NUM1) + Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.subtract = function (args) {
-	    return Cast.toNumber(args.NUM1) - Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.multiply = function (args) {
-	    return Cast.toNumber(args.NUM1) * Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.divide = function (args) {
-	    return Cast.toNumber(args.NUM1) / Cast.toNumber(args.NUM2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.lt = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) < 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.equals = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) == 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.gt = function (args) {
-	    return Cast.compare(args.OPERAND1, args.OPERAND2) > 0;
-	};
-
-	Scratch3OperatorsBlocks.prototype.and = function (args) {
-	    return Cast.toBoolean(args.OPERAND1) && Cast.toBoolean(args.OPERAND2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.or = function (args) {
-	    return Cast.toBoolean(args.OPERAND1) || Cast.toBoolean(args.OPERAND2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.not = function (args) {
-	    return !Cast.toBoolean(args.OPERAND);
-	};
-
-	Scratch3OperatorsBlocks.prototype.random = function (args) {
-	    var nFrom = Cast.toNumber(args.FROM);
-	    var nTo = Cast.toNumber(args.TO);
-	    var low = nFrom <= nTo ? nFrom : nTo;
-	    var high = nFrom <= nTo ? nTo : nFrom;
-	    if (low == high) return low;
-	    // 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;
-	};
-
-	Scratch3OperatorsBlocks.prototype.join = function (args) {
-	    return Cast.toString(args.STRING1) + Cast.toString(args.STRING2);
-	};
-
-	Scratch3OperatorsBlocks.prototype.letterOf = function (args) {
-	    var index = Cast.toNumber(args.LETTER) - 1;
-	    var str = Cast.toString(args.STRING);
-	    // Out of bounds?
-	    if (index < 0 || index >= str.length) {
-	        return '';
-	    }
-	    return str.charAt(index);
-	};
-
-	Scratch3OperatorsBlocks.prototype.length = function (args) {
-	    return Cast.toString(args.STRING).length;
-	};
-
-	Scratch3OperatorsBlocks.prototype.mod = function (args) {
-	    var n = Cast.toNumber(args.NUM1);
-	    var modulus = Cast.toNumber(args.NUM2);
-	    var result = n % modulus;
-	    // Scratch mod is kept positive.
-	    if (result / modulus < 0) result += modulus;
-	    return result;
-	};
-
-	Scratch3OperatorsBlocks.prototype.round = function (args) {
-	    return Math.round(Cast.toNumber(args.NUM));
-	};
-
-	Scratch3OperatorsBlocks.prototype.mathop = function (args) {
-	    var operator = Cast.toString(args.OPERATOR).toLowerCase();
-	    var n = Cast.toNumber(args.NUM);
-	    switch (operator) {
-	    case 'abs': return Math.abs(n);
-	    case 'floor': return Math.floor(n);
-	    case 'ceiling': return Math.ceil(n);
-	    case 'sqrt': return Math.sqrt(n);
-	    case 'sin': return Math.sin((Math.PI * n) / 180);
-	    case 'cos': return Math.cos((Math.PI * n) / 180);
-	    case 'tan': return Math.tan((Math.PI * n) / 180);
-	    case 'asin': return (Math.asin(n) * 180) / Math.PI;
-	    case 'acos': return (Math.acos(n) * 180) / Math.PI;
-	    case 'atan': return (Math.atan(n) * 180) / Math.PI;
-	    case 'ln': return Math.log(n);
-	    case 'log': return Math.log(n) / Math.LN10;
-	    case 'e ^': return Math.exp(n);
-	    case '10 ^': return Math.pow(10, n);
-	    }
-	    return 0;
-	};
-
-	module.exports = Scratch3OperatorsBlocks;
-
-
-/***/ },
-/* 33 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Cast = __webpack_require__(14);
-
-	function Scratch3SensingBlocks(runtime) {
-	    /**
-	     * The runtime instantiating this block package.
-	     * @type {Runtime}
-	     */
-	    this.runtime = runtime;
-	}
-
-	/**
-	 * Retrieve the block primitives implemented by this package.
-	 * @return {Object.<string, Function>} Mapping of opcode to Function.
-	 */
-	Scratch3SensingBlocks.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
-	    };
-	};
-
-	Scratch3SensingBlocks.prototype.touchingColor = function (args, util) {
-	    var color = Cast.toRgbColorList(args.COLOR);
-	    return util.target.isTouchingColor(color);
-	};
-
-	Scratch3SensingBlocks.prototype.colorTouchingColor = function (args, util) {
-	    var maskColor = Cast.toRgbColorList(args.COLOR);
-	    var targetColor = Cast.toRgbColorList(args.COLOR2);
-	    return util.target.colorIsTouchingColor(targetColor, maskColor);
-	};
-
-	Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
-	    return util.ioQuery('clock', 'projectTimer');
-	};
-
-	Scratch3SensingBlocks.prototype.resetTimer = function (args, util) {
-	    util.ioQuery('clock', 'resetProjectTimer');
-	};
-
-	Scratch3SensingBlocks.prototype.getMouseX = function (args, util) {
-	    return util.ioQuery('mouse', 'getX');
-	};
-
-	Scratch3SensingBlocks.prototype.getMouseY = function (args, util) {
-	    return util.ioQuery('mouse', 'getY');
-	};
-
-	Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) {
-	    return util.ioQuery('mouse', 'getIsDown');
-	};
-
-	Scratch3SensingBlocks.prototype.current = function (args) {
-	    var menuOption = Cast.toString(args.CURRENTMENU).toLowerCase();
-	    var date = new Date();
-	    switch (menuOption) {
-	    case 'year': return date.getFullYear();
-	    case 'month': return date.getMonth() + 1; // getMonth is zero-based
-	    case 'date': return date.getDate();
-	    case 'dayofweek': return date.getDay() + 1; // getDay is zero-based, Sun=0
-	    case 'hour': return date.getHours();
-	    case 'minute': return date.getMinutes();
-	    case 'second': return date.getSeconds();
-	    }
-	    return 0;
-	};
-
-	Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
-	    return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTION);
-	};
-
-	module.exports = Scratch3SensingBlocks;
-
-
-/***/ },
-/* 34 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/**
-	 * @fileoverview
-	 * Partial implementation of an SB2 JSON importer.
-	 * Parses provided JSON and then generates all needed
-	 * scratch-vm runtime structures.
-	 */
-
-	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,
-	 * and process the top-level object (the stage object).
-	 * @param {!string} json SB2-format JSON to load.
-	 * @param {!Runtime} runtime Runtime object to load all structures into.
-	 */
-	function sb2import (json, runtime) {
-	    parseScratchObject(
-	        JSON.parse(json),
-	        runtime,
-	        true
-	    );
-	}
-
-	/**
-	 * Parse a single "Scratch object" and create all its in-memory VM objects.
-	 * @param {!Object} object From-JSON "Scratch object:" sprite, stage, watcher.
-	 * @param {!Runtime} runtime Runtime object to load all structures into.
-	 * @param {boolean} topLevel Whether this is the top-level object (stage).
-	 */
-	function parseScratchObject (object, runtime, topLevel) {
-	    if (!object.hasOwnProperty('objName')) {
-	        // Watcher/monitor - skip this object until those are implemented in VM.
-	        // @todo
-	        return;
-	    }
-	    // 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, runtime);
-	    // Sprite/stage name from JSON.
-	    if (object.hasOwnProperty('objName')) {
-	        sprite.name = object.objName;
-	    }
-	    // Costumes from JSON.
-	    if (object.hasOwnProperty('costumes')) {
-	        for (var i = 0; i < object.costumes.length; i++) {
-	            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/'
-	                    + costume.baseLayerMD5 + '/get/',
-	                name: costume.costumeName,
-	                bitmapResolution: costume.bitmapResolution,
-	                rotationCenterX: costume.rotationCenterX,
-	                rotationCenterY: costume.rotationCenterY
-	            });
-	        }
-	    }
-	    // If included, parse any and all scripts/blocks on the object.
-	    if (object.hasOwnProperty('scripts')) {
-	        parseScripts(object.scripts, blocks);
-	    }
-	    // Create the first clone, and load its run-state from JSON.
-	    var target = sprite.createClone();
-	    // Add it to the runtime's list of targets.
-	    runtime.targets.push(target);
-	    if (object.hasOwnProperty('scratchX')) {
-	        target.x = object.scratchX;
-	    }
-	    if (object.hasOwnProperty('scratchY')) {
-	        target.y = object.scratchY;
-	    }
-	    if (object.hasOwnProperty('direction')) {
-	        target.direction = object.direction;
-	    }
-	    if (object.hasOwnProperty('scale')) {
-	        // SB2 stores as 1.0 = 100%; we use % in the VM.
-	        target.size = object.scale * 100;
-	    }
-	    if (object.hasOwnProperty('visible')) {
-	        target.visible = object.visible;
-	    }
-	    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++) {
-	            parseScratchObject(object.children[j], runtime, false);
-	        }
-	    }
-	}
-
-	/**
-	 * Parse a Scratch object's scripts into VM blocks.
-	 * This should only handle top-level scripts that include X, Y coordinates.
-	 * @param {!Object} scripts Scripts object from SB2 JSON.
-	 * @param {!Blocks} blocks Blocks object to load parsed blocks into.
-	 */
-	function parseScripts (scripts, blocks) {
-	    for (var i = 0; i < scripts.length; i++) {
-	        var script = scripts[i];
-	        var scriptX = script[0];
-	        var scriptY = script[1];
-	        var blockList = script[2];
-	        var parsedBlockList = parseBlockList(blockList);
-	        if (parsedBlockList[0]) {
-	            // Adjust script coordinates to account for
-	            // larger block size in scratch-blocks.
-	            // @todo: Determine more precisely the right formulas here.
-	            parsedBlockList[0].x = scriptX * 1.1;
-	            parsedBlockList[0].y = scriptY * 1.1;
-	            parsedBlockList[0].topLevel = true;
-	            parsedBlockList[0].parent = null;
-	        }
-	        // Flatten children and create add the blocks.
-	        var convertedBlocks = flatten(parsedBlockList);
-	        for (var j = 0; j < convertedBlocks.length; j++) {
-	            blocks.createBlock(convertedBlocks[j]);
-	        }
-	    }
-	}
-
-	/**
-	 * Parse any list of blocks from SB2 JSON into a list of VM-format blocks.
-	 * Could be used to parse a top-level script,
-	 * a list of blocks in a branch (e.g., in forever),
-	 * or a list of blocks in an argument (e.g., move [pick random...]).
-	 * @param {Array.<Object>} blockList SB2 JSON-format block list.
-	 * @return {Array.<Object>} Scratch VM-format block list.
-	 */
-	function parseBlockList (blockList) {
-	    var resultingList = [];
-	    var previousBlock = null; // For setting next.
-	    for (var i = 0; i < blockList.length; i++) {
-	        var block = blockList[i];
-	        var parsedBlock = parseBlock(block);
-	        if (previousBlock) {
-	            parsedBlock.parent = previousBlock.id;
-	            previousBlock.next = parsedBlock.id;
-	        }
-	        previousBlock = parsedBlock;
-	        resultingList.push(parsedBlock);
-	    }
-	    return resultingList;
-	}
-
-	/**
-	 * Flatten a block tree into a block list.
-	 * Children are temporarily stored on the `block.children` property.
-	 * @param {Array.<Object>} blocks list generated by `parseBlockList`.
-	 * @return {Array.<Object>} Flattened list to be passed to `blocks.createBlock`.
-	 */
-	function flatten (blocks) {
-	    var finalBlocks = [];
-	    for (var i = 0; i < blocks.length; i++) {
-	        var block = blocks[i];
-	        finalBlocks.push(block);
-	        if (block.children) {
-	            finalBlocks = finalBlocks.concat(flatten(block.children));
-	        }
-	        delete block.children;
-	    }
-	    return finalBlocks;
-	}
-
-	/**
-	 * Parse a single SB2 JSON-formatted block and its children.
-	 * @param {!Object} sb2block SB2 JSON-formatted block.
-	 * @return {Object} Scratch VM format block.
-	 */
-	function parseBlock (sb2block) {
-	    // First item in block object is the old opcode (e.g., 'forward:').
-	    var oldOpcode = sb2block[0];
-	    // Convert the block using the specMap. See sb2specmap.js.
-	    if (!oldOpcode || !specMap[oldOpcode]) {
-	        console.warn('Couldn\'t find SB2 block: ', oldOpcode);
-	        return;
-	    }
-	    var blockMetadata = specMap[oldOpcode];
-	    // Block skeleton.
-	    var activeBlock = {
-	        id: uid(), // Generate a new block unique ID.
-	        opcode: blockMetadata.opcode, // Converted, e.g. "motion_movesteps".
-	        inputs: {}, // Inputs to this block and the blocks they point to.
-	        fields: {}, // Fields on this block and their values.
-	        next: null, // Next block.
-	        shadow: false, // No shadow blocks in an SB2 by default.
-	        children: [] // Store any generated children, flattened in `flatten`.
-	    };
-	    // Look at the expected arguments in `blockMetadata.argMap.`
-	    // The basic problem here is to turn positional SB2 arguments into
-	    // non-positional named Scratch VM arguments.
-	    for (var i = 0; i < blockMetadata.argMap.length; i++) {
-	        var expectedArg = blockMetadata.argMap[i];
-	        var providedArg = sb2block[i + 1]; // (i = 0 is opcode)
-	        // Whether the input is obscuring a shadow.
-	        var shadowObscured = false;
-	        // Positional argument is an input.
-	        if (expectedArg.type == 'input') {
-	            // Create a new block and input metadata.
-	            var inputUid = uid();
-	            activeBlock.inputs[expectedArg.inputName] = {
-	                name: expectedArg.inputName,
-	                block: null,
-	                shadow: null
-	            };
-	            if (typeof providedArg == 'object' && providedArg) {
-	                // Block or block list occupies the input.
-	                var innerBlocks;
-	                if (typeof providedArg[0] == 'object' && providedArg[0]) {
-	                    // Block list occupies the input.
-	                    innerBlocks = parseBlockList(providedArg);
-	                } else {
-	                    // Single block occupies the input.
-	                    innerBlocks = [parseBlock(providedArg)];
-	                }
-	                for (var j = 0; j < innerBlocks.length; j++) {
-	                    innerBlocks[j].parent = activeBlock.id;
-	                }
-	                // Obscures any shadow.
-	                shadowObscured = true;
-	                activeBlock.inputs[expectedArg.inputName].block = (
-	                    innerBlocks[0].id
-	                );
-	                activeBlock.children = (
-	                    activeBlock.children.concat(innerBlocks)
-	                );
-	            }
-	            // Generate a shadow block to occupy the input.
-	            if (!expectedArg.inputOp) {
-	                // No editable shadow input; e.g., for a boolean.
-	                continue;
-	            }
-	            // Each shadow has a field generated for it automatically.
-	            // Value to be filled in the field.
-	            var fieldValue = providedArg;
-	            // Shadows' field names match the input name, except for these:
-	            var fieldName = expectedArg.inputName;
-	            if (expectedArg.inputOp == 'math_number' ||
-	                expectedArg.inputOp == 'math_whole_number' ||
-	                expectedArg.inputOp == 'math_positive_number' ||
-	                expectedArg.inputOp == 'math_integer' ||
-	                expectedArg.inputOp == 'math_angle') {
-	                fieldName = 'NUM';
-	                // Fields are given Scratch 2.0 default values if obscured.
-	                if (shadowObscured) {
-	                    fieldValue = 10;
-	                }
-	            } else if (expectedArg.inputOp == 'text') {
-	                fieldName = 'TEXT';
-	                if (shadowObscured) {
-	                    fieldValue = '';
-	                }
-	            } else if (expectedArg.inputOp == 'colour_picker') {
-	                // Convert SB2 color to hex.
-	                fieldValue = Color.decimalToHex(providedArg);
-	                fieldName = 'COLOUR';
-	                if (shadowObscured) {
-	                    fieldValue = '#990000';
-	                }
-	            }
-	            var fields = {};
-	            fields[fieldName] = {
-	                name: fieldName,
-	                value: fieldValue
-	            };
-	            activeBlock.children.push({
-	                id: inputUid,
-	                opcode: expectedArg.inputOp,
-	                inputs: {},
-	                fields: fields,
-	                next: null,
-	                topLevel: false,
-	                parent: activeBlock.id,
-	                shadow: true
-	            });
-	            activeBlock.inputs[expectedArg.inputName].shadow = inputUid;
-	            // If no block occupying the input, alias to the shadow.
-	            if (!activeBlock.inputs[expectedArg.inputName].block) {
-	                activeBlock.inputs[expectedArg.inputName].block = inputUid;
-	            }
-	        } else if (expectedArg.type == 'field') {
-	            // Add as a field on this block.
-	            activeBlock.fields[expectedArg.fieldName] = {
-	                name: expectedArg.fieldName,
-	                value: providedArg
-	            };
-	        }
-	    }
-	    return activeBlock;
-	}
-
-	module.exports = sb2import;
-
-
-/***/ },
-/* 35 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var adapter = __webpack_require__(36);
-	var xmlEscape = __webpack_require__(88);
-
-	/**
-	 * @fileoverview
-	 * Store and mutate the VM block representation,
-	 * and handle updates from Scratch Blocks events.
-	 */
-
-	function Blocks () {
-	    /**
-	     * All blocks in the workspace.
-	     * Keys are block IDs, values are metadata about the block.
-	     * @type {Object.<string, Object>}
-	     */
-	    this._blocks = {};
-
-	    /**
-	     * All top-level scripts in the workspace.
-	     * A list of block IDs that represent scripts (i.e., first block in script).
-	     * @type {Array.<String>}
-	     */
-	    this._scripts = [];
-	}
-
-	/**
-	 * Blockly inputs that represent statements/branch.
-	 * are prefixed with this string.
-	 * @const{string}
-	 */
-	Blocks.BRANCH_INPUT_PREFIX = 'SUBSTACK';
-
-	/**
-	 * Provide an object with metadata for the requested block ID.
-	 * @param {!string} blockId ID of block we have stored.
-	 * @return {?Object} Metadata about the block, if it exists.
-	 */
-	Blocks.prototype.getBlock = function (blockId) {
-	    return this._blocks[blockId];
-	};
-
-	/**
-	 * Get all known top-level blocks that start scripts.
-	 * @return {Array.<string>} List of block IDs.
-	 */
-	Blocks.prototype.getScripts = function () {
-	    return this._scripts;
-	};
-
-	 /**
-	  * Get the next block for a particular block
-	  * @param {?string} id ID of block to get the next block for
-	  * @return {?string} ID of next block in the sequence
-	  */
-	Blocks.prototype.getNextBlock = function (id) {
-	    if (typeof this._blocks[id] === 'undefined') return null;
-	    return this._blocks[id].next;
-	};
-
-	/**
-	 * Get the branch for a particular C-shaped block.
-	 * @param {?string} id ID for block to get the branch for.
-	 * @param {?number} branchNum Which branch to select (e.g. for if-else).
-	 * @return {?string} ID of block in the branch.
-	 */
-	Blocks.prototype.getBranch = function (id, branchNum) {
-	    var block = this._blocks[id];
-	    if (typeof block === 'undefined') return null;
-	    if (!branchNum) branchNum = 1;
-
-	    var inputName = Blocks.BRANCH_INPUT_PREFIX;
-	    if (branchNum > 1) {
-	        inputName += branchNum;
-	    }
-
-	    // Empty C-block?
-	    if (!(inputName in block.inputs)) return null;
-	    return block.inputs[inputName].block;
-	};
-
-	/**
-	 * Get the opcode for a particular block
-	 * @param {?string} id ID of block to query
-	 * @return {?string} the opcode corresponding to that block
-	 */
-	Blocks.prototype.getOpcode = function (id) {
-	    if (typeof this._blocks[id] === 'undefined') return null;
-	    return this._blocks[id].opcode;
-	};
-
-	/**
-	 * Get all fields and their values for a block.
-	 * @param {?string} id ID of block to query.
-	 * @return {!Object} All fields and their values.
-	 */
-	Blocks.prototype.getFields = function (id) {
-	    if (typeof this._blocks[id] === 'undefined') return null;
-	    return this._blocks[id].fields;
-	};
-
-	/**
-	 * Get all non-branch inputs for a block.
-	 * @param {?string} id ID of block to query.
-	 * @return {!Object} All non-branch inputs and their associated blocks.
-	 */
-	Blocks.prototype.getInputs = function (id) {
-	    if (typeof this._blocks[id] === 'undefined') return null;
-	    var inputs = {};
-	    for (var input in this._blocks[id].inputs) {
-	        // Ignore blocks prefixed with branch prefix.
-	        if (input.substring(0, Blocks.BRANCH_INPUT_PREFIX.length)
-	            != Blocks.BRANCH_INPUT_PREFIX) {
-	            inputs[input] = this._blocks[id].inputs[input];
-	        }
-	    }
-	    return inputs;
-	};
-
-	/**
-	 * Get the top-level script for a given block.
-	 * @param {?string} id ID of block to query.
-	 * @return {?string} ID of top-level script block.
-	 */
-	Blocks.prototype.getTopLevelScript = function (id) {
-	    if (typeof this._blocks[id] === 'undefined') return null;
-	    var block = this._blocks[id];
-	    while (block.parent !== null) {
-	        block = this._blocks[block.parent];
-	    }
-	    return block.id;
-	};
-
-	// ---------------------------------------------------------------------
-
-	/**
-	 * Create event listener for blocks. Handles validation and serves as a generic
-	 * adapter between the blocks and the runtime interface.
-	 * @param {Object} e Blockly "block" event
-	 * @param {boolean} isFlyout If true, create a listener for flyout events.
-	 * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
-	 */
-
-	Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
-	    // Validate event
-	    if (typeof e !== 'object') return;
-	    if (typeof e.blockId !== 'string') return;
-
-	    // UI event: clicked scripts toggle in the runtime.
-	    if (e.element === 'stackclick') {
-	        if (opt_runtime) {
-	            opt_runtime.toggleScript(e.blockId);
-	        }
-	        return;
-	    }
-
-	    // Block create/update/destroy
-	    switch (e.type) {
-	    case 'create':
-	        var newBlocks = adapter(e);
-	        // A create event can create many blocks. Add them all.
-	        for (var i = 0; i < newBlocks.length; i++) {
-	            this.createBlock(newBlocks[i], isFlyout);
-	        }
-	        break;
-	    case 'change':
-	        this.changeBlock({
-	            id: e.blockId,
-	            element: e.element,
-	            name: e.name,
-	            value: e.newValue
-	        });
-	        break;
-	    case 'move':
-	        this.moveBlock({
-	            id: e.blockId,
-	            oldParent: e.oldParentId,
-	            oldInput: e.oldInputName,
-	            newParent: e.newParentId,
-	            newInput: e.newInputName,
-	            newCoordinate: e.newCoordinate
-	        });
-	        break;
-	    case 'delete':
-	        // Don't accept delete events for shadow blocks being obscured.
-	        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
-	        });
-	        break;
-	    }
-	};
-
-	// ---------------------------------------------------------------------
-
-	/**
-	 * Block management: create blocks and scripts from a `create` event
-	 * @param {!Object} block Blockly create event to be processed
-	 * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
-	 */
-	Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
-	    // Does the block already exist?
-	    // Could happen, e.g., for an unobscured shadow.
-	    if (this._blocks.hasOwnProperty(block.id)) {
-	        return;
-	    }
-	    // Create new block.
-	    this._blocks[block.id] = block;
-	    // Push block id to scripts array.
-	    // Blocks are added as a top-level stack if they are marked as a top-block
-	    // (if they were top-level XML in the event) and if they are not
-	    // flyout blocks.
-	    if (!opt_isFlyoutBlock && block.topLevel) {
-	        this._addScript(block.id);
-	    }
-	};
-
-	/**
-	 * Block management: change block field values
-	 * @param {!Object} args Blockly change event to be processed
-	 */
-	Blocks.prototype.changeBlock = function (args) {
-	    // Validate
-	    if (args.element !== 'field') return;
-	    if (typeof this._blocks[args.id] === 'undefined') return;
-	    if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
-
-	    // Update block value
-	    this._blocks[args.id].fields[args.name].value = args.value;
-	};
-
-	/**
-	 * Block management: move blocks from parent to parent
-	 * @param {!Object} e Blockly move event to be processed
-	 */
-	Blocks.prototype.moveBlock = function (e) {
-	    // Move coordinate changes.
-	    if (e.newCoordinate) {
-	        this._blocks[e.id].x = e.newCoordinate.x;
-	        this._blocks[e.id].y = e.newCoordinate.y;
-	    }
-
-	    // Remove from any old parent.
-	    if (e.oldParent !== undefined) {
-	        var oldParent = this._blocks[e.oldParent];
-	        if (e.oldInput !== undefined &&
-	            oldParent.inputs[e.oldInput].block === e.id) {
-	            // This block was connected to the old parent's input.
-	            oldParent.inputs[e.oldInput].block = null;
-	        } else if (oldParent.next === e.id) {
-	            // This block was connected to the old parent's next connection.
-	            oldParent.next = null;
-	        }
-	        this._blocks[e.id].parent = null;
-	    }
-
-	    // Has the block become a top-level block?
-	    if (e.newParent === undefined) {
-	        this._addScript(e.id);
-	    } else {
-	        // Remove script, if one exists.
-	        this._deleteScript(e.id);
-	        // Otherwise, try to connect it in its new place.
-	        if (e.newInput !== undefined) {
-	            // Moved to the new parent's input.
-	            // Don't obscure the shadow block.
-	            var oldShadow = null;
-	            if (this._blocks[e.newParent].inputs.hasOwnProperty(e.newInput)) {
-	                oldShadow = this._blocks[e.newParent].inputs[e.newInput].shadow;
-	            }
-	            this._blocks[e.newParent].inputs[e.newInput] = {
-	                name: e.newInput,
-	                block: e.id,
-	                shadow: oldShadow
-	            };
-	        } else {
-	            // Moved to the new parent's next connection.
-	            this._blocks[e.newParent].next = e.id;
-	        }
-	        this._blocks[e.id].parent = e.newParent;
-	    }
-	};
-
-	/**
-	 * Block management: delete blocks and their associated scripts.
-	 * @param {!Object} e Blockly delete event to be processed.
-	 */
-	Blocks.prototype.deleteBlock = function (e) {
-	    // @todo In runtime, stop threads running on this script.
-
-	    // Get block
-	    var block = this._blocks[e.id];
-
-	    // Delete children
-	    if (block.next !== null) {
-	        this.deleteBlock({id: block.next});
-	    }
-
-	    // Delete inputs (including branches)
-	    for (var input in block.inputs) {
-	        // If it's null, the block in this input moved away.
-	        if (block.inputs[input].block !== null) {
-	            this.deleteBlock({id: block.inputs[input].block});
-	        }
-	        // Delete obscured shadow blocks.
-	        if (block.inputs[input].shadow !== null &&
-	            block.inputs[input].shadow !== block.inputs[input].block) {
-	            this.deleteBlock({id: block.inputs[input].shadow});
-	        }
-	    }
-
-	    // Delete any script starting with this block.
-	    this._deleteScript(e.id);
-
-	    // Delete block itself.
-	    delete this._blocks[e.id];
-	};
-
-	// ---------------------------------------------------------------------
-
-	/**
-	 * Encode all of `this._blocks` as an XML string usable
-	 * by a Blockly/scratch-blocks workspace.
-	 * @return {string} String of XML representing this object's blocks.
-	 */
-	Blocks.prototype.toXML = function () {
-	    var xmlString = '<xml xmlns="http://www.w3.org/1999/xhtml">';
-	    for (var i = 0; i < this._scripts.length; i++) {
-	        xmlString += this.blockToXML(this._scripts[i]);
-	    }
-	    return xmlString + '</xml>';
-	};
-
-	/**
-	 * Recursively encode an individual block and its children
-	 * into a Blockly/scratch-blocks XML string.
-	 * @param {!string} blockId ID of block to encode.
-	 * @return {string} String of XML representing this block and any children.
-	 */
-	Blocks.prototype.blockToXML = function (blockId) {
-	    var block = this._blocks[blockId];
-	    // Encode properties of this block.
-	    var tagName = (block.shadow) ? 'shadow' : 'block';
-	    var xy = (block.topLevel) ?
-	        ' x="' + block.x +'"' + ' y="' + block.y +'"' :
-	        '';
-	    var xmlString = '';
-	    xmlString += '<' + tagName +
-	        ' id="' + block.id + '"' +
-	        ' type="' + block.opcode + '"' +
-	        xy +
-	        '>';
-	    // Add any inputs on this block.
-	    for (var input in block.inputs) {
-	        var blockInput = block.inputs[input];
-	        // Only encode a value tag if the value input is occupied.
-	        if (blockInput.block || blockInput.shadow) {
-	            xmlString += '<value name="' + blockInput.name + '">';
-	            if (blockInput.block) {
-	                xmlString += this.blockToXML(blockInput.block);
-	            }
-	            if (blockInput.shadow && blockInput.shadow != blockInput.block) {
-	                // Obscured shadow.
-	                xmlString += this.blockToXML(blockInput.shadow);
-	            }
-	            xmlString += '</value>';
-	        }
-	    }
-	    // 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 += '<field name="' + blockField.name + '">' +
-	            value + '</field>';
-	    }
-	    // Add blocks connected to the next connection.
-	    if (block.next) {
-	        xmlString += '<next>' + this.blockToXML(block.next) + '</next>';
-	    }
-	    xmlString += '</' + tagName + '>';
-	    return xmlString;
-	};
-
-	// ---------------------------------------------------------------------
-
-	/**
-	 * Helper to add a stack to `this._scripts`.
-	 * @param {?string} topBlockId ID of block that starts the script.
-	 */
-	Blocks.prototype._addScript = function (topBlockId) {
-	    var i = this._scripts.indexOf(topBlockId);
-	    if (i > -1) return; // Already in scripts.
-	    this._scripts.push(topBlockId);
-	    // Update `topLevel` property on the top block.
-	    this._blocks[topBlockId].topLevel = true;
-	};
-
-	/**
-	 * Helper to remove a script from `this._scripts`.
-	 * @param {?string} topBlockId ID of block that starts the script.
-	 */
-	Blocks.prototype._deleteScript = function (topBlockId) {
-	    var i = this._scripts.indexOf(topBlockId);
-	    if (i > -1) this._scripts.splice(i, 1);
-	    // Update `topLevel` property on the top block.
-	    if (this._blocks[topBlockId]) this._blocks[topBlockId].topLevel = false;
-	};
-
-	module.exports = Blocks;
-
-
-/***/ },
-/* 36 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var html = __webpack_require__(37);
-
-	/**
-	 * Adapter between block creation events and block representation which can be
-	 * used by the Scratch runtime.
-	 * @param {Object} e `Blockly.events.create`
-	 * @return {Array.<Object>} List of blocks from this CREATE event.
-	 */
-	module.exports = function (e) {
-	    // Validate input
-	    if (typeof e !== 'object') return;
-	    if (typeof e.xml !== 'object') return;
-
-	    return domToBlocks(html.parseDOM(e.xml.outerHTML));
-	};
-
-	/**
-	 * Convert outer blocks DOM from a Blockly CREATE event
-	 * to a usable form for the Scratch runtime.
-	 * This structure is based on Blockly xml.js:`domToWorkspace` and `domToBlock`.
-	 * @param {Element} blocksDOM DOM tree for this event.
-	 * @return {Array.<Object>} Usable list of blocks from this CREATE event.
-	 */
-	function domToBlocks (blocksDOM) {
-	    // At this level, there could be multiple blocks adjacent in the DOM tree.
-	    var blocks = {};
-	    for (var i = 0; i < blocksDOM.length; i++) {
-	        var block = blocksDOM[i];
-	        if (!block.name || !block.attribs) {
-	            continue;
-	        }
-	        var tagName = block.name.toLowerCase();
-	        if (tagName == 'block' || tagName == 'shadow') {
-	            domToBlock(block, blocks, true, null);
-	        }
-	    }
-	    // Flatten blocks object into a list.
-	    var blocksList = [];
-	    for (var b in blocks) {
-	        blocksList.push(blocks[b]);
-	    }
-	    return blocksList;
-	}
-
-	/**
-	 * Convert and an individual block DOM to the representation tree.
-	 * Based on Blockly's `domToBlockHeadless_`.
-	 * @param {Element} blockDOM DOM tree for an individual block.
-	 * @param {Object} blocks Collection of blocks to add to.
-	 * @param {Boolean} isTopBlock Whether blocks at this level are "top blocks."
-	 * @param {?string} parent Parent block ID.
-	 */
-	function domToBlock (blockDOM, blocks, isTopBlock, parent) {
-	    // Block skeleton.
-	    var block = {
-	        id: blockDOM.attribs.id, // Block ID
-	        opcode: blockDOM.attribs.type, // For execution, "event_whengreenflag".
-	        inputs: {}, // Inputs to this block and the blocks they point to.
-	        fields: {}, // Fields on this block and their values.
-	        next: null, // Next block in the stack, if one exists.
-	        topLevel: isTopBlock, // If this block starts a stack.
-	        parent: parent, // Parent block ID, if available.
-	        shadow: blockDOM.name == 'shadow', // If this represents a shadow/slot.
-	        x: blockDOM.attribs.x, // X position of script, if top-level.
-	        y: blockDOM.attribs.y // Y position of script, if top-level.
-	    };
-
-	    // Add the block to the representation tree.
-	    blocks[block.id] = block;
-
-	    // Process XML children and find enclosed blocks, fields, etc.
-	    for (var i = 0; i < blockDOM.children.length; i++) {
-	        var xmlChild = blockDOM.children[i];
-	        // Enclosed blocks and shadows
-	        var childBlockNode = null;
-	        var childShadowNode = null;
-	        for (var j = 0; j < xmlChild.children.length; j++) {
-	            var grandChildNode = xmlChild.children[j];
-	            if (!grandChildNode.name) {
-	                // Non-XML tag node.
-	                continue;
-	            }
-	            var grandChildNodeName = grandChildNode.name.toLowerCase();
-	            if (grandChildNodeName == 'block') {
-	                childBlockNode = grandChildNode;
-	            } else if (grandChildNodeName == 'shadow') {
-	                childShadowNode = grandChildNode;
-	            }
-	        }
-
-	        // Use shadow block only if there's no real block node.
-	        if (!childBlockNode && childShadowNode) {
-	            childBlockNode = childShadowNode;
-	        }
-
-	        // Not all Blockly-type blocks are handled here,
-	        // as we won't be using all of them for Scratch.
-	        switch (xmlChild.name.toLowerCase()) {
-	        case 'field':
-	            // Add the field to this block.
-	            var fieldName = xmlChild.attribs.name;
-	            var fieldData = '';
-	            if (xmlChild.children.length > 0 && xmlChild.children[0].data) {
-	                fieldData = xmlChild.children[0].data;
-	            } else {
-	                // If the child of the field with a data property
-	                // doesn't exist, set the data to an empty string.
-	                fieldData = '';
-	            }
-	            block.fields[fieldName] = {
-	                name: fieldName,
-	                value: fieldData
-	            };
-	            break;
-	        case 'value':
-	        case 'statement':
-	            // Recursively generate block structure for input block.
-	            domToBlock(childBlockNode, blocks, false, block.id);
-	            if (childShadowNode && childBlockNode != childShadowNode) {
-	                // Also generate the shadow block.
-	                domToBlock(childShadowNode, blocks, false, block.id);
-	            }
-	            // Link this block's input to the child block.
-	            var inputName = xmlChild.attribs.name;
-	            block.inputs[inputName] = {
-	                name: inputName,
-	                block: childBlockNode.attribs.id,
-	                shadow: childShadowNode ? childShadowNode.attribs.id : null
-	            };
-	            break;
-	        case 'next':
-	            if (!childBlockNode || !childBlockNode.attribs) {
-	                // Invalid child block.
-	                continue;
-	            }
-	            // Recursively generate block structure for next block.
-	            domToBlock(childBlockNode, blocks, false, block.id);
-	            // Link next block to this block.
-	            block.next = childBlockNode.attribs.id;
-	            break;
-	        }
-	    }
-	}
-
-
-/***/ },
-/* 37 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Parser = __webpack_require__(38),
-	    DomHandler = __webpack_require__(45);
-
-	function defineProp(name, value){
-		delete module.exports[name];
-		module.exports[name] = value;
-		return value;
-	}
-
-	module.exports = {
-		Parser: Parser,
-		Tokenizer: __webpack_require__(39),
-		ElementType: __webpack_require__(46),
-		DomHandler: DomHandler,
-		get FeedHandler(){
-			return defineProp("FeedHandler", __webpack_require__(49));
-		},
-		get Stream(){
-			return defineProp("Stream", __webpack_require__(50));
-		},
-		get WritableStream(){
-			return defineProp("WritableStream", __webpack_require__(51));
-		},
-		get ProxyHandler(){
-			return defineProp("ProxyHandler", __webpack_require__(74));
-		},
-		get DomUtils(){
-			return defineProp("DomUtils", __webpack_require__(75));
-		},
-		get CollectingHandler(){
-			return defineProp("CollectingHandler", __webpack_require__(87));
-		},
-		// For legacy support
-		DefaultHandler: DomHandler,
-		get RssHandler(){
-			return defineProp("RssHandler", this.FeedHandler);
-		},
-		//helper methods
-		parseDOM: function(data, options){
-			var handler = new DomHandler(options);
-			new Parser(handler, options).end(data);
-			return handler.dom;
-		},
-		parseFeed: function(feed, options){
-			var handler = new module.exports.FeedHandler(options);
-			new Parser(handler, options).end(feed);
-			return handler.dom;
-		},
-		createDomStream: function(cb, options, elementCb){
-			var handler = new DomHandler(cb, options, elementCb);
-			return new Parser(handler, options);
-		},
-		// List of all events that the parser emits
-		EVENTS: { /* Format: eventname: number of arguments */
-			attribute: 2,
-			cdatastart: 0,
-			cdataend: 0,
-			text: 1,
-			processinginstruction: 2,
-			comment: 1,
-			commentend: 0,
-			closetag: 1,
-			opentag: 2,
-			opentagname: 1,
-			error: 1,
-			end: 0
-		}
-	};
-
-
-/***/ },
-/* 38 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Tokenizer = __webpack_require__(39);
-
-	/*
-		Options:
-
-		xmlMode: Disables the special behavior for script/style tags (false by default)
-		lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`)
-		lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`)
-	*/
-
-	/*
-		Callbacks:
-
-		oncdataend,
-		oncdatastart,
-		onclosetag,
-		oncomment,
-		oncommentend,
-		onerror,
-		onopentag,
-		onprocessinginstruction,
-		onreset,
-		ontext
-	*/
-
-	var formTags = {
-		input: true,
-		option: true,
-		optgroup: true,
-		select: true,
-		button: true,
-		datalist: true,
-		textarea: true
-	};
-
-	var openImpliesClose = {
-		tr      : { tr:true, th:true, td:true },
-		th      : { th:true },
-		td      : { thead:true, th:true, td:true },
-		body    : { head:true, link:true, script:true },
-		li      : { li:true },
-		p       : { p:true },
-		h1      : { p:true },
-		h2      : { p:true },
-		h3      : { p:true },
-		h4      : { p:true },
-		h5      : { p:true },
-		h6      : { p:true },
-		select  : formTags,
-		input   : formTags,
-		output  : formTags,
-		button  : formTags,
-		datalist: formTags,
-		textarea: formTags,
-		option  : { option:true },
-		optgroup: { optgroup:true }
-	};
-
-	var voidElements = {
-		__proto__: null,
-		area: true,
-		base: true,
-		basefont: true,
-		br: true,
-		col: true,
-		command: true,
-		embed: true,
-		frame: true,
-		hr: true,
-		img: true,
-		input: true,
-		isindex: true,
-		keygen: true,
-		link: true,
-		meta: true,
-		param: true,
-		source: true,
-		track: true,
-		wbr: true,
-
-		//common self closing svg elements
-		path: true,
-		circle: true,
-		ellipse: true,
-		line: true,
-		rect: true,
-		use: true,
-		stop: true,
-		polyline: true,
-		polygon: true
-	};
-
-	var re_nameEnd = /\s|\//;
-
-	function Parser(cbs, options){
-		this._options = options || {};
-		this._cbs = cbs || {};
-
-		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;
-		if(!!this._options.Tokenizer) {
-			Tokenizer = this._options.Tokenizer;
-		}
-		this._tokenizer = new Tokenizer(this._options, this);
-
-		if(this._cbs.onparserinit) this._cbs.onparserinit(this);
-	}
-
-	__webpack_require__(3).inherits(Parser, __webpack_require__(2).EventEmitter);
-
-	Parser.prototype._updatePosition = function(initialOffset){
-		if(this.endIndex === null){
-			if(this._tokenizer._sectionStart <= initialOffset){
-				this.startIndex = 0;
-			} else {
-				this.startIndex = this._tokenizer._sectionStart - initialOffset;
-			}
-		}
-		else this.startIndex = this.endIndex + 1;
-		this.endIndex = this._tokenizer.getAbsoluteIndex();
-	};
-
-	//Tokenizer event handlers
-	Parser.prototype.ontext = function(data){
-		this._updatePosition(1);
-		this.endIndex--;
-
-		if(this._cbs.ontext) this._cbs.ontext(data);
-	};
-
-	Parser.prototype.onopentagname = function(name){
-		if(this._lowerCaseTagNames){
-			name = name.toLowerCase();
-		}
-
-		this._tagname = name;
-
-		if(!this._options.xmlMode && name in openImpliesClose) {
-			for(
-				var el;
-				(el = this._stack[this._stack.length - 1]) in openImpliesClose[name];
-				this.onclosetag(el)
-			);
-		}
-
-		if(this._options.xmlMode || !(name in voidElements)){
-			this._stack.push(name);
-		}
-
-		if(this._cbs.onopentagname) this._cbs.onopentagname(name);
-		if(this._cbs.onopentag) this._attribs = {};
-	};
-
-	Parser.prototype.onopentagend = function(){
-		this._updatePosition(1);
-
-		if(this._attribs){
-			if(this._cbs.onopentag) this._cbs.onopentag(this._tagname, this._attribs);
-			this._attribs = null;
-		}
-
-		if(!this._options.xmlMode && this._cbs.onclosetag && this._tagname in voidElements){
-			this._cbs.onclosetag(this._tagname);
-		}
-
-		this._tagname = "";
-	};
-
-	Parser.prototype.onclosetag = function(name){
-		this._updatePosition(1);
-
-		if(this._lowerCaseTagNames){
-			name = name.toLowerCase();
-		}
-
-		if(this._stack.length && (!(name in voidElements) || this._options.xmlMode)){
-			var pos = this._stack.lastIndexOf(name);
-			if(pos !== -1){
-				if(this._cbs.onclosetag){
-					pos = this._stack.length - pos;
-					while(pos--) this._cbs.onclosetag(this._stack.pop());
-				}
-				else this._stack.length = pos;
-			} else if(name === "p" && !this._options.xmlMode){
-				this.onopentagname(name);
-				this._closeCurrentTag();
-			}
-		} else if(!this._options.xmlMode && (name === "br" || name === "p")){
-			this.onopentagname(name);
-			this._closeCurrentTag();
-		}
-	};
-
-	Parser.prototype.onselfclosingtag = function(){
-		if(this._options.xmlMode || this._options.recognizeSelfClosing){
-			this._closeCurrentTag();
-		} else {
-			this.onopentagend();
-		}
-	};
-
-	Parser.prototype._closeCurrentTag = function(){
-		var name = this._tagname;
-
-		this.onopentagend();
-
-		//self-closing tags will be on the top of the stack
-		//(cheaper check than in onclosetag)
-		if(this._stack[this._stack.length - 1] === name){
-			if(this._cbs.onclosetag){
-				this._cbs.onclosetag(name);
-			}
-			this._stack.pop();
-		}
-	};
-
-	Parser.prototype.onattribname = function(name){
-		if(this._lowerCaseAttributeNames){
-			name = name.toLowerCase();
-		}
-		this._attribname = name;
-	};
-
-	Parser.prototype.onattribdata = function(value){
-		this._attribvalue += value;
-	};
-
-	Parser.prototype.onattribend = function(){
-		if(this._cbs.onattribute) this._cbs.onattribute(this._attribname, this._attribvalue);
-		if(
-			this._attribs &&
-			!Object.prototype.hasOwnProperty.call(this._attribs, this._attribname)
-		){
-			this._attribs[this._attribname] = this._attribvalue;
-		}
-		this._attribname = "";
-		this._attribvalue = "";
-	};
-
-	Parser.prototype._getInstructionName = function(value){
-		var idx = value.search(re_nameEnd),
-		    name = idx < 0 ? value : value.substr(0, idx);
-
-		if(this._lowerCaseTagNames){
-			name = name.toLowerCase();
-		}
-
-		return name;
-	};
-
-	Parser.prototype.ondeclaration = function(value){
-		if(this._cbs.onprocessinginstruction){
-			var name = this._getInstructionName(value);
-			this._cbs.onprocessinginstruction("!" + name, "!" + value);
-		}
-	};
-
-	Parser.prototype.onprocessinginstruction = function(value){
-		if(this._cbs.onprocessinginstruction){
-			var name = this._getInstructionName(value);
-			this._cbs.onprocessinginstruction("?" + name, "?" + value);
-		}
-	};
-
-	Parser.prototype.oncomment = function(value){
-		this._updatePosition(4);
-
-		if(this._cbs.oncomment) this._cbs.oncomment(value);
-		if(this._cbs.oncommentend) this._cbs.oncommentend();
-	};
-
-	Parser.prototype.oncdata = function(value){
-		this._updatePosition(1);
-
-		if(this._options.xmlMode || this._options.recognizeCDATA){
-			if(this._cbs.oncdatastart) this._cbs.oncdatastart();
-			if(this._cbs.ontext) this._cbs.ontext(value);
-			if(this._cbs.oncdataend) this._cbs.oncdataend();
-		} else {
-			this.oncomment("[CDATA[" + value + "]]");
-		}
-	};
-
-	Parser.prototype.onerror = function(err){
-		if(this._cbs.onerror) this._cbs.onerror(err);
-	};
-
-	Parser.prototype.onend = function(){
-		if(this._cbs.onclosetag){
-			for(
-				var i = this._stack.length;
-				i > 0;
-				this._cbs.onclosetag(this._stack[--i])
-			);
-		}
-		if(this._cbs.onend) this._cbs.onend();
-	};
-
-
-	//Resets the parser to a blank state, ready to parse a new HTML document
-	Parser.prototype.reset = function(){
-		if(this._cbs.onreset) this._cbs.onreset();
-		this._tokenizer.reset();
-
-		this._tagname = "";
-		this._attribname = "";
-		this._attribs = null;
-		this._stack = [];
-
-		if(this._cbs.onparserinit) this._cbs.onparserinit(this);
-	};
-
-	//Parses a complete HTML document and pushes it to the handler
-	Parser.prototype.parseComplete = function(data){
-		this.reset();
-		this.end(data);
-	};
-
-	Parser.prototype.write = function(chunk){
-		this._tokenizer.write(chunk);
-	};
-
-	Parser.prototype.end = function(chunk){
-		this._tokenizer.end(chunk);
-	};
-
-	Parser.prototype.pause = function(){
-		this._tokenizer.pause();
-	};
-
-	Parser.prototype.resume = function(){
-		this._tokenizer.resume();
-	};
-
-	//alias for backwards compat
-	Parser.prototype.parseChunk = Parser.prototype.write;
-	Parser.prototype.done = Parser.prototype.end;
-
-	module.exports = Parser;
-
-
-/***/ },
-/* 39 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = Tokenizer;
-
-	var decodeCodePoint = __webpack_require__(40),
-	    entityMap = __webpack_require__(42),
-	    legacyMap = __webpack_require__(43),
-	    xmlMap    = __webpack_require__(44),
-
-	    i = 0,
-
-	    TEXT                      = i++,
-	    BEFORE_TAG_NAME           = i++, //after <
-	    IN_TAG_NAME               = i++,
-	    IN_SELF_CLOSING_TAG       = i++,
-	    BEFORE_CLOSING_TAG_NAME   = i++,
-	    IN_CLOSING_TAG_NAME       = i++,
-	    AFTER_CLOSING_TAG_NAME    = i++,
-
-	    //attributes
-	    BEFORE_ATTRIBUTE_NAME     = i++,
-	    IN_ATTRIBUTE_NAME         = i++,
-	    AFTER_ATTRIBUTE_NAME      = i++,
-	    BEFORE_ATTRIBUTE_VALUE    = i++,
-	    IN_ATTRIBUTE_VALUE_DQ     = i++, // "
-	    IN_ATTRIBUTE_VALUE_SQ     = i++, // '
-	    IN_ATTRIBUTE_VALUE_NQ     = i++,
-
-	    //declarations
-	    BEFORE_DECLARATION        = i++, // !
-	    IN_DECLARATION            = i++,
-
-	    //processing instructions
-	    IN_PROCESSING_INSTRUCTION = i++, // ?
-
-	    //comments
-	    BEFORE_COMMENT            = i++,
-	    IN_COMMENT                = i++,
-	    AFTER_COMMENT_1           = i++,
-	    AFTER_COMMENT_2           = i++,
-
-	    //cdata
-	    BEFORE_CDATA_1            = i++, // [
-	    BEFORE_CDATA_2            = i++, // C
-	    BEFORE_CDATA_3            = i++, // D
-	    BEFORE_CDATA_4            = i++, // A
-	    BEFORE_CDATA_5            = i++, // T
-	    BEFORE_CDATA_6            = i++, // A
-	    IN_CDATA                  = i++, // [
-	    AFTER_CDATA_1             = i++, // ]
-	    AFTER_CDATA_2             = i++, // ]
-
-	    //special tags
-	    BEFORE_SPECIAL            = i++, //S
-	    BEFORE_SPECIAL_END        = i++,   //S
-
-	    BEFORE_SCRIPT_1           = i++, //C
-	    BEFORE_SCRIPT_2           = i++, //R
-	    BEFORE_SCRIPT_3           = i++, //I
-	    BEFORE_SCRIPT_4           = i++, //P
-	    BEFORE_SCRIPT_5           = i++, //T
-	    AFTER_SCRIPT_1            = i++, //C
-	    AFTER_SCRIPT_2            = i++, //R
-	    AFTER_SCRIPT_3            = i++, //I
-	    AFTER_SCRIPT_4            = i++, //P
-	    AFTER_SCRIPT_5            = i++, //T
-
-	    BEFORE_STYLE_1            = i++, //T
-	    BEFORE_STYLE_2            = i++, //Y
-	    BEFORE_STYLE_3            = i++, //L
-	    BEFORE_STYLE_4            = i++, //E
-	    AFTER_STYLE_1             = i++, //T
-	    AFTER_STYLE_2             = i++, //Y
-	    AFTER_STYLE_3             = i++, //L
-	    AFTER_STYLE_4             = i++, //E
-
-	    BEFORE_ENTITY             = i++, //&
-	    BEFORE_NUMERIC_ENTITY     = i++, //#
-	    IN_NAMED_ENTITY           = i++,
-	    IN_NUMERIC_ENTITY         = i++,
-	    IN_HEX_ENTITY             = i++, //X
-
-	    j = 0,
-
-	    SPECIAL_NONE              = j++,
-	    SPECIAL_SCRIPT            = j++,
-	    SPECIAL_STYLE             = j++;
-
-	function whitespace(c){
-		return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
-	}
-
-	function characterState(char, SUCCESS){
-		return function(c){
-			if(c === char) this._state = SUCCESS;
-		};
-	}
-
-	function ifElseState(upper, SUCCESS, FAILURE){
-		var lower = upper.toLowerCase();
-
-		if(upper === lower){
-			return function(c){
-				if(c === lower){
-					this._state = SUCCESS;
-				} else {
-					this._state = FAILURE;
-					this._index--;
-				}
-			};
-		} else {
-			return function(c){
-				if(c === lower || c === upper){
-					this._state = SUCCESS;
-				} else {
-					this._state = FAILURE;
-					this._index--;
-				}
-			};
-		}
-	}
-
-	function consumeSpecialNameChar(upper, NEXT_STATE){
-		var lower = upper.toLowerCase();
-
-		return function(c){
-			if(c === lower || c === upper){
-				this._state = NEXT_STATE;
-			} else {
-				this._state = IN_TAG_NAME;
-				this._index--; //consume the token again
-			}
-		};
-	}
-
-	function Tokenizer(options, cbs){
-		this._state = TEXT;
-		this._buffer = "";
-		this._sectionStart = 0;
-		this._index = 0;
-		this._bufferOffset = 0; //chars removed from _buffer
-		this._baseState = TEXT;
-		this._special = SPECIAL_NONE;
-		this._cbs = cbs;
-		this._running = true;
-		this._ended = false;
-		this._xmlMode = !!(options && options.xmlMode);
-		this._decodeEntities = !!(options && options.decodeEntities);
-	}
-
-	Tokenizer.prototype._stateText = function(c){
-		if(c === "<"){
-			if(this._index > this._sectionStart){
-				this._cbs.ontext(this._getSection());
-			}
-			this._state = BEFORE_TAG_NAME;
-			this._sectionStart = this._index;
-		} else if(this._decodeEntities && this._special === SPECIAL_NONE && c === "&"){
-			if(this._index > this._sectionStart){
-				this._cbs.ontext(this._getSection());
-			}
-			this._baseState = TEXT;
-			this._state = BEFORE_ENTITY;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeTagName = function(c){
-		if(c === "/"){
-			this._state = BEFORE_CLOSING_TAG_NAME;
-		} else if(c === ">" || this._special !== SPECIAL_NONE || whitespace(c)) {
-			this._state = TEXT;
-		} else if(c === "!"){
-			this._state = BEFORE_DECLARATION;
-			this._sectionStart = this._index + 1;
-		} else if(c === "?"){
-			this._state = IN_PROCESSING_INSTRUCTION;
-			this._sectionStart = this._index + 1;
-		} else if(c === "<"){
-			this._cbs.ontext(this._getSection());
-			this._sectionStart = this._index;
-		} else {
-			this._state = (!this._xmlMode && (c === "s" || c === "S")) ?
-							BEFORE_SPECIAL : IN_TAG_NAME;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateInTagName = function(c){
-		if(c === "/" || c === ">" || whitespace(c)){
-			this._emitToken("onopentagname");
-			this._state = BEFORE_ATTRIBUTE_NAME;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeCloseingTagName = function(c){
-		if(whitespace(c));
-		else if(c === ">"){
-			this._state = TEXT;
-		} else if(this._special !== SPECIAL_NONE){
-			if(c === "s" || c === "S"){
-				this._state = BEFORE_SPECIAL_END;
-			} else {
-				this._state = TEXT;
-				this._index--;
-			}
-		} else {
-			this._state = IN_CLOSING_TAG_NAME;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateInCloseingTagName = function(c){
-		if(c === ">" || whitespace(c)){
-			this._emitToken("onclosetag");
-			this._state = AFTER_CLOSING_TAG_NAME;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateAfterCloseingTagName = function(c){
-		//skip everything until ">"
-		if(c === ">"){
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeAttributeName = function(c){
-		if(c === ">"){
-			this._cbs.onopentagend();
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		} else if(c === "/"){
-			this._state = IN_SELF_CLOSING_TAG;
-		} else if(!whitespace(c)){
-			this._state = IN_ATTRIBUTE_NAME;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateInSelfClosingTag = function(c){
-		if(c === ">"){
-			this._cbs.onselfclosingtag();
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		} else if(!whitespace(c)){
-			this._state = BEFORE_ATTRIBUTE_NAME;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateInAttributeName = function(c){
-		if(c === "=" || c === "/" || c === ">" || whitespace(c)){
-			this._cbs.onattribname(this._getSection());
-			this._sectionStart = -1;
-			this._state = AFTER_ATTRIBUTE_NAME;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateAfterAttributeName = function(c){
-		if(c === "="){
-			this._state = BEFORE_ATTRIBUTE_VALUE;
-		} else if(c === "/" || c === ">"){
-			this._cbs.onattribend();
-			this._state = BEFORE_ATTRIBUTE_NAME;
-			this._index--;
-		} else if(!whitespace(c)){
-			this._cbs.onattribend();
-			this._state = IN_ATTRIBUTE_NAME;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeAttributeValue = function(c){
-		if(c === "\""){
-			this._state = IN_ATTRIBUTE_VALUE_DQ;
-			this._sectionStart = this._index + 1;
-		} else if(c === "'"){
-			this._state = IN_ATTRIBUTE_VALUE_SQ;
-			this._sectionStart = this._index + 1;
-		} else if(!whitespace(c)){
-			this._state = IN_ATTRIBUTE_VALUE_NQ;
-			this._sectionStart = this._index;
-			this._index--; //reconsume token
-		}
-	};
-
-	Tokenizer.prototype._stateInAttributeValueDoubleQuotes = function(c){
-		if(c === "\""){
-			this._emitToken("onattribdata");
-			this._cbs.onattribend();
-			this._state = BEFORE_ATTRIBUTE_NAME;
-		} else if(this._decodeEntities && c === "&"){
-			this._emitToken("onattribdata");
-			this._baseState = this._state;
-			this._state = BEFORE_ENTITY;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateInAttributeValueSingleQuotes = function(c){
-		if(c === "'"){
-			this._emitToken("onattribdata");
-			this._cbs.onattribend();
-			this._state = BEFORE_ATTRIBUTE_NAME;
-		} else if(this._decodeEntities && c === "&"){
-			this._emitToken("onattribdata");
-			this._baseState = this._state;
-			this._state = BEFORE_ENTITY;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateInAttributeValueNoQuotes = function(c){
-		if(whitespace(c) || c === ">"){
-			this._emitToken("onattribdata");
-			this._cbs.onattribend();
-			this._state = BEFORE_ATTRIBUTE_NAME;
-			this._index--;
-		} else if(this._decodeEntities && c === "&"){
-			this._emitToken("onattribdata");
-			this._baseState = this._state;
-			this._state = BEFORE_ENTITY;
-			this._sectionStart = this._index;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeDeclaration = function(c){
-		this._state = c === "[" ? BEFORE_CDATA_1 :
-						c === "-" ? BEFORE_COMMENT :
-							IN_DECLARATION;
-	};
-
-	Tokenizer.prototype._stateInDeclaration = function(c){
-		if(c === ">"){
-			this._cbs.ondeclaration(this._getSection());
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		}
-	};
-
-	Tokenizer.prototype._stateInProcessingInstruction = function(c){
-		if(c === ">"){
-			this._cbs.onprocessinginstruction(this._getSection());
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeComment = function(c){
-		if(c === "-"){
-			this._state = IN_COMMENT;
-			this._sectionStart = this._index + 1;
-		} else {
-			this._state = IN_DECLARATION;
-		}
-	};
-
-	Tokenizer.prototype._stateInComment = function(c){
-		if(c === "-") this._state = AFTER_COMMENT_1;
-	};
-
-	Tokenizer.prototype._stateAfterComment1 = function(c){
-		if(c === "-"){
-			this._state = AFTER_COMMENT_2;
-		} else {
-			this._state = IN_COMMENT;
-		}
-	};
-
-	Tokenizer.prototype._stateAfterComment2 = function(c){
-		if(c === ">"){
-			//remove 2 trailing chars
-			this._cbs.oncomment(this._buffer.substring(this._sectionStart, this._index - 2));
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		} else if(c !== "-"){
-			this._state = IN_COMMENT;
-		}
-		// else: stay in AFTER_COMMENT_2 (`--->`)
-	};
-
-	Tokenizer.prototype._stateBeforeCdata1 = ifElseState("C", BEFORE_CDATA_2, IN_DECLARATION);
-	Tokenizer.prototype._stateBeforeCdata2 = ifElseState("D", BEFORE_CDATA_3, IN_DECLARATION);
-	Tokenizer.prototype._stateBeforeCdata3 = ifElseState("A", BEFORE_CDATA_4, IN_DECLARATION);
-	Tokenizer.prototype._stateBeforeCdata4 = ifElseState("T", BEFORE_CDATA_5, IN_DECLARATION);
-	Tokenizer.prototype._stateBeforeCdata5 = ifElseState("A", BEFORE_CDATA_6, IN_DECLARATION);
-
-	Tokenizer.prototype._stateBeforeCdata6 = function(c){
-		if(c === "["){
-			this._state = IN_CDATA;
-			this._sectionStart = this._index + 1;
-		} else {
-			this._state = IN_DECLARATION;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateInCdata = function(c){
-		if(c === "]") this._state = AFTER_CDATA_1;
-	};
-
-	Tokenizer.prototype._stateAfterCdata1 = characterState("]", AFTER_CDATA_2);
-
-	Tokenizer.prototype._stateAfterCdata2 = function(c){
-		if(c === ">"){
-			//remove 2 trailing chars
-			this._cbs.oncdata(this._buffer.substring(this._sectionStart, this._index - 2));
-			this._state = TEXT;
-			this._sectionStart = this._index + 1;
-		} else if(c !== "]") {
-			this._state = IN_CDATA;
-		}
-		//else: stay in AFTER_CDATA_2 (`]]]>`)
-	};
-
-	Tokenizer.prototype._stateBeforeSpecial = function(c){
-		if(c === "c" || c === "C"){
-			this._state = BEFORE_SCRIPT_1;
-		} else if(c === "t" || c === "T"){
-			this._state = BEFORE_STYLE_1;
-		} else {
-			this._state = IN_TAG_NAME;
-			this._index--; //consume the token again
-		}
-	};
-
-	Tokenizer.prototype._stateBeforeSpecialEnd = function(c){
-		if(this._special === SPECIAL_SCRIPT && (c === "c" || c === "C")){
-			this._state = AFTER_SCRIPT_1;
-		} else if(this._special === SPECIAL_STYLE && (c === "t" || c === "T")){
-			this._state = AFTER_STYLE_1;
-		}
-		else this._state = TEXT;
-	};
-
-	Tokenizer.prototype._stateBeforeScript1 = consumeSpecialNameChar("R", BEFORE_SCRIPT_2);
-	Tokenizer.prototype._stateBeforeScript2 = consumeSpecialNameChar("I", BEFORE_SCRIPT_3);
-	Tokenizer.prototype._stateBeforeScript3 = consumeSpecialNameChar("P", BEFORE_SCRIPT_4);
-	Tokenizer.prototype._stateBeforeScript4 = consumeSpecialNameChar("T", BEFORE_SCRIPT_5);
-
-	Tokenizer.prototype._stateBeforeScript5 = function(c){
-		if(c === "/" || c === ">" || whitespace(c)){
-			this._special = SPECIAL_SCRIPT;
-		}
-		this._state = IN_TAG_NAME;
-		this._index--; //consume the token again
-	};
-
-	Tokenizer.prototype._stateAfterScript1 = ifElseState("R", AFTER_SCRIPT_2, TEXT);
-	Tokenizer.prototype._stateAfterScript2 = ifElseState("I", AFTER_SCRIPT_3, TEXT);
-	Tokenizer.prototype._stateAfterScript3 = ifElseState("P", AFTER_SCRIPT_4, TEXT);
-	Tokenizer.prototype._stateAfterScript4 = ifElseState("T", AFTER_SCRIPT_5, TEXT);
-
-	Tokenizer.prototype._stateAfterScript5 = function(c){
-		if(c === ">" || whitespace(c)){
-			this._special = SPECIAL_NONE;
-			this._state = IN_CLOSING_TAG_NAME;
-			this._sectionStart = this._index - 6;
-			this._index--; //reconsume the token
-		}
-		else this._state = TEXT;
-	};
-
-	Tokenizer.prototype._stateBeforeStyle1 = consumeSpecialNameChar("Y", BEFORE_STYLE_2);
-	Tokenizer.prototype._stateBeforeStyle2 = consumeSpecialNameChar("L", BEFORE_STYLE_3);
-	Tokenizer.prototype._stateBeforeStyle3 = consumeSpecialNameChar("E", BEFORE_STYLE_4);
-
-	Tokenizer.prototype._stateBeforeStyle4 = function(c){
-		if(c === "/" || c === ">" || whitespace(c)){
-			this._special = SPECIAL_STYLE;
-		}
-		this._state = IN_TAG_NAME;
-		this._index--; //consume the token again
-	};
-
-	Tokenizer.prototype._stateAfterStyle1 = ifElseState("Y", AFTER_STYLE_2, TEXT);
-	Tokenizer.prototype._stateAfterStyle2 = ifElseState("L", AFTER_STYLE_3, TEXT);
-	Tokenizer.prototype._stateAfterStyle3 = ifElseState("E", AFTER_STYLE_4, TEXT);
-
-	Tokenizer.prototype._stateAfterStyle4 = function(c){
-		if(c === ">" || whitespace(c)){
-			this._special = SPECIAL_NONE;
-			this._state = IN_CLOSING_TAG_NAME;
-			this._sectionStart = this._index - 5;
-			this._index--; //reconsume the token
-		}
-		else this._state = TEXT;
-	};
-
-	Tokenizer.prototype._stateBeforeEntity = ifElseState("#", BEFORE_NUMERIC_ENTITY, IN_NAMED_ENTITY);
-	Tokenizer.prototype._stateBeforeNumericEntity = ifElseState("X", IN_HEX_ENTITY, IN_NUMERIC_ENTITY);
-
-	//for entities terminated with a semicolon
-	Tokenizer.prototype._parseNamedEntityStrict = function(){
-		//offset = 1
-		if(this._sectionStart + 1 < this._index){
-			var entity = this._buffer.substring(this._sectionStart + 1, this._index),
-			    map = this._xmlMode ? xmlMap : entityMap;
-
-			if(map.hasOwnProperty(entity)){
-				this._emitPartial(map[entity]);
-				this._sectionStart = this._index + 1;
-			}
-		}
-	};
-
-
-	//parses legacy entities (without trailing semicolon)
-	Tokenizer.prototype._parseLegacyEntity = function(){
-		var start = this._sectionStart + 1,
-		    limit = this._index - start;
-
-		if(limit > 6) limit = 6; //the max length of legacy entities is 6
-
-		while(limit >= 2){ //the min length of legacy entities is 2
-			var entity = this._buffer.substr(start, limit);
-
-			if(legacyMap.hasOwnProperty(entity)){
-				this._emitPartial(legacyMap[entity]);
-				this._sectionStart += limit + 1;
-				return;
-			} else {
-				limit--;
-			}
-		}
-	};
-
-	Tokenizer.prototype._stateInNamedEntity = function(c){
-		if(c === ";"){
-			this._parseNamedEntityStrict();
-			if(this._sectionStart + 1 < this._index && !this._xmlMode){
-				this._parseLegacyEntity();
-			}
-			this._state = this._baseState;
-		} else if((c < "a" || c > "z") && (c < "A" || c > "Z") && (c < "0" || c > "9")){
-			if(this._xmlMode);
-			else if(this._sectionStart + 1 === this._index);
-			else if(this._baseState !== TEXT){
-				if(c !== "="){
-					this._parseNamedEntityStrict();
-				}
-			} else {
-				this._parseLegacyEntity();
-			}
-
-			this._state = this._baseState;
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._decodeNumericEntity = function(offset, base){
-		var sectionStart = this._sectionStart + offset;
-
-		if(sectionStart !== this._index){
-			//parse entity
-			var entity = this._buffer.substring(sectionStart, this._index);
-			var parsed = parseInt(entity, base);
-
-			this._emitPartial(decodeCodePoint(parsed));
-			this._sectionStart = this._index;
-		} else {
-			this._sectionStart--;
-		}
-
-		this._state = this._baseState;
-	};
-
-	Tokenizer.prototype._stateInNumericEntity = function(c){
-		if(c === ";"){
-			this._decodeNumericEntity(2, 10);
-			this._sectionStart++;
-		} else if(c < "0" || c > "9"){
-			if(!this._xmlMode){
-				this._decodeNumericEntity(2, 10);
-			} else {
-				this._state = this._baseState;
-			}
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._stateInHexEntity = function(c){
-		if(c === ";"){
-			this._decodeNumericEntity(3, 16);
-			this._sectionStart++;
-		} else if((c < "a" || c > "f") && (c < "A" || c > "F") && (c < "0" || c > "9")){
-			if(!this._xmlMode){
-				this._decodeNumericEntity(3, 16);
-			} else {
-				this._state = this._baseState;
-			}
-			this._index--;
-		}
-	};
-
-	Tokenizer.prototype._cleanup = function (){
-		if(this._sectionStart < 0){
-			this._buffer = "";
-			this._index = 0;
-			this._bufferOffset += this._index;
-		} else if(this._running){
-			if(this._state === TEXT){
-				if(this._sectionStart !== this._index){
-					this._cbs.ontext(this._buffer.substr(this._sectionStart));
-				}
-				this._buffer = "";
-				this._index = 0;
-				this._bufferOffset += this._index;
-			} else if(this._sectionStart === this._index){
-				//the section just started
-				this._buffer = "";
-				this._index = 0;
-				this._bufferOffset += this._index;
-			} else {
-				//remove everything unnecessary
-				this._buffer = this._buffer.substr(this._sectionStart);
-				this._index -= this._sectionStart;
-				this._bufferOffset += this._sectionStart;
-			}
-
-			this._sectionStart = 0;
-		}
-	};
-
-	//TODO make events conditional
-	Tokenizer.prototype.write = function(chunk){
-		if(this._ended) this._cbs.onerror(Error(".write() after done!"));
-
-		this._buffer += chunk;
-		this._parse();
-	};
-
-	Tokenizer.prototype._parse = function(){
-		while(this._index < this._buffer.length && this._running){
-			var c = this._buffer.charAt(this._index);
-			if(this._state === TEXT) {
-				this._stateText(c);
-			} else if(this._state === BEFORE_TAG_NAME){
-				this._stateBeforeTagName(c);
-			} else if(this._state === IN_TAG_NAME) {
-				this._stateInTagName(c);
-			} else if(this._state === BEFORE_CLOSING_TAG_NAME){
-				this._stateBeforeCloseingTagName(c);
-			} else if(this._state === IN_CLOSING_TAG_NAME){
-				this._stateInCloseingTagName(c);
-			} else if(this._state === AFTER_CLOSING_TAG_NAME){
-				this._stateAfterCloseingTagName(c);
-			} else if(this._state === IN_SELF_CLOSING_TAG){
-				this._stateInSelfClosingTag(c);
-			}
-
-			/*
-			*	attributes
-			*/
-			else if(this._state === BEFORE_ATTRIBUTE_NAME){
-				this._stateBeforeAttributeName(c);
-			} else if(this._state === IN_ATTRIBUTE_NAME){
-				this._stateInAttributeName(c);
-			} else if(this._state === AFTER_ATTRIBUTE_NAME){
-				this._stateAfterAttributeName(c);
-			} else if(this._state === BEFORE_ATTRIBUTE_VALUE){
-				this._stateBeforeAttributeValue(c);
-			} else if(this._state === IN_ATTRIBUTE_VALUE_DQ){
-				this._stateInAttributeValueDoubleQuotes(c);
-			} else if(this._state === IN_ATTRIBUTE_VALUE_SQ){
-				this._stateInAttributeValueSingleQuotes(c);
-			} else if(this._state === IN_ATTRIBUTE_VALUE_NQ){
-				this._stateInAttributeValueNoQuotes(c);
-			}
-
-			/*
-			*	declarations
-			*/
-			else if(this._state === BEFORE_DECLARATION){
-				this._stateBeforeDeclaration(c);
-			} else if(this._state === IN_DECLARATION){
-				this._stateInDeclaration(c);
-			}
-
-			/*
-			*	processing instructions
-			*/
-			else if(this._state === IN_PROCESSING_INSTRUCTION){
-				this._stateInProcessingInstruction(c);
-			}
-
-			/*
-			*	comments
-			*/
-			else if(this._state === BEFORE_COMMENT){
-				this._stateBeforeComment(c);
-			} else if(this._state === IN_COMMENT){
-				this._stateInComment(c);
-			} else if(this._state === AFTER_COMMENT_1){
-				this._stateAfterComment1(c);
-			} else if(this._state === AFTER_COMMENT_2){
-				this._stateAfterComment2(c);
-			}
-
-			/*
-			*	cdata
-			*/
-			else if(this._state === BEFORE_CDATA_1){
-				this._stateBeforeCdata1(c);
-			} else if(this._state === BEFORE_CDATA_2){
-				this._stateBeforeCdata2(c);
-			} else if(this._state === BEFORE_CDATA_3){
-				this._stateBeforeCdata3(c);
-			} else if(this._state === BEFORE_CDATA_4){
-				this._stateBeforeCdata4(c);
-			} else if(this._state === BEFORE_CDATA_5){
-				this._stateBeforeCdata5(c);
-			} else if(this._state === BEFORE_CDATA_6){
-				this._stateBeforeCdata6(c);
-			} else if(this._state === IN_CDATA){
-				this._stateInCdata(c);
-			} else if(this._state === AFTER_CDATA_1){
-				this._stateAfterCdata1(c);
-			} else if(this._state === AFTER_CDATA_2){
-				this._stateAfterCdata2(c);
-			}
-
-			/*
-			* special tags
-			*/
-			else if(this._state === BEFORE_SPECIAL){
-				this._stateBeforeSpecial(c);
-			} else if(this._state === BEFORE_SPECIAL_END){
-				this._stateBeforeSpecialEnd(c);
-			}
-
-			/*
-			* script
-			*/
-			else if(this._state === BEFORE_SCRIPT_1){
-				this._stateBeforeScript1(c);
-			} else if(this._state === BEFORE_SCRIPT_2){
-				this._stateBeforeScript2(c);
-			} else if(this._state === BEFORE_SCRIPT_3){
-				this._stateBeforeScript3(c);
-			} else if(this._state === BEFORE_SCRIPT_4){
-				this._stateBeforeScript4(c);
-			} else if(this._state === BEFORE_SCRIPT_5){
-				this._stateBeforeScript5(c);
-			}
-
-			else if(this._state === AFTER_SCRIPT_1){
-				this._stateAfterScript1(c);
-			} else if(this._state === AFTER_SCRIPT_2){
-				this._stateAfterScript2(c);
-			} else if(this._state === AFTER_SCRIPT_3){
-				this._stateAfterScript3(c);
-			} else if(this._state === AFTER_SCRIPT_4){
-				this._stateAfterScript4(c);
-			} else if(this._state === AFTER_SCRIPT_5){
-				this._stateAfterScript5(c);
-			}
-
-			/*
-			* style
-			*/
-			else if(this._state === BEFORE_STYLE_1){
-				this._stateBeforeStyle1(c);
-			} else if(this._state === BEFORE_STYLE_2){
-				this._stateBeforeStyle2(c);
-			} else if(this._state === BEFORE_STYLE_3){
-				this._stateBeforeStyle3(c);
-			} else if(this._state === BEFORE_STYLE_4){
-				this._stateBeforeStyle4(c);
-			}
-
-			else if(this._state === AFTER_STYLE_1){
-				this._stateAfterStyle1(c);
-			} else if(this._state === AFTER_STYLE_2){
-				this._stateAfterStyle2(c);
-			} else if(this._state === AFTER_STYLE_3){
-				this._stateAfterStyle3(c);
-			} else if(this._state === AFTER_STYLE_4){
-				this._stateAfterStyle4(c);
-			}
-
-			/*
-			* entities
-			*/
-			else if(this._state === BEFORE_ENTITY){
-				this._stateBeforeEntity(c);
-			} else if(this._state === BEFORE_NUMERIC_ENTITY){
-				this._stateBeforeNumericEntity(c);
-			} else if(this._state === IN_NAMED_ENTITY){
-				this._stateInNamedEntity(c);
-			} else if(this._state === IN_NUMERIC_ENTITY){
-				this._stateInNumericEntity(c);
-			} else if(this._state === IN_HEX_ENTITY){
-				this._stateInHexEntity(c);
-			}
-
-			else {
-				this._cbs.onerror(Error("unknown _state"), this._state);
-			}
-
-			this._index++;
-		}
-
-		this._cleanup();
-	};
-
-	Tokenizer.prototype.pause = function(){
-		this._running = false;
-	};
-	Tokenizer.prototype.resume = function(){
-		this._running = true;
-
-		if(this._index < this._buffer.length){
-			this._parse();
-		}
-		if(this._ended){
-			this._finish();
-		}
-	};
-
-	Tokenizer.prototype.end = function(chunk){
-		if(this._ended) this._cbs.onerror(Error(".end() after done!"));
-		if(chunk) this.write(chunk);
-
-		this._ended = true;
-
-		if(this._running) this._finish();
-	};
-
-	Tokenizer.prototype._finish = function(){
-		//if there is remaining data, emit it in a reasonable way
-		if(this._sectionStart < this._index){
-			this._handleTrailingData();
-		}
-
-		this._cbs.onend();
-	};
-
-	Tokenizer.prototype._handleTrailingData = function(){
-		var data = this._buffer.substr(this._sectionStart);
-
-		if(this._state === IN_CDATA || this._state === AFTER_CDATA_1 || this._state === AFTER_CDATA_2){
-			this._cbs.oncdata(data);
-		} else if(this._state === IN_COMMENT || this._state === AFTER_COMMENT_1 || this._state === AFTER_COMMENT_2){
-			this._cbs.oncomment(data);
-		} else if(this._state === IN_NAMED_ENTITY && !this._xmlMode){
-			this._parseLegacyEntity();
-			if(this._sectionStart < this._index){
-				this._state = this._baseState;
-				this._handleTrailingData();
-			}
-		} else if(this._state === IN_NUMERIC_ENTITY && !this._xmlMode){
-			this._decodeNumericEntity(2, 10);
-			if(this._sectionStart < this._index){
-				this._state = this._baseState;
-				this._handleTrailingData();
-			}
-		} else if(this._state === IN_HEX_ENTITY && !this._xmlMode){
-			this._decodeNumericEntity(3, 16);
-			if(this._sectionStart < this._index){
-				this._state = this._baseState;
-				this._handleTrailingData();
-			}
-		} else if(
-			this._state !== IN_TAG_NAME &&
-			this._state !== BEFORE_ATTRIBUTE_NAME &&
-			this._state !== BEFORE_ATTRIBUTE_VALUE &&
-			this._state !== AFTER_ATTRIBUTE_NAME &&
-			this._state !== IN_ATTRIBUTE_NAME &&
-			this._state !== IN_ATTRIBUTE_VALUE_SQ &&
-			this._state !== IN_ATTRIBUTE_VALUE_DQ &&
-			this._state !== IN_ATTRIBUTE_VALUE_NQ &&
-			this._state !== IN_CLOSING_TAG_NAME
-		){
-			this._cbs.ontext(data);
-		}
-		//else, ignore remaining data
-		//TODO add a way to remove current tag
-	};
-
-	Tokenizer.prototype.reset = function(){
-		Tokenizer.call(this, {xmlMode: this._xmlMode, decodeEntities: this._decodeEntities}, this._cbs);
-	};
-
-	Tokenizer.prototype.getAbsoluteIndex = function(){
-		return this._bufferOffset + this._index;
-	};
-
-	Tokenizer.prototype._getSection = function(){
-		return this._buffer.substring(this._sectionStart, this._index);
-	};
-
-	Tokenizer.prototype._emitToken = function(name){
-		this._cbs[name](this._getSection());
-		this._sectionStart = -1;
-	};
-
-	Tokenizer.prototype._emitPartial = function(value){
-		if(this._baseState !== TEXT){
-			this._cbs.onattribdata(value); //TODO implement the new event
-		} else {
-			this._cbs.ontext(value);
-		}
-	};
-
-
-/***/ },
-/* 40 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var decodeMap = __webpack_require__(41);
-
-	module.exports = decodeCodePoint;
-
-	// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
-	function decodeCodePoint(codePoint){
-
-		if((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF){
-			return "\uFFFD";
-		}
-
-		if(codePoint in decodeMap){
-			codePoint = decodeMap[codePoint];
-		}
-
-		var output = "";
-
-		if(codePoint > 0xFFFF){
-			codePoint -= 0x10000;
-			output += String.fromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
-			codePoint = 0xDC00 | codePoint & 0x3FF;
-		}
-
-		output += String.fromCharCode(codePoint);
-		return output;
-	}
-
-
-/***/ },
-/* 41 */
-/***/ function(module, exports) {
-
-	module.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
-	};
-
-/***/ },
-/* 42 */
-/***/ function(module, exports) {
-
-	module.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": "‌"
-	};
-
-/***/ },
-/* 43 */
-/***/ function(module, exports) {
-
-	module.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": "ÿ"
-	};
-
-/***/ },
-/* 44 */
-/***/ function(module, exports) {
-
-	module.exports = {
-		"amp": "&",
-		"apos": "'",
-		"gt": ">",
-		"lt": "<",
-		"quot": "\""
-	};
-
-/***/ },
-/* 45 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var ElementType = __webpack_require__(46);
-
-	var re_whitespace = /\s+/g;
-	var NodePrototype = __webpack_require__(47);
-	var ElementPrototype = __webpack_require__(48);
-
-	function DomHandler(callback, options, elementCB){
-		if(typeof callback === "object"){
-			elementCB = options;
-			options = callback;
-			callback = null;
-		} else if(typeof options === "function"){
-			elementCB = options;
-			options = defaultOpts;
-		}
-		this._callback = callback;
-		this._options = options || defaultOpts;
-		this._elementCB = elementCB;
-		this.dom = [];
-		this._done = false;
-		this._tagStack = [];
-		this._parser = this._parser || null;
-	}
-
-	//default options
-	var defaultOpts = {
-		normalizeWhitespace: false, //Replace all whitespace with single spaces
-		withStartIndices: false, //Add startIndex properties to nodes
-	};
-
-	DomHandler.prototype.onparserinit = function(parser){
-		this._parser = parser;
-	};
-
-	//Resets the handler back to starting state
-	DomHandler.prototype.onreset = function(){
-		DomHandler.call(this, this._callback, this._options, this._elementCB);
-	};
-
-	//Signals the handler that parsing is done
-	DomHandler.prototype.onend = function(){
-		if(this._done) return;
-		this._done = true;
-		this._parser = null;
-		this._handleCallback(null);
-	};
-
-	DomHandler.prototype._handleCallback =
-	DomHandler.prototype.onerror = function(error){
-		if(typeof this._callback === "function"){
-			this._callback(error, this.dom);
-		} else {
-			if(error) throw error;
-		}
-	};
-
-	DomHandler.prototype.onclosetag = function(){
-		//if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!"));
-		var elem = this._tagStack.pop();
-		if(this._elementCB) this._elementCB(elem);
-	};
-
-	DomHandler.prototype._addDomElement = function(element){
-		var parent = this._tagStack[this._tagStack.length - 1];
-		var siblings = parent ? parent.children : this.dom;
-		var previousSibling = siblings[siblings.length - 1];
-
-		element.next = null;
-
-		if(this._options.withStartIndices){
-			element.startIndex = this._parser.startIndex;
-		}
-
-		if (this._options.withDomLvl1) {
-			element.__proto__ = element.type === "tag" ? ElementPrototype : NodePrototype;
-		}
-
-		if(previousSibling){
-			element.prev = previousSibling;
-			previousSibling.next = element;
-		} else {
-			element.prev = null;
-		}
-
-		siblings.push(element);
-		element.parent = parent || null;
-	};
-
-	DomHandler.prototype.onopentag = function(name, attribs){
-		var element = {
-			type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag,
-			name: name,
-			attribs: attribs,
-			children: []
-		};
-
-		this._addDomElement(element);
-
-		this._tagStack.push(element);
-	};
-
-	DomHandler.prototype.ontext = function(data){
-		//the ignoreWhitespace is officially dropped, but for now,
-		//it's an alias for normalizeWhitespace
-		var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace;
-
-		var lastTag;
-
-		if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){
-			if(normalize){
-				lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
-			} else {
-				lastTag.data += data;
-			}
-		} else {
-			if(
-				this._tagStack.length &&
-				(lastTag = this._tagStack[this._tagStack.length - 1]) &&
-				(lastTag = lastTag.children[lastTag.children.length - 1]) &&
-				lastTag.type === ElementType.Text
-			){
-				if(normalize){
-					lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
-				} else {
-					lastTag.data += data;
-				}
-			} else {
-				if(normalize){
-					data = data.replace(re_whitespace, " ");
-				}
-
-				this._addDomElement({
-					data: data,
-					type: ElementType.Text
-				});
-			}
-		}
-	};
-
-	DomHandler.prototype.oncomment = function(data){
-		var lastTag = this._tagStack[this._tagStack.length - 1];
-
-		if(lastTag && lastTag.type === ElementType.Comment){
-			lastTag.data += data;
-			return;
-		}
-
-		var element = {
-			data: data,
-			type: ElementType.Comment
-		};
-
-		this._addDomElement(element);
-		this._tagStack.push(element);
-	};
-
-	DomHandler.prototype.oncdatastart = function(){
-		var element = {
-			children: [{
-				data: "",
-				type: ElementType.Text
-			}],
-			type: ElementType.CDATA
-		};
-
-		this._addDomElement(element);
-		this._tagStack.push(element);
-	};
-
-	DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){
-		this._tagStack.pop();
-	};
-
-	DomHandler.prototype.onprocessinginstruction = function(name, data){
-		this._addDomElement({
-			name: name,
-			data: data,
-			type: ElementType.Directive
-		});
-	};
-
-	module.exports = DomHandler;
-
-
-/***/ },
-/* 46 */
-/***/ function(module, exports) {
-
-	//Types of elements found in the DOM
-	module.exports = {
-		Text: "text", //Text
-		Directive: "directive", //<? ... ?>
-		Comment: "comment", //<!-- ... -->
-		Script: "script", //<script> tags
-		Style: "style", //<style> tags
-		Tag: "tag", //Any tag
-		CDATA: "cdata", //<![CDATA[ ... ]]>
-		Doctype: "doctype",
-
-		isTag: function(elem){
-			return elem.type === "tag" || elem.type === "script" || elem.type === "style";
-		}
-	};
-
-
-/***/ },
-/* 47 */
-/***/ function(module, exports) {
-
-	// This object will be used as the prototype for Nodes when creating a
-	// DOM-Level-1-compliant structure.
-	var NodePrototype = module.exports = {
-		get firstChild() {
-			var children = this.children;
-			return children && children[0] || null;
-		},
-		get lastChild() {
-			var children = this.children;
-			return children && children[children.length - 1] || null;
-		},
-		get nodeType() {
-			return nodeTypes[this.type] || nodeTypes.element;
-		}
-	};
-
-	var domLvl1 = {
-		tagName: "name",
-		childNodes: "children",
-		parentNode: "parent",
-		previousSibling: "prev",
-		nextSibling: "next",
-		nodeValue: "data"
-	};
-
-	var nodeTypes = {
-		element: 1,
-		text: 3,
-		cdata: 4,
-		comment: 8
-	};
-
-	Object.keys(domLvl1).forEach(function(key) {
-		var shorthand = domLvl1[key];
-		Object.defineProperty(NodePrototype, key, {
-			get: function() {
-				return this[shorthand] || null;
-			},
-			set: function(val) {
-				this[shorthand] = val;
-				return val;
-			}
-		});
-	});
-
-
-/***/ },
-/* 48 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// DOM-Level-1-compliant structure
-	var NodePrototype = __webpack_require__(47);
-	var ElementPrototype = module.exports = Object.create(NodePrototype);
-
-	var domLvl1 = {
-		tagName: "name"
-	};
-
-	Object.keys(domLvl1).forEach(function(key) {
-		var shorthand = domLvl1[key];
-		Object.defineProperty(ElementPrototype, key, {
-			get: function() {
-				return this[shorthand] || null;
-			},
-			set: function(val) {
-				this[shorthand] = val;
-				return val;
-			}
-		});
-	});
-
-
-/***/ },
-/* 49 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var index = __webpack_require__(37),
-	    DomHandler = index.DomHandler,
-		DomUtils = index.DomUtils;
-
-	//TODO: make this a streamable handler
-	function FeedHandler(callback, options){
-		this.init(callback, options);
-	}
-
-	__webpack_require__(3).inherits(FeedHandler, DomHandler);
-
-	FeedHandler.prototype.init = DomHandler;
-
-	function getElements(what, where){
-		return DomUtils.getElementsByTagName(what, where, true);
-	}
-	function getOneElement(what, where){
-		return DomUtils.getElementsByTagName(what, where, true, 1)[0];
-	}
-	function fetch(what, where, recurse){
-		return DomUtils.getText(
-			DomUtils.getElementsByTagName(what, where, recurse, 1)
-		).trim();
-	}
-
-	function addConditionally(obj, prop, what, where, recurse){
-		var tmp = fetch(what, where, recurse);
-		if(tmp) obj[prop] = tmp;
-	}
-
-	var isValidFeed = function(value){
-		return value === "rss" || value === "feed" || value === "rdf:RDF";
-	};
-
-	FeedHandler.prototype.onend = function(){
-		var feed = {},
-			feedRoot = getOneElement(isValidFeed, this.dom),
-			tmp, childs;
-
-		if(feedRoot){
-			if(feedRoot.name === "feed"){
-				childs = feedRoot.children;
-
-				feed.type = "atom";
-				addConditionally(feed, "id", "id", childs);
-				addConditionally(feed, "title", "title", childs);
-				if((tmp = getOneElement("link", childs)) && (tmp = tmp.attribs) && (tmp = tmp.href)) feed.link = tmp;
-				addConditionally(feed, "description", "subtitle", childs);
-				if((tmp = fetch("updated", childs))) feed.updated = new Date(tmp);
-				addConditionally(feed, "author", "email", childs, true);
-
-				feed.items = getElements("entry", childs).map(function(item){
-					var entry = {}, tmp;
-
-					item = item.children;
-
-					addConditionally(entry, "id", "id", item);
-					addConditionally(entry, "title", "title", item);
-					if((tmp = getOneElement("link", item)) && (tmp = tmp.attribs) && (tmp = tmp.href)) entry.link = tmp;
-					if((tmp = fetch("summary", item) || fetch("content", item))) entry.description = tmp;
-					if((tmp = fetch("updated", item))) entry.pubDate = new Date(tmp);
-					return entry;
-				});
-			} else {
-				childs = getOneElement("channel", feedRoot.children).children;
-
-				feed.type = feedRoot.name.substr(0, 3);
-				feed.id = "";
-				addConditionally(feed, "title", "title", childs);
-				addConditionally(feed, "link", "link", childs);
-				addConditionally(feed, "description", "description", childs);
-				if((tmp = fetch("lastBuildDate", childs))) feed.updated = new Date(tmp);
-				addConditionally(feed, "author", "managingEditor", childs, true);
-
-				feed.items = getElements("item", feedRoot.children).map(function(item){
-					var entry = {}, tmp;
-
-					item = item.children;
-
-					addConditionally(entry, "id", "guid", item);
-					addConditionally(entry, "title", "title", item);
-					addConditionally(entry, "link", "link", item);
-					addConditionally(entry, "description", "description", item);
-					if((tmp = fetch("pubDate", item))) entry.pubDate = new Date(tmp);
-					return entry;
-				});
-			}
-		}
-		this.dom = feed;
-		DomHandler.prototype._handleCallback.call(
-			this, feedRoot ? null : Error("couldn't find root of feed")
-		);
-	};
-
-	module.exports = FeedHandler;
-
-
-/***/ },
-/* 50 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = Stream;
-
-	var Parser = __webpack_require__(51);
-
-	function Stream(options){
-		Parser.call(this, new Cbs(this), options);
-	}
-
-	__webpack_require__(3).inherits(Stream, Parser);
-
-	Stream.prototype.readable = true;
-
-	function Cbs(scope){
-		this.scope = scope;
-	}
-
-	var EVENTS = __webpack_require__(37).EVENTS;
-
-	Object.keys(EVENTS).forEach(function(name){
-		if(EVENTS[name] === 0){
-			Cbs.prototype["on" + name] = function(){
-				this.scope.emit(name);
-			};
-		} else if(EVENTS[name] === 1){
-			Cbs.prototype["on" + name] = function(a){
-				this.scope.emit(name, a);
-			};
-		} else if(EVENTS[name] === 2){
-			Cbs.prototype["on" + name] = function(a, b){
-				this.scope.emit(name, a, b);
-			};
-		} else {
-			throw Error("wrong number of arguments!");
-		}
-	});
-
-/***/ },
-/* 51 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = Stream;
-
-	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);
-
-		WritableStream.call(this, {decodeStrings: false});
-
-		this.once("finish", function(){
-			parser.end();
-		});
-	}
-
-	__webpack_require__(3).inherits(Stream, WritableStream);
-
-	WritableStream.prototype._write = function(chunk, encoding, cb){
-		this._parser.write(chunk);
-		cb();
-	};
-
-/***/ },
-/* 52 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	module.exports = Stream;
-
-	var EE = __webpack_require__(2).EventEmitter;
-	var inherits = __webpack_require__(53);
-
-	inherits(Stream, EE);
-	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;
-
-
-
-	// old-style streams.  Note that the pipe method (the only relevant
-	// part of this class) is overridden in the Readable class.
-
-	function Stream() {
-	  EE.call(this);
-	}
-
-	Stream.prototype.pipe = function(dest, options) {
-	  var source = this;
-
-	  function ondata(chunk) {
-	    if (dest.writable) {
-	      if (false === dest.write(chunk) && source.pause) {
-	        source.pause();
-	      }
-	    }
-	  }
-
-	  source.on('data', ondata);
-
-	  function ondrain() {
-	    if (source.readable && source.resume) {
-	      source.resume();
-	    }
-	  }
-
-	  dest.on('drain', ondrain);
-
-	  // If the 'end' option is not supplied, dest.end() will be called when
-	  // source gets the 'end' or 'close' events.  Only dest.end() once.
-	  if (!dest._isStdio && (!options || options.end !== false)) {
-	    source.on('end', onend);
-	    source.on('close', onclose);
-	  }
-
-	  var didOnEnd = false;
-	  function onend() {
-	    if (didOnEnd) return;
-	    didOnEnd = true;
-
-	    dest.end();
-	  }
-
-
-	  function onclose() {
-	    if (didOnEnd) return;
-	    didOnEnd = true;
-
-	    if (typeof dest.destroy === 'function') dest.destroy();
-	  }
-
-	  // don't leave dangling pipes when there are errors.
-	  function onerror(er) {
-	    cleanup();
-	    if (EE.listenerCount(this, 'error') === 0) {
-	      throw er; // Unhandled stream error in pipe.
-	    }
-	  }
-
-	  source.on('error', onerror);
-	  dest.on('error', onerror);
-
-	  // remove all the event listeners that were added.
-	  function cleanup() {
-	    source.removeListener('data', ondata);
-	    dest.removeListener('drain', ondrain);
-
-	    source.removeListener('end', onend);
-	    source.removeListener('close', onclose);
-
-	    source.removeListener('error', onerror);
-	    dest.removeListener('error', onerror);
-
-	    source.removeListener('end', cleanup);
-	    source.removeListener('close', cleanup);
-
-	    dest.removeListener('close', cleanup);
-	  }
-
-	  source.on('end', cleanup);
-	  source.on('close', cleanup);
-
-	  dest.on('close', cleanup);
-
-	  dest.emit('pipe', source);
-
-	  // Allow for unix-like usage: A.pipe(B).pipe(C)
-	  return dest;
-	};
-
-
-/***/ },
-/* 53 */
-/***/ 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
-	  }
-	}
-
-
-/***/ },
-/* 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.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	module.exports = Readable;
-
-	/*<replacement>*/
-	var isArray = __webpack_require__(56);
-	/*</replacement>*/
-
-
-	/*<replacement>*/
-	var Buffer = __webpack_require__(57).Buffer;
-	/*</replacement>*/
-
-	Readable.ReadableState = ReadableState;
-
-	var EE = __webpack_require__(2).EventEmitter;
-
-	/*<replacement>*/
-	if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
-	  return emitter.listeners(type).length;
-	};
-	/*</replacement>*/
-
-	var Stream = __webpack_require__(52);
-
-	/*<replacement>*/
-	var util = __webpack_require__(61);
-	util.inherits = __webpack_require__(62);
-	/*</replacement>*/
-
-	var StringDecoder;
-
-
-	/*<replacement>*/
-	var debug = __webpack_require__(63);
-	if (debug && debug.debuglog) {
-	  debug = debug.debuglog('stream');
-	} else {
-	  debug = function () {};
-	}
-	/*</replacement>*/
-
-
-	util.inherits(Readable, Stream);
-
-	function ReadableState(options, stream) {
-	  var Duplex = __webpack_require__(64);
-
-	  options = options || {};
-
-	  // the point at which it stops calling _read() to fill the buffer
-	  // Note: 0 is a valid value, means "don't call _read preemptively ever"
-	  var hwm = options.highWaterMark;
-	  var defaultHwm = options.objectMode ? 16 : 16 * 1024;
-	  this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
-
-	  // cast to ints.
-	  this.highWaterMark = ~~this.highWaterMark;
-
-	  this.buffer = [];
-	  this.length = 0;
-	  this.pipes = null;
-	  this.pipesCount = 0;
-	  this.flowing = null;
-	  this.ended = false;
-	  this.endEmitted = false;
-	  this.reading = false;
-
-	  // a flag to be able to tell if the onwrite cb is called immediately,
-	  // or on a later tick.  We set this to true at first, because any
-	  // actions that shouldn't happen until "later" should generally also
-	  // not happen before the first write call.
-	  this.sync = true;
-
-	  // whenever we return null, then we set a flag to say
-	  // that we're awaiting a 'readable' event emission.
-	  this.needReadable = false;
-	  this.emittedReadable = false;
-	  this.readableListening = false;
-
-
-	  // object stream flag. Used to make read(n) ignore n and to
-	  // make all the buffer merging and length checks go away
-	  this.objectMode = !!options.objectMode;
-
-	  if (stream instanceof Duplex)
-	    this.objectMode = this.objectMode || !!options.readableObjectMode;
-
-	  // Crypto is kind of old and crusty.  Historically, its default string
-	  // encoding is 'binary' so we have to make this configurable.
-	  // Everything else in the universe uses 'utf8', though.
-	  this.defaultEncoding = options.defaultEncoding || 'utf8';
-
-	  // when piping, we only care about 'readable' events that happen
-	  // after read()ing all the bytes and not getting any pushback.
-	  this.ranOut = false;
-
-	  // the number of writers that are awaiting a drain event in .pipe()s
-	  this.awaitDrain = 0;
-
-	  // if true, a maybeReadMore has been scheduled
-	  this.readingMore = false;
-
-	  this.decoder = null;
-	  this.encoding = null;
-	  if (options.encoding) {
-	    if (!StringDecoder)
-	      StringDecoder = __webpack_require__(66).StringDecoder;
-	    this.decoder = new StringDecoder(options.encoding);
-	    this.encoding = options.encoding;
-	  }
-	}
-
-	function Readable(options) {
-	  var Duplex = __webpack_require__(64);
-
-	  if (!(this instanceof Readable))
-	    return new Readable(options);
-
-	  this._readableState = new ReadableState(options, this);
-
-	  // legacy
-	  this.readable = true;
-
-	  Stream.call(this);
-	}
-
-	// Manually shove something into the read() buffer.
-	// This returns true if the highWaterMark has not been hit yet,
-	// similar to how Writable.write() returns true if you should
-	// write() some more.
-	Readable.prototype.push = function(chunk, encoding) {
-	  var state = this._readableState;
-
-	  if (util.isString(chunk) && !state.objectMode) {
-	    encoding = encoding || state.defaultEncoding;
-	    if (encoding !== state.encoding) {
-	      chunk = new Buffer(chunk, encoding);
-	      encoding = '';
-	    }
-	  }
-
-	  return readableAddChunk(this, state, chunk, encoding, false);
-	};
-
-	// Unshift should *always* be something directly out of read()
-	Readable.prototype.unshift = function(chunk) {
-	  var state = this._readableState;
-	  return readableAddChunk(this, state, chunk, '', true);
-	};
-
-	function readableAddChunk(stream, state, chunk, encoding, addToFront) {
-	  var er = chunkInvalid(state, chunk);
-	  if (er) {
-	    stream.emit('error', er);
-	  } else if (util.isNullOrUndefined(chunk)) {
-	    state.reading = false;
-	    if (!state.ended)
-	      onEofChunk(stream, state);
-	  } else if (state.objectMode || chunk && chunk.length > 0) {
-	    if (state.ended && !addToFront) {
-	      var e = new Error('stream.push() after EOF');
-	      stream.emit('error', e);
-	    } else if (state.endEmitted && addToFront) {
-	      var e = new Error('stream.unshift() after end event');
-	      stream.emit('error', e);
-	    } else {
-	      if (state.decoder && !addToFront && !encoding)
-	        chunk = state.decoder.write(chunk);
-
-	      if (!addToFront)
-	        state.reading = false;
-
-	      // if we want the data now, just emit it.
-	      if (state.flowing && state.length === 0 && !state.sync) {
-	        stream.emit('data', chunk);
-	        stream.read(0);
-	      } else {
-	        // update the buffer info.
-	        state.length += state.objectMode ? 1 : chunk.length;
-	        if (addToFront)
-	          state.buffer.unshift(chunk);
-	        else
-	          state.buffer.push(chunk);
-
-	        if (state.needReadable)
-	          emitReadable(stream);
-	      }
-
-	      maybeReadMore(stream, state);
-	    }
-	  } else if (!addToFront) {
-	    state.reading = false;
-	  }
-
-	  return needMoreData(state);
-	}
-
-
-
-	// if it's past the high water mark, we can push in some more.
-	// Also, if we have no data yet, we can stand some
-	// more bytes.  This is to work around cases where hwm=0,
-	// such as the repl.  Also, if the push() triggered a
-	// readable event, and the user called read(largeNumber) such that
-	// needReadable was set, then we ought to push more, so that another
-	// 'readable' event will be triggered.
-	function needMoreData(state) {
-	  return !state.ended &&
-	         (state.needReadable ||
-	          state.length < state.highWaterMark ||
-	          state.length === 0);
-	}
-
-	// backwards compatibility.
-	Readable.prototype.setEncoding = function(enc) {
-	  if (!StringDecoder)
-	    StringDecoder = __webpack_require__(66).StringDecoder;
-	  this._readableState.decoder = new StringDecoder(enc);
-	  this._readableState.encoding = enc;
-	  return this;
-	};
-
-	// Don't raise the hwm > 128MB
-	var MAX_HWM = 0x800000;
-	function roundUpToNextPowerOf2(n) {
-	  if (n >= MAX_HWM) {
-	    n = MAX_HWM;
-	  } else {
-	    // Get the next highest power of 2
-	    n--;
-	    for (var p = 1; p < 32; p <<= 1) n |= n >> p;
-	    n++;
-	  }
-	  return n;
-	}
-
-	function howMuchToRead(n, state) {
-	  if (state.length === 0 && state.ended)
-	    return 0;
-
-	  if (state.objectMode)
-	    return n === 0 ? 0 : 1;
-
-	  if (isNaN(n) || util.isNull(n)) {
-	    // only flow one buffer at a time
-	    if (state.flowing && state.buffer.length)
-	      return state.buffer[0].length;
-	    else
-	      return state.length;
-	  }
-
-	  if (n <= 0)
-	    return 0;
-
-	  // If we're asking for more than the target buffer level,
-	  // then raise the water mark.  Bump up to the next highest
-	  // power of 2, to prevent increasing it excessively in tiny
-	  // amounts.
-	  if (n > state.highWaterMark)
-	    state.highWaterMark = roundUpToNextPowerOf2(n);
-
-	  // don't have that much.  return null, unless we've ended.
-	  if (n > state.length) {
-	    if (!state.ended) {
-	      state.needReadable = true;
-	      return 0;
-	    } else
-	      return state.length;
-	  }
-
-	  return n;
-	}
-
-	// you can override either this method, or the async _read(n) below.
-	Readable.prototype.read = function(n) {
-	  debug('read', n);
-	  var state = this._readableState;
-	  var nOrig = n;
-
-	  if (!util.isNumber(n) || n > 0)
-	    state.emittedReadable = false;
-
-	  // if we're doing read(0) to trigger a readable event, but we
-	  // already have a bunch of data in the buffer, then just trigger
-	  // the 'readable' event and move on.
-	  if (n === 0 &&
-	      state.needReadable &&
-	      (state.length >= state.highWaterMark || state.ended)) {
-	    debug('read: emitReadable', state.length, state.ended);
-	    if (state.length === 0 && state.ended)
-	      endReadable(this);
-	    else
-	      emitReadable(this);
-	    return null;
-	  }
-
-	  n = howMuchToRead(n, state);
-
-	  // if we've ended, and we're now clear, then finish it up.
-	  if (n === 0 && state.ended) {
-	    if (state.length === 0)
-	      endReadable(this);
-	    return null;
-	  }
-
-	  // All the actual chunk generation logic needs to be
-	  // *below* the call to _read.  The reason is that in certain
-	  // synthetic stream cases, such as passthrough streams, _read
-	  // may be a completely synchronous operation which may change
-	  // the state of the read buffer, providing enough data when
-	  // before there was *not* enough.
-	  //
-	  // So, the steps are:
-	  // 1. Figure out what the state of things will be after we do
-	  // a read from the buffer.
-	  //
-	  // 2. If that resulting state will trigger a _read, then call _read.
-	  // Note that this may be asynchronous, or synchronous.  Yes, it is
-	  // deeply ugly to write APIs this way, but that still doesn't mean
-	  // that the Readable class should behave improperly, as streams are
-	  // designed to be sync/async agnostic.
-	  // Take note if the _read call is sync or async (ie, if the read call
-	  // has returned yet), so that we know whether or not it's safe to emit
-	  // 'readable' etc.
-	  //
-	  // 3. Actually pull the requested chunks out of the buffer and return.
-
-	  // if we need a readable event, then we need to do some reading.
-	  var doRead = state.needReadable;
-	  debug('need readable', doRead);
-
-	  // if we currently have less than the highWaterMark, then also read some
-	  if (state.length === 0 || state.length - n < state.highWaterMark) {
-	    doRead = true;
-	    debug('length less than watermark', doRead);
-	  }
-
-	  // however, if we've ended, then there's no point, and if we're already
-	  // reading, then it's unnecessary.
-	  if (state.ended || state.reading) {
-	    doRead = false;
-	    debug('reading or ended', doRead);
-	  }
-
-	  if (doRead) {
-	    debug('do read');
-	    state.reading = true;
-	    state.sync = true;
-	    // if the length is currently zero, then we *need* a readable event.
-	    if (state.length === 0)
-	      state.needReadable = true;
-	    // call internal read method
-	    this._read(state.highWaterMark);
-	    state.sync = false;
-	  }
-
-	  // If _read pushed data synchronously, then `reading` will be false,
-	  // and we need to re-evaluate how much data we can return to the user.
-	  if (doRead && !state.reading)
-	    n = howMuchToRead(nOrig, state);
-
-	  var ret;
-	  if (n > 0)
-	    ret = fromList(n, state);
-	  else
-	    ret = null;
-
-	  if (util.isNull(ret)) {
-	    state.needReadable = true;
-	    n = 0;
-	  }
-
-	  state.length -= n;
-
-	  // If we have nothing in the buffer, then we want to know
-	  // as soon as we *do* get something into the buffer.
-	  if (state.length === 0 && !state.ended)
-	    state.needReadable = true;
-
-	  // If we tried to read() past the EOF, then emit end on the next tick.
-	  if (nOrig !== n && state.ended && state.length === 0)
-	    endReadable(this);
-
-	  if (!util.isNull(ret))
-	    this.emit('data', ret);
-
-	  return ret;
-	};
-
-	function chunkInvalid(state, chunk) {
-	  var er = null;
-	  if (!util.isBuffer(chunk) &&
-	      !util.isString(chunk) &&
-	      !util.isNullOrUndefined(chunk) &&
-	      !state.objectMode) {
-	    er = new TypeError('Invalid non-string/buffer chunk');
-	  }
-	  return er;
-	}
-
-
-	function onEofChunk(stream, state) {
-	  if (state.decoder && !state.ended) {
-	    var chunk = state.decoder.end();
-	    if (chunk && chunk.length) {
-	      state.buffer.push(chunk);
-	      state.length += state.objectMode ? 1 : chunk.length;
-	    }
-	  }
-	  state.ended = true;
-
-	  // emit 'readable' now to make sure it gets picked up.
-	  emitReadable(stream);
-	}
-
-	// Don't emit readable right away in sync mode, because this can trigger
-	// another read() call => stack overflow.  This way, it might trigger
-	// a nextTick recursion warning, but that's not so bad.
-	function emitReadable(stream) {
-	  var state = stream._readableState;
-	  state.needReadable = false;
-	  if (!state.emittedReadable) {
-	    debug('emitReadable', state.flowing);
-	    state.emittedReadable = true;
-	    if (state.sync)
-	      process.nextTick(function() {
-	        emitReadable_(stream);
-	      });
-	    else
-	      emitReadable_(stream);
-	  }
-	}
-
-	function emitReadable_(stream) {
-	  debug('emit readable');
-	  stream.emit('readable');
-	  flow(stream);
-	}
-
-
-	// at this point, the user has presumably seen the 'readable' event,
-	// and called read() to consume some data.  that may have triggered
-	// in turn another _read(n) call, in which case reading = true if
-	// it's in progress.
-	// However, if we're not ended, or reading, and the length < hwm,
-	// then go ahead and try to read some more preemptively.
-	function maybeReadMore(stream, state) {
-	  if (!state.readingMore) {
-	    state.readingMore = true;
-	    process.nextTick(function() {
-	      maybeReadMore_(stream, state);
-	    });
-	  }
-	}
-
-	function maybeReadMore_(stream, state) {
-	  var len = state.length;
-	  while (!state.reading && !state.flowing && !state.ended &&
-	         state.length < state.highWaterMark) {
-	    debug('maybeReadMore read 0');
-	    stream.read(0);
-	    if (len === state.length)
-	      // didn't get any data, stop spinning.
-	      break;
-	    else
-	      len = state.length;
-	  }
-	  state.readingMore = false;
-	}
-
-	// abstract method.  to be overridden in specific implementation classes.
-	// call cb(er, data) where data is <= n in length.
-	// for virtual (non-string, non-buffer) streams, "length" is somewhat
-	// arbitrary, and perhaps not very meaningful.
-	Readable.prototype._read = function(n) {
-	  this.emit('error', new Error('not implemented'));
-	};
-
-	Readable.prototype.pipe = function(dest, pipeOpts) {
-	  var src = this;
-	  var state = this._readableState;
-
-	  switch (state.pipesCount) {
-	    case 0:
-	      state.pipes = dest;
-	      break;
-	    case 1:
-	      state.pipes = [state.pipes, dest];
-	      break;
-	    default:
-	      state.pipes.push(dest);
-	      break;
-	  }
-	  state.pipesCount += 1;
-	  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
-	  var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
-	              dest !== process.stdout &&
-	              dest !== process.stderr;
-
-	  var endFn = doEnd ? onend : cleanup;
-	  if (state.endEmitted)
-	    process.nextTick(endFn);
-	  else
-	    src.once('end', endFn);
-
-	  dest.on('unpipe', onunpipe);
-	  function onunpipe(readable) {
-	    debug('onunpipe');
-	    if (readable === src) {
-	      cleanup();
-	    }
-	  }
-
-	  function onend() {
-	    debug('onend');
-	    dest.end();
-	  }
-
-	  // when the dest drains, it reduces the awaitDrain counter
-	  // on the source.  This would be more elegant with a .once()
-	  // handler in flow(), but adding and removing repeatedly is
-	  // too slow.
-	  var ondrain = pipeOnDrain(src);
-	  dest.on('drain', ondrain);
-
-	  function cleanup() {
-	    debug('cleanup');
-	    // cleanup event handlers once the pipe is broken
-	    dest.removeListener('close', onclose);
-	    dest.removeListener('finish', onfinish);
-	    dest.removeListener('drain', ondrain);
-	    dest.removeListener('error', onerror);
-	    dest.removeListener('unpipe', onunpipe);
-	    src.removeListener('end', onend);
-	    src.removeListener('end', cleanup);
-	    src.removeListener('data', ondata);
-
-	    // if the reader is waiting for a drain event from this
-	    // specific writer, then it would cause it to never start
-	    // flowing again.
-	    // So, if this is awaiting a drain, then we just call it now.
-	    // If we don't know, then assume that we are waiting for one.
-	    if (state.awaitDrain &&
-	        (!dest._writableState || dest._writableState.needDrain))
-	      ondrain();
-	  }
-
-	  src.on('data', ondata);
-	  function ondata(chunk) {
-	    debug('ondata');
-	    var ret = dest.write(chunk);
-	    if (false === ret) {
-	      debug('false write response, pause',
-	            src._readableState.awaitDrain);
-	      src._readableState.awaitDrain++;
-	      src.pause();
-	    }
-	  }
-
-	  // if the dest has an error, then stop piping into it.
-	  // however, don't suppress the throwing behavior for this.
-	  function onerror(er) {
-	    debug('onerror', er);
-	    unpipe();
-	    dest.removeListener('error', onerror);
-	    if (EE.listenerCount(dest, 'error') === 0)
-	      dest.emit('error', er);
-	  }
-	  // This is a brutally ugly hack to make sure that our error handler
-	  // is attached before any userland ones.  NEVER DO THIS.
-	  if (!dest._events || !dest._events.error)
-	    dest.on('error', onerror);
-	  else if (isArray(dest._events.error))
-	    dest._events.error.unshift(onerror);
-	  else
-	    dest._events.error = [onerror, dest._events.error];
-
-
-
-	  // Both close and finish should trigger unpipe, but only once.
-	  function onclose() {
-	    dest.removeListener('finish', onfinish);
-	    unpipe();
-	  }
-	  dest.once('close', onclose);
-	  function onfinish() {
-	    debug('onfinish');
-	    dest.removeListener('close', onclose);
-	    unpipe();
-	  }
-	  dest.once('finish', onfinish);
-
-	  function unpipe() {
-	    debug('unpipe');
-	    src.unpipe(dest);
-	  }
-
-	  // tell the dest that it's being piped to
-	  dest.emit('pipe', src);
-
-	  // start the flow if it hasn't been started already.
-	  if (!state.flowing) {
-	    debug('pipe resume');
-	    src.resume();
-	  }
-
-	  return dest;
-	};
-
-	function pipeOnDrain(src) {
-	  return function() {
-	    var state = src._readableState;
-	    debug('pipeOnDrain', state.awaitDrain);
-	    if (state.awaitDrain)
-	      state.awaitDrain--;
-	    if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
-	      state.flowing = true;
-	      flow(src);
-	    }
-	  };
-	}
-
-
-	Readable.prototype.unpipe = function(dest) {
-	  var state = this._readableState;
-
-	  // if we're not piping anywhere, then do nothing.
-	  if (state.pipesCount === 0)
-	    return this;
-
-	  // just one destination.  most common case.
-	  if (state.pipesCount === 1) {
-	    // passed in one, but it's not the right one.
-	    if (dest && dest !== state.pipes)
-	      return this;
-
-	    if (!dest)
-	      dest = state.pipes;
-
-	    // got a match.
-	    state.pipes = null;
-	    state.pipesCount = 0;
-	    state.flowing = false;
-	    if (dest)
-	      dest.emit('unpipe', this);
-	    return this;
-	  }
-
-	  // slow case. multiple pipe destinations.
-
-	  if (!dest) {
-	    // remove all.
-	    var dests = state.pipes;
-	    var len = state.pipesCount;
-	    state.pipes = null;
-	    state.pipesCount = 0;
-	    state.flowing = false;
-
-	    for (var i = 0; i < len; i++)
-	      dests[i].emit('unpipe', this);
-	    return this;
-	  }
-
-	  // try to find the right one.
-	  var i = indexOf(state.pipes, dest);
-	  if (i === -1)
-	    return this;
-
-	  state.pipes.splice(i, 1);
-	  state.pipesCount -= 1;
-	  if (state.pipesCount === 1)
-	    state.pipes = state.pipes[0];
-
-	  dest.emit('unpipe', this);
-
-	  return this;
-	};
-
-	// set up data events if they are asked for
-	// Ensure readable listeners eventually get something
-	Readable.prototype.on = function(ev, fn) {
-	  var res = Stream.prototype.on.call(this, ev, fn);
-
-	  // If listening to data, and it has not explicitly been paused,
-	  // then call resume to start the flow of data on the next tick.
-	  if (ev === 'data' && false !== this._readableState.flowing) {
-	    this.resume();
-	  }
-
-	  if (ev === 'readable' && this.readable) {
-	    var state = this._readableState;
-	    if (!state.readableListening) {
-	      state.readableListening = true;
-	      state.emittedReadable = false;
-	      state.needReadable = true;
-	      if (!state.reading) {
-	        var self = this;
-	        process.nextTick(function() {
-	          debug('readable nexttick read 0');
-	          self.read(0);
-	        });
-	      } else if (state.length) {
-	        emitReadable(this, state);
-	      }
-	    }
-	  }
-
-	  return res;
-	};
-	Readable.prototype.addListener = Readable.prototype.on;
-
-	// pause() and resume() are remnants of the legacy readable stream API
-	// If the user uses them, then switch into old mode.
-	Readable.prototype.resume = function() {
-	  var state = this._readableState;
-	  if (!state.flowing) {
-	    debug('resume');
-	    state.flowing = true;
-	    if (!state.reading) {
-	      debug('resume read 0');
-	      this.read(0);
-	    }
-	    resume(this, state);
-	  }
-	  return this;
-	};
-
-	function resume(stream, state) {
-	  if (!state.resumeScheduled) {
-	    state.resumeScheduled = true;
-	    process.nextTick(function() {
-	      resume_(stream, state);
-	    });
-	  }
-	}
-
-	function resume_(stream, state) {
-	  state.resumeScheduled = false;
-	  stream.emit('resume');
-	  flow(stream);
-	  if (state.flowing && !state.reading)
-	    stream.read(0);
-	}
-
-	Readable.prototype.pause = function() {
-	  debug('call pause flowing=%j', this._readableState.flowing);
-	  if (false !== this._readableState.flowing) {
-	    debug('pause');
-	    this._readableState.flowing = false;
-	    this.emit('pause');
-	  }
-	  return this;
-	};
-
-	function flow(stream) {
-	  var state = stream._readableState;
-	  debug('flow', state.flowing);
-	  if (state.flowing) {
-	    do {
-	      var chunk = stream.read();
-	    } while (null !== chunk && state.flowing);
-	  }
-	}
-
-	// wrap an old-style stream as the async data source.
-	// This is *not* part of the readable stream interface.
-	// It is an ugly unfortunate mess of history.
-	Readable.prototype.wrap = function(stream) {
-	  var state = this._readableState;
-	  var paused = false;
-
-	  var self = this;
-	  stream.on('end', function() {
-	    debug('wrapped end');
-	    if (state.decoder && !state.ended) {
-	      var chunk = state.decoder.end();
-	      if (chunk && chunk.length)
-	        self.push(chunk);
-	    }
-
-	    self.push(null);
-	  });
-
-	  stream.on('data', function(chunk) {
-	    debug('wrapped data');
-	    if (state.decoder)
-	      chunk = state.decoder.write(chunk);
-	    if (!chunk || !state.objectMode && !chunk.length)
-	      return;
-
-	    var ret = self.push(chunk);
-	    if (!ret) {
-	      paused = true;
-	      stream.pause();
-	    }
-	  });
-
-	  // proxy all the other methods.
-	  // important when wrapping filters and duplexes.
-	  for (var i in stream) {
-	    if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
-	      this[i] = function(method) { return function() {
-	        return stream[method].apply(stream, arguments);
-	      }}(i);
-	    }
-	  }
-
-	  // proxy certain important events.
-	  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
-	  forEach(events, function(ev) {
-	    stream.on(ev, self.emit.bind(self, ev));
-	  });
-
-	  // when we try to consume some more bytes, simply unpause the
-	  // underlying stream.
-	  self._read = function(n) {
-	    debug('wrapped _read', n);
-	    if (paused) {
-	      paused = false;
-	      stream.resume();
-	    }
-	  };
-
-	  return self;
-	};
-
-
-
-	// exposed for testing purposes only.
-	Readable._fromList = fromList;
-
-	// Pluck off n bytes from an array of buffers.
-	// Length is the combined lengths of all the buffers in the list.
-	function fromList(n, state) {
-	  var list = state.buffer;
-	  var length = state.length;
-	  var stringMode = !!state.decoder;
-	  var objectMode = !!state.objectMode;
-	  var ret;
-
-	  // nothing in the list, definitely empty.
-	  if (list.length === 0)
-	    return null;
-
-	  if (length === 0)
-	    ret = null;
-	  else if (objectMode)
-	    ret = list.shift();
-	  else if (!n || n >= length) {
-	    // read it all, truncate the array.
-	    if (stringMode)
-	      ret = list.join('');
-	    else
-	      ret = Buffer.concat(list, length);
-	    list.length = 0;
-	  } else {
-	    // read just some of it.
-	    if (n < list[0].length) {
-	      // just take a part of the first list item.
-	      // slice is the same for buffers and strings.
-	      var buf = list[0];
-	      ret = buf.slice(0, n);
-	      list[0] = buf.slice(n);
-	    } else if (n === list[0].length) {
-	      // first list is a perfect match
-	      ret = list.shift();
-	    } else {
-	      // complex case.
-	      // we have enough to cover it, but it spans past the first buffer.
-	      if (stringMode)
-	        ret = '';
-	      else
-	        ret = new Buffer(n);
-
-	      var c = 0;
-	      for (var i = 0, l = list.length; i < l && c < n; i++) {
-	        var buf = list[0];
-	        var cpy = Math.min(n - c, buf.length);
-
-	        if (stringMode)
-	          ret += buf.slice(0, cpy);
-	        else
-	          buf.copy(ret, c, 0, cpy);
-
-	        if (cpy < buf.length)
-	          list[0] = buf.slice(cpy);
-	        else
-	          list.shift();
-
-	        c += cpy;
-	      }
-	    }
-	  }
-
-	  return ret;
-	}
-
-	function endReadable(stream) {
-	  var state = stream._readableState;
-
-	  // If we get here before consuming all the bytes, then that is a
-	  // bug in node.  Should never happen.
-	  if (state.length > 0)
-	    throw new Error('endReadable called on non-empty stream');
-
-	  if (!state.endEmitted) {
-	    state.ended = true;
-	    process.nextTick(function() {
-	      // Check that we didn't get one last unshift.
-	      if (!state.endEmitted && state.length === 0) {
-	        state.endEmitted = true;
-	        stream.readable = false;
-	        stream.emit('end');
-	      }
-	    });
-	  }
-	}
-
-	function forEach (xs, f) {
-	  for (var i = 0, l = xs.length; i < l; i++) {
-	    f(xs[i], i);
-	  }
-	}
-
-	function indexOf (xs, x) {
-	  for (var i = 0, l = xs.length; i < l; i++) {
-	    if (xs[i] === x) return i;
-	  }
-	  return -1;
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
-
-/***/ },
-/* 56 */
-/***/ function(module, exports) {
-
-	module.exports = Array.isArray || function (arr) {
-	  return Object.prototype.toString.call(arr) == '[object Array]';
-	};
-
-
-/***/ },
-/* 57 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
-	 * The buffer module from node.js, for the browser.
-	 *
-	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
-	 * @license  MIT
-	 */
-	/* eslint-disable no-proto */
-
-	'use strict'
-
-	var base64 = __webpack_require__(58)
-	var ieee754 = __webpack_require__(59)
-	var isArray = __webpack_require__(60)
-
-	exports.Buffer = Buffer
-	exports.SlowBuffer = SlowBuffer
-	exports.INSPECT_MAX_BYTES = 50
-
-	/**
-	 * If `Buffer.TYPED_ARRAY_SUPPORT`:
-	 *   === true    Use Uint8Array implementation (fastest)
-	 *   === false   Use Object implementation (most compatible, even IE6)
-	 *
-	 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
-	 * Opera 11.6+, iOS 4.2+.
-	 *
-	 * Due to various browser bugs, sometimes the Object implementation will be used even
-	 * when the browser supports typed arrays.
-	 *
-	 * Note:
-	 *
-	 *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
-	 *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
-	 *
-	 *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
-	 *
-	 *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
-	 *     incorrect length in some situations.
-
-	 * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
-	 * get the Object implementation, which is slower but behaves correctly.
-	 */
-	Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
-	  ? global.TYPED_ARRAY_SUPPORT
-	  : typedArraySupport()
-
-	/*
-	 * Export kMaxLength after typed array support is determined.
-	 */
-	exports.kMaxLength = kMaxLength()
-
-	function typedArraySupport () {
-	  try {
-	    var arr = new Uint8Array(1)
-	    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
-	    return arr.foo() === 42 && // typed array instances can be augmented
-	        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
-	        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
-	  } catch (e) {
-	    return false
-	  }
-	}
-
-	function kMaxLength () {
-	  return Buffer.TYPED_ARRAY_SUPPORT
-	    ? 0x7fffffff
-	    : 0x3fffffff
-	}
-
-	function createBuffer (that, length) {
-	  if (kMaxLength() < length) {
-	    throw new RangeError('Invalid typed array length')
-	  }
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    // Return an augmented `Uint8Array` instance, for best performance
-	    that = new Uint8Array(length)
-	    that.__proto__ = Buffer.prototype
-	  } else {
-	    // Fallback: Return an object instance of the Buffer class
-	    if (that === null) {
-	      that = new Buffer(length)
-	    }
-	    that.length = length
-	  }
-
-	  return that
-	}
-
-	/**
-	 * The Buffer constructor returns instances of `Uint8Array` that have their
-	 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
-	 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
-	 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
-	 * returns a single octet.
-	 *
-	 * The `Uint8Array` prototype remains unmodified.
-	 */
-
-	function Buffer (arg, encodingOrOffset, length) {
-	  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
-	    return new Buffer(arg, encodingOrOffset, length)
-	  }
-
-	  // Common case.
-	  if (typeof arg === 'number') {
-	    if (typeof encodingOrOffset === 'string') {
-	      throw new Error(
-	        'If encoding is specified then the first argument must be a string'
-	      )
-	    }
-	    return allocUnsafe(this, arg)
-	  }
-	  return from(this, arg, encodingOrOffset, length)
-	}
-
-	Buffer.poolSize = 8192 // not used by this implementation
-
-	// TODO: Legacy, not needed anymore. Remove in next major version.
-	Buffer._augment = function (arr) {
-	  arr.__proto__ = Buffer.prototype
-	  return arr
-	}
-
-	function from (that, value, encodingOrOffset, length) {
-	  if (typeof value === 'number') {
-	    throw new TypeError('"value" argument must not be a number')
-	  }
-
-	  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
-	    return fromArrayBuffer(that, value, encodingOrOffset, length)
-	  }
-
-	  if (typeof value === 'string') {
-	    return fromString(that, value, encodingOrOffset)
-	  }
-
-	  return fromObject(that, value)
-	}
-
-	/**
-	 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
-	 * if value is a number.
-	 * Buffer.from(str[, encoding])
-	 * Buffer.from(array)
-	 * Buffer.from(buffer)
-	 * Buffer.from(arrayBuffer[, byteOffset[, length]])
-	 **/
-	Buffer.from = function (value, encodingOrOffset, length) {
-	  return from(null, value, encodingOrOffset, length)
-	}
-
-	if (Buffer.TYPED_ARRAY_SUPPORT) {
-	  Buffer.prototype.__proto__ = Uint8Array.prototype
-	  Buffer.__proto__ = Uint8Array
-	  if (typeof Symbol !== 'undefined' && Symbol.species &&
-	      Buffer[Symbol.species] === Buffer) {
-	    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
-	    Object.defineProperty(Buffer, Symbol.species, {
-	      value: null,
-	      configurable: true
-	    })
-	  }
-	}
-
-	function assertSize (size) {
-	  if (typeof size !== 'number') {
-	    throw new TypeError('"size" argument must be a number')
-	  } else if (size < 0) {
-	    throw new RangeError('"size" argument must not be negative')
-	  }
-	}
-
-	function alloc (that, size, fill, encoding) {
-	  assertSize(size)
-	  if (size <= 0) {
-	    return createBuffer(that, size)
-	  }
-	  if (fill !== undefined) {
-	    // Only pay attention to encoding if it's a string. This
-	    // prevents accidentally sending in a number that would
-	    // be interpretted as a start offset.
-	    return typeof encoding === 'string'
-	      ? createBuffer(that, size).fill(fill, encoding)
-	      : createBuffer(that, size).fill(fill)
-	  }
-	  return createBuffer(that, size)
-	}
-
-	/**
-	 * Creates a new filled Buffer instance.
-	 * alloc(size[, fill[, encoding]])
-	 **/
-	Buffer.alloc = function (size, fill, encoding) {
-	  return alloc(null, size, fill, encoding)
-	}
-
-	function allocUnsafe (that, size) {
-	  assertSize(size)
-	  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
-	  if (!Buffer.TYPED_ARRAY_SUPPORT) {
-	    for (var i = 0; i < size; ++i) {
-	      that[i] = 0
-	    }
-	  }
-	  return that
-	}
-
-	/**
-	 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
-	 * */
-	Buffer.allocUnsafe = function (size) {
-	  return allocUnsafe(null, size)
-	}
-	/**
-	 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
-	 */
-	Buffer.allocUnsafeSlow = function (size) {
-	  return allocUnsafe(null, size)
-	}
-
-	function fromString (that, string, encoding) {
-	  if (typeof encoding !== 'string' || encoding === '') {
-	    encoding = 'utf8'
-	  }
-
-	  if (!Buffer.isEncoding(encoding)) {
-	    throw new TypeError('"encoding" must be a valid string encoding')
-	  }
-
-	  var length = byteLength(string, encoding) | 0
-	  that = createBuffer(that, length)
-
-	  var actual = that.write(string, encoding)
-
-	  if (actual !== length) {
-	    // Writing a hex string, for example, that contains invalid characters will
-	    // cause everything after the first invalid character to be ignored. (e.g.
-	    // 'abxxcd' will be treated as 'ab')
-	    that = that.slice(0, actual)
-	  }
-
-	  return that
-	}
-
-	function fromArrayLike (that, array) {
-	  var length = array.length < 0 ? 0 : checked(array.length) | 0
-	  that = createBuffer(that, length)
-	  for (var i = 0; i < length; i += 1) {
-	    that[i] = array[i] & 255
-	  }
-	  return that
-	}
-
-	function fromArrayBuffer (that, array, byteOffset, length) {
-	  array.byteLength // this throws if `array` is not a valid ArrayBuffer
-
-	  if (byteOffset < 0 || array.byteLength < byteOffset) {
-	    throw new RangeError('\'offset\' is out of bounds')
-	  }
-
-	  if (array.byteLength < byteOffset + (length || 0)) {
-	    throw new RangeError('\'length\' is out of bounds')
-	  }
-
-	  if (byteOffset === undefined && length === undefined) {
-	    array = new Uint8Array(array)
-	  } else if (length === undefined) {
-	    array = new Uint8Array(array, byteOffset)
-	  } else {
-	    array = new Uint8Array(array, byteOffset, length)
-	  }
-
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    // Return an augmented `Uint8Array` instance, for best performance
-	    that = array
-	    that.__proto__ = Buffer.prototype
-	  } else {
-	    // Fallback: Return an object instance of the Buffer class
-	    that = fromArrayLike(that, array)
-	  }
-	  return that
-	}
-
-	function fromObject (that, obj) {
-	  if (Buffer.isBuffer(obj)) {
-	    var len = checked(obj.length) | 0
-	    that = createBuffer(that, len)
-
-	    if (that.length === 0) {
-	      return that
-	    }
-
-	    obj.copy(that, 0, 0, len)
-	    return that
-	  }
-
-	  if (obj) {
-	    if ((typeof ArrayBuffer !== 'undefined' &&
-	        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
-	      if (typeof obj.length !== 'number' || isnan(obj.length)) {
-	        return createBuffer(that, 0)
-	      }
-	      return fromArrayLike(that, obj)
-	    }
-
-	    if (obj.type === 'Buffer' && isArray(obj.data)) {
-	      return fromArrayLike(that, obj.data)
-	    }
-	  }
-
-	  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
-	}
-
-	function checked (length) {
-	  // Note: cannot use `length < kMaxLength()` here because that fails when
-	  // length is NaN (which is otherwise coerced to zero.)
-	  if (length >= kMaxLength()) {
-	    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
-	                         'size: 0x' + kMaxLength().toString(16) + ' bytes')
-	  }
-	  return length | 0
-	}
-
-	function SlowBuffer (length) {
-	  if (+length != length) { // eslint-disable-line eqeqeq
-	    length = 0
-	  }
-	  return Buffer.alloc(+length)
-	}
-
-	Buffer.isBuffer = function isBuffer (b) {
-	  return !!(b != null && b._isBuffer)
-	}
-
-	Buffer.compare = function compare (a, b) {
-	  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
-	    throw new TypeError('Arguments must be Buffers')
-	  }
-
-	  if (a === b) return 0
-
-	  var x = a.length
-	  var y = b.length
-
-	  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
-	    if (a[i] !== b[i]) {
-	      x = a[i]
-	      y = b[i]
-	      break
-	    }
-	  }
-
-	  if (x < y) return -1
-	  if (y < x) return 1
-	  return 0
-	}
-
-	Buffer.isEncoding = function isEncoding (encoding) {
-	  switch (String(encoding).toLowerCase()) {
-	    case 'hex':
-	    case 'utf8':
-	    case 'utf-8':
-	    case 'ascii':
-	    case 'latin1':
-	    case 'binary':
-	    case 'base64':
-	    case 'ucs2':
-	    case 'ucs-2':
-	    case 'utf16le':
-	    case 'utf-16le':
-	      return true
-	    default:
-	      return false
-	  }
-	}
-
-	Buffer.concat = function concat (list, length) {
-	  if (!isArray(list)) {
-	    throw new TypeError('"list" argument must be an Array of Buffers')
-	  }
-
-	  if (list.length === 0) {
-	    return Buffer.alloc(0)
-	  }
-
-	  var i
-	  if (length === undefined) {
-	    length = 0
-	    for (i = 0; i < list.length; ++i) {
-	      length += list[i].length
-	    }
-	  }
-
-	  var buffer = Buffer.allocUnsafe(length)
-	  var pos = 0
-	  for (i = 0; i < list.length; ++i) {
-	    var buf = list[i]
-	    if (!Buffer.isBuffer(buf)) {
-	      throw new TypeError('"list" argument must be an Array of Buffers')
-	    }
-	    buf.copy(buffer, pos)
-	    pos += buf.length
-	  }
-	  return buffer
-	}
-
-	function byteLength (string, encoding) {
-	  if (Buffer.isBuffer(string)) {
-	    return string.length
-	  }
-	  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
-	      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
-	    return string.byteLength
-	  }
-	  if (typeof string !== 'string') {
-	    string = '' + string
-	  }
-
-	  var len = string.length
-	  if (len === 0) return 0
-
-	  // Use a for loop to avoid recursion
-	  var loweredCase = false
-	  for (;;) {
-	    switch (encoding) {
-	      case 'ascii':
-	      case 'latin1':
-	      case 'binary':
-	        return len
-	      case 'utf8':
-	      case 'utf-8':
-	      case undefined:
-	        return utf8ToBytes(string).length
-	      case 'ucs2':
-	      case 'ucs-2':
-	      case 'utf16le':
-	      case 'utf-16le':
-	        return len * 2
-	      case 'hex':
-	        return len >>> 1
-	      case 'base64':
-	        return base64ToBytes(string).length
-	      default:
-	        if (loweredCase) return utf8ToBytes(string).length // assume utf8
-	        encoding = ('' + encoding).toLowerCase()
-	        loweredCase = true
-	    }
-	  }
-	}
-	Buffer.byteLength = byteLength
-
-	function slowToString (encoding, start, end) {
-	  var loweredCase = false
-
-	  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
-	  // property of a typed array.
-
-	  // This behaves neither like String nor Uint8Array in that we set start/end
-	  // to their upper/lower bounds if the value passed is out of range.
-	  // undefined is handled specially as per ECMA-262 6th Edition,
-	  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
-	  if (start === undefined || start < 0) {
-	    start = 0
-	  }
-	  // Return early if start > this.length. Done here to prevent potential uint32
-	  // coercion fail below.
-	  if (start > this.length) {
-	    return ''
-	  }
-
-	  if (end === undefined || end > this.length) {
-	    end = this.length
-	  }
-
-	  if (end <= 0) {
-	    return ''
-	  }
-
-	  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
-	  end >>>= 0
-	  start >>>= 0
-
-	  if (end <= start) {
-	    return ''
-	  }
-
-	  if (!encoding) encoding = 'utf8'
-
-	  while (true) {
-	    switch (encoding) {
-	      case 'hex':
-	        return hexSlice(this, start, end)
-
-	      case 'utf8':
-	      case 'utf-8':
-	        return utf8Slice(this, start, end)
-
-	      case 'ascii':
-	        return asciiSlice(this, start, end)
-
-	      case 'latin1':
-	      case 'binary':
-	        return latin1Slice(this, start, end)
-
-	      case 'base64':
-	        return base64Slice(this, start, end)
-
-	      case 'ucs2':
-	      case 'ucs-2':
-	      case 'utf16le':
-	      case 'utf-16le':
-	        return utf16leSlice(this, start, end)
-
-	      default:
-	        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
-	        encoding = (encoding + '').toLowerCase()
-	        loweredCase = true
-	    }
-	  }
-	}
-
-	// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
-	// Buffer instances.
-	Buffer.prototype._isBuffer = true
-
-	function swap (b, n, m) {
-	  var i = b[n]
-	  b[n] = b[m]
-	  b[m] = i
-	}
-
-	Buffer.prototype.swap16 = function swap16 () {
-	  var len = this.length
-	  if (len % 2 !== 0) {
-	    throw new RangeError('Buffer size must be a multiple of 16-bits')
-	  }
-	  for (var i = 0; i < len; i += 2) {
-	    swap(this, i, i + 1)
-	  }
-	  return this
-	}
-
-	Buffer.prototype.swap32 = function swap32 () {
-	  var len = this.length
-	  if (len % 4 !== 0) {
-	    throw new RangeError('Buffer size must be a multiple of 32-bits')
-	  }
-	  for (var i = 0; i < len; i += 4) {
-	    swap(this, i, i + 3)
-	    swap(this, i + 1, i + 2)
-	  }
-	  return this
-	}
-
-	Buffer.prototype.swap64 = function swap64 () {
-	  var len = this.length
-	  if (len % 8 !== 0) {
-	    throw new RangeError('Buffer size must be a multiple of 64-bits')
-	  }
-	  for (var i = 0; i < len; i += 8) {
-	    swap(this, i, i + 7)
-	    swap(this, i + 1, i + 6)
-	    swap(this, i + 2, i + 5)
-	    swap(this, i + 3, i + 4)
-	  }
-	  return this
-	}
-
-	Buffer.prototype.toString = function toString () {
-	  var length = this.length | 0
-	  if (length === 0) return ''
-	  if (arguments.length === 0) return utf8Slice(this, 0, length)
-	  return slowToString.apply(this, arguments)
-	}
-
-	Buffer.prototype.equals = function equals (b) {
-	  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
-	  if (this === b) return true
-	  return Buffer.compare(this, b) === 0
-	}
-
-	Buffer.prototype.inspect = function inspect () {
-	  var str = ''
-	  var max = exports.INSPECT_MAX_BYTES
-	  if (this.length > 0) {
-	    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
-	    if (this.length > max) str += ' ... '
-	  }
-	  return '<Buffer ' + str + '>'
-	}
-
-	Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
-	  if (!Buffer.isBuffer(target)) {
-	    throw new TypeError('Argument must be a Buffer')
-	  }
-
-	  if (start === undefined) {
-	    start = 0
-	  }
-	  if (end === undefined) {
-	    end = target ? target.length : 0
-	  }
-	  if (thisStart === undefined) {
-	    thisStart = 0
-	  }
-	  if (thisEnd === undefined) {
-	    thisEnd = this.length
-	  }
-
-	  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
-	    throw new RangeError('out of range index')
-	  }
-
-	  if (thisStart >= thisEnd && start >= end) {
-	    return 0
-	  }
-	  if (thisStart >= thisEnd) {
-	    return -1
-	  }
-	  if (start >= end) {
-	    return 1
-	  }
-
-	  start >>>= 0
-	  end >>>= 0
-	  thisStart >>>= 0
-	  thisEnd >>>= 0
-
-	  if (this === target) return 0
-
-	  var x = thisEnd - thisStart
-	  var y = end - start
-	  var len = Math.min(x, y)
-
-	  var thisCopy = this.slice(thisStart, thisEnd)
-	  var targetCopy = target.slice(start, end)
-
-	  for (var i = 0; i < len; ++i) {
-	    if (thisCopy[i] !== targetCopy[i]) {
-	      x = thisCopy[i]
-	      y = targetCopy[i]
-	      break
-	    }
-	  }
-
-	  if (x < y) return -1
-	  if (y < x) return 1
-	  return 0
-	}
-
-	// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
-	// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
-	//
-	// Arguments:
-	// - buffer - a Buffer to search
-	// - val - a string, Buffer, or number
-	// - byteOffset - an index into `buffer`; will be clamped to an int32
-	// - encoding - an optional encoding, relevant is val is a string
-	// - dir - true for indexOf, false for lastIndexOf
-	function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
-	  // Empty buffer means no match
-	  if (buffer.length === 0) return -1
-
-	  // Normalize byteOffset
-	  if (typeof byteOffset === 'string') {
-	    encoding = byteOffset
-	    byteOffset = 0
-	  } else if (byteOffset > 0x7fffffff) {
-	    byteOffset = 0x7fffffff
-	  } else if (byteOffset < -0x80000000) {
-	    byteOffset = -0x80000000
-	  }
-	  byteOffset = +byteOffset  // Coerce to Number.
-	  if (isNaN(byteOffset)) {
-	    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
-	    byteOffset = dir ? 0 : (buffer.length - 1)
-	  }
-
-	  // Normalize byteOffset: negative offsets start from the end of the buffer
-	  if (byteOffset < 0) byteOffset = buffer.length + byteOffset
-	  if (byteOffset >= buffer.length) {
-	    if (dir) return -1
-	    else byteOffset = buffer.length - 1
-	  } else if (byteOffset < 0) {
-	    if (dir) byteOffset = 0
-	    else return -1
-	  }
-
-	  // Normalize val
-	  if (typeof val === 'string') {
-	    val = Buffer.from(val, encoding)
-	  }
-
-	  // Finally, search either indexOf (if dir is true) or lastIndexOf
-	  if (Buffer.isBuffer(val)) {
-	    // Special case: looking for empty string/buffer always fails
-	    if (val.length === 0) {
-	      return -1
-	    }
-	    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
-	  } else if (typeof val === 'number') {
-	    val = val & 0xFF // Search for a byte value [0-255]
-	    if (Buffer.TYPED_ARRAY_SUPPORT &&
-	        typeof Uint8Array.prototype.indexOf === 'function') {
-	      if (dir) {
-	        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
-	      } else {
-	        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
-	      }
-	    }
-	    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
-	  }
-
-	  throw new TypeError('val must be string, number or Buffer')
-	}
-
-	function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
-	  var indexSize = 1
-	  var arrLength = arr.length
-	  var valLength = val.length
-
-	  if (encoding !== undefined) {
-	    encoding = String(encoding).toLowerCase()
-	    if (encoding === 'ucs2' || encoding === 'ucs-2' ||
-	        encoding === 'utf16le' || encoding === 'utf-16le') {
-	      if (arr.length < 2 || val.length < 2) {
-	        return -1
-	      }
-	      indexSize = 2
-	      arrLength /= 2
-	      valLength /= 2
-	      byteOffset /= 2
-	    }
-	  }
-
-	  function read (buf, i) {
-	    if (indexSize === 1) {
-	      return buf[i]
-	    } else {
-	      return buf.readUInt16BE(i * indexSize)
-	    }
-	  }
-
-	  var i
-	  if (dir) {
-	    var foundIndex = -1
-	    for (i = byteOffset; i < arrLength; i++) {
-	      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
-	        if (foundIndex === -1) foundIndex = i
-	        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
-	      } else {
-	        if (foundIndex !== -1) i -= i - foundIndex
-	        foundIndex = -1
-	      }
-	    }
-	  } else {
-	    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
-	    for (i = byteOffset; i >= 0; i--) {
-	      var found = true
-	      for (var j = 0; j < valLength; j++) {
-	        if (read(arr, i + j) !== read(val, j)) {
-	          found = false
-	          break
-	        }
-	      }
-	      if (found) return i
-	    }
-	  }
-
-	  return -1
-	}
-
-	Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
-	  return this.indexOf(val, byteOffset, encoding) !== -1
-	}
-
-	Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
-	  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
-	}
-
-	Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
-	  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
-	}
-
-	function hexWrite (buf, string, offset, length) {
-	  offset = Number(offset) || 0
-	  var remaining = buf.length - offset
-	  if (!length) {
-	    length = remaining
-	  } else {
-	    length = Number(length)
-	    if (length > remaining) {
-	      length = remaining
-	    }
-	  }
-
-	  // must be an even number of digits
-	  var strLen = string.length
-	  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
-
-	  if (length > strLen / 2) {
-	    length = strLen / 2
-	  }
-	  for (var i = 0; i < length; ++i) {
-	    var parsed = parseInt(string.substr(i * 2, 2), 16)
-	    if (isNaN(parsed)) return i
-	    buf[offset + i] = parsed
-	  }
-	  return i
-	}
-
-	function utf8Write (buf, string, offset, length) {
-	  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
-	}
-
-	function asciiWrite (buf, string, offset, length) {
-	  return blitBuffer(asciiToBytes(string), buf, offset, length)
-	}
-
-	function latin1Write (buf, string, offset, length) {
-	  return asciiWrite(buf, string, offset, length)
-	}
-
-	function base64Write (buf, string, offset, length) {
-	  return blitBuffer(base64ToBytes(string), buf, offset, length)
-	}
-
-	function ucs2Write (buf, string, offset, length) {
-	  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
-	}
-
-	Buffer.prototype.write = function write (string, offset, length, encoding) {
-	  // Buffer#write(string)
-	  if (offset === undefined) {
-	    encoding = 'utf8'
-	    length = this.length
-	    offset = 0
-	  // Buffer#write(string, encoding)
-	  } else if (length === undefined && typeof offset === 'string') {
-	    encoding = offset
-	    length = this.length
-	    offset = 0
-	  // Buffer#write(string, offset[, length][, encoding])
-	  } else if (isFinite(offset)) {
-	    offset = offset | 0
-	    if (isFinite(length)) {
-	      length = length | 0
-	      if (encoding === undefined) encoding = 'utf8'
-	    } else {
-	      encoding = length
-	      length = undefined
-	    }
-	  // legacy write(string, encoding, offset, length) - remove in v0.13
-	  } else {
-	    throw new Error(
-	      'Buffer.write(string, encoding, offset[, length]) is no longer supported'
-	    )
-	  }
-
-	  var remaining = this.length - offset
-	  if (length === undefined || length > remaining) length = remaining
-
-	  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
-	    throw new RangeError('Attempt to write outside buffer bounds')
-	  }
-
-	  if (!encoding) encoding = 'utf8'
-
-	  var loweredCase = false
-	  for (;;) {
-	    switch (encoding) {
-	      case 'hex':
-	        return hexWrite(this, string, offset, length)
-
-	      case 'utf8':
-	      case 'utf-8':
-	        return utf8Write(this, string, offset, length)
-
-	      case 'ascii':
-	        return asciiWrite(this, string, offset, length)
-
-	      case 'latin1':
-	      case 'binary':
-	        return latin1Write(this, string, offset, length)
-
-	      case 'base64':
-	        // Warning: maxLength not taken into account in base64Write
-	        return base64Write(this, string, offset, length)
-
-	      case 'ucs2':
-	      case 'ucs-2':
-	      case 'utf16le':
-	      case 'utf-16le':
-	        return ucs2Write(this, string, offset, length)
-
-	      default:
-	        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
-	        encoding = ('' + encoding).toLowerCase()
-	        loweredCase = true
-	    }
-	  }
-	}
-
-	Buffer.prototype.toJSON = function toJSON () {
-	  return {
-	    type: 'Buffer',
-	    data: Array.prototype.slice.call(this._arr || this, 0)
-	  }
-	}
-
-	function base64Slice (buf, start, end) {
-	  if (start === 0 && end === buf.length) {
-	    return base64.fromByteArray(buf)
-	  } else {
-	    return base64.fromByteArray(buf.slice(start, end))
-	  }
-	}
-
-	function utf8Slice (buf, start, end) {
-	  end = Math.min(buf.length, end)
-	  var res = []
-
-	  var i = start
-	  while (i < end) {
-	    var firstByte = buf[i]
-	    var codePoint = null
-	    var bytesPerSequence = (firstByte > 0xEF) ? 4
-	      : (firstByte > 0xDF) ? 3
-	      : (firstByte > 0xBF) ? 2
-	      : 1
-
-	    if (i + bytesPerSequence <= end) {
-	      var secondByte, thirdByte, fourthByte, tempCodePoint
-
-	      switch (bytesPerSequence) {
-	        case 1:
-	          if (firstByte < 0x80) {
-	            codePoint = firstByte
-	          }
-	          break
-	        case 2:
-	          secondByte = buf[i + 1]
-	          if ((secondByte & 0xC0) === 0x80) {
-	            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
-	            if (tempCodePoint > 0x7F) {
-	              codePoint = tempCodePoint
-	            }
-	          }
-	          break
-	        case 3:
-	          secondByte = buf[i + 1]
-	          thirdByte = buf[i + 2]
-	          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
-	            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
-	            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
-	              codePoint = tempCodePoint
-	            }
-	          }
-	          break
-	        case 4:
-	          secondByte = buf[i + 1]
-	          thirdByte = buf[i + 2]
-	          fourthByte = buf[i + 3]
-	          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
-	            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
-	            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
-	              codePoint = tempCodePoint
-	            }
-	          }
-	      }
-	    }
-
-	    if (codePoint === null) {
-	      // we did not generate a valid codePoint so insert a
-	      // replacement char (U+FFFD) and advance only 1 byte
-	      codePoint = 0xFFFD
-	      bytesPerSequence = 1
-	    } else if (codePoint > 0xFFFF) {
-	      // encode to utf16 (surrogate pair dance)
-	      codePoint -= 0x10000
-	      res.push(codePoint >>> 10 & 0x3FF | 0xD800)
-	      codePoint = 0xDC00 | codePoint & 0x3FF
-	    }
-
-	    res.push(codePoint)
-	    i += bytesPerSequence
-	  }
-
-	  return decodeCodePointsArray(res)
-	}
-
-	// Based on http://stackoverflow.com/a/22747272/680742, the browser with
-	// the lowest limit is Chrome, with 0x10000 args.
-	// We go 1 magnitude less, for safety
-	var MAX_ARGUMENTS_LENGTH = 0x1000
-
-	function decodeCodePointsArray (codePoints) {
-	  var len = codePoints.length
-	  if (len <= MAX_ARGUMENTS_LENGTH) {
-	    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
-	  }
-
-	  // Decode in chunks to avoid "call stack size exceeded".
-	  var res = ''
-	  var i = 0
-	  while (i < len) {
-	    res += String.fromCharCode.apply(
-	      String,
-	      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
-	    )
-	  }
-	  return res
-	}
-
-	function asciiSlice (buf, start, end) {
-	  var ret = ''
-	  end = Math.min(buf.length, end)
-
-	  for (var i = start; i < end; ++i) {
-	    ret += String.fromCharCode(buf[i] & 0x7F)
-	  }
-	  return ret
-	}
-
-	function latin1Slice (buf, start, end) {
-	  var ret = ''
-	  end = Math.min(buf.length, end)
-
-	  for (var i = start; i < end; ++i) {
-	    ret += String.fromCharCode(buf[i])
-	  }
-	  return ret
-	}
-
-	function hexSlice (buf, start, end) {
-	  var len = buf.length
-
-	  if (!start || start < 0) start = 0
-	  if (!end || end < 0 || end > len) end = len
-
-	  var out = ''
-	  for (var i = start; i < end; ++i) {
-	    out += toHex(buf[i])
-	  }
-	  return out
-	}
-
-	function utf16leSlice (buf, start, end) {
-	  var bytes = buf.slice(start, end)
-	  var res = ''
-	  for (var i = 0; i < bytes.length; i += 2) {
-	    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
-	  }
-	  return res
-	}
-
-	Buffer.prototype.slice = function slice (start, end) {
-	  var len = this.length
-	  start = ~~start
-	  end = end === undefined ? len : ~~end
-
-	  if (start < 0) {
-	    start += len
-	    if (start < 0) start = 0
-	  } else if (start > len) {
-	    start = len
-	  }
-
-	  if (end < 0) {
-	    end += len
-	    if (end < 0) end = 0
-	  } else if (end > len) {
-	    end = len
-	  }
-
-	  if (end < start) end = start
-
-	  var newBuf
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    newBuf = this.subarray(start, end)
-	    newBuf.__proto__ = Buffer.prototype
-	  } else {
-	    var sliceLen = end - start
-	    newBuf = new Buffer(sliceLen, undefined)
-	    for (var i = 0; i < sliceLen; ++i) {
-	      newBuf[i] = this[i + start]
-	    }
-	  }
-
-	  return newBuf
-	}
-
-	/*
-	 * Need to make sure that buffer isn't trying to write out of bounds.
-	 */
-	function checkOffset (offset, ext, length) {
-	  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
-	  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
-	}
-
-	Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) checkOffset(offset, byteLength, this.length)
-
-	  var val = this[offset]
-	  var mul = 1
-	  var i = 0
-	  while (++i < byteLength && (mul *= 0x100)) {
-	    val += this[offset + i] * mul
-	  }
-
-	  return val
-	}
-
-	Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) {
-	    checkOffset(offset, byteLength, this.length)
-	  }
-
-	  var val = this[offset + --byteLength]
-	  var mul = 1
-	  while (byteLength > 0 && (mul *= 0x100)) {
-	    val += this[offset + --byteLength] * mul
-	  }
-
-	  return val
-	}
-
-	Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 1, this.length)
-	  return this[offset]
-	}
-
-	Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 2, this.length)
-	  return this[offset] | (this[offset + 1] << 8)
-	}
-
-	Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 2, this.length)
-	  return (this[offset] << 8) | this[offset + 1]
-	}
-
-	Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-
-	  return ((this[offset]) |
-	      (this[offset + 1] << 8) |
-	      (this[offset + 2] << 16)) +
-	      (this[offset + 3] * 0x1000000)
-	}
-
-	Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-
-	  return (this[offset] * 0x1000000) +
-	    ((this[offset + 1] << 16) |
-	    (this[offset + 2] << 8) |
-	    this[offset + 3])
-	}
-
-	Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) checkOffset(offset, byteLength, this.length)
-
-	  var val = this[offset]
-	  var mul = 1
-	  var i = 0
-	  while (++i < byteLength && (mul *= 0x100)) {
-	    val += this[offset + i] * mul
-	  }
-	  mul *= 0x80
-
-	  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
-
-	  return val
-	}
-
-	Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) checkOffset(offset, byteLength, this.length)
-
-	  var i = byteLength
-	  var mul = 1
-	  var val = this[offset + --i]
-	  while (i > 0 && (mul *= 0x100)) {
-	    val += this[offset + --i] * mul
-	  }
-	  mul *= 0x80
-
-	  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
-
-	  return val
-	}
-
-	Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 1, this.length)
-	  if (!(this[offset] & 0x80)) return (this[offset])
-	  return ((0xff - this[offset] + 1) * -1)
-	}
-
-	Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 2, this.length)
-	  var val = this[offset] | (this[offset + 1] << 8)
-	  return (val & 0x8000) ? val | 0xFFFF0000 : val
-	}
-
-	Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 2, this.length)
-	  var val = this[offset + 1] | (this[offset] << 8)
-	  return (val & 0x8000) ? val | 0xFFFF0000 : val
-	}
-
-	Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-
-	  return (this[offset]) |
-	    (this[offset + 1] << 8) |
-	    (this[offset + 2] << 16) |
-	    (this[offset + 3] << 24)
-	}
-
-	Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-
-	  return (this[offset] << 24) |
-	    (this[offset + 1] << 16) |
-	    (this[offset + 2] << 8) |
-	    (this[offset + 3])
-	}
-
-	Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-	  return ieee754.read(this, offset, true, 23, 4)
-	}
-
-	Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 4, this.length)
-	  return ieee754.read(this, offset, false, 23, 4)
-	}
-
-	Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 8, this.length)
-	  return ieee754.read(this, offset, true, 52, 8)
-	}
-
-	Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
-	  if (!noAssert) checkOffset(offset, 8, this.length)
-	  return ieee754.read(this, offset, false, 52, 8)
-	}
-
-	function checkInt (buf, value, offset, ext, max, min) {
-	  if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
-	  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
-	  if (offset + ext > buf.length) throw new RangeError('Index out of range')
-	}
-
-	Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) {
-	    var maxBytes = Math.pow(2, 8 * byteLength) - 1
-	    checkInt(this, value, offset, byteLength, maxBytes, 0)
-	  }
-
-	  var mul = 1
-	  var i = 0
-	  this[offset] = value & 0xFF
-	  while (++i < byteLength && (mul *= 0x100)) {
-	    this[offset + i] = (value / mul) & 0xFF
-	  }
-
-	  return offset + byteLength
-	}
-
-	Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  byteLength = byteLength | 0
-	  if (!noAssert) {
-	    var maxBytes = Math.pow(2, 8 * byteLength) - 1
-	    checkInt(this, value, offset, byteLength, maxBytes, 0)
-	  }
-
-	  var i = byteLength - 1
-	  var mul = 1
-	  this[offset + i] = value & 0xFF
-	  while (--i >= 0 && (mul *= 0x100)) {
-	    this[offset + i] = (value / mul) & 0xFF
-	  }
-
-	  return offset + byteLength
-	}
-
-	Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
-	  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
-	  this[offset] = (value & 0xff)
-	  return offset + 1
-	}
-
-	function objectWriteUInt16 (buf, value, offset, littleEndian) {
-	  if (value < 0) value = 0xffff + value + 1
-	  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
-	    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
-	      (littleEndian ? i : 1 - i) * 8
-	  }
-	}
-
-	Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value & 0xff)
-	    this[offset + 1] = (value >>> 8)
-	  } else {
-	    objectWriteUInt16(this, value, offset, true)
-	  }
-	  return offset + 2
-	}
-
-	Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value >>> 8)
-	    this[offset + 1] = (value & 0xff)
-	  } else {
-	    objectWriteUInt16(this, value, offset, false)
-	  }
-	  return offset + 2
-	}
-
-	function objectWriteUInt32 (buf, value, offset, littleEndian) {
-	  if (value < 0) value = 0xffffffff + value + 1
-	  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
-	    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
-	  }
-	}
-
-	Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset + 3] = (value >>> 24)
-	    this[offset + 2] = (value >>> 16)
-	    this[offset + 1] = (value >>> 8)
-	    this[offset] = (value & 0xff)
-	  } else {
-	    objectWriteUInt32(this, value, offset, true)
-	  }
-	  return offset + 4
-	}
-
-	Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value >>> 24)
-	    this[offset + 1] = (value >>> 16)
-	    this[offset + 2] = (value >>> 8)
-	    this[offset + 3] = (value & 0xff)
-	  } else {
-	    objectWriteUInt32(this, value, offset, false)
-	  }
-	  return offset + 4
-	}
-
-	Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) {
-	    var limit = Math.pow(2, 8 * byteLength - 1)
-
-	    checkInt(this, value, offset, byteLength, limit - 1, -limit)
-	  }
-
-	  var i = 0
-	  var mul = 1
-	  var sub = 0
-	  this[offset] = value & 0xFF
-	  while (++i < byteLength && (mul *= 0x100)) {
-	    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
-	      sub = 1
-	    }
-	    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
-	  }
-
-	  return offset + byteLength
-	}
-
-	Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) {
-	    var limit = Math.pow(2, 8 * byteLength - 1)
-
-	    checkInt(this, value, offset, byteLength, limit - 1, -limit)
-	  }
-
-	  var i = byteLength - 1
-	  var mul = 1
-	  var sub = 0
-	  this[offset + i] = value & 0xFF
-	  while (--i >= 0 && (mul *= 0x100)) {
-	    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
-	      sub = 1
-	    }
-	    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
-	  }
-
-	  return offset + byteLength
-	}
-
-	Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
-	  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
-	  if (value < 0) value = 0xff + value + 1
-	  this[offset] = (value & 0xff)
-	  return offset + 1
-	}
-
-	Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value & 0xff)
-	    this[offset + 1] = (value >>> 8)
-	  } else {
-	    objectWriteUInt16(this, value, offset, true)
-	  }
-	  return offset + 2
-	}
-
-	Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value >>> 8)
-	    this[offset + 1] = (value & 0xff)
-	  } else {
-	    objectWriteUInt16(this, value, offset, false)
-	  }
-	  return offset + 2
-	}
-
-	Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value & 0xff)
-	    this[offset + 1] = (value >>> 8)
-	    this[offset + 2] = (value >>> 16)
-	    this[offset + 3] = (value >>> 24)
-	  } else {
-	    objectWriteUInt32(this, value, offset, true)
-	  }
-	  return offset + 4
-	}
-
-	Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
-	  value = +value
-	  offset = offset | 0
-	  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
-	  if (value < 0) value = 0xffffffff + value + 1
-	  if (Buffer.TYPED_ARRAY_SUPPORT) {
-	    this[offset] = (value >>> 24)
-	    this[offset + 1] = (value >>> 16)
-	    this[offset + 2] = (value >>> 8)
-	    this[offset + 3] = (value & 0xff)
-	  } else {
-	    objectWriteUInt32(this, value, offset, false)
-	  }
-	  return offset + 4
-	}
-
-	function checkIEEE754 (buf, value, offset, ext, max, min) {
-	  if (offset + ext > buf.length) throw new RangeError('Index out of range')
-	  if (offset < 0) throw new RangeError('Index out of range')
-	}
-
-	function writeFloat (buf, value, offset, littleEndian, noAssert) {
-	  if (!noAssert) {
-	    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
-	  }
-	  ieee754.write(buf, value, offset, littleEndian, 23, 4)
-	  return offset + 4
-	}
-
-	Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
-	  return writeFloat(this, value, offset, true, noAssert)
-	}
-
-	Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
-	  return writeFloat(this, value, offset, false, noAssert)
-	}
-
-	function writeDouble (buf, value, offset, littleEndian, noAssert) {
-	  if (!noAssert) {
-	    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
-	  }
-	  ieee754.write(buf, value, offset, littleEndian, 52, 8)
-	  return offset + 8
-	}
-
-	Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
-	  return writeDouble(this, value, offset, true, noAssert)
-	}
-
-	Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
-	  return writeDouble(this, value, offset, false, noAssert)
-	}
-
-	// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
-	Buffer.prototype.copy = function copy (target, targetStart, start, end) {
-	  if (!start) start = 0
-	  if (!end && end !== 0) end = this.length
-	  if (targetStart >= target.length) targetStart = target.length
-	  if (!targetStart) targetStart = 0
-	  if (end > 0 && end < start) end = start
-
-	  // Copy 0 bytes; we're done
-	  if (end === start) return 0
-	  if (target.length === 0 || this.length === 0) return 0
-
-	  // Fatal error conditions
-	  if (targetStart < 0) {
-	    throw new RangeError('targetStart out of bounds')
-	  }
-	  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
-	  if (end < 0) throw new RangeError('sourceEnd out of bounds')
-
-	  // Are we oob?
-	  if (end > this.length) end = this.length
-	  if (target.length - targetStart < end - start) {
-	    end = target.length - targetStart + start
-	  }
-
-	  var len = end - start
-	  var i
-
-	  if (this === target && start < targetStart && targetStart < end) {
-	    // descending copy from end
-	    for (i = len - 1; i >= 0; --i) {
-	      target[i + targetStart] = this[i + start]
-	    }
-	  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
-	    // ascending copy from start
-	    for (i = 0; i < len; ++i) {
-	      target[i + targetStart] = this[i + start]
-	    }
-	  } else {
-	    Uint8Array.prototype.set.call(
-	      target,
-	      this.subarray(start, start + len),
-	      targetStart
-	    )
-	  }
-
-	  return len
-	}
-
-	// Usage:
-	//    buffer.fill(number[, offset[, end]])
-	//    buffer.fill(buffer[, offset[, end]])
-	//    buffer.fill(string[, offset[, end]][, encoding])
-	Buffer.prototype.fill = function fill (val, start, end, encoding) {
-	  // Handle string cases:
-	  if (typeof val === 'string') {
-	    if (typeof start === 'string') {
-	      encoding = start
-	      start = 0
-	      end = this.length
-	    } else if (typeof end === 'string') {
-	      encoding = end
-	      end = this.length
-	    }
-	    if (val.length === 1) {
-	      var code = val.charCodeAt(0)
-	      if (code < 256) {
-	        val = code
-	      }
-	    }
-	    if (encoding !== undefined && typeof encoding !== 'string') {
-	      throw new TypeError('encoding must be a string')
-	    }
-	    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
-	      throw new TypeError('Unknown encoding: ' + encoding)
-	    }
-	  } else if (typeof val === 'number') {
-	    val = val & 255
-	  }
-
-	  // Invalid ranges are not set to a default, so can range check early.
-	  if (start < 0 || this.length < start || this.length < end) {
-	    throw new RangeError('Out of range index')
-	  }
-
-	  if (end <= start) {
-	    return this
-	  }
-
-	  start = start >>> 0
-	  end = end === undefined ? this.length : end >>> 0
-
-	  if (!val) val = 0
-
-	  var i
-	  if (typeof val === 'number') {
-	    for (i = start; i < end; ++i) {
-	      this[i] = val
-	    }
-	  } else {
-	    var bytes = Buffer.isBuffer(val)
-	      ? val
-	      : utf8ToBytes(new Buffer(val, encoding).toString())
-	    var len = bytes.length
-	    for (i = 0; i < end - start; ++i) {
-	      this[i + start] = bytes[i % len]
-	    }
-	  }
-
-	  return this
-	}
-
-	// HELPER FUNCTIONS
-	// ================
-
-	var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
-
-	function base64clean (str) {
-	  // Node strips out invalid characters like \n and \t from the string, base64-js does not
-	  str = stringtrim(str).replace(INVALID_BASE64_RE, '')
-	  // Node converts strings with length < 2 to ''
-	  if (str.length < 2) return ''
-	  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
-	  while (str.length % 4 !== 0) {
-	    str = str + '='
-	  }
-	  return str
-	}
-
-	function stringtrim (str) {
-	  if (str.trim) return str.trim()
-	  return str.replace(/^\s+|\s+$/g, '')
-	}
-
-	function toHex (n) {
-	  if (n < 16) return '0' + n.toString(16)
-	  return n.toString(16)
-	}
-
-	function utf8ToBytes (string, units) {
-	  units = units || Infinity
-	  var codePoint
-	  var length = string.length
-	  var leadSurrogate = null
-	  var bytes = []
-
-	  for (var i = 0; i < length; ++i) {
-	    codePoint = string.charCodeAt(i)
-
-	    // is surrogate component
-	    if (codePoint > 0xD7FF && codePoint < 0xE000) {
-	      // last char was a lead
-	      if (!leadSurrogate) {
-	        // no lead yet
-	        if (codePoint > 0xDBFF) {
-	          // unexpected trail
-	          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
-	          continue
-	        } else if (i + 1 === length) {
-	          // unpaired lead
-	          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
-	          continue
-	        }
-
-	        // valid lead
-	        leadSurrogate = codePoint
-
-	        continue
-	      }
-
-	      // 2 leads in a row
-	      if (codePoint < 0xDC00) {
-	        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
-	        leadSurrogate = codePoint
-	        continue
-	      }
-
-	      // valid surrogate pair
-	      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
-	    } else if (leadSurrogate) {
-	      // valid bmp char, but last char was a lead
-	      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
-	    }
-
-	    leadSurrogate = null
-
-	    // encode utf8
-	    if (codePoint < 0x80) {
-	      if ((units -= 1) < 0) break
-	      bytes.push(codePoint)
-	    } else if (codePoint < 0x800) {
-	      if ((units -= 2) < 0) break
-	      bytes.push(
-	        codePoint >> 0x6 | 0xC0,
-	        codePoint & 0x3F | 0x80
-	      )
-	    } else if (codePoint < 0x10000) {
-	      if ((units -= 3) < 0) break
-	      bytes.push(
-	        codePoint >> 0xC | 0xE0,
-	        codePoint >> 0x6 & 0x3F | 0x80,
-	        codePoint & 0x3F | 0x80
-	      )
-	    } else if (codePoint < 0x110000) {
-	      if ((units -= 4) < 0) break
-	      bytes.push(
-	        codePoint >> 0x12 | 0xF0,
-	        codePoint >> 0xC & 0x3F | 0x80,
-	        codePoint >> 0x6 & 0x3F | 0x80,
-	        codePoint & 0x3F | 0x80
-	      )
-	    } else {
-	      throw new Error('Invalid code point')
-	    }
-	  }
-
-	  return bytes
-	}
-
-	function asciiToBytes (str) {
-	  var byteArray = []
-	  for (var i = 0; i < str.length; ++i) {
-	    // Node's code seems to be doing this and not & 0x7F..
-	    byteArray.push(str.charCodeAt(i) & 0xFF)
-	  }
-	  return byteArray
-	}
-
-	function utf16leToBytes (str, units) {
-	  var c, hi, lo
-	  var byteArray = []
-	  for (var i = 0; i < str.length; ++i) {
-	    if ((units -= 2) < 0) break
-
-	    c = str.charCodeAt(i)
-	    hi = c >> 8
-	    lo = c % 256
-	    byteArray.push(lo)
-	    byteArray.push(hi)
-	  }
-
-	  return byteArray
-	}
-
-	function base64ToBytes (str) {
-	  return base64.toByteArray(base64clean(str))
-	}
-
-	function blitBuffer (src, dst, offset, length) {
-	  for (var i = 0; i < length; ++i) {
-	    if ((i + offset >= dst.length) || (i >= src.length)) break
-	    dst[i + offset] = src[i]
-	  }
-	  return i
-	}
-
-	function isnan (val) {
-	  return val !== val // eslint-disable-line no-self-compare
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(57).Buffer, (function() { return this; }())))
-
-/***/ },
-/* 58 */
-/***/ function(module, exports) {
-
-	'use strict'
-
-	exports.toByteArray = toByteArray
-	exports.fromByteArray = fromByteArray
-
-	var lookup = []
-	var revLookup = []
-	var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
-
-	function init () {
-	  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-	  for (var i = 0, len = code.length; i < len; ++i) {
-	    lookup[i] = code[i]
-	    revLookup[code.charCodeAt(i)] = i
-	  }
-
-	  revLookup['-'.charCodeAt(0)] = 62
-	  revLookup['_'.charCodeAt(0)] = 63
-	}
-
-	init()
-
-	function toByteArray (b64) {
-	  var i, j, l, tmp, placeHolders, arr
-	  var len = b64.length
-
-	  if (len % 4 > 0) {
-	    throw new Error('Invalid string. Length must be a multiple of 4')
-	  }
-
-	  // the number of equal signs (place holders)
-	  // if there are two placeholders, than the two characters before it
-	  // represent one byte
-	  // if there is only one, then the three characters before it represent 2 bytes
-	  // this is just a cheap hack to not do indexOf twice
-	  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
-
-	  // base64 is 4/3 + up to two characters of the original data
-	  arr = new Arr(len * 3 / 4 - placeHolders)
-
-	  // if there are placeholders, only get up to the last complete 4 chars
-	  l = placeHolders > 0 ? len - 4 : len
-
-	  var L = 0
-
-	  for (i = 0, j = 0; i < l; i += 4, j += 3) {
-	    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
-	    arr[L++] = (tmp >> 16) & 0xFF
-	    arr[L++] = (tmp >> 8) & 0xFF
-	    arr[L++] = tmp & 0xFF
-	  }
-
-	  if (placeHolders === 2) {
-	    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
-	    arr[L++] = tmp & 0xFF
-	  } else if (placeHolders === 1) {
-	    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
-	    arr[L++] = (tmp >> 8) & 0xFF
-	    arr[L++] = tmp & 0xFF
-	  }
-
-	  return arr
-	}
-
-	function tripletToBase64 (num) {
-	  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
-	}
-
-	function encodeChunk (uint8, start, end) {
-	  var tmp
-	  var output = []
-	  for (var i = start; i < end; i += 3) {
-	    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
-	    output.push(tripletToBase64(tmp))
-	  }
-	  return output.join('')
-	}
-
-	function fromByteArray (uint8) {
-	  var tmp
-	  var len = uint8.length
-	  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
-	  var output = ''
-	  var parts = []
-	  var maxChunkLength = 16383 // must be multiple of 3
-
-	  // go through the array every three bytes, we'll deal with trailing stuff later
-	  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
-	    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
-	  }
-
-	  // pad the end with zeros, but make sure to not forget the extra bytes
-	  if (extraBytes === 1) {
-	    tmp = uint8[len - 1]
-	    output += lookup[tmp >> 2]
-	    output += lookup[(tmp << 4) & 0x3F]
-	    output += '=='
-	  } else if (extraBytes === 2) {
-	    tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
-	    output += lookup[tmp >> 10]
-	    output += lookup[(tmp >> 4) & 0x3F]
-	    output += lookup[(tmp << 2) & 0x3F]
-	    output += '='
-	  }
-
-	  parts.push(output)
-
-	  return parts.join('')
-	}
-
-
-/***/ },
-/* 59 */
-/***/ function(module, exports) {
-
-	exports.read = function (buffer, offset, isLE, mLen, nBytes) {
-	  var e, m
-	  var eLen = nBytes * 8 - mLen - 1
-	  var eMax = (1 << eLen) - 1
-	  var eBias = eMax >> 1
-	  var nBits = -7
-	  var i = isLE ? (nBytes - 1) : 0
-	  var d = isLE ? -1 : 1
-	  var s = buffer[offset + i]
-
-	  i += d
-
-	  e = s & ((1 << (-nBits)) - 1)
-	  s >>= (-nBits)
-	  nBits += eLen
-	  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
-	  m = e & ((1 << (-nBits)) - 1)
-	  e >>= (-nBits)
-	  nBits += mLen
-	  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
-	  if (e === 0) {
-	    e = 1 - eBias
-	  } else if (e === eMax) {
-	    return m ? NaN : ((s ? -1 : 1) * Infinity)
-	  } else {
-	    m = m + Math.pow(2, mLen)
-	    e = e - eBias
-	  }
-	  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-	}
-
-	exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
-	  var e, m, c
-	  var eLen = nBytes * 8 - mLen - 1
-	  var eMax = (1 << eLen) - 1
-	  var eBias = eMax >> 1
-	  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
-	  var i = isLE ? 0 : (nBytes - 1)
-	  var d = isLE ? 1 : -1
-	  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
-
-	  value = Math.abs(value)
-
-	  if (isNaN(value) || value === Infinity) {
-	    m = isNaN(value) ? 1 : 0
-	    e = eMax
-	  } else {
-	    e = Math.floor(Math.log(value) / Math.LN2)
-	    if (value * (c = Math.pow(2, -e)) < 1) {
-	      e--
-	      c *= 2
-	    }
-	    if (e + eBias >= 1) {
-	      value += rt / c
-	    } else {
-	      value += rt * Math.pow(2, 1 - eBias)
-	    }
-	    if (value * c >= 2) {
-	      e++
-	      c /= 2
-	    }
-
-	    if (e + eBias >= eMax) {
-	      m = 0
-	      e = eMax
-	    } else if (e + eBias >= 1) {
-	      m = (value * c - 1) * Math.pow(2, mLen)
-	      e = e + eBias
-	    } else {
-	      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
-	      e = 0
-	    }
-	  }
-
-	  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-
-	  e = (e << mLen) | m
-	  eLen += mLen
-	  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-
-	  buffer[offset + i - d] |= s * 128
-	}
-
-
-/***/ },
-/* 60 */
-/***/ function(module, exports) {
-
-	var toString = {}.toString;
-
-	module.exports = Array.isArray || function (arr) {
-	  return toString.call(arr) == '[object Array]';
-	};
-
-
-/***/ },
-/* 61 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	// NOTE: These type checking functions intentionally don't use `instanceof`
-	// because it is fragile and can be easily faked with `Object.create()`.
-
-	function isArray(arg) {
-	  if (Array.isArray) {
-	    return Array.isArray(arg);
-	  }
-	  return objectToString(arg) === '[object Array]';
-	}
-	exports.isArray = isArray;
-
-	function isBoolean(arg) {
-	  return typeof arg === 'boolean';
-	}
-	exports.isBoolean = isBoolean;
-
-	function isNull(arg) {
-	  return arg === null;
-	}
-	exports.isNull = isNull;
-
-	function isNullOrUndefined(arg) {
-	  return arg == null;
-	}
-	exports.isNullOrUndefined = isNullOrUndefined;
-
-	function isNumber(arg) {
-	  return typeof arg === 'number';
-	}
-	exports.isNumber = isNumber;
-
-	function isString(arg) {
-	  return typeof arg === 'string';
-	}
-	exports.isString = isString;
-
-	function isSymbol(arg) {
-	  return typeof arg === 'symbol';
-	}
-	exports.isSymbol = isSymbol;
-
-	function isUndefined(arg) {
-	  return arg === void 0;
-	}
-	exports.isUndefined = isUndefined;
-
-	function isRegExp(re) {
-	  return objectToString(re) === '[object RegExp]';
-	}
-	exports.isRegExp = isRegExp;
-
-	function isObject(arg) {
-	  return typeof arg === 'object' && arg !== null;
-	}
-	exports.isObject = isObject;
-
-	function isDate(d) {
-	  return objectToString(d) === '[object Date]';
-	}
-	exports.isDate = isDate;
-
-	function isError(e) {
-	  return (objectToString(e) === '[object Error]' || e instanceof Error);
-	}
-	exports.isError = isError;
-
-	function isFunction(arg) {
-	  return typeof arg === 'function';
-	}
-	exports.isFunction = isFunction;
-
-	function isPrimitive(arg) {
-	  return arg === null ||
-	         typeof arg === 'boolean' ||
-	         typeof arg === 'number' ||
-	         typeof arg === 'string' ||
-	         typeof arg === 'symbol' ||  // ES6 symbol
-	         typeof arg === 'undefined';
-	}
-	exports.isPrimitive = isPrimitive;
-
-	exports.isBuffer = Buffer.isBuffer;
-
-	function objectToString(o) {
-	  return Object.prototype.toString.call(o);
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(57).Buffer))
-
-/***/ },
-/* 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) */
-
-/***/ },
-/* 64 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	// a duplex stream is just a stream that is both readable and writable.
-	// Since JS doesn't have multiple prototypal inheritance, this class
-	// prototypally inherits from Readable, and then parasitically from
-	// Writable.
-
-	module.exports = Duplex;
-
-	/*<replacement>*/
-	var objectKeys = Object.keys || function (obj) {
-	  var keys = [];
-	  for (var key in obj) keys.push(key);
-	  return keys;
-	}
-	/*</replacement>*/
-
-
-	/*<replacement>*/
-	var util = __webpack_require__(61);
-	util.inherits = __webpack_require__(62);
-	/*</replacement>*/
-
-	var Readable = __webpack_require__(55);
-	var Writable = __webpack_require__(65);
-
-	util.inherits(Duplex, Readable);
-
-	forEach(objectKeys(Writable.prototype), function(method) {
-	  if (!Duplex.prototype[method])
-	    Duplex.prototype[method] = Writable.prototype[method];
-	});
-
-	function Duplex(options) {
-	  if (!(this instanceof Duplex))
-	    return new Duplex(options);
-
-	  Readable.call(this, options);
-	  Writable.call(this, options);
-
-	  if (options && options.readable === false)
-	    this.readable = false;
-
-	  if (options && options.writable === false)
-	    this.writable = false;
-
-	  this.allowHalfOpen = true;
-	  if (options && options.allowHalfOpen === false)
-	    this.allowHalfOpen = false;
-
-	  this.once('end', onend);
-	}
-
-	// the no-half-open enforcer
-	function onend() {
-	  // if we allow half-open state, or if the writable side ended,
-	  // then we're ok.
-	  if (this.allowHalfOpen || this._writableState.ended)
-	    return;
-
-	  // no more data can be written.
-	  // But allow more writes to happen in this tick.
-	  process.nextTick(this.end.bind(this));
-	}
-
-	function forEach (xs, f) {
-	  for (var i = 0, l = xs.length; i < l; i++) {
-	    f(xs[i], i);
-	  }
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
-
-/***/ },
-/* 65 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	// A bit simpler than readable streams.
-	// Implement an async ._write(chunk, cb), and it'll handle all
-	// the drain event emission and buffering.
-
-	module.exports = Writable;
-
-	/*<replacement>*/
-	var Buffer = __webpack_require__(57).Buffer;
-	/*</replacement>*/
-
-	Writable.WritableState = WritableState;
-
-
-	/*<replacement>*/
-	var util = __webpack_require__(61);
-	util.inherits = __webpack_require__(62);
-	/*</replacement>*/
-
-	var Stream = __webpack_require__(52);
-
-	util.inherits(Writable, Stream);
-
-	function WriteReq(chunk, encoding, cb) {
-	  this.chunk = chunk;
-	  this.encoding = encoding;
-	  this.callback = cb;
-	}
-
-	function WritableState(options, stream) {
-	  var Duplex = __webpack_require__(64);
-
-	  options = options || {};
-
-	  // the point at which write() starts returning false
-	  // Note: 0 is a valid value, means that we always return false if
-	  // the entire buffer is not flushed immediately on write()
-	  var hwm = options.highWaterMark;
-	  var defaultHwm = options.objectMode ? 16 : 16 * 1024;
-	  this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
-
-	  // object stream flag to indicate whether or not this stream
-	  // contains buffers or objects.
-	  this.objectMode = !!options.objectMode;
-
-	  if (stream instanceof Duplex)
-	    this.objectMode = this.objectMode || !!options.writableObjectMode;
-
-	  // cast to ints.
-	  this.highWaterMark = ~~this.highWaterMark;
-
-	  this.needDrain = false;
-	  // at the start of calling end()
-	  this.ending = false;
-	  // when end() has been called, and returned
-	  this.ended = false;
-	  // when 'finish' is emitted
-	  this.finished = false;
-
-	  // should we decode strings into buffers before passing to _write?
-	  // this is here so that some node-core streams can optimize string
-	  // handling at a lower level.
-	  var noDecode = options.decodeStrings === false;
-	  this.decodeStrings = !noDecode;
-
-	  // Crypto is kind of old and crusty.  Historically, its default string
-	  // encoding is 'binary' so we have to make this configurable.
-	  // Everything else in the universe uses 'utf8', though.
-	  this.defaultEncoding = options.defaultEncoding || 'utf8';
-
-	  // not an actual buffer we keep track of, but a measurement
-	  // of how much we're waiting to get pushed to some underlying
-	  // socket or file.
-	  this.length = 0;
-
-	  // a flag to see when we're in the middle of a write.
-	  this.writing = false;
-
-	  // when true all writes will be buffered until .uncork() call
-	  this.corked = 0;
-
-	  // a flag to be able to tell if the onwrite cb is called immediately,
-	  // or on a later tick.  We set this to true at first, because any
-	  // actions that shouldn't happen until "later" should generally also
-	  // not happen before the first write call.
-	  this.sync = true;
-
-	  // a flag to know if we're processing previously buffered items, which
-	  // may call the _write() callback in the same tick, so that we don't
-	  // end up in an overlapped onwrite situation.
-	  this.bufferProcessing = false;
-
-	  // the callback that's passed to _write(chunk,cb)
-	  this.onwrite = function(er) {
-	    onwrite(stream, er);
-	  };
-
-	  // the callback that the user supplies to write(chunk,encoding,cb)
-	  this.writecb = null;
-
-	  // the amount that is being written when _write is called.
-	  this.writelen = 0;
-
-	  this.buffer = [];
-
-	  // number of pending user-supplied write callbacks
-	  // this must be 0 before 'finish' can be emitted
-	  this.pendingcb = 0;
-
-	  // emit prefinish if the only thing we're waiting for is _write cbs
-	  // This is relevant for synchronous Transform streams
-	  this.prefinished = false;
-
-	  // True if the error was already emitted and should not be thrown again
-	  this.errorEmitted = false;
-	}
-
-	function Writable(options) {
-	  var Duplex = __webpack_require__(64);
-
-	  // Writable ctor is applied to Duplexes, though they're not
-	  // instanceof Writable, they're instanceof Readable.
-	  if (!(this instanceof Writable) && !(this instanceof Duplex))
-	    return new Writable(options);
-
-	  this._writableState = new WritableState(options, this);
-
-	  // legacy.
-	  this.writable = true;
-
-	  Stream.call(this);
-	}
-
-	// Otherwise people can pipe Writable streams, which is just wrong.
-	Writable.prototype.pipe = function() {
-	  this.emit('error', new Error('Cannot pipe. Not readable.'));
-	};
-
-
-	function writeAfterEnd(stream, state, cb) {
-	  var er = new Error('write after end');
-	  // TODO: defer error events consistently everywhere, not just the cb
-	  stream.emit('error', er);
-	  process.nextTick(function() {
-	    cb(er);
-	  });
-	}
-
-	// If we get something that is not a buffer, string, null, or undefined,
-	// and we're not in objectMode, then that's an error.
-	// Otherwise stream chunks are all considered to be of length=1, and the
-	// watermarks determine how many objects to keep in the buffer, rather than
-	// how many bytes or characters.
-	function validChunk(stream, state, chunk, cb) {
-	  var valid = true;
-	  if (!util.isBuffer(chunk) &&
-	      !util.isString(chunk) &&
-	      !util.isNullOrUndefined(chunk) &&
-	      !state.objectMode) {
-	    var er = new TypeError('Invalid non-string/buffer chunk');
-	    stream.emit('error', er);
-	    process.nextTick(function() {
-	      cb(er);
-	    });
-	    valid = false;
-	  }
-	  return valid;
-	}
-
-	Writable.prototype.write = function(chunk, encoding, cb) {
-	  var state = this._writableState;
-	  var ret = false;
-
-	  if (util.isFunction(encoding)) {
-	    cb = encoding;
-	    encoding = null;
-	  }
-
-	  if (util.isBuffer(chunk))
-	    encoding = 'buffer';
-	  else if (!encoding)
-	    encoding = state.defaultEncoding;
-
-	  if (!util.isFunction(cb))
-	    cb = function() {};
-
-	  if (state.ended)
-	    writeAfterEnd(this, state, cb);
-	  else if (validChunk(this, state, chunk, cb)) {
-	    state.pendingcb++;
-	    ret = writeOrBuffer(this, state, chunk, encoding, cb);
-	  }
-
-	  return ret;
-	};
-
-	Writable.prototype.cork = function() {
-	  var state = this._writableState;
-
-	  state.corked++;
-	};
-
-	Writable.prototype.uncork = function() {
-	  var state = this._writableState;
-
-	  if (state.corked) {
-	    state.corked--;
-
-	    if (!state.writing &&
-	        !state.corked &&
-	        !state.finished &&
-	        !state.bufferProcessing &&
-	        state.buffer.length)
-	      clearBuffer(this, state);
-	  }
-	};
-
-	function decodeChunk(state, chunk, encoding) {
-	  if (!state.objectMode &&
-	      state.decodeStrings !== false &&
-	      util.isString(chunk)) {
-	    chunk = new Buffer(chunk, encoding);
-	  }
-	  return chunk;
-	}
-
-	// if we're already writing something, then just put this
-	// in the queue, and wait our turn.  Otherwise, call _write
-	// If we return false, then we need a drain event, so set that flag.
-	function writeOrBuffer(stream, state, chunk, encoding, cb) {
-	  chunk = decodeChunk(state, chunk, encoding);
-	  if (util.isBuffer(chunk))
-	    encoding = 'buffer';
-	  var len = state.objectMode ? 1 : chunk.length;
-
-	  state.length += len;
-
-	  var ret = state.length < state.highWaterMark;
-	  // we must ensure that previous needDrain will not be reset to false.
-	  if (!ret)
-	    state.needDrain = true;
-
-	  if (state.writing || state.corked)
-	    state.buffer.push(new WriteReq(chunk, encoding, cb));
-	  else
-	    doWrite(stream, state, false, len, chunk, encoding, cb);
-
-	  return ret;
-	}
-
-	function doWrite(stream, state, writev, len, chunk, encoding, cb) {
-	  state.writelen = len;
-	  state.writecb = cb;
-	  state.writing = true;
-	  state.sync = true;
-	  if (writev)
-	    stream._writev(chunk, state.onwrite);
-	  else
-	    stream._write(chunk, encoding, state.onwrite);
-	  state.sync = false;
-	}
-
-	function onwriteError(stream, state, sync, er, cb) {
-	  if (sync)
-	    process.nextTick(function() {
-	      state.pendingcb--;
-	      cb(er);
-	    });
-	  else {
-	    state.pendingcb--;
-	    cb(er);
-	  }
-
-	  stream._writableState.errorEmitted = true;
-	  stream.emit('error', er);
-	}
-
-	function onwriteStateUpdate(state) {
-	  state.writing = false;
-	  state.writecb = null;
-	  state.length -= state.writelen;
-	  state.writelen = 0;
-	}
-
-	function onwrite(stream, er) {
-	  var state = stream._writableState;
-	  var sync = state.sync;
-	  var cb = state.writecb;
-
-	  onwriteStateUpdate(state);
-
-	  if (er)
-	    onwriteError(stream, state, sync, er, cb);
-	  else {
-	    // Check if we're actually ready to finish, but don't emit yet
-	    var finished = needFinish(stream, state);
-
-	    if (!finished &&
-	        !state.corked &&
-	        !state.bufferProcessing &&
-	        state.buffer.length) {
-	      clearBuffer(stream, state);
-	    }
-
-	    if (sync) {
-	      process.nextTick(function() {
-	        afterWrite(stream, state, finished, cb);
-	      });
-	    } else {
-	      afterWrite(stream, state, finished, cb);
-	    }
-	  }
-	}
-
-	function afterWrite(stream, state, finished, cb) {
-	  if (!finished)
-	    onwriteDrain(stream, state);
-	  state.pendingcb--;
-	  cb();
-	  finishMaybe(stream, state);
-	}
-
-	// Must force callback to be called on nextTick, so that we don't
-	// emit 'drain' before the write() consumer gets the 'false' return
-	// value, and has a chance to attach a 'drain' listener.
-	function onwriteDrain(stream, state) {
-	  if (state.length === 0 && state.needDrain) {
-	    state.needDrain = false;
-	    stream.emit('drain');
-	  }
-	}
-
-
-	// if there's something in the buffer waiting, then process it
-	function clearBuffer(stream, state) {
-	  state.bufferProcessing = true;
-
-	  if (stream._writev && state.buffer.length > 1) {
-	    // Fast case, write everything using _writev()
-	    var cbs = [];
-	    for (var c = 0; c < state.buffer.length; c++)
-	      cbs.push(state.buffer[c].callback);
-
-	    // count the one we are adding, as well.
-	    // TODO(isaacs) clean this up
-	    state.pendingcb++;
-	    doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
-	      for (var i = 0; i < cbs.length; i++) {
-	        state.pendingcb--;
-	        cbs[i](err);
-	      }
-	    });
-
-	    // Clear buffer
-	    state.buffer = [];
-	  } else {
-	    // Slow case, write chunks one-by-one
-	    for (var c = 0; c < state.buffer.length; c++) {
-	      var entry = state.buffer[c];
-	      var chunk = entry.chunk;
-	      var encoding = entry.encoding;
-	      var cb = entry.callback;
-	      var len = state.objectMode ? 1 : chunk.length;
-
-	      doWrite(stream, state, false, len, chunk, encoding, cb);
-
-	      // if we didn't call the onwrite immediately, then
-	      // it means that we need to wait until it does.
-	      // also, that means that the chunk and cb are currently
-	      // being processed, so move the buffer counter past them.
-	      if (state.writing) {
-	        c++;
-	        break;
-	      }
-	    }
-
-	    if (c < state.buffer.length)
-	      state.buffer = state.buffer.slice(c);
-	    else
-	      state.buffer.length = 0;
-	  }
-
-	  state.bufferProcessing = false;
-	}
-
-	Writable.prototype._write = function(chunk, encoding, cb) {
-	  cb(new Error('not implemented'));
-
-	};
-
-	Writable.prototype._writev = null;
-
-	Writable.prototype.end = function(chunk, encoding, cb) {
-	  var state = this._writableState;
-
-	  if (util.isFunction(chunk)) {
-	    cb = chunk;
-	    chunk = null;
-	    encoding = null;
-	  } else if (util.isFunction(encoding)) {
-	    cb = encoding;
-	    encoding = null;
-	  }
-
-	  if (!util.isNullOrUndefined(chunk))
-	    this.write(chunk, encoding);
-
-	  // .end() fully uncorks
-	  if (state.corked) {
-	    state.corked = 1;
-	    this.uncork();
-	  }
-
-	  // ignore unnecessary end() calls.
-	  if (!state.ending && !state.finished)
-	    endWritable(this, state, cb);
-	};
-
-
-	function needFinish(stream, state) {
-	  return (state.ending &&
-	          state.length === 0 &&
-	          !state.finished &&
-	          !state.writing);
-	}
-
-	function prefinish(stream, state) {
-	  if (!state.prefinished) {
-	    state.prefinished = true;
-	    stream.emit('prefinish');
-	  }
-	}
-
-	function finishMaybe(stream, state) {
-	  var need = needFinish(stream, state);
-	  if (need) {
-	    if (state.pendingcb === 0) {
-	      prefinish(stream, state);
-	      state.finished = true;
-	      stream.emit('finish');
-	    } else
-	      prefinish(stream, state);
-	  }
-	  return need;
-	}
-
-	function endWritable(stream, state, cb) {
-	  state.ending = true;
-	  finishMaybe(stream, state);
-	  if (cb) {
-	    if (state.finished)
-	      process.nextTick(cb);
-	    else
-	      stream.once('finish', cb);
-	  }
-	  state.ended = true;
-	}
-
-	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
-
-/***/ },
-/* 66 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	var Buffer = __webpack_require__(57).Buffer;
-
-	var isBufferEncoding = Buffer.isEncoding
-	  || function(encoding) {
-	       switch (encoding && encoding.toLowerCase()) {
-	         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
-	         default: return false;
-	       }
-	     }
-
-
-	function assertEncoding(encoding) {
-	  if (encoding && !isBufferEncoding(encoding)) {
-	    throw new Error('Unknown encoding: ' + encoding);
-	  }
-	}
-
-	// StringDecoder provides an interface for efficiently splitting a series of
-	// buffers into a series of JS strings without breaking apart multi-byte
-	// characters. CESU-8 is handled as part of the UTF-8 encoding.
-	//
-	// @TODO Handling all encodings inside a single object makes it very difficult
-	// to reason about this code, so it should be split up in the future.
-	// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
-	// points as used by CESU-8.
-	var StringDecoder = exports.StringDecoder = function(encoding) {
-	  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
-	  assertEncoding(encoding);
-	  switch (this.encoding) {
-	    case 'utf8':
-	      // CESU-8 represents each of Surrogate Pair by 3-bytes
-	      this.surrogateSize = 3;
-	      break;
-	    case 'ucs2':
-	    case 'utf16le':
-	      // UTF-16 represents each of Surrogate Pair by 2-bytes
-	      this.surrogateSize = 2;
-	      this.detectIncompleteChar = utf16DetectIncompleteChar;
-	      break;
-	    case 'base64':
-	      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
-	      this.surrogateSize = 3;
-	      this.detectIncompleteChar = base64DetectIncompleteChar;
-	      break;
-	    default:
-	      this.write = passThroughWrite;
-	      return;
-	  }
-
-	  // Enough space to store all bytes of a single character. UTF-8 needs 4
-	  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
-	  this.charBuffer = new Buffer(6);
-	  // Number of bytes received for the current incomplete multi-byte character.
-	  this.charReceived = 0;
-	  // Number of bytes expected for the current incomplete multi-byte character.
-	  this.charLength = 0;
-	};
-
-
-	// write decodes the given buffer and returns it as JS string that is
-	// guaranteed to not contain any partial multi-byte characters. Any partial
-	// character found at the end of the buffer is buffered up, and will be
-	// returned when calling write again with the remaining bytes.
-	//
-	// Note: Converting a Buffer containing an orphan surrogate to a String
-	// currently works, but converting a String to a Buffer (via `new Buffer`, or
-	// Buffer#write) will replace incomplete surrogates with the unicode
-	// replacement character. See https://codereview.chromium.org/121173009/ .
-	StringDecoder.prototype.write = function(buffer) {
-	  var charStr = '';
-	  // if our last write ended with an incomplete multibyte character
-	  while (this.charLength) {
-	    // determine how many remaining bytes this buffer has to offer for this char
-	    var available = (buffer.length >= this.charLength - this.charReceived) ?
-	        this.charLength - this.charReceived :
-	        buffer.length;
-
-	    // add the new bytes to the char buffer
-	    buffer.copy(this.charBuffer, this.charReceived, 0, available);
-	    this.charReceived += available;
-
-	    if (this.charReceived < this.charLength) {
-	      // still not enough chars in this buffer? wait for more ...
-	      return '';
-	    }
-
-	    // remove bytes belonging to the current character from the buffer
-	    buffer = buffer.slice(available, buffer.length);
-
-	    // get the character that was split
-	    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
-
-	    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
-	    var charCode = charStr.charCodeAt(charStr.length - 1);
-	    if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-	      this.charLength += this.surrogateSize;
-	      charStr = '';
-	      continue;
-	    }
-	    this.charReceived = this.charLength = 0;
-
-	    // if there are no more bytes in this buffer, just emit our char
-	    if (buffer.length === 0) {
-	      return charStr;
-	    }
-	    break;
-	  }
-
-	  // determine and set charLength / charReceived
-	  this.detectIncompleteChar(buffer);
-
-	  var end = buffer.length;
-	  if (this.charLength) {
-	    // buffer the incomplete character bytes we got
-	    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
-	    end -= this.charReceived;
-	  }
-
-	  charStr += buffer.toString(this.encoding, 0, end);
-
-	  var end = charStr.length - 1;
-	  var charCode = charStr.charCodeAt(end);
-	  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
-	  if (charCode >= 0xD800 && charCode <= 0xDBFF) {
-	    var size = this.surrogateSize;
-	    this.charLength += size;
-	    this.charReceived += size;
-	    this.charBuffer.copy(this.charBuffer, size, 0, size);
-	    buffer.copy(this.charBuffer, 0, 0, size);
-	    return charStr.substring(0, end);
-	  }
-
-	  // or just emit the charStr
-	  return charStr;
-	};
-
-	// detectIncompleteChar determines if there is an incomplete UTF-8 character at
-	// the end of the given buffer. If so, it sets this.charLength to the byte
-	// length that character, and sets this.charReceived to the number of bytes
-	// that are available for this character.
-	StringDecoder.prototype.detectIncompleteChar = function(buffer) {
-	  // determine how many bytes we have to check at the end of this buffer
-	  var i = (buffer.length >= 3) ? 3 : buffer.length;
-
-	  // Figure out if one of the last i bytes of our buffer announces an
-	  // incomplete char.
-	  for (; i > 0; i--) {
-	    var c = buffer[buffer.length - i];
-
-	    // See http://en.wikipedia.org/wiki/UTF-8#Description
-
-	    // 110XXXXX
-	    if (i == 1 && c >> 5 == 0x06) {
-	      this.charLength = 2;
-	      break;
-	    }
-
-	    // 1110XXXX
-	    if (i <= 2 && c >> 4 == 0x0E) {
-	      this.charLength = 3;
-	      break;
-	    }
-
-	    // 11110XXX
-	    if (i <= 3 && c >> 3 == 0x1E) {
-	      this.charLength = 4;
-	      break;
-	    }
-	  }
-	  this.charReceived = i;
-	};
-
-	StringDecoder.prototype.end = function(buffer) {
-	  var res = '';
-	  if (buffer && buffer.length)
-	    res = this.write(buffer);
-
-	  if (this.charReceived) {
-	    var cr = this.charReceived;
-	    var buf = this.charBuffer;
-	    var enc = this.encoding;
-	    res += buf.slice(0, cr).toString(enc);
-	  }
-
-	  return res;
-	};
-
-	function passThroughWrite(buffer) {
-	  return buffer.toString(this.encoding);
-	}
-
-	function utf16DetectIncompleteChar(buffer) {
-	  this.charReceived = buffer.length % 2;
-	  this.charLength = this.charReceived ? 2 : 0;
-	}
-
-	function base64DetectIncompleteChar(buffer) {
-	  this.charReceived = buffer.length % 3;
-	  this.charLength = this.charReceived ? 3 : 0;
-	}
-
-
-/***/ },
-/* 67 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-	// a transform stream is a readable/writable stream where you do
-	// something with the data.  Sometimes it's called a "filter",
-	// but that's not a great name for it, since that implies a thing where
-	// some bits pass through, and others are simply ignored.  (That would
-	// be a valid example of a transform, of course.)
-	//
-	// While the output is causally related to the input, it's not a
-	// necessarily symmetric or synchronous transformation.  For example,
-	// a zlib stream might take multiple plain-text writes(), and then
-	// emit a single compressed chunk some time in the future.
-	//
-	// Here's how this works:
-	//
-	// The Transform stream has all the aspects of the readable and writable
-	// stream classes.  When you write(chunk), that calls _write(chunk,cb)
-	// internally, and returns false if there's a lot of pending writes
-	// buffered up.  When you call read(), that calls _read(n) until
-	// there's enough pending readable data buffered up.
-	//
-	// In a transform stream, the written data is placed in a buffer.  When
-	// _read(n) is called, it transforms the queued up data, calling the
-	// buffered _write cb's as it consumes chunks.  If consuming a single
-	// written chunk would result in multiple output chunks, then the first
-	// outputted bit calls the readcb, and subsequent chunks just go into
-	// the read buffer, and will cause it to emit 'readable' if necessary.
-	//
-	// This way, back-pressure is actually determined by the reading side,
-	// since _read has to be called to start processing a new chunk.  However,
-	// a pathological inflate type of transform can cause excessive buffering
-	// here.  For example, imagine a stream where every byte of input is
-	// interpreted as an integer from 0-255, and then results in that many
-	// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
-	// 1kb of data being output.  In this case, you could write a very small
-	// amount of input, and end up with a very large amount of output.  In
-	// such a pathological inflating mechanism, there'd be no way to tell
-	// the system to stop doing the transform.  A single 4MB write could
-	// cause the system to run out of memory.
-	//
-	// However, even in such a pathological case, only a single written chunk
-	// would be consumed, and then the rest would wait (un-transformed) until
-	// the results of the previous transformed chunk were consumed.
-
-	module.exports = Transform;
-
-	var Duplex = __webpack_require__(64);
-
-	/*<replacement>*/
-	var util = __webpack_require__(61);
-	util.inherits = __webpack_require__(62);
-	/*</replacement>*/
-
-	util.inherits(Transform, Duplex);
-
-
-	function TransformState(options, stream) {
-	  this.afterTransform = function(er, data) {
-	    return afterTransform(stream, er, data);
-	  };
-
-	  this.needTransform = false;
-	  this.transforming = false;
-	  this.writecb = null;
-	  this.writechunk = null;
-	}
-
-	function afterTransform(stream, er, data) {
-	  var ts = stream._transformState;
-	  ts.transforming = false;
-
-	  var cb = ts.writecb;
-
-	  if (!cb)
-	    return stream.emit('error', new Error('no writecb in Transform class'));
-
-	  ts.writechunk = null;
-	  ts.writecb = null;
-
-	  if (!util.isNullOrUndefined(data))
-	    stream.push(data);
-
-	  if (cb)
-	    cb(er);
-
-	  var rs = stream._readableState;
-	  rs.reading = false;
-	  if (rs.needReadable || rs.length < rs.highWaterMark) {
-	    stream._read(rs.highWaterMark);
-	  }
-	}
-
-
-	function Transform(options) {
-	  if (!(this instanceof Transform))
-	    return new Transform(options);
-
-	  Duplex.call(this, options);
-
-	  this._transformState = new TransformState(options, this);
-
-	  // when the writable side finishes, then flush out anything remaining.
-	  var stream = this;
-
-	  // start out asking for a readable event once data is transformed.
-	  this._readableState.needReadable = true;
-
-	  // we have implemented the _read method, and done the other things
-	  // that Readable wants before the first _read call, so unset the
-	  // sync guard flag.
-	  this._readableState.sync = false;
-
-	  this.once('prefinish', function() {
-	    if (util.isFunction(this._flush))
-	      this._flush(function(er) {
-	        done(stream, er);
-	      });
-	    else
-	      done(stream);
-	  });
-	}
-
-	Transform.prototype.push = function(chunk, encoding) {
-	  this._transformState.needTransform = false;
-	  return Duplex.prototype.push.call(this, chunk, encoding);
-	};
-
-	// This is the part where you do stuff!
-	// override this function in implementation classes.
-	// 'chunk' is an input chunk.
-	//
-	// Call `push(newChunk)` to pass along transformed output
-	// to the readable side.  You may call 'push' zero or more times.
-	//
-	// Call `cb(err)` when you are done with this chunk.  If you pass
-	// an error, then that'll put the hurt on the whole operation.  If you
-	// never call cb(), then you'll never get another chunk.
-	Transform.prototype._transform = function(chunk, encoding, cb) {
-	  throw new Error('not implemented');
-	};
-
-	Transform.prototype._write = function(chunk, encoding, cb) {
-	  var ts = this._transformState;
-	  ts.writecb = cb;
-	  ts.writechunk = chunk;
-	  ts.writeencoding = encoding;
-	  if (!ts.transforming) {
-	    var rs = this._readableState;
-	    if (ts.needTransform ||
-	        rs.needReadable ||
-	        rs.length < rs.highWaterMark)
-	      this._read(rs.highWaterMark);
-	  }
-	};
-
-	// Doesn't matter what the args are here.
-	// _transform does all the work.
-	// That we got here means that the readable side wants more data.
-	Transform.prototype._read = function(n) {
-	  var ts = this._transformState;
-
-	  if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
-	    ts.transforming = true;
-	    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
-	  } else {
-	    // mark that we need a transform, so that any data that comes in
-	    // will get processed, now that we've asked for it.
-	    ts.needTransform = true;
-	  }
-	};
-
-
-	function done(stream, er) {
-	  if (er)
-	    return stream.emit('error', er);
-
-	  // if there's nothing in the write buffer, then that means
-	  // that nothing more will ever be provided
-	  var ws = stream._writableState;
-	  var ts = stream._transformState;
-
-	  if (ws.length)
-	    throw new Error('calling transform done when ws.length != 0');
-
-	  if (ts.transforming)
-	    throw new Error('calling transform done when still transforming');
-
-	  return stream.push(null);
-	}
-
-
-/***/ },
-/* 68 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// Copyright Joyent, Inc. and other Node contributors.
-	//
-	// Permission is hereby granted, free of charge, to any person obtaining a
-	// copy of this software and associated documentation files (the
-	// "Software"), to deal in the Software without restriction, including
-	// without limitation the rights to use, copy, modify, merge, publish,
-	// distribute, sublicense, and/or sell copies of the Software, and to permit
-	// persons to whom the Software is furnished to do so, subject to the
-	// following conditions:
-	//
-	// The above copyright notice and this permission notice shall be included
-	// in all copies or substantial portions of the Software.
-	//
-	// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-	// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-	// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-	// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-	// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-	// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-	// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-	// a passthrough stream.
-	// basically just the most minimal sort of Transform stream.
-	// Every written chunk gets output as-is.
-
-	module.exports = PassThrough;
-
-	var Transform = __webpack_require__(67);
-
-	/*<replacement>*/
-	var util = __webpack_require__(61);
-	util.inherits = __webpack_require__(62);
-	/*</replacement>*/
-
-	util.inherits(PassThrough, Transform);
-
-	function PassThrough(options) {
-	  if (!(this instanceof PassThrough))
-	    return new PassThrough(options);
-
-	  Transform.call(this, options);
-	}
-
-	PassThrough.prototype._transform = function(chunk, encoding, cb) {
-	  cb(null, chunk);
-	};
-
-
-/***/ },
-/* 69 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = __webpack_require__(65)
-
-
-/***/ },
-/* 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) */
-
-/***/ },
-/* 74 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = ProxyHandler;
-
-	function ProxyHandler(cbs){
-		this._cbs = cbs || {};
-	}
-
-	var EVENTS = __webpack_require__(37).EVENTS;
-	Object.keys(EVENTS).forEach(function(name){
-		if(EVENTS[name] === 0){
-			name = "on" + name;
-			ProxyHandler.prototype[name] = function(){
-				if(this._cbs[name]) this._cbs[name]();
-			};
-		} else if(EVENTS[name] === 1){
-			name = "on" + name;
-			ProxyHandler.prototype[name] = function(a){
-				if(this._cbs[name]) this._cbs[name](a);
-			};
-		} else if(EVENTS[name] === 2){
-			name = "on" + name;
-			ProxyHandler.prototype[name] = function(a, b){
-				if(this._cbs[name]) this._cbs[name](a, b);
-			};
-		} else {
-			throw Error("wrong number of arguments");
-		}
-	});
-
-/***/ },
-/* 75 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var DomUtils = module.exports;
-
-	[
-		__webpack_require__(76),
-		__webpack_require__(82),
-		__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);
-		});
-	});
-
-
-/***/ },
-/* 76 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var ElementType = __webpack_require__(46),
-	    getOuterHTML = __webpack_require__(77),
-	    isTag = ElementType.isTag;
-
-	module.exports = {
-		getInnerHTML: getInnerHTML,
-		getOuterHTML: getOuterHTML,
-		getText: getText
-	};
-
-	function getInnerHTML(elem, opts){
-		return elem.children ? elem.children.map(function(elem){
-			return getOuterHTML(elem, opts);
-		}).join("") : "";
-	}
-
-	function getText(elem){
-		if(Array.isArray(elem)) return elem.map(getText).join("");
-		if(isTag(elem) || elem.type === ElementType.CDATA) return getText(elem.children);
-		if(elem.type === ElementType.Text) return elem.data;
-		return "";
-	}
-
-
-/***/ },
-/* 77 */
-/***/ function(module, exports, __webpack_require__) {
-
-	/*
-	  Module dependencies
-	*/
-	var ElementType = __webpack_require__(78);
-	var entities = __webpack_require__(79);
-
-	/*
-	  Boolean Attributes
-	*/
-	var booleanAttributes = {
-	  __proto__: null,
-	  allowfullscreen: true,
-	  async: true,
-	  autofocus: true,
-	  autoplay: true,
-	  checked: true,
-	  controls: true,
-	  default: true,
-	  defer: true,
-	  disabled: true,
-	  hidden: true,
-	  ismap: true,
-	  loop: true,
-	  multiple: true,
-	  muted: true,
-	  open: true,
-	  readonly: true,
-	  required: true,
-	  reversed: true,
-	  scoped: true,
-	  seamless: true,
-	  selected: true,
-	  typemustmatch: true
-	};
-
-	var unencodedElements = {
-	  __proto__: null,
-	  style: true,
-	  script: true,
-	  xmp: true,
-	  iframe: true,
-	  noembed: true,
-	  noframes: true,
-	  plaintext: true,
-	  noscript: true
-	};
-
-	/*
-	  Format attributes
-	*/
-	function formatAttrs(attributes, opts) {
-	  if (!attributes) return;
-
-	  var output = '',
-	      value;
-
-	  // Loop through the attributes
-	  for (var key in attributes) {
-	    value = attributes[key];
-	    if (output) {
-	      output += ' ';
-	    }
-
-	    if (!value && booleanAttributes[key]) {
-	      output += key;
-	    } else {
-	      output += key + '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
-	    }
-	  }
-
-	  return output;
-	}
-
-	/*
-	  Self-enclosing tags (stolen from node-htmlparser)
-	*/
-	var singleTag = {
-	  __proto__: null,
-	  area: true,
-	  base: true,
-	  basefont: true,
-	  br: true,
-	  col: true,
-	  command: true,
-	  embed: true,
-	  frame: true,
-	  hr: true,
-	  img: true,
-	  input: true,
-	  isindex: true,
-	  keygen: true,
-	  link: true,
-	  meta: true,
-	  param: true,
-	  source: true,
-	  track: true,
-	  wbr: true,
-	};
-
-
-	var render = module.exports = function(dom, opts) {
-	  if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
-	  opts = opts || {};
-
-	  var output = '';
-
-	  for(var i = 0; i < dom.length; i++){
-	    var elem = dom[i];
-
-	    if (elem.type === 'root')
-	      output += render(elem.children, opts);
-	    else if (ElementType.isTag(elem))
-	      output += renderTag(elem, opts);
-	    else if (elem.type === ElementType.Directive)
-	      output += renderDirective(elem);
-	    else if (elem.type === ElementType.Comment)
-	      output += renderComment(elem);
-	    else if (elem.type === ElementType.CDATA)
-	      output += renderCdata(elem);
-	    else
-	      output += renderText(elem, opts);
-	  }
-
-	  return output;
-	};
-
-	function renderTag(elem, opts) {
-	  // Handle SVG
-	  if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
-
-	  var tag = '<' + elem.name,
-	      attribs = formatAttrs(elem.attribs, opts);
-
-	  if (attribs) {
-	    tag += ' ' + attribs;
-	  }
-
-	  if (
-	    opts.xmlMode
-	    && (!elem.children || elem.children.length === 0)
-	  ) {
-	    tag += '/>';
-	  } else {
-	    tag += '>';
-	    if (elem.children) {
-	      tag += render(elem.children, opts);
-	    }
-
-	    if (!singleTag[elem.name] || opts.xmlMode) {
-	      tag += '</' + elem.name + '>';
-	    }
-	  }
-
-	  return tag;
-	}
-
-	function renderDirective(elem) {
-	  return '<' + elem.data + '>';
-	}
-
-	function renderText(elem, opts) {
-	  var data = elem.data || '';
-
-	  // if entities weren't decoded, no need to encode them back
-	  if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
-	    data = entities.encodeXML(data);
-	  }
-
-	  return data;
-	}
-
-	function renderCdata(elem) {
-	  return '<![CDATA[' + elem.children[0].data + ']]>';
-	}
-
-	function renderComment(elem) {
-	  return '<!--' + elem.data + '-->';
-	}
-
-
-/***/ },
-/* 78 */
-/***/ function(module, exports) {
-
-	//Types of elements found in the DOM
-	module.exports = {
-		Text: "text", //Text
-		Directive: "directive", //<? ... ?>
-		Comment: "comment", //<!-- ... -->
-		Script: "script", //<script> tags
-		Style: "style", //<style> tags
-		Tag: "tag", //Any tag
-		CDATA: "cdata", //<![CDATA[ ... ]]>
-
-		isTag: function(elem){
-			return elem.type === "tag" || elem.type === "script" || elem.type === "style";
-		}
-	};
-
-/***/ },
-/* 79 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var encode = __webpack_require__(80),
-	    decode = __webpack_require__(81);
-
-	exports.decode = function(data, level){
-		return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
-	};
-
-	exports.decodeStrict = function(data, level){
-		return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data);
-	};
-
-	exports.encode = function(data, level){
-		return (!level || level <= 0 ? encode.XML : encode.HTML)(data);
-	};
-
-	exports.encodeXML = encode.XML;
-
-	exports.encodeHTML4 =
-	exports.encodeHTML5 =
-	exports.encodeHTML  = encode.HTML;
-
-	exports.decodeXML =
-	exports.decodeXMLStrict = decode.XML;
-
-	exports.decodeHTML4 =
-	exports.decodeHTML5 =
-	exports.decodeHTML = decode.HTML;
-
-	exports.decodeHTML4Strict =
-	exports.decodeHTML5Strict =
-	exports.decodeHTMLStrict = decode.HTMLStrict;
-
-	exports.escape = encode.escape;
-
-
-/***/ },
-/* 80 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var inverseXML = getInverseObj(__webpack_require__(44)),
-	    xmlReplacer = getInverseReplacer(inverseXML);
-
-	exports.XML = getInverse(inverseXML, xmlReplacer);
-
-	var inverseHTML = getInverseObj(__webpack_require__(42)),
-	    htmlReplacer = getInverseReplacer(inverseHTML);
-
-	exports.HTML = getInverse(inverseHTML, htmlReplacer);
-
-	function getInverseObj(obj){
-		return Object.keys(obj).sort().reduce(function(inverse, name){
-			inverse[obj[name]] = "&" + name + ";";
-			return inverse;
-		}, {});
-	}
-
-	function getInverseReplacer(inverse){
-		var single = [],
-		    multiple = [];
-
-		Object.keys(inverse).forEach(function(k){
-			if(k.length === 1){
-				single.push("\\" + k);
-			} else {
-				multiple.push(k);
-			}
-		});
-
-		//TODO add ranges
-		multiple.unshift("[" + single.join("") + "]");
-
-		return new RegExp(multiple.join("|"), "g");
-	}
-
-	var re_nonASCII = /[^\0-\x7F]/g,
-	    re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
-
-	function singleCharReplacer(c){
-		return "&#x" + c.charCodeAt(0).toString(16).toUpperCase() + ";";
-	}
-
-	function astralReplacer(c){
-		// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
-		var high = c.charCodeAt(0);
-		var low  = c.charCodeAt(1);
-		var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
-		return "&#x" + codePoint.toString(16).toUpperCase() + ";";
-	}
-
-	function getInverse(inverse, re){
-		function func(name){
-			return inverse[name];
-		}
-
-		return function(data){
-			return data
-					.replace(re, func)
-					.replace(re_astralSymbols, astralReplacer)
-					.replace(re_nonASCII, singleCharReplacer);
-		};
-	}
-
-	var re_xmlChars = getInverseReplacer(inverseXML);
-
-	function escapeXML(data){
-		return data
-				.replace(re_xmlChars, singleCharReplacer)
-				.replace(re_astralSymbols, astralReplacer)
-				.replace(re_nonASCII, singleCharReplacer);
-	}
-
-	exports.escape = escapeXML;
-
-
-/***/ },
-/* 81 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var entityMap = __webpack_require__(42),
-	    legacyMap = __webpack_require__(43),
-	    xmlMap    = __webpack_require__(44),
-	    decodeCodePoint = __webpack_require__(40);
-
-	var decodeXMLStrict  = getStrictDecoder(xmlMap),
-	    decodeHTMLStrict = getStrictDecoder(entityMap);
-
-	function getStrictDecoder(map){
-		var keys = Object.keys(map).join("|"),
-		    replace = getReplacer(map);
-
-		keys += "|#[xX][\\da-fA-F]+|#\\d+";
-
-		var re = new RegExp("&(?:" + keys + ");", "g");
-
-		return function(str){
-			return String(str).replace(re, replace);
-		};
-	}
-
-	var decodeHTML = (function(){
-		var legacy = Object.keys(legacyMap)
-			.sort(sorter);
-
-		var keys = Object.keys(entityMap)
-			.sort(sorter);
-
-		for(var i = 0, j = 0; i < keys.length; i++){
-			if(legacy[j] === keys[i]){
-				keys[i] += ";?";
-				j++;
-			} else {
-				keys[i] += ";";
-			}
-		}
-
-		var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"),
-		    replace = getReplacer(entityMap);
-
-		function replacer(str){
-			if(str.substr(-1) !== ";") str += ";";
-			return replace(str);
-		}
-
-		//TODO consider creating a merged map
-		return function(str){
-			return String(str).replace(re, replacer);
-		};
-	}());
-
-	function sorter(a, b){
-		return a < b ? 1 : -1;
-	}
-
-	function getReplacer(map){
-		return function replace(str){
-			if(str.charAt(1) === "#"){
-				if(str.charAt(2) === "X" || str.charAt(2) === "x"){
-					return decodeCodePoint(parseInt(str.substr(3), 16));
-				}
-				return decodeCodePoint(parseInt(str.substr(2), 10));
-			}
-			return map[str.slice(1, -1)];
-		};
-	}
-
-	module.exports = {
-		XML: decodeXMLStrict,
-		HTML: decodeHTML,
-		HTMLStrict: decodeHTMLStrict
-	};
-
-/***/ },
-/* 82 */
-/***/ function(module, exports) {
-
-	var getChildren = exports.getChildren = function(elem){
-		return elem.children;
-	};
-
-	var getParent = exports.getParent = function(elem){
-		return elem.parent;
-	};
-
-	exports.getSiblings = function(elem){
-		var parent = getParent(elem);
-		return parent ? getChildren(parent) : [elem];
-	};
-
-	exports.getAttributeValue = function(elem, name){
-		return elem.attribs && elem.attribs[name];
-	};
-
-	exports.hasAttrib = function(elem, name){
-		return !!elem.attribs && hasOwnProperty.call(elem.attribs, name);
-	};
-
-	exports.getName = function(elem){
-		return elem.name;
-	};
-
-
-/***/ },
-/* 83 */
-/***/ function(module, exports) {
-
-	exports.removeElement = function(elem){
-		if(elem.prev) elem.prev.next = elem.next;
-		if(elem.next) elem.next.prev = elem.prev;
-
-		if(elem.parent){
-			var childs = elem.parent.children;
-			childs.splice(childs.lastIndexOf(elem), 1);
-		}
-	};
-
-	exports.replaceElement = function(elem, replacement){
-		var prev = replacement.prev = elem.prev;
-		if(prev){
-			prev.next = replacement;
-		}
-
-		var next = replacement.next = elem.next;
-		if(next){
-			next.prev = replacement;
-		}
-
-		var parent = replacement.parent = elem.parent;
-		if(parent){
-			var childs = parent.children;
-			childs[childs.lastIndexOf(elem)] = replacement;
-		}
-	};
-
-	exports.appendChild = function(elem, child){
-		child.parent = elem;
-
-		if(elem.children.push(child) !== 1){
-			var sibling = elem.children[elem.children.length - 2];
-			sibling.next = child;
-			child.prev = sibling;
-			child.next = null;
-		}
-	};
-
-	exports.append = function(elem, next){
-		var parent = elem.parent,
-			currNext = elem.next;
-
-		next.next = currNext;
-		next.prev = elem;
-		elem.next = next;
-		next.parent = parent;
-
-		if(currNext){
-			currNext.prev = next;
-			if(parent){
-				var childs = parent.children;
-				childs.splice(childs.lastIndexOf(currNext), 0, next);
-			}
-		} else if(parent){
-			parent.children.push(next);
-		}
-	};
-
-	exports.prepend = function(elem, prev){
-		var parent = elem.parent;
-		if(parent){
-			var childs = parent.children;
-			childs.splice(childs.lastIndexOf(elem), 0, prev);
-		}
-
-		if(elem.prev){
-			elem.prev.next = prev;
-		}
-		
-		prev.parent = parent;
-		prev.prev = elem.prev;
-		prev.next = elem;
-		elem.prev = prev;
-	};
-
-
-
-
-/***/ },
-/* 84 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var isTag = __webpack_require__(46).isTag;
-
-	module.exports = {
-		filter: filter,
-		find: find,
-		findOneChild: findOneChild,
-		findOne: findOne,
-		existsOne: existsOne,
-		findAll: findAll
-	};
-
-	function filter(test, element, recurse, limit){
-		if(!Array.isArray(element)) element = [element];
-
-		if(typeof limit !== "number" || !isFinite(limit)){
-			limit = Infinity;
-		}
-		return find(test, element, recurse !== false, limit);
-	}
-
-	function find(test, elems, recurse, limit){
-		var result = [], childs;
-
-		for(var i = 0, j = elems.length; i < j; i++){
-			if(test(elems[i])){
-				result.push(elems[i]);
-				if(--limit <= 0) break;
-			}
-
-			childs = elems[i].children;
-			if(recurse && childs && childs.length > 0){
-				childs = find(test, childs, recurse, limit);
-				result = result.concat(childs);
-				limit -= childs.length;
-				if(limit <= 0) break;
-			}
-		}
-
-		return result;
-	}
-
-	function findOneChild(test, elems){
-		for(var i = 0, l = elems.length; i < l; i++){
-			if(test(elems[i])) return elems[i];
-		}
-
-		return null;
-	}
-
-	function findOne(test, elems){
-		var elem = null;
-
-		for(var i = 0, l = elems.length; i < l && !elem; i++){
-			if(!isTag(elems[i])){
-				continue;
-			} else if(test(elems[i])){
-				elem = elems[i];
-			} else if(elems[i].children.length > 0){
-				elem = findOne(test, elems[i].children);
-			}
-		}
-
-		return elem;
-	}
-
-	function existsOne(test, elems){
-		for(var i = 0, l = elems.length; i < l; i++){
-			if(
-				isTag(elems[i]) && (
-					test(elems[i]) || (
-						elems[i].children.length > 0 &&
-						existsOne(test, elems[i].children)
-					)
-				)
-			){
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	function findAll(test, elems){
-		var result = [];
-		for(var i = 0, j = elems.length; i < j; i++){
-			if(!isTag(elems[i])) continue;
-			if(test(elems[i])) result.push(elems[i]);
-
-			if(elems[i].children.length > 0){
-				result = result.concat(findAll(test, elems[i].children));
-			}
-		}
-		return result;
-	}
-
-
-/***/ },
-/* 85 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var ElementType = __webpack_require__(46);
-	var isTag = exports.isTag = ElementType.isTag;
-
-	exports.testElement = function(options, element){
-		for(var key in options){
-			if(!options.hasOwnProperty(key));
-			else if(key === "tag_name"){
-				if(!isTag(element) || !options.tag_name(element.name)){
-					return false;
-				}
-			} else if(key === "tag_type"){
-				if(!options.tag_type(element.type)) return false;
-			} else if(key === "tag_contains"){
-				if(isTag(element) || !options.tag_contains(element.data)){
-					return false;
-				}
-			} else if(!element.attribs || !options[key](element.attribs[key])){
-				return false;
-			}
-		}
-		return true;
-	};
-
-	var Checks = {
-		tag_name: function(name){
-			if(typeof name === "function"){
-				return function(elem){ return isTag(elem) && name(elem.name); };
-			} else if(name === "*"){
-				return isTag;
-			} else {
-				return function(elem){ return isTag(elem) && elem.name === name; };
-			}
-		},
-		tag_type: function(type){
-			if(typeof type === "function"){
-				return function(elem){ return type(elem.type); };
-			} else {
-				return function(elem){ return elem.type === type; };
-			}
-		},
-		tag_contains: function(data){
-			if(typeof data === "function"){
-				return function(elem){ return !isTag(elem) && data(elem.data); };
-			} else {
-				return function(elem){ return !isTag(elem) && elem.data === data; };
-			}
-		}
-	};
-
-	function getAttribCheck(attrib, value){
-		if(typeof value === "function"){
-			return function(elem){ return elem.attribs && value(elem.attribs[attrib]); };
-		} else {
-			return function(elem){ return elem.attribs && elem.attribs[attrib] === value; };
-		}
-	}
-
-	function combineFuncs(a, b){
-		return function(elem){
-			return a(elem) || b(elem);
-		};
-	}
-
-	exports.getElements = function(options, element, recurse, limit){
-		var funcs = Object.keys(options).map(function(key){
-			var value = options[key];
-			return key in Checks ? Checks[key](value) : getAttribCheck(key, value);
-		});
-
-		return funcs.length === 0 ? [] : this.filter(
-			funcs.reduce(combineFuncs),
-			element, recurse, limit
-		);
-	};
-
-	exports.getElementById = function(id, element, recurse){
-		if(!Array.isArray(element)) element = [element];
-		return this.findOne(getAttribCheck("id", id), element, recurse !== false);
-	};
-
-	exports.getElementsByTagName = function(name, element, recurse, limit){
-		return this.filter(Checks.tag_name(name), element, recurse, limit);
-	};
-
-	exports.getElementsByTagType = function(type, element, recurse, limit){
-		return this.filter(Checks.tag_type(type), element, recurse, limit);
-	};
-
-
-/***/ },
-/* 86 */
-/***/ function(module, exports) {
-
-	// removeSubsets
-	// Given an array of nodes, remove any member that is contained by another.
-	exports.removeSubsets = function(nodes) {
-		var idx = nodes.length, node, ancestor, replace;
-
-		// Check if each node (or one of its ancestors) is already contained in the
-		// array.
-		while (--idx > -1) {
-			node = ancestor = nodes[idx];
-
-			// Temporarily remove the node under consideration
-			nodes[idx] = null;
-			replace = true;
-
-			while (ancestor) {
-				if (nodes.indexOf(ancestor) > -1) {
-					replace = false;
-					nodes.splice(idx, 1);
-					break;
-				}
-				ancestor = ancestor.parent;
-			}
-
-			// If the node has been found to be unique, re-insert it.
-			if (replace) {
-				nodes[idx] = node;
-			}
-		}
-
-		return nodes;
-	};
-
-	// Source: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
-	var POSITION = {
-		DISCONNECTED: 1,
-		PRECEDING: 2,
-		FOLLOWING: 4,
-		CONTAINS: 8,
-		CONTAINED_BY: 16
-	};
-
-	// Compare the position of one node against another node in any other document.
-	// The return value is a bitmask with the following values:
-	//
-	// document order:
-	// > There is an ordering, document order, defined on all the nodes in the
-	// > document corresponding to the order in which the first character of the
-	// > XML representation of each node occurs in the XML representation of the
-	// > document after expansion of general entities. Thus, the document element
-	// > node will be the first node. Element nodes occur before their children.
-	// > Thus, document order orders element nodes in order of the occurrence of
-	// > their start-tag in the XML (after expansion of entities). The attribute
-	// > nodes of an element occur after the element and before its children. The
-	// > relative order of attribute nodes is implementation-dependent./
-	// Source:
-	// http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
-	//
-	// @argument {Node} nodaA The first node to use in the comparison
-	// @argument {Node} nodeB The second node to use in the comparison
-	//
-	// @return {Number} A bitmask describing the input nodes' relative position.
-	//         See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
-	//         a description of these values.
-	var comparePos = exports.compareDocumentPosition = function(nodeA, nodeB) {
-		var aParents = [];
-		var bParents = [];
-		var current, sharedParent, siblings, aSibling, bSibling, idx;
-
-		if (nodeA === nodeB) {
-			return 0;
-		}
-
-		current = nodeA;
-		while (current) {
-			aParents.unshift(current);
-			current = current.parent;
-		}
-		current = nodeB;
-		while (current) {
-			bParents.unshift(current);
-			current = current.parent;
-		}
-
-		idx = 0;
-		while (aParents[idx] === bParents[idx]) {
-			idx++;
-		}
-
-		if (idx === 0) {
-			return POSITION.DISCONNECTED;
-		}
-
-		sharedParent = aParents[idx - 1];
-		siblings = sharedParent.children;
-		aSibling = aParents[idx];
-		bSibling = bParents[idx];
-
-		if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
-			if (sharedParent === nodeB) {
-				return POSITION.FOLLOWING | POSITION.CONTAINED_BY;
-			}
-			return POSITION.FOLLOWING;
-		} else {
-			if (sharedParent === nodeA) {
-				return POSITION.PRECEDING | POSITION.CONTAINS;
-			}
-			return POSITION.PRECEDING;
-		}
-	};
-
-	// Sort an array of nodes based on their relative position in the document and
-	// remove any duplicate nodes. If the array contains nodes that do not belong
-	// to the same document, sort order is unspecified.
-	//
-	// @argument {Array} nodes Array of DOM nodes
-	//
-	// @returns {Array} collection of unique nodes, sorted in document order
-	exports.uniqueSort = function(nodes) {
-		var idx = nodes.length, node, position;
-
-		nodes = nodes.slice();
-
-		while (--idx > -1) {
-			node = nodes[idx];
-			position = nodes.indexOf(node);
-			if (position > -1 && position < idx) {
-				nodes.splice(idx, 1);
-			}
-		}
-		nodes.sort(function(a, b) {
-			var relative = comparePos(a, b);
-			if (relative & POSITION.PRECEDING) {
-				return -1;
-			} else if (relative & POSITION.FOLLOWING) {
-				return 1;
-			}
-			return 0;
-		});
-
-		return nodes;
-	};
-
-
-/***/ },
-/* 87 */
-/***/ function(module, exports, __webpack_require__) {
-
-	module.exports = CollectingHandler;
-
-	function CollectingHandler(cbs){
-		this._cbs = cbs || {};
-		this.events = [];
-	}
-
-	var EVENTS = __webpack_require__(37).EVENTS;
-	Object.keys(EVENTS).forEach(function(name){
-		if(EVENTS[name] === 0){
-			name = "on" + name;
-			CollectingHandler.prototype[name] = function(){
-				this.events.push([name]);
-				if(this._cbs[name]) this._cbs[name]();
-			};
-		} else if(EVENTS[name] === 1){
-			name = "on" + name;
-			CollectingHandler.prototype[name] = function(a){
-				this.events.push([name, a]);
-				if(this._cbs[name]) this._cbs[name](a);
-			};
-		} else if(EVENTS[name] === 2){
-			name = "on" + name;
-			CollectingHandler.prototype[name] = function(a, b){
-				this.events.push([name, a, b]);
-				if(this._cbs[name]) this._cbs[name](a, b);
-			};
-		} else {
-			throw Error("wrong number of arguments");
-		}
-	});
-
-	CollectingHandler.prototype.onreset = function(){
-		this.events = [];
-		if(this._cbs.onreset) this._cbs.onreset();
-	};
-
-	CollectingHandler.prototype.restart = function(){
-		if(this._cbs.onreset) this._cbs.onreset();
-
-		for(var i = 0, len = this.events.length; i < len; i++){
-			if(this._cbs[this.events[i][0]]){
-
-				var num = this.events[i].length;
-
-				if(num === 1){
-					this._cbs[this.events[i][0]]();
-				} else if(num === 2){
-					this._cbs[this.events[i][0]](this.events[i][1]);
-				} else {
-					this._cbs[this.events[i][0]](this.events[i][1], this.events[i][2]);
-				}
-			}
-		}
-	};
-
-
-/***/ },
-/* 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 '&lt;';
-	        case '>': return '&gt;';
-	        case '&': return '&amp;';
-	        case '\'': return '&apos;';
-	        case '"': return '&quot;';
-	        }
-	    });
-	};
-
-	module.exports = xmlEscape;
-
-
-/***/ },
-/* 89 */
-/***/ function(module, exports, __webpack_require__) {
-
-	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, runtime) {
-	    this.runtime = runtime;
-	    if (!blocks) {
-	        // Shared set of blocks for all clones.
-	        blocks = new Blocks();
-	    }
-	    this.blocks = blocks;
-	    /**
-	     * Human-readable name for this sprite (and all clones).
-	     * @type {string}
-	     */
-	    this.name = '';
-	    /**
-	     * List of costumes for this sprite.
-	     * Each entry is an object, e.g.,
-	     * {
-	     *      skin: "costume.svg",
-	     *      name: "Costume Name",
-	     *      bitmapResolution: 2,
-	     *      rotationCenterX: 0,
-	     *      rotationCenterY: 0
-	     * }
-	     * @type {Array.<!Object>}
-	     */
-	    this.costumes = [];
-	    /**
-	     * List of clones for this sprite, including the original.
-	     * @type {Array.<!Clone>}
-	     */
-	    this.clones = [];
-	}
-
-	/**
-	 * Create a clone of this sprite.
-	 * @returns {!Clone} Newly created clone.
-	 */
-	Sprite.prototype.createClone = function () {
-	    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;
-	};
-
-	module.exports = Sprite;
-
-
-/***/ },
-/* 90 */
-/***/ function(module, exports, __webpack_require__) {
-
-	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, runtime) {
-	    Target.call(this, sprite.blocks);
-	    this.runtime = runtime;
-	    /**
-	     * Reference to the sprite that this is a clone of.
-	     * @type {!Sprite}
-	     */
-	    this.sprite = sprite;
-	    /**
-	     * Reference to the global renderer for this VM, if one exists.
-	     * @type {?RenderWebGLWorker}
-	     */
-	    this.renderer = null;
-	    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;
-	}
-	util.inherits(Clone, Target);
-
-	/**
-	 * Create a clone's drawable with the this.renderer.
-	 */
-	Clone.prototype.initDrawable = function () {
-	    if (this.renderer) {
-	        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}
-	 */
-	Clone.prototype.isStage = false;
-
-	/**
-	 * Scratch X coordinate. Currently should range from -240 to 240.
-	 * @type {Number}
-	 */
-	Clone.prototype.x = 0;
-
-	/**
-	 * Scratch Y coordinate. Currently should range from -180 to 180.
-	 * @type {number}
-	 */
-	Clone.prototype.y = 0;
-
-	/**
-	 * Scratch direction. Currently should range from -179 to 180.
-	 * @type {number}
-	 */
-	Clone.prototype.direction = 90;
-
-	/**
-	 * Whether the clone is currently visible.
-	 * @type {boolean}
-	 */
-	Clone.prototype.visible = true;
-
-	/**
-	 * Size of clone as a percent of costume size. Ranges from 5% to 535%.
-	 * @type {number}
-	 */
-	Clone.prototype.size = 100;
-
-	/**
-	 * Currently selected costume index.
-	 * @type {number}
-	 */
-	Clone.prototype.currentCostume = 0;
-
-	/**
-	 * Map of current graphic effect values.
-	 * @type {!Object.<string, number>}
-	 */
-	Clone.prototype.effects = {
-	    'color': 0,
-	    'fisheye': 0,
-	    'whirl': 0,
-	    'pixelate': 0,
-	    'mosaic': 0,
-	    'brightness': 0,
-	    'ghost': 0
-	};
-	// End clone-level properties.
-
-	/**
-	 * Set the X and Y coordinates of a clone.
-	 * @param {!number} x New X coordinate of clone, in Scratch coordinates.
-	 * @param {!number} y New Y coordinate of clone, in Scratch coordinates.
-	 */
-	Clone.prototype.setXY = function (x, y) {
-	    if (this.isStage) {
-	        return;
-	    }
-	    this.x = x;
-	    this.y = y;
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            position: [this.x, this.y]
-	        });
-	    }
-	};
-
-	/**
-	 * Set the direction of a clone.
-	 * @param {!number} direction New direction of clone.
-	 */
-	Clone.prototype.setDirection = function (direction) {
-	    if (this.isStage) {
-	        return;
-	    }
-	    // Keep direction between -179 and +180.
-	    this.direction = MathUtil.wrapClamp(direction, -179, 180);
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            direction: this.direction
-	        });
-	    }
-	};
-
-	/**
-	 * Set a say bubble on this clone.
-	 * @param {?string} type Type of say bubble: "say", "think", or null.
-	 * @param {?string} message Message to put in say bubble.
-	 */
-	Clone.prototype.setSay = function (type, message) {
-	    if (this.isStage) {
-	        return;
-	    }
-	    // @todo: Render to stage.
-	    if (!type || !message) {
-	        console.log('Clearing say bubble');
-	        return;
-	    }
-	    console.log('Setting say bubble:', type, message);
-	};
-
-	/**
-	 * Set visibility of the clone; i.e., whether it's shown or hidden.
-	 * @param {!boolean} visible True if the sprite should be shown.
-	 */
-	Clone.prototype.setVisible = function (visible) {
-	    if (this.isStage) {
-	        return;
-	    }
-	    this.visible = visible;
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            visible: this.visible
-	        });
-	    }
-	};
-
-	/**
-	 * Set size of the clone, as a percentage of the costume size.
-	 * @param {!number} size Size of clone, from 5 to 535.
-	 */
-	Clone.prototype.setSize = function (size) {
-	    if (this.isStage) {
-	        return;
-	    }
-	    // Keep size between 5% and 535%.
-	    this.size = MathUtil.clamp(size, 5, 535);
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            scale: [this.size, this.size]
-	        });
-	    }
-	};
-
-	/**
-	 * Set a particular graphic effect on this clone.
-	 * @param {!string} effectName Name of effect (see `Clone.prototype.effects`).
-	 * @param {!number} value Numerical magnitude of effect.
-	 */
-	Clone.prototype.setEffect = function (effectName, value) {
-	    if (!this.effects.hasOwnProperty(effectName)) return;
-	    this.effects[effectName] = value;
-	    if (this.renderer) {
-	        var props = {};
-	        props[effectName] = this.effects[effectName];
-	        this.renderer.updateDrawableProperties(this.drawableID, props);
-	    }
-	};
-
-	/**
-	 * Clear all graphic effects on this clone.
-	 */
-	Clone.prototype.clearEffects = function () {
-	    for (var effectName in this.effects) {
-	        this.effects[effectName] = 0;
-	    }
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, this.effects);
-	    }
-	};
-
-	/**
-	 * Set the current costume of this clone.
-	 * @param {number} index New index of costume.
-	 */
-	Clone.prototype.setCostume = function (index) {
-	    // Keep the costume index within possible values.
-	    this.currentCostume = MathUtil.wrapClamp(
-	        index, 0, this.sprite.costumes.length - 1
-	    );
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            skin: this.sprite.costumes[this.currentCostume].skin
-	        });
-	    }
-	};
-
-	/**
-	 * Get a costume index of this clone, by name of the costume.
-	 * @param {?string} costumeName Name of a costume.
-	 * @return {number} Index of the named costume, or -1 if not present.
-	 */
-	Clone.prototype.getCostumeIndexByName = function (costumeName) {
-	    for (var i = 0; i < this.sprite.costumes.length; i++) {
-	        if (this.sprite.costumes[i].name == costumeName) {
-	            return i;
-	        }
-	    }
-	    return -1;
-	};
-
-	/**
-	 * Update all drawable properties for this clone.
-	 * Use when a batch has changed, e.g., when the drawable is first created.
-	 */
-	Clone.prototype.updateAllDrawableProperties = function () {
-	    if (this.renderer) {
-	        this.renderer.updateDrawableProperties(this.drawableID, {
-	            position: [this.x, this.y],
-	            direction: this.direction,
-	            scale: [this.size, this.size],
-	            visible: this.visible,
-	            skin: this.sprite.costumes[this.currentCostume].skin
-	        });
-	    }
-	};
-
-	/**
-	 * Return the human-readable name for this clone, i.e., the sprite's name.
-	 * @override
-	 * @returns {string} Human-readable name for the clone.
-	 */
-	Clone.prototype.getName = function () {
-	    return this.sprite.name;
-	};
-
-	/**
-	 * Return whether the clone is touching a color.
-	 * @param {Array.<number>} rgb [r,g,b], values between 0-255.
-	 * @return {Promise.<Boolean>} True iff the clone is touching the color.
-	 */
-	Clone.prototype.isTouchingColor = function (rgb) {
-	    if (this.renderer) {
-	        return this.renderer.isTouchingColor(this.drawableID, rgb);
-	    }
-	    return false;
-	};
-
-	/**
-	 * Return whether the clone's color is touching a color.
-	 * @param {Object} targetRgb {Array.<number>} [r,g,b], values between 0-255.
-	 * @param {Object} maskRgb {Array.<number>} [r,g,b], values between 0-255.
-	 * @return {Promise.<Boolean>} True iff the clone's color is touching the color.
-	 */
-	Clone.prototype.colorIsTouchingColor = function (targetRgb, maskRgb) {
-	    if (this.renderer) {
-	        return this.renderer.isTouchingColor(
-	            this.drawableID,
-	            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;
-
-
-/***/ },
-/* 91 */
-/***/ function(module, exports, __webpack_require__) {
-
-	var Blocks = __webpack_require__(35);
-	var uid = __webpack_require__(92);
-
-	/**
-	 * @fileoverview
-	 * A Target is an abstract "code-running" object for the Scratch VM.
-	 * Examples include sprites/clones or potentially physical-world devices.
-	 */
-
-	/**
-	 * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
-	 * @constructor
-	 */
-	function Target (blocks) {
-	    if (!blocks) {
-	        blocks = new Blocks(this);
-	    }
-	    /**
-	     * A unique ID for this target.
-	     * @type {string}
-	     */
-	    this.id = uid();
-	    /**
-	     * Blocks run as code for this target.
-	     * @type {!Blocks}
-	     */
-	    this.blocks = blocks;
-	}
-
-	/**
-	 * Return a human-readable name for this target.
-	 * Target implementations should override this.
-	 * @abstract
-	 * @returns {string} Human-readable name for the target.
-	 */
-	Target.prototype.getName = function () {
-	    return this.id;
-	};
-
-	/**
-	 * Call to destroy a target.
-	 * @abstract
-	 */
-	Target.prototype.dispose = function () {
-
-	};
-
-	module.exports = Target;
-
-
-/***/ },
-/* 92 */
-/***/ function(module, exports) {
-
-	/**
-	 * @fileoverview UID generator, from Blockly.
-	 */
-
-	/**
-	 * Legal characters for the unique ID.
-	 * Should be all on a US keyboard.  No XML special characters or control codes.
-	 * Removed $ due to issue 251.
-	 * @private
-	 */
-	var soup_ = '!#%()*+,-./:;=?@[]^_`{|}~' +
-	    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
-
-	/**
-	 * Generate a unique ID, from Blockly.  This should be globally unique.
-	 * 87 characters ^ 20 length > 128 bits (better than a UUID).
-	 * @return {string} A globally unique ID string.
-	 */
-	var uid = function () {
-	    var length = 20;
-	    var soupLength = soup_.length;
-	    var id = [];
-	    for (var i = 0; i < length; i++) {
-	        id[i] = soup_.charAt(Math.random() * soupLength);
-	    }
-	    return id.join('');
-	};
-
-	module.exports = uid;
-
-
-/***/ },
-/* 93 */
-/***/ function(module, exports) {
-
-	/**
-	 * @fileoverview
-	 * The specMap below handles a few pieces of "translation" work between
-	 * the SB2 JSON format and the data we need to run a project
-	 * in the Scratch 3.0 VM.
-	 * Notably:
-	 *  - 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:':{
-	        'opcode':'motion_movesteps',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'STEPS'
-	            }
-	        ]
-	    },
-	    'turnRight:':{
-	        'opcode':'motion_turnright',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'DEGREES'
-	            }
-	        ]
-	    },
-	    'turnLeft:':{
-	        'opcode':'motion_turnleft',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'DEGREES'
-	            }
-	        ]
-	    },
-	    'heading:':{
-	        'opcode':'motion_pointindirection',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_angle',
-	                'inputName':'DIRECTION'
-	            }
-	        ]
-	    },
-	    'pointTowards:':{
-	        'opcode':'motion_pointtowards',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'motion_pointtowards_menu',
-	                'inputName':'TOWARDS'
-	            }
-	        ]
-	    },
-	    'gotoX:y:':{
-	        'opcode':'motion_gotoxy',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'X'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'Y'
-	            }
-	        ]
-	    },
-	    'gotoSpriteOrMouse:':{
-	        'opcode':'motion_goto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'motion_goto_menu',
-	                'inputName':'TO'
-	            }
-	        ]
-	    },
-	    'glideSecs:toX:y:elapsed:from:':{
-	        'opcode':'motion_glidesecstoxy',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SECS'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'X'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'Y'
-	            }
-	        ]
-	    },
-	    'changeXposBy:':{
-	        'opcode':'motion_changexby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'DX'
-	            }
-	        ]
-	    },
-	    'xpos:':{
-	        'opcode':'motion_setx',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'X'
-	            }
-	        ]
-	    },
-	    'changeYposBy:':{
-	        'opcode':'motion_changeyby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'DY'
-	            }
-	        ]
-	    },
-	    'ypos:':{
-	        'opcode':'motion_sety',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'Y'
-	            }
-	        ]
-	    },
-	    'bounceOffEdge':{
-	        'opcode':'motion_ifonedgebounce',
-	        'argMap':[
-	        ]
-	    },
-	    'setRotationStyle':{
-	        'opcode':'motion_setrotationstyle',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'motion_setrotationstyle_menu',
-	                'inputName':'STYLE'
-	            }
-	        ]
-	    },
-	    'xpos':{
-	        'opcode':'motion_xposition',
-	        'argMap':[
-	        ]
-	    },
-	    'ypos':{
-	        'opcode':'motion_yposition',
-	        'argMap':[
-	        ]
-	    },
-	    'heading':{
-	        'opcode':'motion_direction',
-	        'argMap':[
-	        ]
-	    },
-	    'say:duration:elapsed:from:':{
-	        'opcode':'looks_sayforsecs',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'MESSAGE'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SECS'
-	            }
-	        ]
-	    },
-	    'say:':{
-	        'opcode':'looks_say',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'MESSAGE'
-	            }
-	        ]
-	    },
-	    'think:duration:elapsed:from:':{
-	        'opcode':'looks_thinkforsecs',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'MESSAGE'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SECS'
-	            }
-	        ]
-	    },
-	    'think:':{
-	        'opcode':'looks_think',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'MESSAGE'
-	            }
-	        ]
-	    },
-	    'show':{
-	        'opcode':'looks_show',
-	        'argMap':[
-	        ]
-	    },
-	    'hide':{
-	        'opcode':'looks_hide',
-	        'argMap':[
-	        ]
-	    },
-	    'lookLike:':{
-	        'opcode':'looks_switchcostumeto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'looks_costume',
-	                'inputName':'COSTUME'
-	            }
-	        ]
-	    },
-	    'nextCostume':{
-	        'opcode':'looks_nextcostume',
-	        'argMap':[
-	        ]
-	    },
-	    'startScene':{
-	        'opcode':'looks_switchbackdropto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'looks_backdrops',
-	                'inputName':'BACKDROP'
-	            }
-	        ]
-	    },
-	    'changeGraphicEffect:by:':{
-	        'opcode':'looks_changeeffectby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'looks_effectmenu',
-	                'inputName':'EFFECT'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'CHANGE'
-	            }
-	        ]
-	    },
-	    'setGraphicEffect:to:':{
-	        'opcode':'looks_seteffectto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'looks_effectmenu',
-	                'inputName':'EFFECT'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'VALUE'
-	            }
-	        ]
-	    },
-	    'filterReset':{
-	        'opcode':'looks_cleargraphiceffects',
-	        'argMap':[
-	        ]
-	    },
-	    'changeSizeBy:':{
-	        'opcode':'looks_changesizeby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'CHANGE'
-	            }
-	        ]
-	    },
-	    'setSizeTo:':{
-	        'opcode':'looks_setsizeto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SIZE'
-	            }
-	        ]
-	    },
-	    'comeToFront':{
-	        'opcode':'looks_gotofront',
-	        'argMap':[
-	        ]
-	    },
-	    'goBackByLayers:':{
-	        'opcode':'looks_gobacklayers',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_integer',
-	                'inputName':'NUM'
-	            }
-	        ]
-	    },
-	    'costumeIndex':{
-	        'opcode':'looks_costumeorder',
-	        'argMap':[
-	        ]
-	    },
-	    'sceneName':{
-	        'opcode':'looks_backdropname',
-	        'argMap':[
-	        ]
-	    },
-	    'scale':{
-	        'opcode':'looks_size',
-	        'argMap':[
-	        ]
-	    },
-	    'startSceneAndWait':{
-	        'opcode':'looks_switchbackdroptoandwait',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'looks_backdrops',
-	                'inputName':'BACKDROP'
-	            }
-	        ]
-	    },
-	    'nextScene':{
-	        'opcode':'looks_nextbackdrop',
-	        'argMap':[
-	        ]
-	    },
-	    'backgroundIndex':{
-	        'opcode':'looks_backdroporder',
-	        'argMap':[
-	        ]
-	    },
-	    'playSound:':{
-	        'opcode':'sound_play',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sound_sounds_option',
-	                'inputName':'SOUND_MENU'
-	            }
-	        ]
-	    },
-	    'doPlaySoundAndWait':{
-	        'opcode':'sound_playuntildone',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sound_sounds_option',
-	                'inputName':'SOUND_MENU'
-	            }
-	        ]
-	    },
-	    'stopAllSounds':{
-	        'opcode':'sound_stopallsounds',
-	        'argMap':[
-	        ]
-	    },
-	    'playDrum':{
-	        'opcode':'sound_playdrumforbeats',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'DRUMTYPE'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'BEATS'
-	            }
-	        ]
-	    },
-	    'rest:elapsed:from:':{
-	        'opcode':'sound_restforbeats',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'BEATS'
-	            }
-	        ]
-	    },
-	    'noteOn:duration:elapsed:from:':{
-	        'opcode':'sound_playnoteforbeats',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NOTE'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'BEATS'
-	            }
-	        ]
-	    },
-	    'instrument:':{
-	        'opcode':'sound_setinstrumentto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'INSTRUMENT'
-	            }
-	        ]
-	    },
-	    'changeVolumeBy:':{
-	        'opcode':'sound_changevolumeby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'VOLUME'
-	            }
-	        ]
-	    },
-	    'setVolumeTo:':{
-	        'opcode':'sound_setvolumeto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'VOLUME'
-	            }
-	        ]
-	    },
-	    'volume':{
-	        'opcode':'sound_volume',
-	        'argMap':[
-	        ]
-	    },
-	    'changeTempoBy:':{
-	        'opcode':'sound_changetempoby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'TEMPO'
-	            }
-	        ]
-	    },
-	    'setTempoTo:':{
-	        'opcode':'sound_settempotobpm',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'TEMPO'
-	            }
-	        ]
-	    },
-	    'tempo':{
-	        'opcode':'sound_tempo',
-	        'argMap':[
-	        ]
-	    },
-	    'clearPenTrails':{
-	        'opcode':'pen_clear',
-	        'argMap':[
-	        ]
-	    },
-	    'stampCostume':{
-	        'opcode':'pen_stamp',
-	        'argMap':[
-	        ]
-	    },
-	    'putPenDown':{
-	        'opcode':'pen_pendown',
-	        'argMap':[
-	        ]
-	    },
-	    'putPenUp':{
-	        'opcode':'pen_penup',
-	        'argMap':[
-	        ]
-	    },
-	    'penColor:':{
-	        'opcode':'pen_setpencolortocolor',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'colour_picker',
-	                'inputName':'COLOR'
-	            }
-	        ]
-	    },
-	    'changePenHueBy:':{
-	        'opcode':'pen_changepencolorby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'COLOR'
-	            }
-	        ]
-	    },
-	    'setPenHueTo:':{
-	        'opcode':'pen_setpencolortonum',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'COLOR'
-	            }
-	        ]
-	    },
-	    'changePenShadeBy:':{
-	        'opcode':'pen_changepenshadeby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SHADE'
-	            }
-	        ]
-	    },
-	    'setPenShadeTo:':{
-	        'opcode':'pen_changepenshadeby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SHADE'
-	            }
-	        ]
-	    },
-	    'changePenSizeBy:':{
-	        'opcode':'pen_changepensizeby',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SIZE'
-	            }
-	        ]
-	    },
-	    'penSize:':{
-	        'opcode':'pen_setpensizeto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'SIZE'
-	            }
-	        ]
-	    },
-	    'whenGreenFlag':{
-	        'opcode':'event_whenflagclicked',
-	        'argMap':[
-	        ]
-	    },
-	    'whenKeyPressed':{
-	        'opcode':'event_whenkeypressed',
-	        'argMap':[
-	            {
-	                'type':'field',
-	                'fieldName':'KEY_OPTION'
-	            }
-	        ]
-	    },
-	    'whenClicked':{
-	        'opcode':'event_whenthisspriteclicked',
-	        'argMap':[
-	        ]
-	    },
-	    'whenSceneStarts':{
-	        'opcode':'event_whenbackdropswitchesto',
-	        'argMap':[
-	            {
-	                'type':'field',
-	                'fieldName':'BACKDROP'
-	            }
-	        ]
-	    },
-	    'whenSensorGreaterThan':{
-	        'opcode':'event_whengreaterthan',
-	        'argMap':[
-	            {
-	                'type':'field',
-	                'fieldName':'WHENGREATERTHANMENU'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'VALUE'
-	            }
-	        ]
-	    },
-	    'whenIReceive':{
-	        'opcode':'event_whenbroadcastreceived',
-	        'argMap':[
-	            {
-	                'type':'field',
-	                'fieldName':'BROADCAST_OPTION'
-	            }
-	        ]
-	    },
-	    'broadcast:':{
-	        'opcode':'event_broadcast',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'event_broadcast_menu',
-	                'inputName':'BROADCAST_OPTION'
-	            }
-	        ]
-	    },
-	    'doBroadcastAndWait':{
-	        'opcode':'event_broadcastandwait',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'event_broadcast_menu',
-	                'inputName':'BROADCAST_OPTION'
-	            }
-	        ]
-	    },
-	    'wait:elapsed:from:':{
-	        'opcode':'control_wait',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_positive_number',
-	                'inputName':'DURATION'
-	            }
-	        ]
-	    },
-	    'doRepeat':{
-	        'opcode':'control_repeat',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_whole_number',
-	                'inputName':'TIMES'
-	            },
-	            {
-	                'type':'input',
-	                'inputName': 'SUBSTACK'
-	            }
-	        ]
-	    },
-	    'doForever':{
-	        'opcode':'control_forever',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputName':'SUBSTACK'
-	            }
-	        ]
-	    },
-	    'doIf':{
-	        'opcode':'control_if',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputName':'CONDITION'
-	            },
-	            {
-	                'type':'input',
-	                'inputName':'SUBSTACK'
-	            }
-	        ]
-	    },
-	    'doIfElse':{
-	        'opcode':'control_if_else',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputName':'CONDITION'
-	            },
-	            {
-	                'type':'input',
-	                'inputName':'SUBSTACK'
-	            },
-	            {
-	                'type':'input',
-	                'inputName':'SUBSTACK2'
-	            }
-	        ]
-	    },
-	    'doWaitUntil':{
-	        'opcode':'control_wait_until',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputName':'CONDITION'
-	            }
-	        ]
-	    },
-	    'doUntil':{
-	        'opcode':'control_repeat_until',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputName':'CONDITION'
-	            },
-	            {
-	                'type':'input',
-	                'inputName':'SUBSTACK'
-	            }
-	        ]
-	    },
-	    'stopScripts':{
-	        'opcode':'control_stop',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'control_stop_menu',
-	                'inputName':'STOP_OPTION'
-	            }
-	        ]
-	    },
-	    'whenCloned':{
-	        'opcode':'control_start_as_clone',
-	        'argMap':[
-	        ]
-	    },
-	    'createCloneOf':{
-	        'opcode':'control_create_clone_of',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'control_create_clone_of_menu',
-	                'inputName':'CLONE_OPTION'
-	            }
-	        ]
-	    },
-	    'deleteClone':{
-	        'opcode':'control_delete_this_clone',
-	        'argMap':[
-	        ]
-	    },
-	    'touching:':{
-	        'opcode':'sensing_touchingobject',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_touchingobjectmenu',
-	                'inputName':'TOUCHINGOBJECTMENU'
-	            }
-	        ]
-	    },
-	    'touchingColor:':{
-	        'opcode':'sensing_touchingcolor',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'colour_picker',
-	                'inputName':'COLOR'
-	            }
-	        ]
-	    },
-	    'color:sees:':{
-	        'opcode':'sensing_coloristouchingcolor',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'colour_picker',
-	                'inputName':'COLOR'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'colour_picker',
-	                'inputName':'COLOR2'
-	            }
-	        ]
-	    },
-	    'distanceTo:':{
-	        'opcode':'sensing_distanceto',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_distancetomenu',
-	                'inputName':'DISTANCETOMENU'
-	            }
-	        ]
-	    },
-	    'doAsk':{
-	        'opcode':'sensing_askandwait',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'QUESTION'
-	            }
-	        ]
-	    },
-	    'answer':{
-	        'opcode':'sensing_answer',
-	        'argMap':[
-	        ]
-	    },
-	    'keyPressed:':{
-	        'opcode':'sensing_keypressed',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_keyoptions',
-	                'inputName':'KEY_OPTION'
-	            }
-	        ]
-	    },
-	    'mousePressed':{
-	        'opcode':'sensing_mousedown',
-	        'argMap':[
-	        ]
-	    },
-	    'mouseX':{
-	        'opcode':'sensing_mousex',
-	        'argMap':[
-	        ]
-	    },
-	    'mouseY':{
-	        'opcode':'sensing_mousey',
-	        'argMap':[
-	        ]
-	    },
-	    'soundLevel':{
-	        'opcode':'sensing_loudness',
-	        'argMap':[
-	        ]
-	    },
-	    'senseVideoMotion':{
-	        'opcode':'sensing_videoon',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_videoonmenuone',
-	                'inputName':'VIDEOONMENU1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_videoonmenutwo',
-	                'inputName':'VIDEOONMENU2'
-	            }
-	        ]
-	    },
-	    'setVideoState':{
-	        'opcode':'sensing_videotoggle',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_videotogglemenu',
-	                'inputName':'VIDEOTOGGLEMENU'
-	            }
-	        ]
-	    },
-	    'setVideoTransparency':{
-	        'opcode':'sensing_setvideotransparency',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'TRANSPARENCY'
-	            }
-	        ]
-	    },
-	    'timer':{
-	        'opcode':'sensing_timer',
-	        'argMap':[
-	        ]
-	    },
-	    'timerReset':{
-	        'opcode':'sensing_resettimer',
-	        'argMap':[
-	        ]
-	    },
-	    'getAttribute:of:':{
-	        'opcode':'sensing_of',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_of_property_menu',
-	                'inputName':'PROPERTY'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_of_object_menu',
-	                'inputName':'OBJECT'
-	            }
-	        ]
-	    },
-	    'timeAndDate':{
-	        'opcode':'sensing_current',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'sensing_currentmenu',
-	                'inputName':'CURRENTMENU'
-	            }
-	        ]
-	    },
-	    'timestamp':{
-	        'opcode':'sensing_dayssince2000',
-	        'argMap':[
-	        ]
-	    },
-	    'getUserName':{
-	        'opcode':'sensing_username',
-	        'argMap':[
-	        ]
-	    },
-	    '+':{
-	        'opcode':'operator_add',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM2'
-	            }
-	        ]
-	    },
-	    '-':{
-	        'opcode':'operator_subtract',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM2'
-	            }
-	        ]
-	    },
-	    '*':{
-	        'opcode':'operator_multiply',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM2'
-	            }
-	        ]
-	    },
-	    '/':{
-	        'opcode':'operator_divide',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'NUM2'
-	            }
-	        ]
-	    },
-	    'randomFrom:to:':{
-	        'opcode':'operator_random',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'FROM'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'math_number',
-	                'inputName':'TO'
-	            }
-	        ]
-	    },
-	    '<':{
-	        'opcode':'operator_lt',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'OPERAND1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'OPERAND2'
-	            }
-	        ]
-	    },
-	    '=':{
-	        'opcode':'operator_equals',
-	        'argMap':[
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'OPERAND1'
-	            },
-	            {
-	                'type':'input',
-	                'inputOp':'text',
-	                'inputName':'OPERAND2'
-	            }
-	        ]
-	    },
-	    '>':{
-	        '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':[]
-	    }
-	};
-	module.exports = specMap;
-
-
-/***/ }
-/******/ ]);
\ No newline at end of file
diff --git a/vm.min.js b/vm.min.js
deleted file mode 100644
index 6a53aaea7..000000000
--- a/vm.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-!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(){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(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.attachRenderer=function(t){this.runtime.attachRenderer(t)},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;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&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<a;++s)M(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-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<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(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];r<o;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=k,e.isDate=T,e.isError=E,e.isFunction=N,e.isPrimitive=x,e.isBuffer=r(5);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(6),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(p===setTimeout)return setTimeout(t,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!g){var t=i(s);g=!0;for(var e=d.length;e;){for(f=d,d=[];++m<e;)f&&f[m].run();m=-1,e=d.length}f=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,l=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],g=!1,m=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||g||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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(){i.call(this),this.targets=[],this.threads=[],this.sequencer=new o(this),this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)},this._scriptGlowsPreviousFrame=[],this._editingTarget=null,this._cloneCounter=0}var i=r(2),o=r(8),s=r(10),a=r(3),u=r(12),c=r(13),p=r(16),h={scratch3_control:r(18),scratch3_event:r(29),scratch3_looks:r(30),scratch3_motion:r(31),scratch3_operators:r(32),scratch3_sensing:r(33)};n.SCRIPT_GLOW_ON="STACK_GLOW_ON",n.SCRIPT_GLOW_OFF="STACK_GLOW_OFF",n.BLOCK_GLOW_ON="BLOCK_GLOW_ON",n.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",n.VISUAL_REPORT="VISUAL_REPORT",a.inherits(n,i),n.THREAD_STEP_INTERVAL=1e3/60,n.MAX_CLONES=300,n.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},n.prototype.getOpcodeFunction=function(t){return this._primitives[t]},n.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},n.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},n.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},n.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},n.prototype.attachRenderer=function(t){this.renderer=t},n.prototype._pushThread=function(t,e){var r=new s(t);return r.setTarget(e),r.pushStack(t),this.threads.push(r),r},n.prototype._removeThread=function(t){var e=this.threads.indexOf(t);e>-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<this.threads.length;e++)if(this.threads[e].topBlock==t)return void this._removeThread(this.threads[e]);this._pushThread(t,this._editingTarget)},n.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},n.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(o,s){var a=s.blocks.getBlock(o).opcode;if(a===t){var u=s.blocks.getFields(o);if(e)for(var c in e)if(u[c].value!==e[c])return;var p=n._hats[t];if(p.restartExistingThreads)for(var h=0;h<n.threads.length;h++)n.threads[h].topBlock!==o||r&&n.threads[h].target!=r||n._removeThread(n.threads[h]);else for(var l=0;l<n.threads.length;l++)if(n.threads[l].topBlock===o&&(!r||n.threads[l].target==r))return;i.push(n._pushThread(o,s))}},r),i}},n.prototype.disposeTarget=function(t){t.dispose();var e=this.targets.indexOf(t);e>-1&&this.targets.splice(e,1)},n.prototype.stopForTarget=function(t){for(var e=0;e<this.threads.length;e++)this.threads[e].target==t&&this._removeThread(this.threads[e])},n.prototype.greenFlag=function(){this.stopAll(),this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues(),this.startHats("event_whenflagclicked")},n.prototype.stopAll=function(){for(var t=[],e=0;e<this.targets.length;e++)this.targets[e].hasOwnProperty("isOriginal")&&!this.targets[e].isOriginal?this.targets[e].dispose():t.push(this.targets[e]);this.targets=t;for(var r=this.threads.slice();r.length>0;){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<r.length;n++)this._removeThread(r[n])},n.prototype.setEditingTarget=function(t){this._scriptGlowsPreviousFrame=[],this._editingTarget=t,this._updateScriptGlows()},n.prototype._updateScriptGlows=function(){for(var t=[],e=[],r=0;r<this.threads.length;r++){var n=this.threads[r],i=n.target;if(n.requestScriptGlowInFrame&&i==this._editingTarget){var o=n.peekStack()||n.topBlock,s=i.blocks.getTopLevelScript(o);s&&t.push(s)}}for(var a=0;a<this._scriptGlowsPreviousFrame.length;a++){var u=this._scriptGlowsPreviousFrame[a];t.indexOf(u)<0?this.glowScript(u,!1):e.push(u)}for(var c=0;c<t.length;c++){var p=t[c];this._scriptGlowsPreviousFrame.indexOf(p)<0&&(this.glowScript(p,!0),e.push(p))}this._scriptGlowsPreviousFrame=e},n.prototype.quietGlow=function(t){var e=this._scriptGlowsPreviousFrame.indexOf(t);e>-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;e<this.targets.length;e++){var r=this.targets[e];if(r.id==t)return r}},n.prototype.getSpriteTargetByName=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.sprite&&r.sprite.name==t)return r}},n.prototype.changeCloneCounter=function(t){this._cloneCounter+=t},n.prototype.clonesAvailable=function(){return this._cloneCounter<n.MAX_CLONES},n.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},n.prototype.animationFrame=function(){this.renderer&&this.renderer.draw()},n.prototype.start=function(){self.setInterval(function(){this._step()}.bind(this),n.THREAD_STEP_INTERVAL)},t.exports=n},function(t,e,r){function n(t){this.timer=new i,this.runtime=t}var i=r(9),o=r(10),s=r(11);n.WORK_TIME=10,n.prototype.stepThreads=function(t){this.timer.start();for(var e=[],r=0,i=0;i<t.length;i++)t[i].status===o.STATUS_YIELD_FRAME&&t[i].setStatus(o.STATUS_RUNNING);for(;t.length>0&&t.length>r&&this.timer.timeElapsed()<n.WORK_TIME;){var s=[];r=0;for(var a=0;a<t.length;a++){var u=t[a];u.status===o.STATUS_RUNNING?this.startThread(u):u.status!==o.STATUS_YIELD&&u.status!==o.STATUS_YIELD_FRAME||r++,0===u.stack.length&&u.status===o.STATUS_DONE?e.push(u):s.push(u)}t=s}return e},n.prototype.startThread=function(t){var e=t.peekStack();return e?(s(this,t),void(t.status===o.STATUS_RUNNING&&t.peekStack()===e&&this.proceedThread(t))):(t.popStack(),void t.setStatus(o.STATUS_YIELD_FRAME))},n.prototype.stepToBranch=function(t,e){e||(e=1);var r=t.peekStack(),n=t.target.blocks.getBranch(r,e);n?t.pushStack(n):t.pushStack(null)},n.prototype.stepToReporter=function(t,e,r){var n=t.peekStackFrame();return t.pushStack(e),n.waitingReporter=r,this.startThread(t),t.status===o.STATUS_YIELD},n.prototype.proceedThread=function(t){var e=t.peekStack();t.popStack();var r=t.target.blocks.getNextBlock(e);r&&t.pushStack(r),t.peekStack()||t.setStatus(o.STATUS_DONE)},n.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.requestScriptGlowInFrame=!1,t.setStatus(o.STATUS_DONE)},t.exports=n},function(t,e){function r(){}r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){function r(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.target=null,this.requestScriptGlowInFrame=!1}r.STATUS_RUNNING=0,r.STATUS_YIELD=1,r.STATUS_YIELD_FRAME=2,r.STATUS_DONE=3,r.prototype.pushStack=function(t){this.stack.push(t),this.stack.length>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<this.runtime.targets.length;n++){var i=this.runtime.targets[n];if(i.hasOwnProperty("drawableID")&&i.drawableID==r)return void this.runtime.startHats("event_whenthisspriteclicked",null,i)}},n.prototype.getX=function(){return i.clamp(this._x,-240,240)},n.prototype.getY=function(){return i.clamp(-this._y,-180,180)},n.prototype.getIsDown=function(){return this._isDown},t.exports=n},function(t,e){function r(){}r.degToRad=function(t){return Math.PI*(90-t)/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){function n(t){this.runtime=t}var i=r(14),o=r(19);n.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of_menu:this.createCloneMenu,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone}},n.prototype.getHats=function(){return{control_start_as_clone:{restartExistingThreads:!1}}},n.prototype.repeat=function(t,e){var r=Math.floor(i.toNumber(t.TIMES));void 0===e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.executedInFrame?(e.stackFrame.executedInFrame=!1,e.yieldFrame()):(e.stackFrame.executedInFrame=!0,e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=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;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function d(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function g(t,e){var r=!1,n=s(t,function(t){r||(r=!0,h(e,t))},function(t){r||(r=!0,l(e,t))});r||n!==y||(r=!0,l(e,_))}var m=r(22),_=null,y={};t.exports=a,a._10=null,a._97=null,a._61=n,a.prototype.then=function(t,e){if(this.constructor!==a)return u(this,t,e);var r=new a(n);return c(this,new d(t,e,r)),r}},function(t,e){(function(e){"use strict";function r(t){a.length||(s(),u=!0),a[a.length]=t}function n(){for(;c<a.length;){var t=c;if(c+=1,a[t].call(),c>p){for(var e=0,r=a.length-c;e<r;e++)a[e]=a[e+c];a.length-=c,c=0}}a.length=0,c=0,u=!1}function i(t){var e=1,r=new h(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function o(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}t.exports=r;var s,a=[],u=!1,c=0,p=1024,h=e.MutationObserver||e.WebKitMutationObserver;s="function"==typeof h?i(n):o(n),r.requestFlush=s,r.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,e,r){"use strict";var n=r(21);t.exports=n,n.prototype["finally"]=function(t){return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}},function(t,e,r){"use strict";function n(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=r(21);t.exports=i;var o=n(!0),s=n(!1),a=n(null),u=n(void 0),c=n(0),p=n("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return a;if(void 0===t)return u;if(t===!0)return o;if(t===!1)return s;if(0===t)return c;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new i(e.bind(t))}catch(r){return new i(function(t,e){e(r)})}return n(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,r){function n(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof i&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?n(s,a._65):(2===a._81&&r(a._65),void a.then(function(t){n(s,t)},r))}var u=a.then;if("function"==typeof u){var c=new i(u.bind(a));return void c.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){return new i(function(e,r){r(t)})},i.race=function(t){return new i(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){return this.then(null,t)}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(o,t)}function i(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var i=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+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;a<t.costumes.length;a++){var u=t.costumes[a];s.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+u.baseLayerMD5+"/get/",name:u.costumeName,bitmapResolution:u.bitmapResolution,rotationCenterX:u.rotationCenterX,rotationCenterY:u.rotationCenterY})}t.hasOwnProperty("scripts")&&o(t.scripts,n);var h=s.createClone();if(e.targets.push(h),t.hasOwnProperty("scratchX")&&(h.x=t.scratchX),t.hasOwnProperty("scratchY")&&(h.y=t.scratchY),t.hasOwnProperty("direction")&&(h.direction=t.direction),t.hasOwnProperty("scale")&&(h.size=100*t.scale),t.hasOwnProperty("visible")&&(h.visible=t.visible),t.hasOwnProperty("currentCostumeIndex")&&(h.currentCostume=t.currentCostumeIndex),h.isStage=r,h.updateAllDrawableProperties(),t.children)for(var l=0;l<t.children.length;l++)i(t.children[l],e,!1)}}function o(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],u=n[2],c=s(u);c[0]&&(c[0].x=1.1*i,c[0].y=1.1*o,c[0].topLevel=!0,c[0].parent=null);for(var p=a(c),h=0;h<p.length;h++)e.createBlock(p[h])}}function s(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=u(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e}function a(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(a(n.children))),delete n.children}return e}function u(t){var e=t[0];if(!e||!f[e])return void console.warn("Couldn't find SB2 block: ",e);for(var r=f[e],n={id:l(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]},i=0;i<r.argMap.length;i++){var o=r.argMap[i],a=t[i+1],c=!1;if("input"==o.type){var p=l();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof a&&a){var d;d="object"==typeof a[0]&&a[0]?s(a):[u(a)];for(var g=0;g<d.length;g++)d[g].parent=n.id;c=!0,n.inputs[o.inputName].block=d[0].id,n.children=n.children.concat(d)}if(!o.inputOp)continue;var m=a,_=o.inputName;"math_number"==o.inputOp||"math_whole_number"==o.inputOp||"math_positive_number"==o.inputOp||"math_integer"==o.inputOp||"math_angle"==o.inputOp?(_="NUM",c&&(m=10)):"text"==o.inputOp?(_="TEXT",c&&(m="")):"colour_picker"==o.inputOp&&(m=h.decimalToHex(a),_="COLOUR",c&&(m="#990000"));var y={};y[_]={name:_,value:m},n.children.push({id:p,opcode:o.inputOp,inputs:{},fields:y,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=p,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=p)}else"field"==o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:a})}return n}var c=r(35),p=r(89),h=r(15),l=r(92),f=r(93);t.exports=n},function(t,e,r){function n(){this._blocks={},this._scripts=[]}var i=r(36),o=r(88);n.BRANCH_INPUT_PREFIX="SUBSTACK",n.prototype.getBlock=function(t){return this._blocks[t]},n.prototype.getScripts=function(){return this._scripts},n.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},n.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var i=n.BRANCH_INPUT_PREFIX;return e>1&&(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.length;o++)this.createBlock(n[o],e);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(this._blocks[t.blockId].shadow)return;r&&this._blocks[t.blockId].topLevel&&r.quietGlow(t.blockId),this.deleteBlock({id:t.blockId})}}},n.prototype.createBlock=function(t,e){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,!e&&t.topLevel&&this._addScript(t.id))},n.prototype.changeBlock=function(t){"field"===t.element&&"undefined"!=typeof this._blocks[t.id]&&"undefined"!=typeof this._blocks[t.id].fields[t.name]&&(this._blocks[t.id].fields[t.name].value=t.value)},n.prototype.moveBlock=function(t){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),void 0!==t.oldParent){var e=this._blocks[t.oldParent];void 0!==t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if(void 0===t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),void 0!==t.newInput){var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}else this._blocks[t.newParent].next=t.id;this._blocks[t.id].parent=t.newParent}},n.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},n.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},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+='<value name="'+a.name+'">',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!=a.block&&(i+=this.blockToXML(a.shadow)),i+="</value>")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+='<field name="'+c.name+'">'+p+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},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;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var o=n.name.toLowerCase();"block"!=o&&"shadow"!=o||i(n,e,!0,null)}}var s=[];for(var a in e)s.push(e[a]);return s}function i(t,e,r,n){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:n,shadow:"shadow"==t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var a=t.children[s],u=null,c=null,p=0;p<a.children.length;p++){var h=a.children[p];if(h.name){var l=h.name.toLowerCase();"block"==l?u=h:"shadow"==l&&(c=h)}}switch(!u&&c&&(u=c),a.name.toLowerCase()){case"field":var f=a.attribs.name,d="";d=a.children.length>0&&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+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(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<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"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<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===k?this._stateBeforeAttributeValue(t):this._state===T?this._stateInAttributeValueDoubleQuotes(t):this._state===E?this._stateInAttributeValueSingleQuotes(t):this._state===N?this._stateInAttributeValueNoQuotes(t):this._state===x?this._stateBeforeDeclaration(t):this._state===O?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===C?this._stateBeforeComment(t):this._state===M?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===R?this._stateAfterComment2(t):this._state===D?this._stateBeforeCdata1(t):this._state===I?this._stateBeforeCdata2(t):this._state===P?this._stateBeforeCdata3(t):this._state===B?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===V?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===K?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===M||this._state===L||this._state===R?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==k&&this._state!==S&&this._state!==w&&this._state!==E&&this._state!==T&&this._state!==N&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=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<t.highWaterMark||0===t.length)}function a(t){if(t>=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<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):T.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new T(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)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;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var k=r(56),T=r(57).Buffer;i.ReadableState=n;var E=r(2).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var N=r(52),x=r(61);x.inherits=r(62);var O,A=r(63);A=A&&A.debuglog?A.debuglog("stream"):function(){},x.inherits(i,N),i.prototype.push=function(t,e){var r=this._readableState;return x.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new T(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return O||(O=r(66).StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var C=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!x.isNumber(t)||t>0)&&(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-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?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<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=N.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)x.isFunction(t[i])&&x.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(4))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
-	 * The buffer module from node.js, for the browser.
-	 *
-	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
-	 * @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()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function p(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||J(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=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;c<a;c++)if(o(t,c)===o(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===u)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;l<u;l++)if(o(t,c+l)!==o(e,l)){h=!1;break}if(h)return c}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function k(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function T(t,e,r,n){return K(z(e),t,r,n)}function E(t,e,r,n){return T(t,e,r,n)}function N(t,e,r,n){return K(W(e),t,r,n)}function x(t,e,r,n){return K(X(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?Q.fromByteArray(t):Q.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?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;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=Y(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)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||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.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<o;++i)t[r+i]=(e&255<<8*(n?i:1-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<o;++i)t[r+i]=e>>>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;s<n;++s){if(r=t.charCodeAt(s),r>55295&&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<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=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<n&&!(i+r>=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);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=_,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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;h<u;++h)if(c[h]!==p[h]){s=c[h],a=p[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=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<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(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<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=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<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=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=r-1,s=1;for(this[e+o]=255&t;--o>=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<r&&(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.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<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:V(new t(e,i).toString()),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(57).Buffer,function(){return this}())},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)a[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,s,a=t.length;if(a%4>0)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<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[p++]=i>>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;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",s=[],u=16383,c=0,p=r-n;c<p;c+=u)s.push(o(t,c,c+u>p?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<<a)-1,c=u>>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<<c)-1,h=p>>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<<i|a,c+=i;c>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;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(61);a.inherits=r(62);var u=r(55),c=r(65);a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(64);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void k.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):p(t,e,!1,s,r,i,o),a}function p(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=_(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),b(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,p(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(p(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function _(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=_(t,e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function v(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(57).Buffer;o.WritableState=i;var S=r(61);S.inherits=r(62);var k=r(52);S.inherits(o,k),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||m(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(4))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(57).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=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<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(64),u=r(61);u.inherits=r(62),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,
-n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(67),o=r(61);o.inherits=r(62),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(65)},function(t,e,r){t.exports=r(64)},function(t,e,r){t.exports=r(67)},function(t,e,r){t.exports=r(68)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(37).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(76),r(82),r(83),r(84),r(85),r(86)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(46),s=r(77),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):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"<![CDATA["+t.children[0].data+"]]>"}function u(t){return"<!--"+t.data+"-->"}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;n<t.length;n++){var p=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(80),i=r(81);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function u(t){return t.replace(g,o).replace(d,s).replace(f,o)}var c=n(r(44)),p=i(c);e.XML=a(c,p);var h=n(r(42)),l=i(h);e.HTML=a(h,l);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(c);e.escape=u},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?c("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(42),a=r(43),u=r(44),c=r(40),p=n(u),h=n(s),l=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),p(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,u=0;n<r.length;n++)e[u]===r[n]?(r[n]+=";?",u++):r[n]+=";";var c=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),p=o(s);return function(e){return String(e).replace(c,t)}}();t.exports={XML:p,HTML:l,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,u=e.length;a<u&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(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;r<n;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)c(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(c(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n<i;n++)c(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(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<o&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(37).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e){var r=function(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&apos;";case'"':return"&quot;"}})};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<this.sprite.costumes.length;e++)if(this.sprite.costumes[e].name==t)return e;return-1},n.prototype.updateAllDrawableProperties=function(){this.renderer&&this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y],direction:this.direction,scale:[this.size,this.size],visible:this.visible,skin:this.sprite.costumes[this.currentCostume].skin})},n.prototype.getName=function(){return this.sprite.name},n.prototype.isTouchingColor=function(t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t)},n.prototype.colorIsTouchingColor=function(t,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t,e)},n.prototype.makeClone=function(){if(this.runtime.clonesAvailable()){this.runtime.changeCloneCounter(1);var t=this.sprite.createClone();return t.x=this.x,t.y=this.y,t.direction=this.direction,t.visible=this.visible,t.size=this.size,t.currentCostume=this.currentCostume,t.effects=JSON.parse(JSON.stringify(this.effects)),t.initDrawable(),t.updateAllDrawableProperties(),t}},n.prototype.dispose=function(){this.isOriginal||(this.runtime.changeCloneCounter(-1),this.renderer&&null!==this.drawableID&&this.renderer.destroyDrawable(this.drawableID))},t.exports=n},function(t,e,r){function n(t){t||(t=new i(this)),this.id=o(),this.blocks=t}var i=r(35),o=r(92);n.prototype.getName=function(){return this.id},n.prototype.dispose=function(){},t.exports=n},function(t,e){var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=function(){for(var t=20,e=r.length,n=[],i=0;i<t;i++)n[i]=r.charAt(Math.random()*e);return n.join("")};t.exports=n},function(t,e){var r={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"input",inputOp:"motion_setrotationstyle_menu",inputName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},comeToFront:{opcode:"looks_gotofront",argMap:[]},"goBackByLayers:":{opcode:"looks_gobacklayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumeorder",argMap:[]},sceneName:{opcode:"looks_backdropname",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdroporder",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_option",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"sound_playdrumforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUMTYPE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"sound_restforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"sound_playnoteforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"sound_setinstrumentto",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"sound_changetempoby",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"sound_settempotobpm",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"sound_tempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_pendown",argMap:[]},putPenUp:{opcode:"pen_penup",argMap:[]},"penColor:":{opcode:"pen_setpencolortocolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changepencolorby",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"setPenHueTo:":{opcode:"pen_setpencolortonum",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"changePenShadeBy:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changepensizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setpensizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"},{type:"input",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"input",inputOp:"control_stop_menu",inputName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},senseVideoMotion:{opcode:"sensing_videoon",argMap:[{type:"input",inputOp:"sensing_videoonmenuone",inputName:"VIDEOONMENU1"},{type:"input",inputOp:"sensing_videoonmenutwo",inputName:"VIDEOONMENU2"}]},setVideoState:{opcode:"sensing_videotoggle",argMap:[{type:"input",inputOp:"sensing_videotogglemenu",inputName:"VIDEOTOGGLEMENU"}]},setVideoTransparency:{opcode:"sensing_setvideotransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"input",inputOp:"sensing_of_property_menu",inputName:"PROPERTY"},{type:"input",inputOp:"sensing_of_object_menu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"input",inputOp:"sensing_currentmenu",inputName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{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

From e9cb0a51023399e12b82add45b38d850cda00147 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Sun, 25 Sep 2016 13:59:24 -0400
Subject: [PATCH 254/302] Add explanatory comments

---
 .travis.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 54b75299c..f0d9a25d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,13 +13,19 @@ after_script:
   $(npm bin)/travis-after-all
   exitCode=$?
   if [[
+    # Execute after all jobs finish successfully
     $exitCode = 0 &&
+    # Only release on release branches
     $RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
+    # Don't release on PR builds
     $TRAVIS_PULL_REQUEST = "false"
   ]]; then
+    # Authenticate NPM
     echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
+    # Set version to commit SHA
     npm --no-git-tag-version version $(node -p -e "require('./package.json').version")-${TRAVIS_COMMIT:0:5}
     npm publish
+    # Publish to gh-pages as most recent committer
     git config --global user.email $(git log --pretty=format:"%ce" -n1)
     git config --global user.name $(git log --pretty=format:"%cn" -n1)
     ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Build for $(git log --pretty=format:%H)"

From 6b1d2a8eb64d72ef315f975e95ebc463ed0a112f Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 26 Sep 2016 10:02:24 -0400
Subject: [PATCH 255/302] Update dev server to only serve the playground

Now that we don't rely on node_modules, we can update the content base to just `playground` and just look at it from http://localhost:8080/
---
 .gitignore             |  4 ++++
 Makefile               |  2 +-
 README.md              |  2 +-
 StartServerWindows.bat |  4 ++--
 index.html             |  7 -------
 package.json           |  2 +-
 webpack.config.js      | 16 ++++++++++------
 7 files changed, 19 insertions(+), 18 deletions(-)
 delete mode 100644 index.html

diff --git a/.gitignore b/.gitignore
index b896c5ade..753e3f651 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,7 @@ npm-*
 /dist.js
 /vm.js
 /vm.min.js
+/playground/media
+/playground/vendor.js
+/playground/vm.js
+/playground/zenburn.css
diff --git a/Makefile b/Makefile
index c3614f5ac..14a5870ba 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ watch:
 	$(WEBPACK) --watch
 
 serve:
-	$(WEBPACK_DEV_SERVER) --host 0.0.0.0 --content-base ./
+	$(WEBPACK_DEV_SERVER)
 
 # ------------------------------------------------------------------------------
 
diff --git a/README.md b/README.md
index 55cf93f9e..032dac985 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ StartServerWindows.bat
 ```
 
 ## Playground
-To run the Playground, make sure the dev server's running and go to [http://localhost:8080/](http://localhost:8080/) - you will be redirected to the playground, which demonstrates various tools and internal state.
+To run the Playground, make sure the dev server's running and go to [http://localhost:8080/](http://localhost:8080/) - you will be directed to the playground, which demonstrates various tools and internal state.
 
 ![VM Playground Screenshot](https://i.imgur.com/nOCNqEc.gif)
 
diff --git a/StartServerWindows.bat b/StartServerWindows.bat
index b81638194..73a4d84db 100644
--- a/StartServerWindows.bat
+++ b/StartServerWindows.bat
@@ -1,2 +1,2 @@
-@echo off
-node_modules\.bin\webpack-dev-server --host 0.0.0.0 --content-base .
+@echo off
+node_modules\.bin\webpack-dev-server --host 0.0.0.0 --content-base .\playground
diff --git a/index.html b/index.html
deleted file mode 100644
index 42edce430..000000000
--- a/index.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-    <meta http-equiv="refresh" content="0; URL='/playground'" />
-	<title>Redirect to playground</title>
-</head>
-</html>
diff --git a/package.json b/package.json
index 02b23a0c8..21b910414 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
   "main": "./dist.js",
   "scripts": {
     "prepublish": "./node_modules/.bin/webpack --bail",
-    "start": "webpack-dev-server --host 0.0.0.0 --content-base .",
+    "start": "make serve",
     "test": "make test"
   },
   "dependencies": {},
diff --git a/webpack.config.js b/webpack.config.js
index aa2e50f7b..6d08c73ac 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,8 +1,13 @@
 var CopyWebpackPlugin = require('copy-webpack-plugin');
 var defaultsDeep = require('lodash.defaultsdeep');
+var path = require('path');
 var webpack = require('webpack');
 
 var base = {
+    devServer: {
+        contentBase: path.resolve(__dirname, 'playground'),
+        host: '0.0.0.0'
+    },
     module: {
         loaders: [
             {
@@ -57,8 +62,8 @@ module.exports = [
     // Playground
     defaultsDeep({}, base, {
         entry: {
-            'playground/vm': './src/index.js',
-            'playground/vendor': [
+            'vm': './src/index.js',
+            'vendor': [
                 // FPS counter
                 'stats.js/build/stats.min.js',
                 // Syntax highlighter
@@ -70,7 +75,7 @@ module.exports = [
             ]
         },
         output: {
-            path: __dirname,
+            path: path.resolve(__dirname, 'playground'),
             filename: '[name].js'
         },
         module: {
@@ -100,10 +105,9 @@ module.exports = [
         plugins: base.plugins.concat([
             new CopyWebpackPlugin([{
                 from: 'node_modules/scratch-blocks/media',
-                to: 'playground/media'
+                to: 'media'
             }, {
-                from: 'node_modules/highlightjs/styles/zenburn.css',
-                to: 'playground'
+                from: 'node_modules/highlightjs/styles/zenburn.css'
             }])
         ])
     })

From 96b579a2dede05eafc6632b8865347db834fca9e Mon Sep 17 00:00:00 2001
From: IAP-Reloaded <IAP-Reloaded@users.noreply.github.com>
Date: Mon, 26 Sep 2016 11:24:44 -0400
Subject: [PATCH 256/302] Github README url (#217)

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 55cf93f9e..5be499ad3 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ npm install https://github.com/LLK/scratch-vm.git
 ```
 If you want to edit/play yourself:
 ```bash
-git clone git@github.com:LLK/scratch-vm.git
+git clone https://github.com/LLK/scratch-vm.git
 cd scratch-vm
 npm install
 ```

From e4ec9c551fe4449267489ca083c0c22bf190a319 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 26 Sep 2016 11:47:00 -0400
Subject: [PATCH 257/302] Use most recent version of scratch-* dependencies

---
 package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 21b910414..034629a17 100644
--- a/package.json
+++ b/package.json
@@ -26,8 +26,8 @@
     "json-loader": "0.5.4",
     "lodash.defaultsdeep": "4.6.0",
     "promise": "7.1.1",
-    "scratch-blocks": "0.1.0-80849",
-    "scratch-render": "0.1.0-9f26a",
+    "scratch-blocks": "*",
+    "scratch-render": "*",
     "script-loader": "0.7.0",
     "stats.js": "0.16.0",
     "tap": "5.7.1",

From 2357d63243df4f99230acaee5112b96b8327b26c Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 26 Sep 2016 12:01:21 -0400
Subject: [PATCH 258/302] Drop `useRound` option from `Cast.toListIndex` (#213)

* Drop `useRound` option from `Cast.toListIndex`

* Param fix
---
 src/blocks/scratch3_data.js |  2 +-
 src/util/cast.js            | 10 ++--------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/blocks/scratch3_data.js b/src/blocks/scratch3_data.js
index fcac71744..576eb975f 100644
--- a/src/blocks/scratch3_data.js
+++ b/src/blocks/scratch3_data.js
@@ -73,7 +73,7 @@ Scratch3DataBlocks.prototype.addToList = function (args, util) {
 
 Scratch3DataBlocks.prototype.deleteOfList = function (args, util) {
     var list = util.target.lookupOrCreateList(args.LIST);
-    var index = Cast.toListIndex(args.INDEX, list.contents.length, true);
+    var index = Cast.toListIndex(args.INDEX, list.contents.length);
     if (index === Cast.LIST_INVALID) {
         return;
     } else if (index === Cast.LIST_ALL) {
diff --git a/src/util/cast.js b/src/util/cast.js
index c6bb151ae..dda55bf8e 100644
--- a/src/util/cast.js
+++ b/src/util/cast.js
@@ -134,11 +134,9 @@ Cast.LIST_ALL = 'ALL';
  * 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) {
+Cast.toListIndex = function (index, length) {
     if (typeof index !== 'number') {
         if (index == 'all') {
             return Cast.LIST_ALL;
@@ -155,11 +153,7 @@ Cast.toListIndex = function (
             return Cast.LIST_INVALID;
         }
     }
-    if (useRound) {
-        index = Math.round(Cast.toNumber(index));
-    } else {
-        index = Math.floor(Cast.toNumber(index));
-    }
+    index = Math.floor(Cast.toNumber(index));
     if (index < 1 || index > length) {
         return Cast.LIST_INVALID;
     }

From e31fc19a50f63cbfd15692859de232059d2f9946 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Tue, 27 Sep 2016 09:20:55 -0400
Subject: [PATCH 259/302] Update version format

-prerelease.[timestamp] is semver friendly. Move SHA info to package.json.
---
 .travis.yml  | 4 ++--
 package.json | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f0d9a25d1..f836d9861 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,8 +22,8 @@ after_script:
   ]]; then
     # Authenticate NPM
     echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
-    # Set version to commit SHA
-    npm --no-git-tag-version version $(node -p -e "require('./package.json').version")-${TRAVIS_COMMIT:0:5}
+    # Set version to timestamp
+    npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s)
     npm publish
     # Publish to gh-pages as most recent committer
     git config --global user.email $(git log --pretty=format:"%ce" -n1)
diff --git a/package.json b/package.json
index 034629a17..f3d39d4b4 100644
--- a/package.json
+++ b/package.json
@@ -13,9 +13,9 @@
   "scripts": {
     "prepublish": "./node_modules/.bin/webpack --bail",
     "start": "make serve",
-    "test": "make test"
+    "test": "make test",
+    "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
   },
-  "dependencies": {},
   "devDependencies": {
     "copy-webpack-plugin": "3.0.1",
     "eslint": "2.7.0",
@@ -23,6 +23,7 @@
     "gh-pages": "0.11.0",
     "highlightjs": "8.7.0",
     "htmlparser2": "3.9.0",
+    "json": "9.0.4",
     "json-loader": "0.5.4",
     "lodash.defaultsdeep": "4.6.0",
     "promise": "7.1.1",

From 4c80e9a9b0f73164a6486fa6e069e26619089e73 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Tue, 27 Sep 2016 10:23:12 -0400
Subject: [PATCH 260/302] Use new version format for scratch-* dependencies

---
 package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index f3d39d4b4..e042b6de6 100644
--- a/package.json
+++ b/package.json
@@ -27,8 +27,8 @@
     "json-loader": "0.5.4",
     "lodash.defaultsdeep": "4.6.0",
     "promise": "7.1.1",
-    "scratch-blocks": "*",
-    "scratch-render": "*",
+    "scratch-blocks": "^0.1.0-prepublish",
+    "scratch-render": "^0.1.0-prepublish",
     "script-loader": "0.7.0",
     "stats.js": "0.16.0",
     "tap": "5.7.1",

From a585a08a9358277b64ff3a3fd0319cf0bb53e49b Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 28 Sep 2016 16:43:04 -0400
Subject: [PATCH 261/302] Remove extra calls to `updateAllDrawableProperties`
 (#222)

---
 src/sprites/clone.js  | 1 -
 src/sprites/sprite.js | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 16c65a1de..ef7f5892f 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -38,7 +38,6 @@ util.inherits(Clone, Target);
 Clone.prototype.initDrawable = function () {
     if (this.renderer) {
         this.drawableID = this.renderer.createDrawable();
-        this.updateAllDrawableProperties();
     }
     // If we're a clone, start the hats.
     if (!this.isOriginal) {
diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js
index 687e30f72..2afb25e5e 100644
--- a/src/sprites/sprite.js
+++ b/src/sprites/sprite.js
@@ -50,7 +50,6 @@ Sprite.prototype.createClone = function () {
     this.clones.push(newClone);
     if (newClone.isOriginal) {
         newClone.initDrawable();
-        newClone.updateAllDrawableProperties();
     }
     return newClone;
 };

From d10ba11c8f13fccc79554bcdee90fbddf892b064 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 28 Sep 2016 16:43:12 -0400
Subject: [PATCH 262/302] Round costume values (#221)

---
 src/import/sb2import.js | 2 +-
 src/sprites/clone.js    | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 0962074e3..dfa6d25e2 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -108,7 +108,7 @@ function parseScratchObject (object, runtime, topLevel) {
         target.visible = object.visible;
     }
     if (object.hasOwnProperty('currentCostumeIndex')) {
-        target.currentCostume = object.currentCostumeIndex;
+        target.currentCostume = Math.round(object.currentCostumeIndex);
     }
     target.isStage = topLevel;
     target.updateAllDrawableProperties();
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index ef7f5892f..f94015c64 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -230,6 +230,7 @@ Clone.prototype.clearEffects = function () {
  */
 Clone.prototype.setCostume = function (index) {
     // Keep the costume index within possible values.
+    index = Math.round(index);
     this.currentCostume = MathUtil.wrapClamp(
         index, 0, this.sprite.costumes.length - 1
     );

From 2226fda19e32ef19f26e858ed71b51f6a9e66066 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 28 Sep 2016 17:09:04 -0400
Subject: [PATCH 263/302] Implement rotation style (#223)

---
 src/blocks/scratch3_motion.js |  5 +++
 src/import/sb2import.js       | 10 +++++
 src/sprites/clone.js          | 79 +++++++++++++++++++++++++++++++++--
 3 files changed, 90 insertions(+), 4 deletions(-)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 10679750d..8b8e7356e 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -22,6 +22,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         'motion_turnleft': this.turnLeft,
         'motion_pointindirection': this.pointInDirection,
         'motion_glidesecstoxy': this.glide,
+        'motion_setrotationstyle': this.setRotationStyle,
         'motion_changexby': this.changeX,
         'motion_setx': this.setX,
         'motion_changeyby': this.changeY,
@@ -96,6 +97,10 @@ Scratch3MotionBlocks.prototype.glide = function (args, util) {
     }
 };
 
+Scratch3MotionBlocks.prototype.setRotationStyle = function (args, util) {
+    util.target.setRotationStyle(args.STYLE);
+};
+
 Scratch3MotionBlocks.prototype.changeX = function (args, util) {
     var dx = Cast.toNumber(args.DX);
     util.target.setXY(util.target.x + dx, util.target.y);
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index dfa6d25e2..79e135a7b 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -6,6 +6,7 @@
  */
 
 var Blocks = require('../engine/blocks');
+var Clone = require('../sprites/clone');
 var Sprite = require('../sprites/sprite');
 var Color = require('../util/color.js');
 var uid = require('../util/uid');
@@ -110,6 +111,15 @@ function parseScratchObject (object, runtime, topLevel) {
     if (object.hasOwnProperty('currentCostumeIndex')) {
         target.currentCostume = Math.round(object.currentCostumeIndex);
     }
+    if (object.hasOwnProperty('rotationStyle')) {
+        if (object.rotationStyle == 'none') {
+            target.rotationStyle = Clone.ROTATION_STYLE_NONE;
+        } else if (object.rotationStyle == 'leftRight') {
+            target.rotationStyle = Clone.ROTATION_STYLE_LEFT_RIGHT;
+        } else if (object.rotationStyle == 'normal') {
+            target.rotationStyle = Clone.ROTATION_STYLE_ALL_AROUND;
+        }
+    }
     target.isStage = topLevel;
     target.updateAllDrawableProperties();
     // The stage will have child objects; recursively process them.
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index f94015c64..14d7b366c 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -97,6 +97,30 @@ Clone.prototype.size = 100;
  */
 Clone.prototype.currentCostume = 0;
 
+/**
+ * Rotation style for "all around"/spinning.
+ * @enum
+ */
+Clone.ROTATION_STYLE_ALL_AROUND = 'all around';
+
+/**
+ * Rotation style for "left-right"/flipping.
+ * @enum
+ */
+Clone.ROTATION_STYLE_LEFT_RIGHT = 'left-right';
+
+/**
+ * Rotation style for "no rotation."
+ * @enum
+ */
+Clone.ROTATION_STYLE_NONE = 'don\'t rotate';
+
+/**
+ * Current rotation style.
+ * @type {!string}
+ */
+Clone.prototype.rotationStyle = Clone.ROTATION_STYLE_ALL_AROUND;
+
 /**
  * Map of current graphic effect values.
  * @type {!Object.<string, number>}
@@ -130,6 +154,26 @@ Clone.prototype.setXY = function (x, y) {
     }
 };
 
+/**
+ * Get the rendered direction and scale, after applying rotation style.
+ * @return {Object<string, number>} Direction and scale to render.
+ */
+Clone.prototype._getRenderedDirectionAndScale = function () {
+    // Default: no changes to `this.direction` or `this.scale`.
+    var finalDirection = this.direction;
+    var finalScale = [this.size, this.size];
+    if (this.rotationStyle == Clone.ROTATION_STYLE_NONE) {
+        // Force rendered direction to be 90.
+        finalDirection = 90;
+    } else if (this.rotationStyle === Clone.ROTATION_STYLE_LEFT_RIGHT) {
+        // Force rendered direction to be 90, and flip drawable if needed.
+        finalDirection = 90;
+        var scaleFlip = (this.direction < 0) ? -1 : 1;
+        finalScale = [scaleFlip * this.size, this.size];
+    }
+    return {direction: finalDirection, scale: finalScale};
+};
+
 /**
  * Set the direction of a clone.
  * @param {!number} direction New direction of clone.
@@ -141,8 +185,10 @@ Clone.prototype.setDirection = function (direction) {
     // Keep direction between -179 and +180.
     this.direction = MathUtil.wrapClamp(direction, -179, 180);
     if (this.renderer) {
+        var renderedDirectionScale = this._getRenderedDirectionAndScale();
         this.renderer.updateDrawableProperties(this.drawableID, {
-            direction: this.direction
+            direction: renderedDirectionScale.direction,
+            scale: renderedDirectionScale.scale
         });
     }
 };
@@ -191,8 +237,10 @@ Clone.prototype.setSize = function (size) {
     // Keep size between 5% and 535%.
     this.size = MathUtil.clamp(size, 5, 535);
     if (this.renderer) {
+        var renderedDirectionScale = this._getRenderedDirectionAndScale();
         this.renderer.updateDrawableProperties(this.drawableID, {
-            scale: [this.size, this.size]
+            direction: renderedDirectionScale.direction,
+            scale: renderedDirectionScale.scale
         });
     }
 };
@@ -241,6 +289,27 @@ Clone.prototype.setCostume = function (index) {
     }
 };
 
+/**
+ * Update the rotation style for this clone.
+ * @param {!string} rotationStyle New rotation style.
+ */
+Clone.prototype.setRotationStyle = function (rotationStyle) {
+    if (rotationStyle == Clone.ROTATION_STYLE_NONE) {
+        this.rotationStyle = Clone.ROTATION_STYLE_NONE;
+    } else if (rotationStyle == Clone.ROTATION_STYLE_ALL_AROUND) {
+        this.rotationStyle = Clone.ROTATION_STYLE_ALL_AROUND;
+    } else if (rotationStyle == Clone.ROTATION_STYLE_LEFT_RIGHT) {
+        this.rotationStyle = Clone.ROTATION_STYLE_LEFT_RIGHT;
+    }
+    if (this.renderer) {
+        var renderedDirectionScale = this._getRenderedDirectionAndScale();
+        this.renderer.updateDrawableProperties(this.drawableID, {
+            direction: renderedDirectionScale.direction,
+            scale: renderedDirectionScale.scale
+        });
+    }
+};
+
 /**
  * Get a costume index of this clone, by name of the costume.
  * @param {?string} costumeName Name of a costume.
@@ -261,10 +330,11 @@ Clone.prototype.getCostumeIndexByName = function (costumeName) {
  */
 Clone.prototype.updateAllDrawableProperties = function () {
     if (this.renderer) {
+        var renderedDirectionScale = this._getRenderedDirectionAndScale();
         this.renderer.updateDrawableProperties(this.drawableID, {
             position: [this.x, this.y],
-            direction: this.direction,
-            scale: [this.size, this.size],
+            direction: renderedDirectionScale.direction,
+            scale: renderedDirectionScale.scale,
             visible: this.visible,
             skin: this.sprite.costumes[this.currentCostume].skin
         });
@@ -326,6 +396,7 @@ Clone.prototype.makeClone = function () {
     newClone.visible = this.visible;
     newClone.size = this.size;
     newClone.currentCostume = this.currentCostume;
+    newClone.rotationStyle = this.rotationStyle;
     newClone.effects = JSON.parse(JSON.stringify(this.effects));
     newClone.variables = JSON.parse(JSON.stringify(this.variables));
     newClone.lists = JSON.parse(JSON.stringify(this.lists));

From 5728d648b1b320bb4c37f03b28ceab5da802cd82 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 3 Oct 2016 10:16:43 -0400
Subject: [PATCH 264/302] Ensure clone.effects is defined on each instance
 (#225)

* Ensure clone.effects is defined on each instance

* Add regression test for GH-224
---
 src/sprites/clone.js | 27 ++++++++++++++-------------
 test/unit/clone.js   | 13 +++++++++++++
 2 files changed, 27 insertions(+), 13 deletions(-)
 create mode 100644 test/unit/clone.js

diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 14d7b366c..4d7c3672c 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -29,6 +29,20 @@ function Clone(sprite, runtime) {
      * @type {?Number}
      */
     this.drawableID = null;
+
+    /**
+     * Map of current graphic effect values.
+     * @type {!Object.<string, number>}
+     */
+    this.effects = {
+        'color': 0,
+        'fisheye': 0,
+        'whirl': 0,
+        'pixelate': 0,
+        'mosaic': 0,
+        'brightness': 0,
+        'ghost': 0
+    };
 }
 util.inherits(Clone, Target);
 
@@ -121,19 +135,6 @@ Clone.ROTATION_STYLE_NONE = 'don\'t rotate';
  */
 Clone.prototype.rotationStyle = Clone.ROTATION_STYLE_ALL_AROUND;
 
-/**
- * Map of current graphic effect values.
- * @type {!Object.<string, number>}
- */
-Clone.prototype.effects = {
-    'color': 0,
-    'fisheye': 0,
-    'whirl': 0,
-    'pixelate': 0,
-    'mosaic': 0,
-    'brightness': 0,
-    'ghost': 0
-};
 // End clone-level properties.
 
 /**
diff --git a/test/unit/clone.js b/test/unit/clone.js
new file mode 100644
index 000000000..246e1b955
--- /dev/null
+++ b/test/unit/clone.js
@@ -0,0 +1,13 @@
+var test = require('tap').test;
+var Clone = require('../../src/sprites/clone');
+var Sprite = require('../../src/sprites/sprite');
+
+test('clone effects', function (t) {
+    // Create two clones and ensure they have different graphic effect objects.
+    // Regression test for Github issue #224
+    var spr = new Sprite();
+    var a = new Clone(spr, null);
+    var b = new Clone(spr, null);
+    t.ok(a.effects !== b.effects);
+    t.end();
+});

From 5b3fe7ee1b1273f1102e99709d6626ee7918e970 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 3 Oct 2016 11:35:13 -0400
Subject: [PATCH 265/302] Ensure scratch-* dependencies are up to date

With node_modules cached, npm install sees the scratch-* dependencies satisfied (since if any version 0.1.0-prepublish.x satisfies ^0.1.0-prepublish).  So remove these before the install step to ensure the latest version is installed.
---
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index f836d9861..091fe53fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,9 @@ sudo: false
 cache:
   directories:
   - node_modules
+before_install:
+# Install the most up to date scratch-* dependencies
+- rm -rf node_modules/scratch-*
 after_script:
 - |
   # RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel

From dd624aea06ca12cd887458096829d3a4ba607b9a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 3 Oct 2016 11:44:08 -0400
Subject: [PATCH 266/302] Update toolbox for data_list rename (#227)

---
 playground/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playground/index.html b/playground/index.html
index bbfc80324..e8b980141 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -404,7 +404,7 @@
       <category name="Data" colour="#FF8C1A" custom="VARIABLE">
       </category>
       <category name="Lists" colour="#FF8C1A">
-        <block type="data_list"></block>
+        <block type="data_listcontents"></block>
         <block type="data_addtolist">
           <value name="ITEM">
             <shadow type="text">

From 8ca6944292bd18f2e0ae540e1abb59ca884bf35e Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 3 Oct 2016 16:34:57 -0400
Subject: [PATCH 267/302] Add unit tests for all utility modules. Re GH-103

---
 test/unit/{adapter.js => engine_adapter.js}   |   0
 test/unit/{blocks.js => engine_blocks.js}     |   0
 test/unit/{runtime.js => engine_runtime.js}   |   0
 .../{sequencer.js => engine_sequencer.js}     |   0
 test/unit/{thread.js => engine_thread.js}     |   0
 test/unit/{clone.js => sprites_clone.js}      |   0
 test/unit/util_cast.js                        | 178 ++++++++++++++++++
 test/unit/util_color.js                       |  62 ++++++
 test/unit/util_math.js                        |  37 ++++
 test/unit/{timer.js => util_timer.js}         |   0
 test/unit/util_xml.js                         |   9 +
 11 files changed, 286 insertions(+)
 rename test/unit/{adapter.js => engine_adapter.js} (100%)
 rename test/unit/{blocks.js => engine_blocks.js} (100%)
 rename test/unit/{runtime.js => engine_runtime.js} (100%)
 rename test/unit/{sequencer.js => engine_sequencer.js} (100%)
 rename test/unit/{thread.js => engine_thread.js} (100%)
 rename test/unit/{clone.js => sprites_clone.js} (100%)
 create mode 100644 test/unit/util_cast.js
 create mode 100644 test/unit/util_color.js
 create mode 100644 test/unit/util_math.js
 rename test/unit/{timer.js => util_timer.js} (100%)
 create mode 100644 test/unit/util_xml.js

diff --git a/test/unit/adapter.js b/test/unit/engine_adapter.js
similarity index 100%
rename from test/unit/adapter.js
rename to test/unit/engine_adapter.js
diff --git a/test/unit/blocks.js b/test/unit/engine_blocks.js
similarity index 100%
rename from test/unit/blocks.js
rename to test/unit/engine_blocks.js
diff --git a/test/unit/runtime.js b/test/unit/engine_runtime.js
similarity index 100%
rename from test/unit/runtime.js
rename to test/unit/engine_runtime.js
diff --git a/test/unit/sequencer.js b/test/unit/engine_sequencer.js
similarity index 100%
rename from test/unit/sequencer.js
rename to test/unit/engine_sequencer.js
diff --git a/test/unit/thread.js b/test/unit/engine_thread.js
similarity index 100%
rename from test/unit/thread.js
rename to test/unit/engine_thread.js
diff --git a/test/unit/clone.js b/test/unit/sprites_clone.js
similarity index 100%
rename from test/unit/clone.js
rename to test/unit/sprites_clone.js
diff --git a/test/unit/util_cast.js b/test/unit/util_cast.js
new file mode 100644
index 000000000..dac55f596
--- /dev/null
+++ b/test/unit/util_cast.js
@@ -0,0 +1,178 @@
+var test = require('tap').test;
+var cast = require('../../src/util/cast');
+
+test('toNumber', function (t) {
+    // Numeric
+    t.equal(cast.toNumber(0), 0);
+    t.equal(cast.toNumber(1), 1);
+    t.equal(cast.toNumber(3.14), 3.14);
+
+    // String
+    t.equal(cast.toNumber('0'), 0);
+    t.equal(cast.toNumber('1'), 1);
+    t.equal(cast.toNumber('3.14'), 3.14);
+    t.equal(cast.toNumber('0.1e10'), 1000000000);
+    t.equal(cast.toNumber('foobar'), 0);
+
+    // Boolean
+    t.equal(cast.toNumber(true), 1);
+    t.equal(cast.toNumber(false), 0);
+    t.equal(cast.toNumber('true'), 0);
+    t.equal(cast.toNumber('false'), 0);
+
+    // Undefined & object
+    t.equal(cast.toNumber(undefined), 0);
+    t.equal(cast.toNumber({}), 0);
+    t.end();
+});
+
+test('toBoolean', function (t) {
+    // Numeric
+    t.equal(cast.toBoolean(0), false);
+    t.equal(cast.toBoolean(1), true);
+    t.equal(cast.toBoolean(3.14), true);
+
+    // String
+    t.equal(cast.toBoolean('0'), false);
+    t.equal(cast.toBoolean('1'), true);
+    t.equal(cast.toBoolean('3.14'), true);
+    t.equal(cast.toBoolean('0.1e10'), true);
+    t.equal(cast.toBoolean('foobar'), true);
+
+    // Boolean
+    t.equal(cast.toBoolean(true), true);
+    t.equal(cast.toBoolean(false), false);
+
+    // Undefined & object
+    t.equal(cast.toBoolean(undefined), false);
+    t.equal(cast.toBoolean({}), true);
+    t.end();
+});
+
+test('toString', function (t) {
+    // Numeric
+    t.equal(cast.toString(0), '0');
+    t.equal(cast.toString(1), '1');
+    t.equal(cast.toString(3.14), '3.14');
+
+    // String
+    t.equal(cast.toString('0'), '0');
+    t.equal(cast.toString('1'), '1');
+    t.equal(cast.toString('3.14'), '3.14');
+    t.equal(cast.toString('0.1e10'), '0.1e10');
+    t.equal(cast.toString('foobar'), 'foobar');
+
+    // Boolean
+    t.equal(cast.toString(true), 'true');
+    t.equal(cast.toString(false), 'false');
+
+    // Undefined & object
+    t.equal(cast.toString(undefined), 'undefined');
+    t.equal(cast.toString({}), '[object Object]');
+    t.end();
+});
+
+test('toRbgColorList', function (t) {
+    // Hex (minimal, see "color" util tests)
+    t.deepEqual(cast.toRgbColorList('#000'), [0,0,0]);
+    t.deepEqual(cast.toRgbColorList('#000000'), [0,0,0]);
+    t.deepEqual(cast.toRgbColorList('#fff'), [255,255,255]);
+    t.deepEqual(cast.toRgbColorList('#ffffff'), [255,255,255]);
+
+    // Decimal (minimal, see "color" util tests)
+    t.deepEqual(cast.toRgbColorList(0), [0,0,0]);
+    t.deepEqual(cast.toRgbColorList(1), [0,0,1]);
+    t.deepEqual(cast.toRgbColorList(16777215), [255,255,255]);
+
+    // Malformed
+    t.deepEqual(cast.toRgbColorList('ffffff'), [0,0,0]);
+    t.deepEqual(cast.toRgbColorList('foobar'), [0,0,0]);
+    t.end();
+});
+
+test('compare', function (t) {
+    // Numeric
+    t.equal(cast.compare(0, 0), 0);
+    t.equal(cast.compare(1, 0), 1);
+    t.equal(cast.compare(0, 1), -1);
+    t.equal(cast.compare(1, 1), 0);
+
+    // String
+    t.equal(cast.compare('0', '0'), 0);
+    t.equal(cast.compare('0.1e10', '1000000000'), 0);
+    t.equal(cast.compare('foobar', 'FOOBAR'), 0);
+    t.equal(cast.compare('dog', 'cat'), 1);
+
+    // Boolean
+    t.equal(cast.compare(true, true), 0);
+    t.equal(cast.compare(true, false), 1);
+    t.equal(cast.compare(false, true), -1);
+    t.equal(cast.compare(true, true), 0);
+
+    // Undefined & object
+    t.equal(cast.compare(undefined, undefined), 0);
+    t.equal(cast.compare(undefined, 'undefined'), 0);
+    t.equal(cast.compare({}, {}), 0);
+    t.equal(cast.compare({}, '[object Object]'), 0);
+    t.end();
+});
+
+test('isInt', function (t) {
+    // Numeric
+    t.equal(cast.isInt(0), true);
+    t.equal(cast.isInt(1), true);
+    t.equal(cast.isInt(0.0), true);
+    t.equal(cast.isInt(3.14), false);
+    t.equal(cast.isInt(NaN), true);
+
+    // String
+    t.equal(cast.isInt('0'), true);
+    t.equal(cast.isInt('1'), true);
+    t.equal(cast.isInt('0.0'), false);      // @todo This should be true
+    t.equal(cast.isInt('0.1e10'), false);   // @todo This should be true
+    t.equal(cast.isInt('3.14'), false);
+
+    // Boolean
+    t.equal(cast.isInt(true), true);
+    t.equal(cast.isInt(false), true);
+
+    // Undefined & object
+    t.equal(cast.isInt(undefined), false);
+    t.equal(cast.isInt({}), false);
+    t.end();
+});
+
+test('toListIndex', function (t) {
+    var list = [0,1,2,3,4,5];
+    var empty = [];
+
+    // Valid
+    t.equal(cast.toListIndex(1, list.length), 1);
+    t.equal(cast.toListIndex(6, list.length), 6);
+
+    // Invalid
+    t.equal(cast.toListIndex(-1, list.length), 'INVALID');
+    t.equal(cast.toListIndex(0.1, list.length), 'INVALID');
+    t.equal(cast.toListIndex(0, list.length), 'INVALID');
+    t.equal(cast.toListIndex(7, list.length), 'INVALID');
+
+    // "all"
+    t.equal(cast.toListIndex('all', list.length), 'ALL');
+
+    // "last"
+    t.equal(cast.toListIndex('last', list.length), list.length);
+    t.equal(cast.toListIndex('last', empty.length), 'INVALID');
+
+    // "random"
+    var random = cast.toListIndex('random', list.length);
+    t.ok(random <= list.length);
+    t.ok(random > 0);
+    t.equal(cast.toListIndex('random', empty.length), 'INVALID');
+
+    // "any" (alias for "random")
+    var any = cast.toListIndex('any', list.length);
+    t.ok(any <= list.length);
+    t.ok(any > 0);
+    t.equal(cast.toListIndex('any', empty.length), 'INVALID');
+    t.end();
+});
diff --git a/test/unit/util_color.js b/test/unit/util_color.js
new file mode 100644
index 000000000..0558b4b3c
--- /dev/null
+++ b/test/unit/util_color.js
@@ -0,0 +1,62 @@
+var test = require('tap').test;
+var color = require('../../src/util/color');
+
+test('decimalToHex', function (t) {
+    t.equal(color.decimalToHex(0), '#000000');
+    t.equal(color.decimalToHex(1), '#000001');
+    t.equal(color.decimalToHex(16777215), '#ffffff');
+    t.equal(color.decimalToHex(-16777215), '#000001');                  // @todo
+    t.equal(color.decimalToHex(99999999), '#5f5e0ff');                  // @todo
+    t.end();
+});
+
+test('decimalToRgb', function (t) {
+    t.deepEqual(color.decimalToRgb(0), {r:0,g:0,b:0});
+    t.deepEqual(color.decimalToRgb(1), {r:0,g:0,b:1});
+    t.deepEqual(color.decimalToRgb(16777215), {r:255,g:255,b:255});
+    t.deepEqual(color.decimalToRgb(-16777215), {r:0,g:0,b:1});          // @todo
+    t.deepEqual(color.decimalToRgb(99999999), {r:245,g:224,b:255});     // @todo
+    t.end();
+});
+
+test('hexToRgb', function (t) {
+    t.deepEqual(color.hexToRgb('#000'), {r:0,g:0,b:0});
+    t.deepEqual(color.hexToRgb('#000000'), {r:0,g:0,b:0});
+    t.deepEqual(color.hexToRgb('#fff'), {r:255,g:255,b:255});
+    t.deepEqual(color.hexToRgb('#ffffff'), {r:255,g:255,b:255});
+    t.deepEqual(color.hexToRgb('#0fa'), {r:0,g:255,b:170});
+    t.deepEqual(color.hexToRgb('#00ffaa'), {r:0,g:255,b:170});
+
+    t.deepEqual(color.hexToRgb('000'), {r:0,g:0,b:0});
+    t.deepEqual(color.hexToRgb('fff'), {r:255,g:255,b:255});
+    t.deepEqual(color.hexToRgb('00ffaa'), {r:0,g:255,b:170});
+
+    t.deepEqual(color.hexToRgb('0'), null);
+    t.deepEqual(color.hexToRgb('hello world'), null);
+
+    t.end();
+});
+
+test('rgbToHex', function (t) {
+    t.equal(color.rgbToHex({r:0,g:0,b:0}), '#000000');
+    t.equal(color.rgbToHex({r:255,g:255,b:255}), '#ffffff');
+    t.equal(color.rgbToHex({r:0,g:255,b:170}), '#00ffaa');
+    t.end();
+});
+
+test('rgbToDecimal', function (t) {
+    t.equal(color.rgbToDecimal({r:0,g:0,b:0}), 0);
+    t.equal(color.rgbToDecimal({r:255,g:255,b:255}), 16777215);
+    t.equal(color.rgbToDecimal({r:0,g:255,b:170}), 65450);
+    t.end();
+});
+
+test('hexToDecimal', function (t) {
+    t.deepEqual(color.hexToDecimal('#000'), 0);
+    t.deepEqual(color.hexToDecimal('#000000'), 0);
+    t.deepEqual(color.hexToDecimal('#fff'), 16777215);
+    t.deepEqual(color.hexToDecimal('#ffffff'), 16777215);
+    t.deepEqual(color.hexToDecimal('#0fa'), 65450);
+    t.deepEqual(color.hexToDecimal('#00ffaa'), 65450);
+    t.end();
+});
diff --git a/test/unit/util_math.js b/test/unit/util_math.js
new file mode 100644
index 000000000..484b88c4b
--- /dev/null
+++ b/test/unit/util_math.js
@@ -0,0 +1,37 @@
+var test = require('tap').test;
+var math = require('../../src/util/math-util');
+
+test('degToRad', function (t) {
+    // @todo This is incorrect
+    t.equal(math.degToRad(0), 1.5707963267948966);
+    t.equal(math.degToRad(1), 1.5533430342749535);
+    t.equal(math.degToRad(180), -1.5707963267948966);
+    t.equal(math.degToRad(360), -4.71238898038469);
+    t.equal(math.degToRad(720), -10.995574287564276);
+    t.end();
+});
+
+test('radToDeg', function (t) {
+    t.equal(math.radToDeg(0), 0);
+    t.equal(math.radToDeg(1), 57.29577951308232);
+    t.equal(math.radToDeg(180), 10313.240312354817);
+    t.equal(math.radToDeg(360), 20626.480624709635);
+    t.equal(math.radToDeg(720), 41252.96124941927);
+    t.end();
+});
+
+test('clamp', function (t) {
+    t.equal(math.clamp(0, 0, 10), 0);
+    t.equal(math.clamp(1, 0, 10), 1);
+    t.equal(math.clamp(-10, 0, 10), 0);
+    t.equal(math.clamp(100, 0, 10), 10);
+    t.end();
+});
+
+test('wrapClamp', function (t) {
+    t.equal(math.wrapClamp(0, 0, 10), 0);
+    t.equal(math.wrapClamp(1, 0, 10), 1);
+    t.equal(math.wrapClamp(-10, 0, 10), 1);
+    t.equal(math.wrapClamp(100, 0, 10), 1);
+    t.end();
+});
diff --git a/test/unit/timer.js b/test/unit/util_timer.js
similarity index 100%
rename from test/unit/timer.js
rename to test/unit/util_timer.js
diff --git a/test/unit/util_xml.js b/test/unit/util_xml.js
new file mode 100644
index 000000000..8682d8323
--- /dev/null
+++ b/test/unit/util_xml.js
@@ -0,0 +1,9 @@
+var test = require('tap').test;
+var xml = require('../../src/util/xml-escape');
+
+test('escape', function (t) {
+    var input = '<foo bar="he & llo \'"></foo>';
+    var output = '&lt;foo bar=&quot;he &amp; llo &apos;&quot;&gt;&lt;/foo&gt;';
+    t.equal(xml(input), output);
+    t.end();
+});

From 0a66c62f6a9ba7832b2c622e29b231f41290655f Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 3 Oct 2016 17:43:24 -0400
Subject: [PATCH 268/302] Mutations in block representation; an unfeatured
 procedure call (#212)

* Add scratch3_procedures and no-op for defnoreturn

* Add mutation adapter to parse mutations in CREATE/CHANGE events

* Add mutation-to-XML

* Update spec map for Blockly procedure names

* Placeholder for procedure special cases

* Basic stepping to procedures

* Remove extra case

* Validation for changeBlock
---
 src/blocks/scratch3_procedures.js | 32 ++++++++++++++++
 src/engine/adapter.js             |  4 ++
 src/engine/blocks.js              | 63 +++++++++++++++++++++++++++++--
 src/engine/execute.js             |  9 +++++
 src/engine/mutation-adapter.js    | 39 +++++++++++++++++++
 src/engine/runtime.js             |  3 +-
 src/engine/sequencer.js           | 10 +++++
 src/import/sb2import.js           |  8 ++++
 src/import/sb2specmap.js          | 11 ++++--
 9 files changed, 171 insertions(+), 8 deletions(-)
 create mode 100644 src/blocks/scratch3_procedures.js
 create mode 100644 src/engine/mutation-adapter.js

diff --git a/src/blocks/scratch3_procedures.js b/src/blocks/scratch3_procedures.js
new file mode 100644
index 000000000..8d43c4c92
--- /dev/null
+++ b/src/blocks/scratch3_procedures.js
@@ -0,0 +1,32 @@
+function Scratch3ProcedureBlocks(runtime) {
+    /**
+     * The runtime instantiating this block package.
+     * @type {Runtime}
+     */
+    this.runtime = runtime;
+}
+
+/**
+ * Retrieve the block primitives implemented by this package.
+ * @return {Object.<string, Function>} Mapping of opcode to Function.
+ */
+Scratch3ProcedureBlocks.prototype.getPrimitives = function() {
+    return {
+        'procedures_defnoreturn': this.defNoReturn,
+        'procedures_callnoreturn': this.callNoReturn
+    };
+};
+
+Scratch3ProcedureBlocks.prototype.defNoReturn = function () {
+    // No-op: execute the blocks.
+};
+
+Scratch3ProcedureBlocks.prototype.callNoReturn = function (args, util) {
+    if (!util.stackFrame.executed) {
+        var procedureName = args.mutation.name;
+        util.stackFrame.executed = true;
+        util.startProcedure(procedureName);
+    }
+};
+
+module.exports = Scratch3ProcedureBlocks;
diff --git a/src/engine/adapter.js b/src/engine/adapter.js
index 26f52be90..327aae5e3 100644
--- a/src/engine/adapter.js
+++ b/src/engine/adapter.js
@@ -1,3 +1,4 @@
+var mutationAdapter = require('./mutation-adapter');
 var html = require('htmlparser2');
 
 /**
@@ -138,6 +139,9 @@ function domToBlock (blockDOM, blocks, isTopBlock, parent) {
             // Link next block to this block.
             block.next = childBlockNode.attribs.id;
             break;
+        case 'mutation':
+            block.mutation = mutationAdapter(xmlChild);
+            break;
         }
     }
 }
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index 99f52477d..f96c916ad 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -1,4 +1,5 @@
 var adapter = require('./adapter');
+var mutationAdapter = require('./mutation-adapter');
 var xmlEscape = require('../util/xml-escape');
 
 /**
@@ -116,6 +117,16 @@ Blocks.prototype.getInputs = function (id) {
     return inputs;
 };
 
+/**
+ * Get mutation data for a block.
+ * @param {?string} id ID of block to query.
+ * @return {!Object} Mutation for the block.
+ */
+Blocks.prototype.getMutation = function (id) {
+    if (typeof this._blocks[id] === 'undefined') return null;
+    return this._blocks[id].mutation;
+};
+
 /**
  * Get the top-level script for a given block.
  * @param {?string} id ID of block to query.
@@ -130,6 +141,23 @@ Blocks.prototype.getTopLevelScript = function (id) {
     return block.id;
 };
 
+/**
+ * Get the procedure definition for a given name.
+ * @param {?string} name Name of procedure to query.
+ * @return {?string} ID of procedure definition.
+ */
+Blocks.prototype.getProcedureDefinition = function (name) {
+    for (var id in this._blocks) {
+        var block = this._blocks[id];
+        if ((block.opcode == 'procedures_defnoreturn' ||
+            block.opcode == 'procedures_defreturn') &&
+            block.fields['NAME'].value == name) {
+            return id;
+        }
+    }
+    return null;
+};
+
 // ---------------------------------------------------------------------
 
 /**
@@ -226,12 +254,16 @@ Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
  */
 Blocks.prototype.changeBlock = function (args) {
     // Validate
-    if (args.element !== 'field') return;
+    if (args.element !== 'field' && args.element !== 'mutation') return;
     if (typeof this._blocks[args.id] === 'undefined') return;
-    if (typeof this._blocks[args.id].fields[args.name] === 'undefined') return;
 
-    // Update block value
-    this._blocks[args.id].fields[args.name].value = args.value;
+    if (args.element == 'field') {
+        // Update block value
+        if (!this._blocks[args.id].fields[args.name]) return;
+        this._blocks[args.id].fields[args.name].value = args.value;
+    } else if (args.element == 'mutation') {
+        this._blocks[args.id].mutation = mutationAdapter(args.value);
+    }
 };
 
 /**
@@ -355,6 +387,10 @@ Blocks.prototype.blockToXML = function (blockId) {
         ' type="' + block.opcode + '"' +
         xy +
         '>';
+    // Add any mutation. Must come before inputs.
+    if (block.mutation) {
+        xmlString += this.mutationToXML(block.mutation);
+    }
     // Add any inputs on this block.
     for (var input in block.inputs) {
         var blockInput = block.inputs[input];
@@ -389,6 +425,25 @@ Blocks.prototype.blockToXML = function (blockId) {
     return xmlString;
 };
 
+/**
+ * Recursively encode a mutation object to XML.
+ * @param {!Object} mutation Object representing a mutation.
+ * @return {string} XML string representing a mutation.
+ */
+Blocks.prototype.mutationToXML = function (mutation) {
+    var mutationString = '<' + mutation.tagName;
+    for (var prop in mutation) {
+        if (prop == 'children' || prop == 'tagName') continue;
+        mutationString += ' ' + prop + '="' + mutation[prop] + '"';
+    }
+    mutationString += '>';
+    for (var i = 0; i < mutation.children.length; i++) {
+        mutationString += this.mutationToXML(mutation.children[i]);
+    }
+    mutationString += '</' + mutation.tagName + '>';
+    return mutationString;
+};
+
 // ---------------------------------------------------------------------
 
 /**
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 29116d5e5..59b4a3cbf 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -132,6 +132,12 @@ var execute = function (sequencer, thread) {
         argValues[inputName] = currentStackFrame.reported[inputName];
     }
 
+    // Add any mutation to args (e.g., for procedures).
+    var mutation = target.blocks.getMutation(currentBlockId);
+    if (mutation) {
+        argValues.mutation = mutation;
+    }
+
     // If we've gotten this far, all of the input blocks are evaluated,
     // and `argValues` is fully populated. So, execute the block primitive.
     // First, clear `currentStackFrame.reported`, so any subsequent execution
@@ -155,6 +161,9 @@ var execute = function (sequencer, thread) {
         startBranch: function (branchNum) {
             sequencer.stepToBranch(thread, branchNum);
         },
+        startProcedure: function (procedureName) {
+            sequencer.stepToProcedure(thread, procedureName);
+        },
         startHats: function(requestedHat, opt_matchFields, opt_target) {
             return (
                 runtime.startHats(requestedHat, opt_matchFields, opt_target)
diff --git a/src/engine/mutation-adapter.js b/src/engine/mutation-adapter.js
new file mode 100644
index 000000000..12dc123e1
--- /dev/null
+++ b/src/engine/mutation-adapter.js
@@ -0,0 +1,39 @@
+var html = require('htmlparser2');
+
+/**
+ * Adapter between mutator XML or DOM and block representation which can be
+ * used by the Scratch runtime.
+ * @param {(Object|string)} mutation Mutation XML string or DOM.
+ * @return {Object} Object representing the mutation.
+ */
+module.exports = function (mutation) {
+    var mutationParsed;
+    // Check if the mutation is already parsed; if not, parse it.
+    if (typeof mutation === 'object') {
+        mutationParsed = mutation;
+    } else {
+        mutationParsed = html.parseDOM(mutation)[0];
+    }
+    return mutatorTagToObject(mutationParsed);
+};
+
+/**
+ * Convert a part of a mutation DOM to a mutation VM object, recursively.
+ * @param {Object} dom DOM object for mutation tag.
+ * @return {Object} Object representing useful parts of this mutation.
+ */
+function mutatorTagToObject (dom) {
+    var obj = Object.create(null);
+    obj.tagName = dom.name;
+    obj.children = [];
+    for (var prop in dom.attribs) {
+        if (prop == 'xmlns') continue;
+        obj[prop] = dom.attribs[prop];
+    }
+    for (var i = 0; i < dom.children.length; i++) {
+        obj.children.push(
+            mutatorTagToObject(dom.children[i])
+        );
+    }
+    return obj;
+}
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 75067be3d..18cffd8ec 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -15,7 +15,8 @@ var defaultBlockPackages = {
     'scratch3_motion': require('../blocks/scratch3_motion'),
     'scratch3_operators': require('../blocks/scratch3_operators'),
     'scratch3_sensing': require('../blocks/scratch3_sensing'),
-    'scratch3_data': require('../blocks/scratch3_data')
+    'scratch3_data': require('../blocks/scratch3_data'),
+    'scratch3_procedures': require('../blocks/scratch3_procedures')
 };
 
 /**
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 690ab61a7..85575c804 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -124,6 +124,16 @@ Sequencer.prototype.stepToBranch = function (thread, branchNum) {
     }
 };
 
+/**
+ * Step a procedure.
+ * @param {!Thread} thread Thread object to step to procedure.
+ * @param {!string} procedureName Name of procedure defined in this target.
+ */
+Sequencer.prototype.stepToProcedure = function (thread, procedureName) {
+    var definition = thread.target.blocks.getProcedureDefinition(procedureName);
+    thread.pushStack(definition);
+};
+
 /**
  * Step a thread into an input reporter, and manage its status appropriately.
  * @param {!Thread} thread Thread object to step to reporter.
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 79e135a7b..f633de9c0 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -327,6 +327,14 @@ function parseBlock (sb2block) {
             };
         }
     }
+    // Special cases to generate mutations.
+    if (oldOpcode == 'call') {
+        activeBlock.mutation = {
+            tagName: 'mutation',
+            children: [],
+            name: sb2block[1]
+        };
+    }
     return activeBlock;
 }
 
diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js
index 693d82f81..76e9683e1 100644
--- a/src/import/sb2specmap.js
+++ b/src/import/sb2specmap.js
@@ -1374,15 +1374,20 @@ var specMap = {
         ]
     },
     'procDef':{
-        'opcode':'proc_def',
-        'argMap':[]
+        'opcode':'procedures_defnoreturn',
+        'argMap':[
+            {
+                'type':'field',
+                'fieldName':'NAME'
+            }
+        ]
     },
     'getParam':{
         'opcode':'proc_param',
         'argMap':[]
     },
     'call':{
-        'opcode':'proc_call',
+        'opcode':'procedures_callnoreturn',
         'argMap':[]
     }
 };

From 4205d05cdb2728fe49572bf64a0242ae9546fbfa Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 3 Oct 2016 18:23:43 -0400
Subject: [PATCH 269/302] Address feedback from PR review. GH-103

---
 test/unit/util_cast.js  | 159 ++++++++++++++++++++--------------------
 test/unit/util_color.js |  38 +++++-----
 test/unit/util_math.js  |  36 ++++-----
 test/unit/util_xml.js   |   2 +-
 4 files changed, 118 insertions(+), 117 deletions(-)

diff --git a/test/unit/util_cast.js b/test/unit/util_cast.js
index dac55f596..1d372213e 100644
--- a/test/unit/util_cast.js
+++ b/test/unit/util_cast.js
@@ -3,72 +3,73 @@ var cast = require('../../src/util/cast');
 
 test('toNumber', function (t) {
     // Numeric
-    t.equal(cast.toNumber(0), 0);
-    t.equal(cast.toNumber(1), 1);
-    t.equal(cast.toNumber(3.14), 3.14);
+    t.strictEqual(cast.toNumber(0), 0);
+    t.strictEqual(cast.toNumber(1), 1);
+    t.strictEqual(cast.toNumber(3.14), 3.14);
 
     // String
-    t.equal(cast.toNumber('0'), 0);
-    t.equal(cast.toNumber('1'), 1);
-    t.equal(cast.toNumber('3.14'), 3.14);
-    t.equal(cast.toNumber('0.1e10'), 1000000000);
-    t.equal(cast.toNumber('foobar'), 0);
+    t.strictEqual(cast.toNumber('0'), 0);
+    t.strictEqual(cast.toNumber('1'), 1);
+    t.strictEqual(cast.toNumber('3.14'), 3.14);
+    t.strictEqual(cast.toNumber('0.1e10'), 1000000000);
+    t.strictEqual(cast.toNumber('foobar'), 0);
 
     // Boolean
-    t.equal(cast.toNumber(true), 1);
-    t.equal(cast.toNumber(false), 0);
-    t.equal(cast.toNumber('true'), 0);
-    t.equal(cast.toNumber('false'), 0);
+    t.strictEqual(cast.toNumber(true), 1);
+    t.strictEqual(cast.toNumber(false), 0);
+    t.strictEqual(cast.toNumber('true'), 0);
+    t.strictEqual(cast.toNumber('false'), 0);
 
     // Undefined & object
-    t.equal(cast.toNumber(undefined), 0);
-    t.equal(cast.toNumber({}), 0);
+    t.strictEqual(cast.toNumber(undefined), 0);
+    t.strictEqual(cast.toNumber({}), 0);
+    t.strictEqual(cast.toNumber(NaN), 0);
     t.end();
 });
 
 test('toBoolean', function (t) {
     // Numeric
-    t.equal(cast.toBoolean(0), false);
-    t.equal(cast.toBoolean(1), true);
-    t.equal(cast.toBoolean(3.14), true);
+    t.strictEqual(cast.toBoolean(0), false);
+    t.strictEqual(cast.toBoolean(1), true);
+    t.strictEqual(cast.toBoolean(3.14), true);
 
     // String
-    t.equal(cast.toBoolean('0'), false);
-    t.equal(cast.toBoolean('1'), true);
-    t.equal(cast.toBoolean('3.14'), true);
-    t.equal(cast.toBoolean('0.1e10'), true);
-    t.equal(cast.toBoolean('foobar'), true);
+    t.strictEqual(cast.toBoolean('0'), false);
+    t.strictEqual(cast.toBoolean('1'), true);
+    t.strictEqual(cast.toBoolean('3.14'), true);
+    t.strictEqual(cast.toBoolean('0.1e10'), true);
+    t.strictEqual(cast.toBoolean('foobar'), true);
 
     // Boolean
-    t.equal(cast.toBoolean(true), true);
-    t.equal(cast.toBoolean(false), false);
+    t.strictEqual(cast.toBoolean(true), true);
+    t.strictEqual(cast.toBoolean(false), false);
 
     // Undefined & object
-    t.equal(cast.toBoolean(undefined), false);
-    t.equal(cast.toBoolean({}), true);
+    t.strictEqual(cast.toBoolean(undefined), false);
+    t.strictEqual(cast.toBoolean({}), true);
     t.end();
 });
 
 test('toString', function (t) {
     // Numeric
-    t.equal(cast.toString(0), '0');
-    t.equal(cast.toString(1), '1');
-    t.equal(cast.toString(3.14), '3.14');
+    t.strictEqual(cast.toString(0), '0');
+    t.strictEqual(cast.toString(1), '1');
+    t.strictEqual(cast.toString(3.14), '3.14');
 
     // String
-    t.equal(cast.toString('0'), '0');
-    t.equal(cast.toString('1'), '1');
-    t.equal(cast.toString('3.14'), '3.14');
-    t.equal(cast.toString('0.1e10'), '0.1e10');
-    t.equal(cast.toString('foobar'), 'foobar');
+    t.strictEqual(cast.toString('0'), '0');
+    t.strictEqual(cast.toString('1'), '1');
+    t.strictEqual(cast.toString('3.14'), '3.14');
+    t.strictEqual(cast.toString('0.1e10'), '0.1e10');
+    t.strictEqual(cast.toString('foobar'), 'foobar');
 
     // Boolean
-    t.equal(cast.toString(true), 'true');
-    t.equal(cast.toString(false), 'false');
+    t.strictEqual(cast.toString(true), 'true');
+    t.strictEqual(cast.toString(false), 'false');
 
     // Undefined & object
-    t.equal(cast.toString(undefined), 'undefined');
-    t.equal(cast.toString({}), '[object Object]');
+    t.strictEqual(cast.toString(undefined), 'undefined');
+    t.strictEqual(cast.toString({}), '[object Object]');
     t.end();
 });
 
@@ -92,53 +93,53 @@ test('toRbgColorList', function (t) {
 
 test('compare', function (t) {
     // Numeric
-    t.equal(cast.compare(0, 0), 0);
-    t.equal(cast.compare(1, 0), 1);
-    t.equal(cast.compare(0, 1), -1);
-    t.equal(cast.compare(1, 1), 0);
+    t.strictEqual(cast.compare(0, 0), 0);
+    t.strictEqual(cast.compare(1, 0), 1);
+    t.strictEqual(cast.compare(0, 1), -1);
+    t.strictEqual(cast.compare(1, 1), 0);
 
     // String
-    t.equal(cast.compare('0', '0'), 0);
-    t.equal(cast.compare('0.1e10', '1000000000'), 0);
-    t.equal(cast.compare('foobar', 'FOOBAR'), 0);
-    t.equal(cast.compare('dog', 'cat'), 1);
+    t.strictEqual(cast.compare('0', '0'), 0);
+    t.strictEqual(cast.compare('0.1e10', '1000000000'), 0);
+    t.strictEqual(cast.compare('foobar', 'FOOBAR'), 0);
+    t.ok(cast.compare('dog', 'cat') > 0);
 
     // Boolean
-    t.equal(cast.compare(true, true), 0);
-    t.equal(cast.compare(true, false), 1);
-    t.equal(cast.compare(false, true), -1);
-    t.equal(cast.compare(true, true), 0);
+    t.strictEqual(cast.compare(true, true), 0);
+    t.strictEqual(cast.compare(true, false), 1);
+    t.strictEqual(cast.compare(false, true), -1);
+    t.strictEqual(cast.compare(true, true), 0);
 
     // Undefined & object
-    t.equal(cast.compare(undefined, undefined), 0);
-    t.equal(cast.compare(undefined, 'undefined'), 0);
-    t.equal(cast.compare({}, {}), 0);
-    t.equal(cast.compare({}, '[object Object]'), 0);
+    t.strictEqual(cast.compare(undefined, undefined), 0);
+    t.strictEqual(cast.compare(undefined, 'undefined'), 0);
+    t.strictEqual(cast.compare({}, {}), 0);
+    t.strictEqual(cast.compare({}, '[object Object]'), 0);
     t.end();
 });
 
 test('isInt', function (t) {
     // Numeric
-    t.equal(cast.isInt(0), true);
-    t.equal(cast.isInt(1), true);
-    t.equal(cast.isInt(0.0), true);
-    t.equal(cast.isInt(3.14), false);
-    t.equal(cast.isInt(NaN), true);
+    t.strictEqual(cast.isInt(0), true);
+    t.strictEqual(cast.isInt(1), true);
+    t.strictEqual(cast.isInt(0.0), true);
+    t.strictEqual(cast.isInt(3.14), false);
+    t.strictEqual(cast.isInt(NaN), true);
 
     // String
-    t.equal(cast.isInt('0'), true);
-    t.equal(cast.isInt('1'), true);
-    t.equal(cast.isInt('0.0'), false);      // @todo This should be true
-    t.equal(cast.isInt('0.1e10'), false);   // @todo This should be true
-    t.equal(cast.isInt('3.14'), false);
+    t.strictEqual(cast.isInt('0'), true);
+    t.strictEqual(cast.isInt('1'), true);
+    t.strictEqual(cast.isInt('0.0'), false);
+    t.strictEqual(cast.isInt('0.1e10'), false);
+    t.strictEqual(cast.isInt('3.14'), false);
 
     // Boolean
-    t.equal(cast.isInt(true), true);
-    t.equal(cast.isInt(false), true);
+    t.strictEqual(cast.isInt(true), true);
+    t.strictEqual(cast.isInt(false), true);
 
     // Undefined & object
-    t.equal(cast.isInt(undefined), false);
-    t.equal(cast.isInt({}), false);
+    t.strictEqual(cast.isInt(undefined), false);
+    t.strictEqual(cast.isInt({}), false);
     t.end();
 });
 
@@ -147,32 +148,32 @@ test('toListIndex', function (t) {
     var empty = [];
 
     // Valid
-    t.equal(cast.toListIndex(1, list.length), 1);
-    t.equal(cast.toListIndex(6, list.length), 6);
+    t.strictEqual(cast.toListIndex(1, list.length), 1);
+    t.strictEqual(cast.toListIndex(6, list.length), 6);
 
     // Invalid
-    t.equal(cast.toListIndex(-1, list.length), 'INVALID');
-    t.equal(cast.toListIndex(0.1, list.length), 'INVALID');
-    t.equal(cast.toListIndex(0, list.length), 'INVALID');
-    t.equal(cast.toListIndex(7, list.length), 'INVALID');
+    t.strictEqual(cast.toListIndex(-1, list.length), cast.LIST_INVALID);
+    t.strictEqual(cast.toListIndex(0.1, list.length), cast.LIST_INVALID);
+    t.strictEqual(cast.toListIndex(0, list.length), cast.LIST_INVALID);
+    t.strictEqual(cast.toListIndex(7, list.length), cast.LIST_INVALID);
 
     // "all"
-    t.equal(cast.toListIndex('all', list.length), 'ALL');
+    t.strictEqual(cast.toListIndex('all', list.length), cast.LIST_ALL);
 
     // "last"
-    t.equal(cast.toListIndex('last', list.length), list.length);
-    t.equal(cast.toListIndex('last', empty.length), 'INVALID');
+    t.strictEqual(cast.toListIndex('last', list.length), list.length);
+    t.strictEqual(cast.toListIndex('last', empty.length), cast.LIST_INVALID);
 
     // "random"
     var random = cast.toListIndex('random', list.length);
     t.ok(random <= list.length);
     t.ok(random > 0);
-    t.equal(cast.toListIndex('random', empty.length), 'INVALID');
+    t.strictEqual(cast.toListIndex('random', empty.length), cast.LIST_INVALID);
 
     // "any" (alias for "random")
     var any = cast.toListIndex('any', list.length);
     t.ok(any <= list.length);
     t.ok(any > 0);
-    t.equal(cast.toListIndex('any', empty.length), 'INVALID');
+    t.strictEqual(cast.toListIndex('any', empty.length), cast.LIST_INVALID);
     t.end();
 });
diff --git a/test/unit/util_color.js b/test/unit/util_color.js
index 0558b4b3c..ba7fa059c 100644
--- a/test/unit/util_color.js
+++ b/test/unit/util_color.js
@@ -2,11 +2,11 @@ var test = require('tap').test;
 var color = require('../../src/util/color');
 
 test('decimalToHex', function (t) {
-    t.equal(color.decimalToHex(0), '#000000');
-    t.equal(color.decimalToHex(1), '#000001');
-    t.equal(color.decimalToHex(16777215), '#ffffff');
-    t.equal(color.decimalToHex(-16777215), '#000001');                  // @todo
-    t.equal(color.decimalToHex(99999999), '#5f5e0ff');                  // @todo
+    t.strictEqual(color.decimalToHex(0), '#000000');
+    t.strictEqual(color.decimalToHex(1), '#000001');
+    t.strictEqual(color.decimalToHex(16777215), '#ffffff');
+    t.strictEqual(color.decimalToHex(-16777215), '#000001');
+    t.strictEqual(color.decimalToHex(99999999), '#5f5e0ff');
     t.end();
 });
 
@@ -14,8 +14,8 @@ test('decimalToRgb', function (t) {
     t.deepEqual(color.decimalToRgb(0), {r:0,g:0,b:0});
     t.deepEqual(color.decimalToRgb(1), {r:0,g:0,b:1});
     t.deepEqual(color.decimalToRgb(16777215), {r:255,g:255,b:255});
-    t.deepEqual(color.decimalToRgb(-16777215), {r:0,g:0,b:1});          // @todo
-    t.deepEqual(color.decimalToRgb(99999999), {r:245,g:224,b:255});     // @todo
+    t.deepEqual(color.decimalToRgb(-16777215), {r:0,g:0,b:1});
+    t.deepEqual(color.decimalToRgb(99999999), {r:245,g:224,b:255});
     t.end();
 });
 
@@ -38,25 +38,25 @@ test('hexToRgb', function (t) {
 });
 
 test('rgbToHex', function (t) {
-    t.equal(color.rgbToHex({r:0,g:0,b:0}), '#000000');
-    t.equal(color.rgbToHex({r:255,g:255,b:255}), '#ffffff');
-    t.equal(color.rgbToHex({r:0,g:255,b:170}), '#00ffaa');
+    t.strictEqual(color.rgbToHex({r:0,g:0,b:0}), '#000000');
+    t.strictEqual(color.rgbToHex({r:255,g:255,b:255}), '#ffffff');
+    t.strictEqual(color.rgbToHex({r:0,g:255,b:170}), '#00ffaa');
     t.end();
 });
 
 test('rgbToDecimal', function (t) {
-    t.equal(color.rgbToDecimal({r:0,g:0,b:0}), 0);
-    t.equal(color.rgbToDecimal({r:255,g:255,b:255}), 16777215);
-    t.equal(color.rgbToDecimal({r:0,g:255,b:170}), 65450);
+    t.strictEqual(color.rgbToDecimal({r:0,g:0,b:0}), 0);
+    t.strictEqual(color.rgbToDecimal({r:255,g:255,b:255}), 16777215);
+    t.strictEqual(color.rgbToDecimal({r:0,g:255,b:170}), 65450);
     t.end();
 });
 
 test('hexToDecimal', function (t) {
-    t.deepEqual(color.hexToDecimal('#000'), 0);
-    t.deepEqual(color.hexToDecimal('#000000'), 0);
-    t.deepEqual(color.hexToDecimal('#fff'), 16777215);
-    t.deepEqual(color.hexToDecimal('#ffffff'), 16777215);
-    t.deepEqual(color.hexToDecimal('#0fa'), 65450);
-    t.deepEqual(color.hexToDecimal('#00ffaa'), 65450);
+    t.strictEqual(color.hexToDecimal('#000'), 0);
+    t.strictEqual(color.hexToDecimal('#000000'), 0);
+    t.strictEqual(color.hexToDecimal('#fff'), 16777215);
+    t.strictEqual(color.hexToDecimal('#ffffff'), 16777215);
+    t.strictEqual(color.hexToDecimal('#0fa'), 65450);
+    t.strictEqual(color.hexToDecimal('#00ffaa'), 65450);
     t.end();
 });
diff --git a/test/unit/util_math.js b/test/unit/util_math.js
index 484b88c4b..b282e90cc 100644
--- a/test/unit/util_math.js
+++ b/test/unit/util_math.js
@@ -3,35 +3,35 @@ var math = require('../../src/util/math-util');
 
 test('degToRad', function (t) {
     // @todo This is incorrect
-    t.equal(math.degToRad(0), 1.5707963267948966);
-    t.equal(math.degToRad(1), 1.5533430342749535);
-    t.equal(math.degToRad(180), -1.5707963267948966);
-    t.equal(math.degToRad(360), -4.71238898038469);
-    t.equal(math.degToRad(720), -10.995574287564276);
+    t.strictEqual(math.degToRad(0), 1.5707963267948966);
+    t.strictEqual(math.degToRad(1), 1.5533430342749535);
+    t.strictEqual(math.degToRad(180), -1.5707963267948966);
+    t.strictEqual(math.degToRad(360), -4.71238898038469);
+    t.strictEqual(math.degToRad(720), -10.995574287564276);
     t.end();
 });
 
 test('radToDeg', function (t) {
-    t.equal(math.radToDeg(0), 0);
-    t.equal(math.radToDeg(1), 57.29577951308232);
-    t.equal(math.radToDeg(180), 10313.240312354817);
-    t.equal(math.radToDeg(360), 20626.480624709635);
-    t.equal(math.radToDeg(720), 41252.96124941927);
+    t.strictEqual(math.radToDeg(0), 0);
+    t.strictEqual(math.radToDeg(1), 57.29577951308232);
+    t.strictEqual(math.radToDeg(180), 10313.240312354817);
+    t.strictEqual(math.radToDeg(360), 20626.480624709635);
+    t.strictEqual(math.radToDeg(720), 41252.96124941927);
     t.end();
 });
 
 test('clamp', function (t) {
-    t.equal(math.clamp(0, 0, 10), 0);
-    t.equal(math.clamp(1, 0, 10), 1);
-    t.equal(math.clamp(-10, 0, 10), 0);
-    t.equal(math.clamp(100, 0, 10), 10);
+    t.strictEqual(math.clamp(0, 0, 10), 0);
+    t.strictEqual(math.clamp(1, 0, 10), 1);
+    t.strictEqual(math.clamp(-10, 0, 10), 0);
+    t.strictEqual(math.clamp(100, 0, 10), 10);
     t.end();
 });
 
 test('wrapClamp', function (t) {
-    t.equal(math.wrapClamp(0, 0, 10), 0);
-    t.equal(math.wrapClamp(1, 0, 10), 1);
-    t.equal(math.wrapClamp(-10, 0, 10), 1);
-    t.equal(math.wrapClamp(100, 0, 10), 1);
+    t.strictEqual(math.wrapClamp(0, 0, 10), 0);
+    t.strictEqual(math.wrapClamp(1, 0, 10), 1);
+    t.strictEqual(math.wrapClamp(-10, 0, 10), 1);
+    t.strictEqual(math.wrapClamp(100, 0, 10), 1);
     t.end();
 });
diff --git a/test/unit/util_xml.js b/test/unit/util_xml.js
index 8682d8323..1906a2ab6 100644
--- a/test/unit/util_xml.js
+++ b/test/unit/util_xml.js
@@ -4,6 +4,6 @@ var xml = require('../../src/util/xml-escape');
 test('escape', function (t) {
     var input = '<foo bar="he & llo \'"></foo>';
     var output = '&lt;foo bar=&quot;he &amp; llo &apos;&quot;&gt;&lt;/foo&gt;';
-    t.equal(xml(input), output);
+    t.strictEqual(xml(input), output);
     t.end();
 });

From 953c892aab021d6e36b0d6e27c8e92eaf11c2f02 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 3 Oct 2016 21:43:31 -0400
Subject: [PATCH 270/302] Add unit test coverage for operator blocks. Resolves
 GH-103

---
 test/unit/blocks_operators.js | 175 ++++++++++++++++++++++++++++++++++
 1 file changed, 175 insertions(+)
 create mode 100644 test/unit/blocks_operators.js

diff --git a/test/unit/blocks_operators.js b/test/unit/blocks_operators.js
new file mode 100644
index 000000000..e2477f03f
--- /dev/null
+++ b/test/unit/blocks_operators.js
@@ -0,0 +1,175 @@
+var test = require('tap').test;
+var Operators = require('../../src/blocks/scratch3_operators');
+
+var blocks = new Operators(null);
+
+test('getPrimitives', function (t) {
+    t.type(blocks.getPrimitives(), 'object');
+    t.end();
+});
+
+test('add', function (t) {
+    t.strictEqual(blocks.add({NUM1:'1', NUM2:'1'}), 2);
+    t.strictEqual(blocks.add({NUM1:'foo', NUM2:'bar'}), 0);
+    t.end();
+});
+
+test('subtract', function (t) {
+    t.strictEqual(blocks.subtract({NUM1:'1', NUM2:'1'}), 0);
+    t.strictEqual(blocks.subtract({NUM1:'foo', NUM2:'bar'}), 0);
+    t.end();
+});
+
+test('multiply', function (t) {
+    t.strictEqual(blocks.multiply({NUM1:'2', NUM2:'2'}), 4);
+    t.strictEqual(blocks.multiply({NUM1:'foo', NUM2:'bar'}), 0);
+    t.end();
+});
+
+test('divide', function (t) {
+    t.strictEqual(blocks.divide({NUM1:'2', NUM2:'2'}), 1);
+    t.strictEqual(blocks.divide({NUM1:'1', NUM2:'0'}), Infinity);   // @todo
+    t.ok(isNaN(blocks.divide({NUM1:'foo', NUM2:'bar'})));           // @todo
+    t.end();
+});
+
+test('lt', function (t) {
+    t.strictEqual(blocks.lt({OPERAND1:'1', OPERAND2:'2'}), true);
+    t.strictEqual(blocks.lt({OPERAND1:'2', OPERAND2:'1'}), false);
+    t.strictEqual(blocks.lt({OPERAND1:'1', OPERAND2:'1'}), false);
+    t.end();
+});
+
+test('equals', function (t) {
+    t.strictEqual(blocks.equals({OPERAND1:'1', OPERAND2:'2'}), false);
+    t.strictEqual(blocks.equals({OPERAND1:'2', OPERAND2:'1'}), false);
+    t.strictEqual(blocks.equals({OPERAND1:'1', OPERAND2:'1'}), true);
+    t.end();
+});
+
+test('gt', function (t) {
+    t.strictEqual(blocks.gt({OPERAND1:'1', OPERAND2:'2'}), false);
+    t.strictEqual(blocks.gt({OPERAND1:'2', OPERAND2:'1'}), true);
+    t.strictEqual(blocks.gt({OPERAND1:'1', OPERAND2:'1'}), false);
+    t.end();
+});
+
+test('and', function (t) {
+    t.strictEqual(blocks.and({OPERAND1:true, OPERAND2:true}), true);
+    t.strictEqual(blocks.and({OPERAND1:true, OPERAND2:false}), false);
+    t.strictEqual(blocks.and({OPERAND1:false, OPERAND2:false}), false);
+    t.end();
+});
+
+test('or', function (t) {
+    t.strictEqual(blocks.or({OPERAND1:true, OPERAND2:true}), true);
+    t.strictEqual(blocks.or({OPERAND1:true, OPERAND2:false}), true);
+    t.strictEqual(blocks.or({OPERAND1:false, OPERAND2:false}), false);
+    t.end();
+});
+
+test('not', function (t) {
+    t.strictEqual(blocks.not({OPERAND:true}), false);
+    t.strictEqual(blocks.not({OPERAND:false}), true);
+    t.end();
+});
+
+test('random', function (t) {
+    var min = 0;
+    var max = 100;
+    var result = blocks.random({FROM:0, TO:1});
+    t.ok(result >= min);
+    t.ok(result <= max);
+    t.end();
+});
+
+test('random - equal', function (t) {
+    var min = 1;
+    var max = 1;
+    t.strictEqual(blocks.random({FROM:min, TO:max}), min);
+    t.end();
+});
+
+test('random - decimal', function (t) {
+    var min = 0.1;
+    var max = 10;
+    var result = blocks.random({FROM:min, TO:max});
+    t.ok(result >= min);
+    t.ok(result <= max);
+    t.end();
+});
+
+test('random - int', function (t) {
+    var min = 0;
+    var max = 10;
+    var result = blocks.random({FROM:min, TO:max});
+    t.ok(result >= min);
+    t.ok(result <= max);
+    t.end();
+});
+
+test('random - reverse', function (t) {
+    var min = 0;
+    var max = 10;
+    var result = blocks.random({FROM:max, TO:min});
+    t.ok(result >= min);
+    t.ok(result <= max);
+    t.end();
+});
+
+test('join', function (t) {
+    t.strictEqual(blocks.join({STRING1:'foo', STRING2:'bar'}), 'foobar');
+    t.strictEqual(blocks.join({STRING1:'1', STRING2:'2'}), '12');
+    t.end();
+});
+
+test('letterOf', function (t) {
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:0}), '');
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:1}), 'f');
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:2}), 'o');
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:3}), 'o');
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:4}), '');
+    t.strictEqual(blocks.letterOf({STRING:'foo', LETTER:'bar'}), '');
+    t.end();
+});
+
+test('length', function (t) {
+    t.strictEqual(blocks.length({STRING:''}), 0);
+    t.strictEqual(blocks.length({STRING:'foo'}), 3);
+    t.strictEqual(blocks.length({STRING:'1'}), 1);
+    t.strictEqual(blocks.length({STRING:'100'}), 3);
+    t.end();
+});
+
+test('mod', function (t) {
+    t.strictEqual(blocks.mod({NUM1:1, NUM2:1}), 0);
+    t.strictEqual(blocks.mod({NUM1:3, NUM2:6}), 3);
+    t.strictEqual(blocks.mod({NUM1:-3, NUM2:6}), 3);
+    t.end();
+});
+
+test('round', function (t) {
+    t.strictEqual(blocks.round({NUM:1}), 1);
+    t.strictEqual(blocks.round({NUM:1.1}), 1);
+    t.strictEqual(blocks.round({NUM:1.5}), 2);
+    t.end();
+});
+
+test('mathop', function (t) {
+    t.strictEqual(blocks.mathop({OPERATOR:'abs', NUM:-1}), 1);
+    t.strictEqual(blocks.mathop({OPERATOR:'floor', NUM:1.5}), 1);
+    t.strictEqual(blocks.mathop({OPERATOR:'ceiling', NUM:0.1}), 1);
+    t.strictEqual(blocks.mathop({OPERATOR:'sqrt', NUM:1}), 1);
+    t.strictEqual(blocks.mathop({OPERATOR:'sin', NUM:1}), 0.01745240643728351);
+    t.strictEqual(blocks.mathop({OPERATOR:'cos', NUM:1}), 0.9998476951563913);
+    t.strictEqual(blocks.mathop({OPERATOR:'tan', NUM:1}), 0.017455064928217585);
+    t.strictEqual(blocks.mathop({OPERATOR:'asin', NUM:1}), 90);
+    t.strictEqual(blocks.mathop({OPERATOR:'acos', NUM:1}), 0);
+    t.strictEqual(blocks.mathop({OPERATOR:'atan', NUM:1}), 45);
+    t.strictEqual(blocks.mathop({OPERATOR:'ln', NUM:1}), 0);
+    t.strictEqual(blocks.mathop({OPERATOR:'log', NUM:1}), 0);
+    t.strictEqual(blocks.mathop({OPERATOR:'e ^', NUM:1}), 2.718281828459045);
+    t.strictEqual(blocks.mathop({OPERATOR:'10 ^', NUM:1}), 10);
+    t.strictEqual(blocks.mathop({OPERATOR:'undefined', NUM:1}), 0);
+    t.end();
+});

From edb109a296cb13e81667ba527156f1f5ad52c90c Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 3 Oct 2016 22:05:45 -0400
Subject: [PATCH 271/302] Add code coverage badge to README. Re GH-103

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index b71d51604..b701ca103 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
 #### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
 
 [![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=develop)](https://travis-ci.org/LLK/scratch-vm)
+[![Coverage Status](https://coveralls.io/repos/github/LLK/scratch-vm/badge.svg?branch=develop)](https://coveralls.io/github/LLK/scratch-vm?branch=develop)
 [![Dependency Status](https://david-dm.org/LLK/scratch-vm.svg)](https://david-dm.org/LLK/scratch-vm)
 [![devDependency Status](https://david-dm.org/LLK/scratch-vm/dev-status.svg)](https://david-dm.org/LLK/scratch-vm#info=devDependencies)
 

From 157b6152f52fe67f3d1ca8f0cdfa1fd754b6197c Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 4 Oct 2016 14:37:39 -0400
Subject: [PATCH 272/302] Address feedback from PR review. GH-103

---
 test/unit/blocks_operators.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unit/blocks_operators.js b/test/unit/blocks_operators.js
index e2477f03f..f7befa063 100644
--- a/test/unit/blocks_operators.js
+++ b/test/unit/blocks_operators.js
@@ -77,7 +77,7 @@ test('not', function (t) {
 test('random', function (t) {
     var min = 0;
     var max = 100;
-    var result = blocks.random({FROM:0, TO:1});
+    var result = blocks.random({FROM:min, TO:max});
     t.ok(result >= min);
     t.ok(result <= max);
     t.end();

From 886bcbe3c1be9069e2ca5f395928c3cbc4a42eb5 Mon Sep 17 00:00:00 2001
From: Liam <liam4@users.noreply.github.com>
Date: Tue, 4 Oct 2016 16:20:53 -0300
Subject: [PATCH 273/302] Implement the point-towards block (#235)

* Implement the point-towards block

* Pointing towards a nonexistent sprite should do nothing, not throw an error
---
 src/blocks/scratch3_motion.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 8b8e7356e..18c7bc7e9 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -21,6 +21,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         'motion_turnright': this.turnRight,
         'motion_turnleft': this.turnLeft,
         'motion_pointindirection': this.pointInDirection,
+        'motion_pointtowards': this.pointTowards,
         'motion_glidesecstoxy': this.glide,
         'motion_setrotationstyle': this.setRotationStyle,
         'motion_changexby': this.changeX,
@@ -62,6 +63,25 @@ Scratch3MotionBlocks.prototype.pointInDirection = function (args, util) {
     util.target.setDirection(direction);
 };
 
+Scratch3MotionBlocks.prototype.pointTowards = function (args, util) {
+    var targetX = 0;
+    var targetY = 0;
+    if (args.TOWARDS === '_mouse_') {
+        targetX = util.ioQuery('mouse', 'getX');
+        targetY = util.ioQuery('mouse', 'getY');
+    } else {
+        var pointTarget = this.runtime.getSpriteTargetByName(args.TOWARDS);
+        if (!pointTarget) return;
+        targetX = pointTarget.x;
+        targetY = pointTarget.y;
+    }
+
+    var dx = targetX - util.target.x;
+    var dy = targetY - util.target.y;
+    var direction = 90 - MathUtil.radToDeg(Math.atan2(dy, dx));
+    util.target.setDirection(direction);
+};
+
 Scratch3MotionBlocks.prototype.glide = function (args, util) {
     if (!util.stackFrame.timer) {
         // First time: save data for future use.

From 6cd9697bed93782f94c5a3b3023561b39283fac3 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Tue, 4 Oct 2016 15:21:55 -0400
Subject: [PATCH 274/302] Add secure environment var for coveralls. Re GH-103

---
 .travis.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 091fe53fe..70433651b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,15 @@
 language: node_js
 node_js:
-- "4"
-- "stable"
+- '4'
+- stable
 sudo: false
 cache:
   directories:
   - node_modules
+env:
+  global:
+    secure: pgTtizuHLxuSOtDZ/DBoxcBeigRPiBTAuWo5Kn5wVtnXhqpWfzcT6DGe9vVwbaFLvb+zdY3pYmopAZnZTUCmGRGgPgNdE7BFwwCpMSbHHjtlHkcwCOwRUaNcW6iB9WjfwOM/I6UTy2N0OiUQdZcysW2ybdIxzYdYHElQE47kJHIecOoxJXRw/c0nv7MUkmVYnMt7gOqH2sK9kWyUDgDbtG4sCLb5LhN5/WFzUopACpN6VvAYaCIU8BTAAnb0XxIAD5mmBrOScbANTodnN4ubFjtNfMBd+j7h02bFBHbbJ73Z5gnRRonDos5kkRuFI08IV/0QauMwMSv2TKCVvsbaf53zWbfPkWr7zbj6gtisscfK0zEW9lTz7lvhyUeiPonzAqeV39gd+oPowWM5ZuyIZoawPbIvTJtGb4RlkEPI8OQST6O6g71hMksw0VDWDiLDneLCcHYFw7Q25qAkBg9P4ahH6McP4BB4gTJfQFKCDKvGYFsGrxM2IvYkXcZ0CdcatnNZGLsvHFk24sIQleLZPiCXOZKfp6zbNLwoJWhkoLz8aZ5hJoiRpoztyyrAdh6IL9MwZIgQ9KI10GfKpHmX5jbnh55KRc3G8a65fksHP5TFt2JjKtiN6A3oJAGzltdatW2TwlhyweEnjfpmtQcN8I4OKfgnsOcohcS+RaBNPCQ=
 before_install:
-# Install the most up to date scratch-* dependencies
 - rm -rf node_modules/scratch-*
 after_script:
 - |

From 5871672551e70b539d8da6772d2c54b33c4d61dd Mon Sep 17 00:00:00 2001
From: Liam <liam4@users.noreply.github.com>
Date: Tue, 4 Oct 2016 19:19:52 -0300
Subject: [PATCH 275/302] Implement "go to" block (#238)

* Implement "go to" block

* Add a missing semicolon

My text editor doesn't automatically insert them and I'm not used to using
semicolons so much. :(

* Implement go-to-random

* Clean up the go-to-random code a bit

* Add rounding to _random_ picks
---
 src/blocks/scratch3_motion.js | 21 +++++++++++++++++++++
 src/engine/runtime.js         | 12 ++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 18c7bc7e9..3e19e6ef1 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -18,6 +18,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
     return {
         'motion_movesteps': this.moveSteps,
         'motion_gotoxy': this.goToXY,
+        'motion_goto': this.goTo,
         'motion_turnright': this.turnRight,
         'motion_turnleft': this.turnLeft,
         'motion_pointindirection': this.pointInDirection,
@@ -48,6 +49,26 @@ Scratch3MotionBlocks.prototype.goToXY = function (args, util) {
     util.target.setXY(x, y);
 };
 
+Scratch3MotionBlocks.prototype.goTo = function (args, util) {
+    var targetX = 0;
+    var targetY = 0;
+    if (args.TO === '_mouse_') {
+        targetX = util.ioQuery('mouse', 'getX');
+        targetY = util.ioQuery('mouse', 'getY');
+    } else if (args.TO === '_random_') {
+        var stageWidth = this.runtime.constructor.STAGE_WIDTH;
+        var stageHeight = this.runtime.constructor.STAGE_HEIGHT;
+        targetX = Math.round(stageWidth * (Math.random() - 0.5));
+        targetY = Math.round(stageHeight * (Math.random() - 0.5));
+    } else {
+        var goToTarget = this.runtime.getSpriteTargetByName(args.TO);
+        if (!goToTarget) return;
+        targetX = goToTarget.x;
+        targetY = goToTarget.y;
+    }
+    util.target.setXY(targetX, targetY);
+};
+
 Scratch3MotionBlocks.prototype.turnRight = function (args, util) {
     var degrees = Cast.toNumber(args.DEGREES);
     util.target.setDirection(util.target.direction + degrees);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 18cffd8ec..10c025199 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -69,6 +69,18 @@ function Runtime () {
     this._cloneCounter = 0;
 }
 
+/**
+ * Width of the stage, in pixels.
+ * @const {number}
+ */
+Runtime.STAGE_WIDTH = 480;
+
+/**
+ * Height of the stage, in pixels.
+ * @const {number}
+ */
+Runtime.STAGE_HEIGHT = 360;
+
 /**
  * Event name for glowing a script.
  * @const {string}

From cb4a75928e9036a94a99c59f7c27d0425c2dd218 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Tue, 4 Oct 2016 20:25:06 -0400
Subject: [PATCH 276/302] Add NPM Script 'build'

---
 package.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index e042b6de6..0b9743912 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
   "main": "./dist.js",
   "scripts": {
     "prepublish": "./node_modules/.bin/webpack --bail",
-    "start": "make serve",
+    "start": "webpack-dev-server",
+    "start": "webpack --colors --progress",
     "test": "make test",
     "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
   },

From 9b07889b3f042ac1880f0a7ae44a154bf8706f63 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Tue, 4 Oct 2016 20:38:11 -0400
Subject: [PATCH 277/302] Fix Stage PNG (#241)

* Fix Stage PNG

* Add New Stage PNG

* Remove Old Stage PNG

* Delete backdrop1.png

* Rename New Stage PNG

* Delete stage.png

* Fix Stage Resolution
---
 assets/stage.png | Bin 1346 -> 3552 bytes
 src/index.js     |   6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/assets/stage.png b/assets/stage.png
index c60861c2bd315d6eaffdb9dfb632abb49e1102d4..b13e9d1f5f77b8f623b272d4520eecc34c0aa797 100644
GIT binary patch
literal 3552
zcmeAS@N?(olHy`uVBq!ia0y~yU_QXWz;uCw2`F+wwC^#HVk{1FcVbv~PUa<$!;<dk
z>&U>cv7h@-A}f&3S>O>_%)r2R7=#&*=dVZsnpEoP;uum9_x740BZGke^TJ=|bEAIT
zc4W<GU^p<-ftkTU;Q|AL0EY?CI3`{OhQ?8$(U2HT6QfySv``o=3rA~((fV<;Suol_
o8f_Pjwvb0V21Iv}=H$v>2{pNWlFLR1*ehf3boFyt=akR{0Pf7lyZ`_I

literal 1346
zcmeAS@N?(olHy`uVBq!ia0y~yV0-|?85~SN5r)wH<v^0LILO_JVcj{Imp~3nx}&cn
z1H;CC?mvmFKt5-IM`SSr1K(i~W;~w1A_b`Cx~Gd{NJZS+D~5~=3_OPy{4~FN^8};P
z4#o*884Vha%r2Z#3SJi&0-M-6giIW!EMQ#3!YiOUDm5A!qiJI_I}FmoVbV7CV3uBk
U&mZa{f#n{9r>mdKI;Vst00K&1Q~&?~

diff --git a/src/index.js b/src/index.js
index 321a0f889..fd987f4de 100644
--- a/src/index.js
+++ b/src/index.js
@@ -137,9 +137,9 @@ VirtualMachine.prototype.createEmptyProject = function () {
     stage.costumes.push({
         skin: '/assets/stage.png',
         name: 'backdrop1',
-        bitmapResolution: 1,
-        rotationCenterX: 240,
-        rotationCenterY: 180
+        bitmapResolution: 2,
+        rotationCenterX: 480,
+        rotationCenterY: 360
     });
     var target2 = stage.createClone();
     this.runtime.targets.push(target2);

From 30535d8e6ea4f2cbb6c7c1fe51db433d0fca6b3d Mon Sep 17 00:00:00 2001
From: Liam <liam4@users.noreply.github.com>
Date: Tue, 4 Oct 2016 22:26:59 -0300
Subject: [PATCH 278/302] Implement "distance to" block (#239)

* Implement "distance-to" block

* distance-to in stage should always be 10000
---
 src/blocks/scratch3_sensing.js | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index 5e392ef86..15466e3c0 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -16,6 +16,7 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
     return {
         'sensing_touchingcolor': this.touchingColor,
         'sensing_coloristouchingcolor': this.colorTouchingColor,
+        'sensing_distanceto': this.distanceTo,
         'sensing_timer': this.getTimer,
         'sensing_resettimer': this.resetTimer,
         'sensing_mousex': this.getMouseX,
@@ -37,6 +38,28 @@ Scratch3SensingBlocks.prototype.colorTouchingColor = function (args, util) {
     return util.target.colorIsTouchingColor(targetColor, maskColor);
 };
 
+Scratch3SensingBlocks.prototype.distanceTo = function (args, util) {
+    if (util.target.isStage) return 10000;
+
+    var targetX = 0;
+    var targetY = 0;
+    if (args.DISTANCETOMENU === '_mouse_') {
+        targetX = util.ioQuery('mouse', 'getX');
+        targetY = util.ioQuery('mouse', 'getY');
+    } else {
+        var distTarget = this.runtime.getSpriteTargetByName(
+            args.DISTANCETOMENU
+        );
+        if (!distTarget) return 10000;
+        targetX = distTarget.x;
+        targetY = distTarget.y;
+    }
+
+    var dx = util.target.x - targetX;
+    var dy = util.target.y - targetY;
+    return Math.sqrt((dx * dx) + (dy * dy));
+};
+
 Scratch3SensingBlocks.prototype.getTimer = function (args, util) {
     return util.ioQuery('clock', 'projectTimer');
 };

From 2b54366d1c291e81d636235606722c1b2deac03a Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Wed, 5 Oct 2016 10:00:28 -0400
Subject: [PATCH 279/302] Add issue and PR templates for contributors

---
 .github/ISSUE_TEMPLATE.md        | 15 +++++++++++++++
 .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 .github/ISSUE_TEMPLATE.md
 create mode 100644 .github/PULL_REQUEST_TEMPLATE.md

diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000..9ea236ba5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,15 @@
+### Expected behavior
+
+_Please describe what should happen_
+
+### Actual behavior
+
+_Describe what actually happens_
+
+### Steps to reproduce
+
+_Explain what someone needs to do in order to see what's described in *Actual behavior* above_
+
+### Operating system and browser
+
+_e.g. Mac OS 10.11.6 Safari 10.0_
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..1030318c8
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,14 @@
+### Type of change
+
+- [ ] Bug fix
+- [ ] New feature
+- [ ] Refactor
+- [ ] "Chore" (changes to build script, updates to README, etc.)
+
+### Proposed changes
+
+_Describe what this Pull Request does_
+
+### Reason for changes
+
+_Explain why these changes should be made. Please include an issue # if applicable._

From b28c67633abf68066bda4b94ed8659195ab23d1e Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Wed, 5 Oct 2016 10:19:25 -0400
Subject: [PATCH 280/302] Remove Type section

---
 .github/PULL_REQUEST_TEMPLATE.md | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 1030318c8..696bd38d7 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,10 +1,3 @@
-### Type of change
-
-- [ ] Bug fix
-- [ ] New feature
-- [ ] Refactor
-- [ ] "Chore" (changes to build script, updates to README, etc.)
-
 ### Proposed changes
 
 _Describe what this Pull Request does_

From da5b70ffd252c82c2ef70c9e48ee20ef708e4112 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Wed, 5 Oct 2016 16:37:55 -0400
Subject: [PATCH 281/302] Add CONTRIBUTING.md for scratch-vm (#244)

* Add CONTRIBUTING.md for scratch-vm

* Thought through language

* Forum post -> developers link

* paper
---
 CONTRIBUTING.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 CONTRIBUTING.md

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..ddd2e36c3
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,25 @@
+## Contributing
+The development of scratch-vm is an ongoing process,
+and we love to have people in the Scratch and open source communities help us along the way.
+
+If you're interested in contributing, please take a look at the
+[issues](https://github.com/LLK/scratch-vm/issues) on this repository.
+Two great ways of helping are by identifying bugs and documenting them as issues,
+or fixing issues and creating pull requests. When submitting pull requests please be patient
+-- it can take a while to find time to review them.
+The organization and class structures can't be radically changed without significant coordination
+and collaboration from the Scratch Team, so these types of changes should be avoided.
+
+It's been said that the Scratch Team spends about one hour of design discussion for every pixel in Scratch,
+but some think that estimate is a little low. While we welcome suggestions for new features in our
+[suggestions forum](https://scratch.mit.edu/discuss/1/) (especially ones that come with mockups), we are unlikely to accept PRs with
+new features that haven't been thought through and discussed as a group. Why? Because we have a strong belief
+in the value of keeping things simple for new users. To learn more about our design philosophy,
+see [the Scratch Developers page](https://scratch.mit.edu/developers), or
+[this paper](http://web.media.mit.edu/~mres/papers/Scratch-CACM-final.pdf).
+
+Beyond this repo, there are also some other resources that you might want to take a look at:
+* [Community Guidelines](https://github.com/LLK/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
+* [Open Source forum](https://scratch.mit.edu/discuss/49/) on Scratch
+* [Suggestions forum](https://scratch.mit.edu/discuss/1/) on Scratch
+* [Bugs & Glitches forum](https://scratch.mit.edu/discuss/3/) on Scratch

From 5c6d80ab8e2cb31e7ef27b10c2a73a2aa107ab5e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Fri, 7 Oct 2016 15:51:03 -0400
Subject: [PATCH 282/302] Toolbox update Oct 7 (#246)

* Toolbox XML update October 7

* Blocks font CSS
---
 playground/index.html     | 44 ++++++++++++++++++---------------------
 playground/playground.css |  1 +
 2 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index e8b980141..41c5ac4f0 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -52,7 +52,7 @@
     <div id="blocks"></div>
 
     <xml id="toolbox" style="display: none">
-        <category name="Motion" colour="#4C97FF">
+        <category name="Motion" colour="#4C97FF" secondaryColour="#3373CC">
         <block type="motion_movesteps">
           <value name="STEPS">
             <shadow type="math_number">
@@ -160,7 +160,7 @@
         <block type="motion_yposition"></block>
         <block type="motion_direction"></block>
       </category>
-      <category name="Looks" colour="#9966FF">
+      <category name="Looks" colour="#9966FF" secondaryColour="#774DCB">
         <block type="looks_sayforsecs">
           <value name="MESSAGE">
             <shadow type="text">
@@ -266,7 +266,7 @@
         <block type="looks_backdropname"></block>
         <block type="looks_size"></block>
       </category>
-      <category name="Sound" colour="#D65CD6">
+      <category name="Sound" colour="#D65CD6" secondaryColour="#BD42BD">
         <block type="sound_play">
           <value name="SOUND_MENU">
             <shadow type="sound_sounds_option"></shadow>
@@ -347,7 +347,7 @@
         </block>
         <block type="sound_tempo"></block>
       </category>
-      <category name="Pen" colour="#00B295">
+      <category name="Pen" colour="#00B295" secondaryColour="#0B8E69">
         <block type="pen_clear"></block>
         <block type="pen_stamp"></block>
         <block type="pen_pendown"></block>
@@ -401,9 +401,9 @@
           </value>
 		    </block>
       </category>
-      <category name="Data" colour="#FF8C1A" custom="VARIABLE">
+      <category name="Data" colour="#FF8C1A" secondaryColour="#DB6E00" custom="VARIABLE">
       </category>
-      <category name="Lists" colour="#FF8C1A">
+      <category name="Lists" colour="#FF8C1A" secondaryColour="#DB6E00">
         <block type="data_listcontents"></block>
         <block type="data_addtolist">
           <value name="ITEM">
@@ -414,15 +414,15 @@
         </block>
         <block type="data_deleteoflist">
           <value name="INDEX">
-            <shadow type="math_integer">
-              <field name="NUM">1</field>
+            <shadow type="data_listindexall">
+              <field name="INDEX">1</field>
             </shadow>
           </value>
         </block>
         <block type="data_insertatlist">
           <value name="INDEX">
-            <shadow type="math_integer">
-              <field name="NUM">1</field>
+            <shadow type="data_listindexrandom">
+              <field name="INDEX">1</field>
             </shadow>
           </value>
           <value name="ITEM">
@@ -433,8 +433,8 @@
         </block>
         <block type="data_replaceitemoflist">
           <value name="INDEX">
-            <shadow type="math_integer">
-              <field name="NUM">1</field>
+            <shadow type="data_listindexrandom">
+              <field name="INDEX">1</field>
             </shadow>
           </value>
           <value name="ITEM">
@@ -445,8 +445,8 @@
         </block>
         <block type="data_itemoflist">
           <value name="INDEX">
-            <shadow type="math_integer">
-              <field name="NUM">1</field>
+            <shadow type="data_listindexrandom">
+              <field name="INDEX">1</field>
             </shadow>
           </value>
         </block>
@@ -461,7 +461,7 @@
         <block type="data_showlist"></block>
         <block type="data_hidelist"></block>
       </category>
-      <category name="Events" colour="#FFD500">
+      <category name="Events" colour="#FFD500" secondaryColour="#CC9900">
         <block type="event_whenflagclicked"></block>
         <block type="event_whenkeypressed">
         </block>
@@ -488,7 +488,7 @@
           </value>
         </block>
       </category>
-      <category name="Control" colour="#FFAB19">
+      <category name="Control" colour="#FFAB19" secondaryColour="#CF8B17">
         <block type="control_wait">
           <value name="DURATION">
             <shadow type="math_positive_number">
@@ -508,11 +508,7 @@
         <block type="control_if_else"></block>
         <block type="control_wait_until"></block>
         <block type="control_repeat_until"></block>
-        <block type="control_stop">
-          <value name="STOP_OPTION">
-            <shadow type="control_stop_menu"></shadow>
-          </value>
-        </block>
+        <block type="control_stop"></block>
         <block type="control_start_as_clone"></block>
         <block type="control_create_clone_of">
           <value name="CLONE_OPTION">
@@ -521,7 +517,7 @@
         </block>
         <block type="control_delete_this_clone"></block>
       </category>
-      <category name="Sensing" colour="#4CBFE6">
+      <category name="Sensing" colour="#4CBFE6" secondaryColour="#2E8EB8">
         <block type="sensing_touchingobject">
           <value name="TOUCHINGOBJECTMENU">
             <shadow type="sensing_touchingobjectmenu"></shadow>
@@ -600,7 +596,7 @@
   		<block type="sensing_dayssince2000"></block>
   		<block type="sensing_username"></block>
 	  </category>
-    <category name="Operators" colour="#40BF4A">
+    <category name="Operators" colour="#40BF4A" secondaryColour="#389438">
         <block type="operator_add">
           <value name="NUM1">
             <shadow type="math_number">
@@ -761,7 +757,7 @@
           </value>
         </block>
       </category>
-      <category name="More Blocks" colour="#FF6680" custom="PROCEDURE"></category>
+      <category name="More Blocks" colour="#FF6680" secondaryColour="#FF3355" custom="PROCEDURE"></category>
     </xml>
     <!-- FPS counter, Syntax highlighter, Blocks, Renderer -->
     <script src="./vendor.js"></script>
diff --git a/playground/playground.css b/playground/playground.css
index 41586749f..3eccd2625 100644
--- a/playground/playground.css
+++ b/playground/playground.css
@@ -13,6 +13,7 @@ h2 {
     right: 0;
     top: 0;
     bottom: 0;
+    font-family: "Helvetica Neue", Helvetica, sans-serif;
 }
 #vm-devtools {
     color: rgb(217,217,217);

From a7522c7734b587e699d3ed332d7b3e21a456461d Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Tue, 11 Oct 2016 17:12:19 -0400
Subject: [PATCH 283/302] Fix data_listcontents block name (#254)

---
 src/blocks/scratch3_data.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_data.js b/src/blocks/scratch3_data.js
index 576eb975f..a40172427 100644
--- a/src/blocks/scratch3_data.js
+++ b/src/blocks/scratch3_data.js
@@ -17,7 +17,7 @@ Scratch3DataBlocks.prototype.getPrimitives = function () {
         'data_variable': this.getVariable,
         'data_setvariableto': this.setVariableTo,
         'data_changevariableby': this.changeVariableBy,
-        'data_list': this.getListContents,
+        'data_listcontents': this.getListContents,
         'data_addtolist': this.addToList,
         'data_deleteoflist': this.deleteOfList,
         'data_insertatlist': this.insertAtList,

From 49d6bd3b67922d4dfef43f06ae9e3f72059e1d2c Mon Sep 17 00:00:00 2001
From: dekrain <dawidkrainski8@gmail.com>
Date: Wed, 12 Oct 2016 19:56:31 +0200
Subject: [PATCH 284/302] Fix new project creation (#256)

* Fix new project creation

* Fix new project creation

* const -> var
---
 playground/playground.js | 10 ++++++++--
 src/index.js             |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 053f6e925..2aee59d58 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -1,6 +1,12 @@
+var NEW_PROJECT_HASH = 'createEmptyProject';
+
 var loadProject = function () {
     var id = location.hash.substring(1);
-    if (id.length < 1) {
+    if (id === NEW_PROJECT_HASH) {
+        window.vm.createEmptyProject();
+        return;
+    }
+    if (id.length < 1 || !isFinite(id)) {
         id = '119615668';
     }
     var url = 'https://projects.scratch.mit.edu/internalapi/project/' +
@@ -32,7 +38,7 @@ window.onload = function() {
     };
     document.getElementById('createEmptyProject').addEventListener('click',
     function() {
-        document.location = '#' + 'createEmptyProject';
+        document.location = '#' + NEW_PROJECT_HASH;
         location.reload();
     });
     loadProject();
diff --git a/src/index.js b/src/index.js
index fd987f4de..f608932c8 100644
--- a/src/index.js
+++ b/src/index.js
@@ -132,7 +132,7 @@ VirtualMachine.prototype.loadProject = function (json) {
 VirtualMachine.prototype.createEmptyProject = function () {
     // Stage.
     var blocks2 = new Blocks();
-    var stage = new Sprite(blocks2);
+    var stage = new Sprite(blocks2, this.runtime);
     stage.name = 'Stage';
     stage.costumes.push({
         skin: '/assets/stage.png',
@@ -151,7 +151,7 @@ VirtualMachine.prototype.createEmptyProject = function () {
     target2.isStage = true;
     // Sprite1 (cat).
     var blocks1 = new Blocks();
-    var sprite = new Sprite(blocks1);
+    var sprite = new Sprite(blocks1, this.runtime);
     sprite.name = 'Sprite1';
     sprite.costumes.push({
         skin: '/assets/scratch_cat.svg',

From 1d99efbcd8a52234f78288c1f8d7688ebcfd6d5e Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Wed, 12 Oct 2016 20:58:03 -0400
Subject: [PATCH 285/302] Copy Assets To Playground With Webpack

---
 webpack.config.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/webpack.config.js b/webpack.config.js
index 6d08c73ac..68d377b62 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -52,6 +52,7 @@ module.exports = [
         entry: {
             'dist': './src/index.js'
         },
+
         output: {
             library: 'VirtualMachine',
             libraryTarget: 'commonjs2',
@@ -108,6 +109,8 @@ module.exports = [
                 to: 'media'
             }, {
                 from: 'node_modules/highlightjs/styles/zenburn.css'
+            }, {
+                from: 'assets'
             }])
         ])
     })

From 476221fc1be50e4ff282fcd5f6be05422ddde022 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Wed, 12 Oct 2016 21:00:10 -0400
Subject: [PATCH 286/302] change second start to build

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 0b9743912..15f2dd459 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
   "scripts": {
     "prepublish": "./node_modules/.bin/webpack --bail",
     "start": "webpack-dev-server",
-    "start": "webpack --colors --progress",
+    "build": "webpack --colors --progress",
     "test": "make test",
     "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
   },

From 91037a261edafd71ad853048376a699a9afafd8b Mon Sep 17 00:00:00 2001
From: dekrain <dawidkrainski8@gmail.com>
Date: Thu, 13 Oct 2016 16:19:42 +0200
Subject: [PATCH 287/302] Fix relative localization for assets

---
 src/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/index.js b/src/index.js
index f608932c8..fa392ff69 100644
--- a/src/index.js
+++ b/src/index.js
@@ -135,7 +135,7 @@ VirtualMachine.prototype.createEmptyProject = function () {
     var stage = new Sprite(blocks2, this.runtime);
     stage.name = 'Stage';
     stage.costumes.push({
-        skin: '/assets/stage.png',
+        skin: './assets/stage.png',
         name: 'backdrop1',
         bitmapResolution: 2,
         rotationCenterX: 480,
@@ -154,7 +154,7 @@ VirtualMachine.prototype.createEmptyProject = function () {
     var sprite = new Sprite(blocks1, this.runtime);
     sprite.name = 'Sprite1';
     sprite.costumes.push({
-        skin: '/assets/scratch_cat.svg',
+        skin: './assets/scratch_cat.svg',
         name: 'costume1',
         bitmapResolution: 1,
         rotationCenterX: 47,

From 8c654bbe607c88b2d74aeef95fd08324927598be Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 13 Oct 2016 13:11:26 -0400
Subject: [PATCH 288/302] Procedure blocks (#264)

---
 src/blocks/scratch3_procedures.js | 19 +++++++-
 src/engine/blocks.js              | 23 +++++++++-
 src/engine/execute.js             |  9 ++++
 src/engine/sequencer.js           |  5 +++
 src/engine/thread.js              | 16 +++++++
 src/import/sb2import.js           | 74 ++++++++++++++++++++++++++++++-
 src/import/sb2specmap.js          | 14 ++----
 7 files changed, 144 insertions(+), 16 deletions(-)

diff --git a/src/blocks/scratch3_procedures.js b/src/blocks/scratch3_procedures.js
index 8d43c4c92..eb33e322b 100644
--- a/src/blocks/scratch3_procedures.js
+++ b/src/blocks/scratch3_procedures.js
@@ -13,7 +13,8 @@ function Scratch3ProcedureBlocks(runtime) {
 Scratch3ProcedureBlocks.prototype.getPrimitives = function() {
     return {
         'procedures_defnoreturn': this.defNoReturn,
-        'procedures_callnoreturn': this.callNoReturn
+        'procedures_callnoreturn': this.callNoReturn,
+        'procedures_param': this.param
     };
 };
 
@@ -23,10 +24,24 @@ Scratch3ProcedureBlocks.prototype.defNoReturn = function () {
 
 Scratch3ProcedureBlocks.prototype.callNoReturn = function (args, util) {
     if (!util.stackFrame.executed) {
-        var procedureName = args.mutation.name;
+        var procedureName = args.mutation.proccode;
+        var paramNames = util.getProcedureParamNames(procedureName);
+        for (var i = 0; i < paramNames.length; i++) {
+            if (args.hasOwnProperty('input' + i)) {
+                util.pushParam(paramNames[i], args['input' + i]);
+            }
+        }
         util.stackFrame.executed = true;
         util.startProcedure(procedureName);
     }
 };
 
+Scratch3ProcedureBlocks.prototype.param = function (args, util) {
+    var value = util.getParam(args.mutation.paramname);
+    if (!value) {
+        return 0;
+    }
+    return value;
+};
+
 module.exports = Scratch3ProcedureBlocks;
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index f96c916ad..e3384d46c 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -151,13 +151,30 @@ Blocks.prototype.getProcedureDefinition = function (name) {
         var block = this._blocks[id];
         if ((block.opcode == 'procedures_defnoreturn' ||
             block.opcode == 'procedures_defreturn') &&
-            block.fields['NAME'].value == name) {
+            block.mutation.proccode == name) {
             return id;
         }
     }
     return null;
 };
 
+/**
+ * Get the procedure definition for a given name.
+ * @param {?string} name Name of procedure to query.
+ * @return {?string} ID of procedure definition.
+ */
+Blocks.prototype.getProcedureParamNames = function (name) {
+    for (var id in this._blocks) {
+        var block = this._blocks[id];
+        if ((block.opcode == 'procedures_defnoreturn' ||
+            block.opcode == 'procedures_defreturn') &&
+            block.mutation.proccode == name) {
+            return JSON.parse(block.mutation.argumentnames);
+        }
+    }
+    return null;
+};
+
 // ---------------------------------------------------------------------
 
 /**
@@ -434,7 +451,9 @@ Blocks.prototype.mutationToXML = function (mutation) {
     var mutationString = '<' + mutation.tagName;
     for (var prop in mutation) {
         if (prop == 'children' || prop == 'tagName') continue;
-        mutationString += ' ' + prop + '="' + mutation[prop] + '"';
+        var mutationValue = (typeof mutation[prop] === 'string') ?
+            xmlEscape(mutation[prop]) : mutation[prop];
+        mutationString += ' ' + prop + '="' + mutationValue + '"';
     }
     mutationString += '>';
     for (var i = 0; i < mutation.children.length; i++) {
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 59b4a3cbf..241f238a3 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -164,6 +164,15 @@ var execute = function (sequencer, thread) {
         startProcedure: function (procedureName) {
             sequencer.stepToProcedure(thread, procedureName);
         },
+        getProcedureParamNames: function (procedureName) {
+            return thread.target.blocks.getProcedureParamNames(procedureName);
+        },
+        pushParam: function (paramName, paramValue) {
+            thread.pushParam(paramName, paramValue);
+        },
+        getParam: function (paramName) {
+            return thread.getParam(paramName);
+        },
         startHats: function(requestedHat, opt_matchFields, opt_target) {
             return (
                 runtime.startHats(requestedHat, opt_matchFields, opt_target)
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 85575c804..0e54ca4ab 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -132,6 +132,11 @@ Sequencer.prototype.stepToBranch = function (thread, branchNum) {
 Sequencer.prototype.stepToProcedure = function (thread, procedureName) {
     var definition = thread.target.blocks.getProcedureDefinition(procedureName);
     thread.pushStack(definition);
+    // Check if the call is recursive. If so, yield.
+    // @todo: Have behavior match Scratch 2.0.
+    if (thread.stack.indexOf(definition) > -1) {
+        thread.setStatus(Thread.STATUS_YIELD_FRAME);
+    }
 };
 
 /**
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 3bb53596b..6a08361fd 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -83,6 +83,7 @@ Thread.prototype.pushStack = function (blockId) {
         this.stackFrames.push({
             reported: {}, // Collects reported input values.
             waitingReporter: null, // Name of waiting reporter.
+            params: {}, // Procedure parameters.
             executionContext: {} // A context passed to block implementations.
         });
     }
@@ -135,6 +136,21 @@ Thread.prototype.pushReportedValue = function (value) {
     }
 };
 
+Thread.prototype.pushParam = function (paramName, value) {
+    var stackFrame = this.peekStackFrame();
+    stackFrame.params[paramName] = value;
+};
+
+Thread.prototype.getParam = function (paramName) {
+    for (var i = this.stackFrames.length - 1; i >= 0; i--) {
+        var frame = this.stackFrames[i];
+        if (frame.params.hasOwnProperty(paramName)) {
+            return frame.params[paramName];
+        }
+    }
+    return null;
+};
+
 /**
  * Whether the current execution of a thread is at the top of the stack.
  * @return {Boolean} True if execution is at top of the stack.
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index f633de9c0..752e39298 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -203,6 +203,40 @@ function flatten (blocks) {
     return finalBlocks;
 }
 
+/**
+ * Convert a Scratch 2.0 procedure string (e.g., "my_procedure %s %b %n")
+ * into an argument map. This allows us to provide the expected inputs
+ * to a mutated procedure call.
+ * @param {string} procCode Scratch 2.0 procedure string.
+ * @return {Object} Argument map compatible with those in sb2specmap.
+ */
+function parseProcedureArgMap (procCode) {
+    var argMap = [
+        {} // First item in list is op string.
+    ];
+    var INPUT_PREFIX = 'input';
+    var inputCount = 0;
+    // Split by %n, %b, %s.
+    var parts = procCode.split(/(?=[^\\]\%[nbs])/);
+    for (var i = 0; i < parts.length; i++) {
+        var part = parts[i].trim();
+        if (part.substring(0, 1) == '%') {
+            var argType = part.substring(1, 2);
+            var arg = {
+                type: 'input',
+                inputName: INPUT_PREFIX + (inputCount++)
+            };
+            if (argType == 'n') {
+                arg.inputOp = 'math_number';
+            } else if (argType == 's') {
+                arg.inputOp = 'text';
+            }
+            argMap.push(arg);
+        }
+    }
+    return argMap;
+}
+
 /**
  * Parse a single SB2 JSON-formatted block and its children.
  * @param {!Object} sb2block SB2 JSON-formatted block.
@@ -227,6 +261,10 @@ function parseBlock (sb2block) {
         shadow: false, // No shadow blocks in an SB2 by default.
         children: [] // Store any generated children, flattened in `flatten`.
     };
+    // For a procedure call, generate argument map from proc string.
+    if (oldOpcode == 'call') {
+        blockMetadata.argMap = parseProcedureArgMap(sb2block[1]);
+    }
     // Look at the expected arguments in `blockMetadata.argMap.`
     // The basic problem here is to turn positional SB2 arguments into
     // non-positional named Scratch VM arguments.
@@ -328,11 +366,43 @@ function parseBlock (sb2block) {
         }
     }
     // Special cases to generate mutations.
-    if (oldOpcode == 'call') {
+    if (oldOpcode == 'stopScripts') {
+        // Mutation for stop block: if the argument is 'other scripts',
+        // the block needs a next connection.
+        if (sb2block[1] == 'other scripts in sprite') {
+            activeBlock.mutation = {
+                tagName: 'mutation',
+                hasnext: 'true',
+                children: []
+            };
+        }
+    } else if (oldOpcode == 'procDef') {
+        // Mutation for procedure definition:
+        // store all 2.0 proc data.
+        var procData = sb2block.slice(1);
+        activeBlock.mutation = {
+            tagName: 'mutation',
+            proccode: procData[0], // e.g., "abc %n %b %s"
+            argumentnames: JSON.stringify(procData[1]), // e.g. ['arg1', 'arg2']
+            argumentdefaults: JSON.stringify(procData[2]), // e.g., [1, 'abc']
+            warp: procData[3], // Warp mode, e.g., true/false.
+            children: []
+        };
+    } else if (oldOpcode == 'call') {
+        // Mutation for procedure call:
+        // string for proc code (e.g., "abc %n %b %s").
         activeBlock.mutation = {
             tagName: 'mutation',
             children: [],
-            name: sb2block[1]
+            proccode: sb2block[1]
+        };
+    } else if (oldOpcode == 'getParam') {
+        // Mutation for procedure parameter.
+        activeBlock.mutation = {
+            tagName: 'mutation',
+            children: [],
+            paramname: sb2block[1], // Name of parameter.
+            shape: sb2block[2] // Shape - in 2.0, 'r' or 'b'.
         };
     }
     return activeBlock;
diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js
index 76e9683e1..1cf0620fc 100644
--- a/src/import/sb2specmap.js
+++ b/src/import/sb2specmap.js
@@ -752,9 +752,8 @@ var specMap = {
         'opcode':'control_stop',
         'argMap':[
             {
-                'type':'input',
-                'inputOp':'control_stop_menu',
-                'inputName':'STOP_OPTION'
+                'type':'field',
+                'fieldName':'STOP_OPTION'
             }
         ]
     },
@@ -1375,15 +1374,10 @@ var specMap = {
     },
     'procDef':{
         'opcode':'procedures_defnoreturn',
-        'argMap':[
-            {
-                'type':'field',
-                'fieldName':'NAME'
-            }
-        ]
+        'argMap':[]
     },
     'getParam':{
-        'opcode':'proc_param',
+        'opcode':'procedures_param',
         'argMap':[]
     },
     'call':{

From dcda82a0094fc6c6dcd7e0c6fdd4f5190e3a3e8a Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 13 Oct 2016 17:05:53 -0400
Subject: [PATCH 289/302] Use default toolbox XML (#265)

---
 playground/index.html    | 708 ---------------------------------------
 playground/playground.js |   2 -
 2 files changed, 710 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 41c5ac4f0..645980893 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -51,714 +51,6 @@
 
     <div id="blocks"></div>
 
-    <xml id="toolbox" style="display: none">
-        <category name="Motion" colour="#4C97FF" secondaryColour="#3373CC">
-        <block type="motion_movesteps">
-          <value name="STEPS">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_turnright">
-          <value name="DEGREES">
-            <shadow type="math_number">
-              <field name="NUM">15</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_turnleft">
-          <value name="DEGREES">
-            <shadow type="math_number">
-              <field name="NUM">15</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_pointindirection">
-          <value name="DIRECTION">
-            <shadow type="math_angle">
-              <field name="NUM">90</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_pointtowards">
-          <value name="TOWARDS">
-            <shadow type="motion_pointtowards_menu">
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_gotoxy">
-          <value name="X">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-          <value name="Y">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_goto">
-          <value name="TO">
-            <shadow type="motion_goto_menu">
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_glidesecstoxy">
-          <value name="SECS">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="X">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-          <value name="Y">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_changexby">
-          <value name="DX">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_setx">
-          <value name="X">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_changeyby">
-          <value name="DY">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_sety">
-          <value name="Y">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="motion_ifonedgebounce"></block>
-        <block type="motion_setrotationstyle">
-          <value name="STYLE">
-            <shadow type="motion_setrotationstyle_menu"></shadow>
-          </value>
-        </block>
-        <block type="motion_xposition"></block>
-        <block type="motion_yposition"></block>
-        <block type="motion_direction"></block>
-      </category>
-      <category name="Looks" colour="#9966FF" secondaryColour="#774DCB">
-        <block type="looks_sayforsecs">
-          <value name="MESSAGE">
-            <shadow type="text">
-              <field name="TEXT">Hello!</field>
-            </shadow>
-          </value>
-          <value name="SECS">
-            <shadow type="math_number">
-              <field name="NUM">2</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_say">
-          <value name="MESSAGE">
-            <shadow type="text">
-              <field name="TEXT">Hello!</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_thinkforsecs">
-          <value name="MESSAGE">
-            <shadow type="text">
-              <field name="TEXT">Hmm...</field>
-            </shadow>
-          </value>
-          <value name="SECS">
-            <shadow type="math_number">
-              <field name="NUM">2</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_think">
-          <value name="MESSAGE">
-            <shadow type="text">
-              <field name="TEXT">Hmm...</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_show"></block>
-        <block type="looks_hide"></block>
-        <block type="looks_switchcostumeto">
-          <value name="COSTUME">
-            <shadow type="looks_costume"></shadow>
-          </value>
-		    </block>
-        <block type="looks_nextcostume"></block>
-        <block type="looks_nextbackdrop"></block>
-        <block type="looks_switchbackdropto">
-          <value name="BACKDROP">
-            <shadow type="looks_backdrops"></shadow>
-          </value>
-		    </block>
-        <block type="looks_switchbackdroptoandwait">
-          <value name="BACKDROP">
-            <shadow type="looks_backdrops"></shadow>
-          </value>
-		    </block>
-        <block type="looks_changeeffectby">
-          <value name="EFFECT">
-            <shadow type="looks_effectmenu"></shadow>
-          </value>
-          <value name="CHANGE">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_seteffectto">
-          <value name="EFFECT">
-            <shadow type="looks_effectmenu"></shadow>
-          </value>
-          <value name="VALUE">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_cleargraphiceffects"></block>
-        <block type="looks_changesizeby">
-          <value name="CHANGE">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_setsizeto">
-          <value name="SIZE">
-            <shadow type="math_number">
-              <field name="NUM">100</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_gotofront"></block>
-        <block type="looks_gobacklayers">
-          <value name="NUM">
-            <shadow type="math_integer">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="looks_costumeorder"></block>
-        <block type="looks_backdroporder"></block>
-        <block type="looks_backdropname"></block>
-        <block type="looks_size"></block>
-      </category>
-      <category name="Sound" colour="#D65CD6" secondaryColour="#BD42BD">
-        <block type="sound_play">
-          <value name="SOUND_MENU">
-            <shadow type="sound_sounds_option"></shadow>
-          </value>
-        </block>
-        <block type="sound_playuntildone">
-          <value name="SOUND_MENU">
-            <shadow type="sound_sounds_option"></shadow>
-          </value>
-        </block>
-        <block type="sound_stopallsounds"></block>
-        <block type="sound_playdrumforbeats">
-          <value name="DRUMTYPE">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="BEATS">
-            <shadow type="math_number">
-              <field name="NUM">0.25</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_restforbeats">
-          <value name="BEATS">
-            <shadow type="math_number">
-              <field name="NUM">0.25</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_playnoteforbeats">
-          <value name="NOTE">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="BEATS">
-            <shadow type="math_number">
-              <field name="NUM">0.5</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_setinstrumentto">
-          <value name="INSTRUMENT">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_changevolumeby">
-          <value name="VOLUME">
-            <shadow type="math_number">
-              <field name="NUM">-10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_setvolumeto">
-          <value name="VOLUME">
-            <shadow type="math_number">
-              <field name="NUM">100</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_volume"></block>
-        <block type="sound_changetempoby">
-          <value name="TEMPO">
-            <shadow type="math_number">
-              <field name="NUM">20</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_settempotobpm">
-          <value name="TEMPO">
-            <shadow type="math_number">
-              <field name="NUM">60</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="sound_tempo"></block>
-      </category>
-      <category name="Pen" colour="#00B295" secondaryColour="#0B8E69">
-        <block type="pen_clear"></block>
-        <block type="pen_stamp"></block>
-        <block type="pen_pendown"></block>
-        <block type="pen_penup"></block>
-        <block type="pen_setpencolortocolor">
-          <value name="COLOR">
-            <shadow type="colour_picker">
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_changepencolorby">
-          <value name="COLOR">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_setpencolortonum">
-          <value name="COLOR">
-            <shadow type="math_number">
-              <field name="NUM">0</field>
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_changepenshadeby">
-          <value name="SHADE">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_setpenshadeto">
-          <value name="SHADE">
-            <shadow type="math_number">
-              <field name="NUM">50</field>
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_changepensizeby">
-          <value name="SIZE">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-		    </block>
-        <block type="pen_setpensizeto">
-          <value name="SIZE">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-		    </block>
-      </category>
-      <category name="Data" colour="#FF8C1A" secondaryColour="#DB6E00" custom="VARIABLE">
-      </category>
-      <category name="Lists" colour="#FF8C1A" secondaryColour="#DB6E00">
-        <block type="data_listcontents"></block>
-        <block type="data_addtolist">
-          <value name="ITEM">
-            <shadow type="text">
-              <field name="TEXT">thing</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_deleteoflist">
-          <value name="INDEX">
-            <shadow type="data_listindexall">
-              <field name="INDEX">1</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_insertatlist">
-          <value name="INDEX">
-            <shadow type="data_listindexrandom">
-              <field name="INDEX">1</field>
-            </shadow>
-          </value>
-          <value name="ITEM">
-            <shadow type="text">
-              <field name="TEXT">thing</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_replaceitemoflist">
-          <value name="INDEX">
-            <shadow type="data_listindexrandom">
-              <field name="INDEX">1</field>
-            </shadow>
-          </value>
-          <value name="ITEM">
-            <shadow type="text">
-              <field name="TEXT">thing</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_itemoflist">
-          <value name="INDEX">
-            <shadow type="data_listindexrandom">
-              <field name="INDEX">1</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_lengthoflist"></block>
-        <block type="data_listcontainsitem">
-          <value name="ITEM">
-            <shadow type="text">
-              <field name="TEXT">thing</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="data_showlist"></block>
-        <block type="data_hidelist"></block>
-      </category>
-      <category name="Events" colour="#FFD500" secondaryColour="#CC9900">
-        <block type="event_whenflagclicked"></block>
-        <block type="event_whenkeypressed">
-        </block>
-        <block type="event_whenthisspriteclicked"></block>
-        <block type="event_whenbackdropswitchesto">
-        </block>
-        <block type="event_whengreaterthan">
-          <value name="VALUE">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="event_whenbroadcastreceived">
-        </block>
-        <block type="event_broadcast">
-          <value name="BROADCAST_OPTION">
-            <shadow type="event_broadcast_menu"></shadow>
-          </value>
-        </block>
-        <block type="event_broadcastandwait">
-          <value name="BROADCAST_OPTION">
-            <shadow type="event_broadcast_menu"></shadow>
-          </value>
-        </block>
-      </category>
-      <category name="Control" colour="#FFAB19" secondaryColour="#CF8B17">
-        <block type="control_wait">
-          <value name="DURATION">
-            <shadow type="math_positive_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="control_repeat">
-          <value name="TIMES">
-            <shadow type="math_whole_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="control_forever"></block>
-        <block type="control_if"></block>
-        <block type="control_if_else"></block>
-        <block type="control_wait_until"></block>
-        <block type="control_repeat_until"></block>
-        <block type="control_stop"></block>
-        <block type="control_start_as_clone"></block>
-        <block type="control_create_clone_of">
-          <value name="CLONE_OPTION">
-            <shadow type="control_create_clone_of_menu"></shadow>
-          </value>
-        </block>
-        <block type="control_delete_this_clone"></block>
-      </category>
-      <category name="Sensing" colour="#4CBFE6" secondaryColour="#2E8EB8">
-        <block type="sensing_touchingobject">
-          <value name="TOUCHINGOBJECTMENU">
-            <shadow type="sensing_touchingobjectmenu"></shadow>
-          </value>
-        </block>
-        <block type="sensing_touchingcolor">
-          <value name="COLOR">
-            <shadow type="colour_picker"></shadow>
-          </value>
-        </block>
-        <block type="sensing_coloristouchingcolor">
-          <value name="COLOR">
-            <shadow type="colour_picker"></shadow>
-          </value>
-          <value name="COLOR2">
-            <shadow type="colour_picker"></shadow>
-          </value>
-        </block>
-        <block type="sensing_distanceto">
-          <value name="DISTANCETOMENU">
-            <shadow type="sensing_distancetomenu"></shadow>
-          </value>
-        </block>
-        <block type="sensing_askandwait">
-          <value name="QUESTION">
-            <shadow type="text">
-              <field name="TEXT">What's your name?</field>
-            </shadow>
-          </value>
-        </block>
-  		<block type="sensing_answer"></block>
-	    <block type="sensing_keypressed">
-          <value name="KEY_OPTION">
-            <shadow type="sensing_keyoptions"></shadow>
-          </value>
-      </block>
-  		<block type="sensing_mousedown"></block>
-  		<block type="sensing_mousex"></block>
-  		<block type="sensing_mousey"></block>
-  		<block type="sensing_loudness"></block>
-	    <block type="sensing_videoon">
-          <value name="VIDEOONMENU1">
-            <shadow type="sensing_videoonmenuone"></shadow>
-          </value>
-          <value name="VIDEOONMENU2">
-            <shadow type="sensing_videoonmenutwo"></shadow>
-          </value>
-      </block>
-	    <block type="sensing_videotoggle">
-          <value name="VIDEOTOGGLEMENU">
-            <shadow type="sensing_videotogglemenu"></shadow>
-          </value>
-      </block>
-      <block type="sensing_setvideotransparency">
-        <value name="TRANSPARENCY">
-          <shadow type="math_number">
-            <field name="NUM">50</field>
-          </shadow>
-        </value>
-  		</block>
-  		<block type="sensing_timer"></block>
-  		<block type="sensing_resettimer"></block>
-      <block type="sensing_of">
-        <value name="PROPERTY">
-          <shadow type="sensing_of_property_menu"></shadow>
-        </value>
-        <value name="OBJECT">
-          <shadow type="sensing_of_object_menu"></shadow>
-        </value>
-      </block>
-  	  <block type="sensing_current">
-        <value name="CURRENTMENU">
-          <shadow type="sensing_currentmenu"></shadow>
-        </value>
-      </block>
-  		<block type="sensing_dayssince2000"></block>
-  		<block type="sensing_username"></block>
-	  </category>
-    <category name="Operators" colour="#40BF4A" secondaryColour="#389438">
-        <block type="operator_add">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_subtract">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_multiply">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_divide">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_random">
-          <value name="FROM">
-            <shadow type="math_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="TO">
-            <shadow type="math_number">
-              <field name="NUM">10</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_lt">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_equals">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_gt">
-          <value name="OPERAND1">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-          <value name="OPERAND2">
-            <shadow type="text">
-              <field name="TEXT"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_and"></block>
-        <block type="operator_or"></block>
-        <block type="operator_not"></block>
-        <block type="operator_join">
-          <value name="STRING1">
-            <shadow type="text">
-              <field name="TEXT">hello</field>
-            </shadow>
-          </value>
-          <value name="STRING2">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_letter_of">
-          <value name="LETTER">
-            <shadow type="math_whole_number">
-              <field name="NUM">1</field>
-            </shadow>
-          </value>
-          <value name="STRING">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_length">
-          <value name="STRING">
-            <shadow type="text">
-              <field name="TEXT">world</field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_mod">
-          <value name="NUM1">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-          <value name="NUM2">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_round">
-          <value name="NUM">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-        <block type="operator_mathop">
-          <value name="OPERATOR">
-            <shadow type="operator_mathop_menu"></shadow>
-          </value>
-          <value name="NUM">
-            <shadow type="math_number">
-              <field name="NUM"></field>
-            </shadow>
-          </value>
-        </block>
-      </category>
-      <category name="More Blocks" colour="#FF6680" secondaryColour="#FF3355" custom="PROCEDURE"></category>
-    </xml>
     <!-- FPS counter, Syntax highlighter, Blocks, Renderer -->
     <script src="./vendor.js"></script>
     <!-- VM Worker -->
diff --git a/playground/playground.js b/playground/playground.js
index 2aee59d58..76db62ed3 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -50,9 +50,7 @@ window.onload = function() {
     vm.attachRenderer(renderer);
 
     // Instantiate scratch-blocks and attach it to the DOM.
-    var toolbox = document.getElementById('toolbox');
     var workspace = window.Blockly.inject('blocks', {
-        toolbox: toolbox,
         media: './media/',
         zoom: {
             controls: true,

From 1e86d48a31986cb96b12c29a9f6ee13ad79d9b18 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 13 Oct 2016 17:15:49 -0400
Subject: [PATCH 290/302] Clicking blocks in the toolbox (#267)

---
 playground/playground.js |  5 ++---
 src/engine/blocks.js     | 23 +++++++++++++----------
 src/engine/execute.js    | 31 +++++++++++++++++++++++--------
 src/engine/runtime.js    |  7 +++++++
 src/index.js             | 15 ++++++++++-----
 5 files changed, 55 insertions(+), 26 deletions(-)

diff --git a/playground/playground.js b/playground/playground.js
index 76db62ed3..949a02c5a 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -71,8 +71,9 @@ window.onload = function() {
     window.workspace = workspace;
 
     // Attach scratch-blocks events to VM.
-    // @todo: Re-enable flyout listening after fixing GH-69.
     workspace.addChangeListener(vm.blockListener);
+    var flyoutWorkspace = workspace.getFlyout().getWorkspace();
+    flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
 
     // Create FPS counter.
     var stats = new window.Stats();
@@ -117,11 +118,9 @@ window.onload = function() {
 
     // Receipt of new block XML for the selected target.
     vm.on('workspaceUpdate', function (data) {
-        window.Blockly.Events.disable();
         workspace.clear();
         var dom = window.Blockly.Xml.textToDom(data.xml);
         window.Blockly.Xml.domToWorkspace(dom, workspace);
-        window.Blockly.Events.enable();
     });
 
     // Receipt of new list of targets, selected target update.
diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index e3384d46c..0e89025e9 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -181,11 +181,10 @@ Blocks.prototype.getProcedureParamNames = function (name) {
  * Create event listener for blocks. Handles validation and serves as a generic
  * adapter between the blocks and the runtime interface.
  * @param {Object} e Blockly "block" event
- * @param {boolean} isFlyout If true, create a listener for flyout events.
  * @param {?Runtime} opt_runtime Optional runtime to forward click events to.
  */
 
-Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
+Blocks.prototype.blocklyListen = function (e, opt_runtime) {
     // Validate event
     if (typeof e !== 'object') return;
     if (typeof e.blockId !== 'string') return;
@@ -204,7 +203,7 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
         var newBlocks = adapter(e);
         // A create event can create many blocks. Add them all.
         for (var i = 0; i < newBlocks.length; i++) {
-            this.createBlock(newBlocks[i], isFlyout);
+            this.createBlock(newBlocks[i]);
         }
         break;
     case 'change':
@@ -226,8 +225,10 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
         });
         break;
     case 'delete':
-        // Don't accept delete events for shadow blocks being obscured.
-        if (this._blocks[e.blockId].shadow) {
+        // Don't accept delete events for missing blocks,
+        // or shadow blocks being obscured.
+        if (!this._blocks.hasOwnProperty(e.blockId) ||
+            this._blocks[e.blockId].shadow) {
             return;
         }
         // Inform any runtime to forget about glows on this script.
@@ -246,9 +247,8 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
 /**
  * Block management: create blocks and scripts from a `create` event
  * @param {!Object} block Blockly create event to be processed
- * @param {boolean} opt_isFlyoutBlock Whether the block is in the flyout.
  */
-Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
+Blocks.prototype.createBlock = function (block) {
     // Does the block already exist?
     // Could happen, e.g., for an unobscured shadow.
     if (this._blocks.hasOwnProperty(block.id)) {
@@ -258,9 +258,8 @@ Blocks.prototype.createBlock = function (block, opt_isFlyoutBlock) {
     this._blocks[block.id] = block;
     // Push block id to scripts array.
     // Blocks are added as a top-level stack if they are marked as a top-block
-    // (if they were top-level XML in the event) and if they are not
-    // flyout blocks.
-    if (!opt_isFlyoutBlock && block.topLevel) {
+    // (if they were top-level XML in the event).
+    if (block.topLevel) {
         this._addScript(block.id);
     }
 };
@@ -288,6 +287,10 @@ Blocks.prototype.changeBlock = function (args) {
  * @param {!Object} e Blockly move event to be processed
  */
 Blocks.prototype.moveBlock = function (e) {
+    if (!this._blocks.hasOwnProperty(e.id)) {
+        return;
+    }
+
     // Move coordinate changes.
     if (e.newCoordinate) {
         this._blocks[e.id].x = e.newCoordinate.x;
diff --git a/src/engine/execute.js b/src/engine/execute.js
index 241f238a3..f51c0acaa 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -22,19 +22,34 @@ var execute = function (sequencer, thread) {
     var currentBlockId = thread.peekStack();
     var currentStackFrame = thread.peekStackFrame();
 
-    // Verify that the block still exists.
-    if (!target ||
-        typeof target.blocks.getBlock(currentBlockId) === 'undefined') {
+    // Check where the block lives: target blocks or flyout blocks.
+    var targetHasBlock = (
+        typeof target.blocks.getBlock(currentBlockId) !== 'undefined'
+    );
+    var flyoutHasBlock = (
+        typeof runtime.flyoutBlocks.getBlock(currentBlockId) !== 'undefined'
+    );
+
+    // Stop if block or target no longer exists.
+    if (!target || (!targetHasBlock && !flyoutHasBlock)) {
         // 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 blockContainer = null;
+    if (targetHasBlock) {
+        blockContainer = target.blocks;
+    } else {
+        blockContainer = runtime.flyoutBlocks;
+    }
+    var opcode = blockContainer.getOpcode(currentBlockId);
+    var fields = blockContainer.getFields(currentBlockId);
+    var inputs = blockContainer.getInputs(currentBlockId);
     var blockFunction = runtime.getOpcodeFunction(opcode);
     var isHat = runtime.getIsHat(opcode);
-    var fields = target.blocks.getFields(currentBlockId);
-    var inputs = target.blocks.getInputs(currentBlockId);
+
 
     if (!opcode) {
         console.warn('Could not get opcode for block: ' + currentBlockId);
@@ -133,7 +148,7 @@ var execute = function (sequencer, thread) {
     }
 
     // Add any mutation to args (e.g., for procedures).
-    var mutation = target.blocks.getMutation(currentBlockId);
+    var mutation = blockContainer.getMutation(currentBlockId);
     if (mutation) {
         argValues.mutation = mutation;
     }
@@ -165,7 +180,7 @@ var execute = function (sequencer, thread) {
             sequencer.stepToProcedure(thread, procedureName);
         },
         getProcedureParamNames: function (procedureName) {
-            return thread.target.blocks.getProcedureParamNames(procedureName);
+            return blockContainer.getProcedureParamNames(procedureName);
         },
         pushParam: function (paramName, paramValue) {
             thread.pushParam(paramName, paramValue);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 10c025199..952dd213e 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -1,5 +1,6 @@
 var EventEmitter = require('events');
 var Sequencer = require('./sequencer');
+var Blocks = require('./blocks');
 var Thread = require('./thread');
 var util = require('util');
 
@@ -44,6 +45,8 @@ function Runtime () {
     /** @type {!Sequencer} */
     this.sequencer = new Sequencer(this);
 
+    this.flyoutBlocks = new Blocks();
+
     /**
      * Map to look up a block primitive's implementation function by its opcode.
      * This is a two-step lookup: package name first, then primitive name.
@@ -463,6 +466,10 @@ Runtime.prototype._updateScriptGlows = function () {
         if (thread.requestScriptGlowInFrame && target == this._editingTarget) {
             var blockForThread = thread.peekStack() || thread.topBlock;
             var script = target.blocks.getTopLevelScript(blockForThread);
+            if (!script) {
+                // Attempt to find in flyout blocks.
+                script = this.flyoutBlocks.getTopLevelScript(blockForThread);
+            }
             if (script) {
                 requestedGlowsThisFrame.push(script);
             }
diff --git a/src/index.js b/src/index.js
index fa392ff69..469e3fec0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -44,6 +44,7 @@ function VirtualMachine () {
     });
 
     this.blockListener = this.blockListener.bind(this);
+    this.flyoutBlockListener = this.flyoutBlockListener.bind(this);
 }
 
 /**
@@ -186,14 +187,18 @@ VirtualMachine.prototype.attachRenderer = function (renderer) {
  */
 VirtualMachine.prototype.blockListener = function (e) {
     if (this.editingTarget) {
-        this.editingTarget.blocks.blocklyListen(
-            e,
-            false,
-            this.runtime
-        );
+        this.editingTarget.blocks.blocklyListen(e, this.runtime);
     }
 };
 
+/**
+ * Handle a Blockly event for the flyout.
+ * @param {!Blockly.Event} e Any Blockly event.
+ */
+VirtualMachine.prototype.flyoutBlockListener = function (e) {
+    this.runtime.flyoutBlocks.blocklyListen(e, this.runtime);
+};
+
 /**
  * Set an editing target. An editor UI can use this function to switch
  * between editing different targets, sprites, etc.

From ebe8f6323255afb4ecf2343dafd057a8251944e2 Mon Sep 17 00:00:00 2001
From: TheBrokenRail <connor24nolan@live.com>
Date: Thu, 13 Oct 2016 20:01:17 -0400
Subject: [PATCH 291/302] Fix

---
 webpack.config.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webpack.config.js b/webpack.config.js
index 68d377b62..d46f55bf6 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -110,7 +110,8 @@ module.exports = [
             }, {
                 from: 'node_modules/highlightjs/styles/zenburn.css'
             }, {
-                from: 'assets'
+                from: 'assets',
+                to: 'assets'
             }])
         ])
     })

From c45b4201157a6a761713281775610612d245b032 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 13 Oct 2016 22:14:19 -0400
Subject: [PATCH 292/302] Fix check for existing hat threads (#269)

---
 src/engine/runtime.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 952dd213e..f78424109 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -344,7 +344,7 @@ Runtime.prototype.startHats = function (requestedHatOpcode,
             // any existing threads starting with the top block.
             for (var i = 0; i < instance.threads.length; i++) {
                 if (instance.threads[i].topBlock === topBlockId &&
-                    (!opt_target || instance.threads[i].target == opt_target)) {
+                    instance.threads[i].target == target) {
                     instance._removeThread(instance.threads[i]);
                 }
             }
@@ -353,7 +353,7 @@ Runtime.prototype.startHats = function (requestedHatOpcode,
             // 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 &&
-                    (!opt_target || instance.threads[j].target == opt_target)) {
+                    instance.threads[j].target == target) {
                     // Some thread is already running.
                     return;
                 }

From 3bfd755e6005fcf528a544548e517dce6122c8b0 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Thu, 13 Oct 2016 23:00:46 -0400
Subject: [PATCH 293/302] Complete implementation of stop block (#271)

* "Other scripts in stage" sb2

* Complete implementation of "stop" block
---
 src/blocks/scratch3_control.js | 13 ++++++++++---
 src/engine/execute.js          |  9 +++++++++
 src/engine/runtime.js          |  9 ++++++++-
 src/import/sb2import.js        |  3 ++-
 4 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index eab6c1a0f..efa0c2fb6 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -133,9 +133,16 @@ Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
     }
 };
 
-Scratch3ControlBlocks.prototype.stop = function() {
-    // @todo - don't use this.runtime
-    this.runtime.stopAll();
+Scratch3ControlBlocks.prototype.stop = function(args, util) {
+    var option = args.STOP_OPTION;
+    if (option == 'all') {
+        util.stopAll();
+    } else if (option == 'other scripts in sprite' ||
+        option == 'other scripts in stage') {
+        util.stopOtherTargetThreads();
+    } else if (option == 'this script') {
+        util.stopThread();
+    }
 };
 
 // @todo (GH-146): remove.
diff --git a/src/engine/execute.js b/src/engine/execute.js
index f51c0acaa..c857b73d7 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -176,6 +176,15 @@ var execute = function (sequencer, thread) {
         startBranch: function (branchNum) {
             sequencer.stepToBranch(thread, branchNum);
         },
+        stopAll: function () {
+            runtime.stopAll();
+        },
+        stopOtherTargetThreads: function() {
+            runtime.stopForTarget(target, thread);
+        },
+        stopThread: function() {
+            sequencer.retireThread(thread);
+        },
         startProcedure: function (procedureName) {
             sequencer.stepToProcedure(thread, procedureName);
         },
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index f78424109..4a101147d 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -246,6 +246,9 @@ Runtime.prototype._pushThread = function (id, target) {
  * @param {?Thread} thread Thread object to remove from actives
  */
 Runtime.prototype._removeThread = function (thread) {
+    // Inform sequencer to stop executing that thread.
+    this.sequencer.retireThread(thread);
+    // Remove from the list.
     var i = this.threads.indexOf(thread);
     if (i > -1) {
         this.threads.splice(i, 1);
@@ -382,10 +385,14 @@ Runtime.prototype.disposeTarget = function (target) {
 /**
  * Stop any threads acting on the target.
  * @param {!Target} target Target to stop threads for.
+ * @param {Thread=} opt_threadException Optional thread to skip.
  */
-Runtime.prototype.stopForTarget = function (target) {
+Runtime.prototype.stopForTarget = function (target, opt_threadException) {
     // Stop any threads on the target.
     for (var i = 0; i < this.threads.length; i++) {
+        if (this.threads[i] === opt_threadException) {
+            continue;
+        }
         if (this.threads[i].target == target) {
             this._removeThread(this.threads[i]);
         }
diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index 752e39298..b052a4ee9 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -369,7 +369,8 @@ function parseBlock (sb2block) {
     if (oldOpcode == 'stopScripts') {
         // Mutation for stop block: if the argument is 'other scripts',
         // the block needs a next connection.
-        if (sb2block[1] == 'other scripts in sprite') {
+        if (sb2block[1] == 'other scripts in sprite' ||
+            sb2block[1] == 'other scripts in stage') {
             activeBlock.mutation = {
                 tagName: 'mutation',
                 hasnext: 'true',

From 95dc6d38b3dd4c55865d71acf7e0a71567adc668 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 17 Oct 2016 09:38:41 -0400
Subject: [PATCH 294/302] Update packages after installing

This is the less hacky way to keep scratch-* packages up to date (and any others in the future).  This is only necessary because we cache the node_modules directory.
---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 091fe53fe..16b90a8ee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,9 +6,9 @@ sudo: false
 cache:
   directories:
   - node_modules
-before_install:
-# Install the most up to date scratch-* dependencies
-- rm -rf node_modules/scratch-*
+install:
+- npm install
+- npm update
 after_script:
 - |
   # RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel

From ace9a96fc2cdd5962deab0f48f9064cfa8212788 Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 17 Oct 2016 11:52:02 -0400
Subject: [PATCH 295/302] Fix degToRad function definition. Resolves GH-229

---
 src/blocks/scratch3_motion.js |  2 +-
 src/util/math-util.js         |  2 +-
 test/unit/util_math.js        | 11 +++++------
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 3e19e6ef1..a8687e4f9 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -37,7 +37,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
 
 Scratch3MotionBlocks.prototype.moveSteps = function (args, util) {
     var steps = Cast.toNumber(args.STEPS);
-    var radians = MathUtil.degToRad(util.target.direction);
+    var radians = MathUtil.degToRad(90 - util.target.direction);
     var dx = steps * Math.cos(radians);
     var dy = steps * Math.sin(radians);
     util.target.setXY(util.target.x + dx, util.target.y + dy);
diff --git a/src/util/math-util.js b/src/util/math-util.js
index b53698ef1..14ebb450e 100644
--- a/src/util/math-util.js
+++ b/src/util/math-util.js
@@ -6,7 +6,7 @@ function MathUtil () {}
  * @return {!number} Equivalent value in radians.
  */
 MathUtil.degToRad = function (deg) {
-    return (Math.PI * (90 - deg)) / 180;
+    return deg * Math.PI / 180;
 };
 
 /**
diff --git a/test/unit/util_math.js b/test/unit/util_math.js
index b282e90cc..b198ef1d3 100644
--- a/test/unit/util_math.js
+++ b/test/unit/util_math.js
@@ -2,12 +2,11 @@ var test = require('tap').test;
 var math = require('../../src/util/math-util');
 
 test('degToRad', function (t) {
-    // @todo This is incorrect
-    t.strictEqual(math.degToRad(0), 1.5707963267948966);
-    t.strictEqual(math.degToRad(1), 1.5533430342749535);
-    t.strictEqual(math.degToRad(180), -1.5707963267948966);
-    t.strictEqual(math.degToRad(360), -4.71238898038469);
-    t.strictEqual(math.degToRad(720), -10.995574287564276);
+    t.strictEqual(math.degToRad(0), 0);
+    t.strictEqual(math.degToRad(1), 0.017453292519943295);
+    t.strictEqual(math.degToRad(180), Math.PI);
+    t.strictEqual(math.degToRad(360), 2 * Math.PI);
+    t.strictEqual(math.degToRad(720), 4 * Math.PI);
     t.end();
 });
 

From 9cd4d961011ff1f5050490fe6395a5c859c446cd Mon Sep 17 00:00:00 2001
From: Andrew Sliwinski <andrewsliwinski@acm.org>
Date: Mon, 17 Oct 2016 11:55:21 -0400
Subject: [PATCH 296/302] Add test coverage for SB2 importer (#278)

---
 test/fixtures/default.json |  71 ++++++++
 test/fixtures/demo.json    | 359 +++++++++++++++++++++++++++++++++++++
 test/unit/import_sb2.js    |  88 +++++++++
 3 files changed, 518 insertions(+)
 create mode 100644 test/fixtures/default.json
 create mode 100644 test/fixtures/demo.json
 create mode 100644 test/unit/import_sb2.js

diff --git a/test/fixtures/default.json b/test/fixtures/default.json
new file mode 100644
index 000000000..af478a4e2
--- /dev/null
+++ b/test/fixtures/default.json
@@ -0,0 +1,71 @@
+{
+   "objName": "Stage",
+   "sounds": [{
+           "soundName": "pop",
+           "soundID": -1,
+           "md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
+           "sampleCount": 258,
+           "rate": 11025,
+           "format": ""
+       }],
+   "costumes": [{
+           "costumeName": "backdrop1",
+           "baseLayerID": -1,
+           "baseLayerMD5": "739b5e2a2435f6e1ec2993791b423146.png",
+           "bitmapResolution": 1,
+           "rotationCenterX": 240,
+           "rotationCenterY": 180
+       }],
+   "currentCostumeIndex": 0,
+   "penLayerMD5": "5c81a336fab8be57adc039a8a2b33ca9.png",
+   "penLayerID": -1,
+   "tempoBPM": 60,
+   "videoAlpha": 0.5,
+   "children": [{
+           "objName": "Sprite1",
+           "sounds": [{
+                   "soundName": "meow",
+                   "soundID": -1,
+                   "md5": "83c36d806dc92327b9e7049a565c6bff.wav",
+                   "sampleCount": 18688,
+                   "rate": 22050,
+                   "format": ""
+               }],
+           "costumes": [{
+                   "costumeName": "costume1",
+                   "baseLayerID": -1,
+                   "baseLayerMD5": "09dc888b0b7df19f70d81588ae73420e.svg",
+                   "bitmapResolution": 1,
+                   "rotationCenterX": 47,
+                   "rotationCenterY": 55
+               },
+               {
+                   "costumeName": "costume2",
+                   "baseLayerID": -1,
+                   "baseLayerMD5": "3696356a03a8d938318876a593572843.svg",
+                   "bitmapResolution": 1,
+                   "rotationCenterX": 47,
+                   "rotationCenterY": 55
+               }],
+           "currentCostumeIndex": 0,
+           "scratchX": 0,
+           "scratchY": 0,
+           "scale": 1,
+           "direction": 90,
+           "rotationStyle": "normal",
+           "isDraggable": false,
+           "indexInLibrary": 1,
+           "visible": true,
+           "spriteInfo": {
+           }
+       }],
+   "info": {
+       "videoOn": false,
+       "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/50.0.2661.102 Safari\/537.36",
+       "swfVersion": "v446",
+       "scriptCount": 0,
+       "spriteCount": 1,
+       "hasCloudData": false,
+       "flashVersion": "MAC 21,0,0,242"
+   }
+}
diff --git a/test/fixtures/demo.json b/test/fixtures/demo.json
new file mode 100644
index 000000000..b10376ec7
--- /dev/null
+++ b/test/fixtures/demo.json
@@ -0,0 +1,359 @@
+{
+	"objName": "Stage",
+	"variables": [{
+			"name": "x",
+			"value": "1",
+			"isPersistent": false
+		},
+		{
+			"name": "y",
+			"value": "1",
+			"isPersistent": false
+		},
+		{
+			"name": "z",
+			"value": "1",
+			"isPersistent": false
+		},
+		{
+			"name": "d",
+			"value": "1",
+			"isPersistent": false
+		},
+		{
+			"name": "a",
+			"value": 4,
+			"isPersistent": false
+		}],
+	"lists": [{
+			"listName": "D# Minor Pentatonic",
+			"contents": ["78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"78",
+				"73",
+				"75",
+				"75",
+				"78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"75",
+				"78",
+				"73",
+				"75",
+				"78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"73",
+				"68",
+				"70",
+				"66",
+				"68",
+				"63"],
+			"isPersistent": false,
+			"x": 5,
+			"y": 32,
+			"width": 125,
+			"height": 206,
+			"visible": true
+		}],
+	"scripts": [[52,
+			8,
+			[["whenIReceive", "start"],
+				["setVar:to:", "a", "1"],
+				["doRepeat",
+					["lineCountOfList:", "D# Minor Pentatonic"],
+					[["noteOn:duration:elapsed:from:", ["getLine:ofList:", ["readVariable", "a"], "D# Minor Pentatonic"], 0.5], ["changeVar:by:", "a", 1]]]]],
+		[53,
+			186,
+			[["whenIReceive", "start"],
+				["setVar:to:", "x", "1"],
+				["rest:elapsed:from:", 7.25],
+				["doRepeat",
+					["lineCountOfList:", "D# Minor Pentatonic"],
+					[["noteOn:duration:elapsed:from:", ["getLine:ofList:", ["readVariable", "x"], "D# Minor Pentatonic"], 0.25], ["changeVar:by:", "x", 1]]]]],
+		[48,
+			557,
+			[["whenIReceive", "start"],
+				["setVar:to:", "z", "1"],
+				["rest:elapsed:from:", 13],
+				["doRepeat",
+					["lineCountOfList:", "D# Minor Pentatonic"],
+					[["noteOn:duration:elapsed:from:", ["getLine:ofList:", ["readVariable", "z"], "D# Minor Pentatonic"], 0.0625], ["changeVar:by:", "z", 1]]]]],
+		[49,
+			368,
+			[["whenIReceive", "start"],
+				["setVar:to:", "y", "1"],
+				["rest:elapsed:from:", 11],
+				["doRepeat",
+					["lineCountOfList:", "D# Minor Pentatonic"],
+					[["noteOn:duration:elapsed:from:", ["getLine:ofList:", ["readVariable", "y"], "D# Minor Pentatonic"], 0.125], ["changeVar:by:", "y", 1]]]]],
+		[52,
+			745,
+			[["whenIReceive", "start"],
+				["setVar:to:", "d", "1"],
+				["rest:elapsed:from:", 13.5],
+				["doRepeat",
+					["lineCountOfList:", "D# Minor Pentatonic"],
+					[["noteOn:duration:elapsed:from:", ["getLine:ofList:", ["readVariable", "d"], "D# Minor Pentatonic"], 0.03125], ["changeVar:by:", "d", 1]]]]]],
+	"sounds": [{
+			"soundName": "pop",
+			"soundID": 0,
+			"md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
+			"sampleCount": 258,
+			"rate": 11025,
+			"format": ""
+		}],
+	"costumes": [{
+			"costumeName": "backdrop1",
+			"baseLayerID": 4,
+			"baseLayerMD5": "b61b1077b0ea1931abee9dbbfa7903ff.png",
+			"bitmapResolution": 2,
+			"rotationCenterX": 480,
+			"rotationCenterY": 360
+		}],
+	"currentCostumeIndex": 0,
+	"penLayerMD5": "5c81a336fab8be57adc039a8a2b33ca9.png",
+	"penLayerID": 0,
+	"tempoBPM": 60,
+	"videoAlpha": 0.5,
+	"children": [{
+			"objName": "Indicator",
+			"scripts": [[247.85,
+					32.8,
+					[["procDef", "foo %n", ["bar"], [1], false],
+						["hide"],
+						["clearPenTrails"],
+						["penColor:", 5968094],
+						["say:", ["getParam", "bar", "r"]],
+						["stopScripts", "this script"]]],
+				[41, 36, [["whenGreenFlag"], ["call", "foo %n", 1]]]],
+			"sounds": [{
+					"soundName": "pop",
+					"soundID": 0,
+					"md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
+					"sampleCount": 258,
+					"rate": 11025,
+					"format": ""
+				}],
+			"costumes": [{
+					"costumeName": "costume1",
+					"baseLayerID": 1,
+					"baseLayerMD5": "d36f6603ec293d2c2198d3ea05109fe0.png",
+					"bitmapResolution": 2,
+					"rotationCenterX": 0,
+					"rotationCenterY": 0
+				}],
+			"currentCostumeIndex": 0,
+			"scratchX": 22,
+			"scratchY": -26,
+			"scale": 1,
+			"direction": 90,
+			"rotationStyle": "normal",
+			"isDraggable": false,
+			"indexInLibrary": 3,
+			"visible": false,
+			"spriteInfo": {
+			}
+		},
+		{
+			"target": "Stage",
+			"cmd": "timer",
+			"param": null,
+			"color": 2926050,
+			"label": "timer",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 5,
+			"y": 5,
+			"visible": false
+		},
+		{
+			"target": "Stage",
+			"cmd": "getVar:",
+			"param": "x",
+			"color": 15629590,
+			"label": "x",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 5,
+			"y": 268,
+			"visible": true
+		},
+		{
+			"target": "Stage",
+			"cmd": "getVar:",
+			"param": "y",
+			"color": 15629590,
+			"label": "y",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 5,
+			"y": 295,
+			"visible": true
+		},
+		{
+			"target": "Stage",
+			"cmd": "getVar:",
+			"param": "z",
+			"color": 15629590,
+			"label": "z",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 78,
+			"y": 268,
+			"visible": true
+		},
+		{
+			"objName": "Play",
+			"scripts": [[32, 33, [["whenClicked"], ["broadcast:", "start"]]]],
+			"sounds": [{
+					"soundName": "pop",
+					"soundID": 0,
+					"md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
+					"sampleCount": 258,
+					"rate": 11025,
+					"format": ""
+				}],
+			"costumes": [{
+					"costumeName": "costume1",
+					"baseLayerID": 2,
+					"baseLayerMD5": "30f811366ae3a53e6447932cc7f0212d.png",
+					"bitmapResolution": 2,
+					"rotationCenterX": 68,
+					"rotationCenterY": 115
+				}],
+			"currentCostumeIndex": 0,
+			"scratchX": 2,
+			"scratchY": -48,
+			"scale": 1,
+			"direction": 90,
+			"rotationStyle": "normal",
+			"isDraggable": false,
+			"indexInLibrary": 1,
+			"visible": true,
+			"spriteInfo": {
+			}
+		},
+		{
+			"target": "Stage",
+			"cmd": "getVar:",
+			"param": "d",
+			"color": 15629590,
+			"label": "d",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 5,
+			"y": 241,
+			"visible": true
+		},
+		{
+			"target": "Stage",
+			"cmd": "getVar:",
+			"param": "a",
+			"color": 15629590,
+			"label": "a",
+			"mode": 1,
+			"sliderMin": 0,
+			"sliderMax": 100,
+			"isDiscrete": true,
+			"x": 78,
+			"y": 241,
+			"visible": true
+		},
+		{
+			"objName": "Stop",
+			"scripts": [[45, 104, [["whenClicked"], ["stopScripts", "all"]]]],
+			"sounds": [{
+					"soundName": "pop",
+					"soundID": 0,
+					"md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
+					"sampleCount": 258,
+					"rate": 11025,
+					"format": ""
+				}],
+			"costumes": [{
+					"costumeName": "costume1",
+					"baseLayerID": 3,
+					"baseLayerMD5": "3de406f265b8d664406adf7c70762514.png",
+					"bitmapResolution": 2,
+					"rotationCenterX": 68,
+					"rotationCenterY": 70
+				}],
+			"currentCostumeIndex": 0,
+			"scratchX": 121,
+			"scratchY": -33,
+			"scale": 1,
+			"direction": 90,
+			"rotationStyle": "normal",
+			"isDraggable": false,
+			"indexInLibrary": 2,
+			"visible": true,
+			"spriteInfo": {
+			}
+		},
+		{
+			"listName": "D# Minor Pentatonic",
+			"contents": ["78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"78",
+				"73",
+				"75",
+				"75",
+				"78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"75",
+				"78",
+				"73",
+				"75",
+				"78",
+				"75",
+				"73",
+				"75",
+				"70",
+				"73",
+				"68",
+				"70",
+				"66",
+				"68",
+				"63"],
+			"isPersistent": false,
+			"x": 5,
+			"y": 32,
+			"width": 125,
+			"height": 206,
+			"visible": true
+		}],
+	"info": {
+		"spriteCount": 3,
+		"projectID": "118381369",
+		"videoOn": false,
+		"hasCloudData": false,
+		"userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/53.0.2785.143 Safari\/537.36",
+		"scriptCount": 9,
+		"flashVersion": "MAC 23,0,0,185",
+		"swfVersion": "v450.1"
+	}
+}
diff --git a/test/unit/import_sb2.js b/test/unit/import_sb2.js
new file mode 100644
index 000000000..be4d62864
--- /dev/null
+++ b/test/unit/import_sb2.js
@@ -0,0 +1,88 @@
+var fs = require('fs');
+var path = require('path');
+var test = require('tap').test;
+
+var clone = require('../../src/sprites/clone');
+var runtime = require('../../src/engine/runtime');
+var sb2 = require('../../src/import/sb2import');
+
+test('spec', function (t) {
+    t.type(sb2, 'function');
+    t.end();
+});
+
+test('default', function (t) {
+    // Get SB2 JSON (string)
+    var uri = path.resolve(__dirname, '../fixtures/default.json');
+    var file = fs.readFileSync(uri, 'utf8');
+
+    // Create runtime instance & load SB2 into it
+    var rt = new runtime();
+    sb2(file, rt);
+
+    // Test
+    t.type(file, 'string');
+    t.type(rt, 'object');
+    t.type(rt.targets, 'object');
+
+    t.ok(rt.targets[0] instanceof clone);
+    t.type(rt.targets[0].id, 'string');
+    t.type(rt.targets[0].blocks, 'object');
+    t.type(rt.targets[0].variables, 'object');
+    t.type(rt.targets[0].lists, 'object');
+
+    t.equal(rt.targets[0].isOriginal, true);
+    t.equal(rt.targets[0].currentCostume, 0);
+    t.equal(rt.targets[0].isOriginal, true);
+    t.equal(rt.targets[0].isStage, true);
+
+    t.ok(rt.targets[1] instanceof clone);
+    t.type(rt.targets[1].id, 'string');
+    t.type(rt.targets[1].blocks, 'object');
+    t.type(rt.targets[1].variables, 'object');
+    t.type(rt.targets[1].lists, 'object');
+
+    t.equal(rt.targets[1].isOriginal, true);
+    t.equal(rt.targets[1].currentCostume, 0);
+    t.equal(rt.targets[1].isOriginal, true);
+    t.equal(rt.targets[1].isStage, false);
+    t.end();
+});
+
+test('demo', function (t) {
+    // Get SB2 JSON (string)
+    var uri = path.resolve(__dirname, '../fixtures/demo.json');
+    var file = fs.readFileSync(uri, 'utf8');
+
+    // Create runtime instance & load SB2 into it
+    var rt = new runtime();
+    sb2(file, rt);
+
+    // Test
+    t.type(file, 'string');
+    t.type(rt, 'object');
+    t.type(rt.targets, 'object');
+
+    t.ok(rt.targets[0] instanceof clone);
+    t.type(rt.targets[0].id, 'string');
+    t.type(rt.targets[0].blocks, 'object');
+    t.type(rt.targets[0].variables, 'object');
+    t.type(rt.targets[0].lists, 'object');
+
+    t.equal(rt.targets[0].isOriginal, true);
+    t.equal(rt.targets[0].currentCostume, 0);
+    t.equal(rt.targets[0].isOriginal, true);
+    t.equal(rt.targets[0].isStage, true);
+
+    t.ok(rt.targets[1] instanceof clone);
+    t.type(rt.targets[1].id, 'string');
+    t.type(rt.targets[1].blocks, 'object');
+    t.type(rt.targets[1].variables, 'object');
+    t.type(rt.targets[1].lists, 'object');
+
+    t.equal(rt.targets[1].isOriginal, true);
+    t.equal(rt.targets[1].currentCostume, 0);
+    t.equal(rt.targets[1].isOriginal, true);
+    t.equal(rt.targets[1].isStage, false);
+    t.end();
+});

From bd95c1461df9e46d25bf6cac16167c7d789294f0 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 17 Oct 2016 13:43:38 -0400
Subject: [PATCH 297/302] Add VM.clear method

Use it before loading projects so targets don't accumulate when multiple projects are loaded on the same instance.

Move check to see if the clone is the original clone onto the block implementation so all clones can be removed.

Fixes #274
---
 src/blocks/scratch3_control.js |  1 +
 src/engine/runtime.js          | 24 ++++++++++++++++--------
 src/index.js                   | 12 +++++++++++-
 src/sprites/clone.js           |  3 ---
 4 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index efa0c2fb6..a2bab50e1 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -167,6 +167,7 @@ Scratch3ControlBlocks.prototype.createClone = function (args, util) {
 };
 
 Scratch3ControlBlocks.prototype.deleteClone = function (args, util) {
+    if (util.target.isOriginal) return;
     this.runtime.disposeTarget(util.target);
     this.runtime.stopForTarget(util.target);
 };
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 4a101147d..f96dfd514 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -368,18 +368,26 @@ Runtime.prototype.startHats = function (requestedHatOpcode,
     return newThreads;
 };
 
+/**
+ * Dispose all targets. Return to clean state.
+ */
+Runtime.prototype.dispose = function () {
+    this.stopAll();
+    this.targets.map(this.disposeTarget, this);
+};
+
 /**
  * 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);
-    }
+Runtime.prototype.disposeTarget = function (disposingTarget) {
+    this.targets = this.targets.filter(function (target) {
+        if (disposingTarget !== target) return true;
+        // Allow target to do dispose actions.
+        target.dispose();
+        // Remove from list of targets.
+        return false;
+    });
 };
 
 /**
diff --git a/src/index.js b/src/index.js
index 469e3fec0..818ea4f1a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -73,6 +73,15 @@ VirtualMachine.prototype.stopAll = function () {
     this.runtime.stopAll();
 };
 
+/**
+ * Clear out current running project data.
+ */
+VirtualMachine.prototype.clear = function () {
+    this.runtime.dispose();
+    this.editingTarget = null;
+    this.emitTargetsUpdate();
+};
+
 /**
  * Get data for playground. Data comes back in an emitted event.
  */
@@ -116,6 +125,7 @@ VirtualMachine.prototype.postIOData = function (device, data) {
  * @param {?string} json JSON string representing the project.
  */
 VirtualMachine.prototype.loadProject = function (json) {
+    this.clear();
     // @todo: Handle other formats, e.g., Scratch 1.4, Scratch 3.0.
     sb2import(json, this.runtime);
     // Select the first target for editing, e.g., the stage.
@@ -237,7 +247,7 @@ VirtualMachine.prototype.emitTargetsUpdate = function () {
             return [target.id, target.getName()];
         }),
         // Currently editing target id.
-        editingTarget: this.editingTarget.id
+        editingTarget: this.editingTarget ? this.editingTarget.id : null
     });
 };
 
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 4d7c3672c..f63bbfe09 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -418,9 +418,6 @@ Clone.prototype.onGreenFlag = function () {
  * 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);

From 5615583fb298c028b7adc45296bdc7cfe98478f4 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Mon, 17 Oct 2016 13:53:49 -0400
Subject: [PATCH 298/302] Lint

---
 .gitignore            | 1 +
 src/engine/runtime.js | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 753e3f651..aad54ff5e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ npm-*
 /dist.js
 /vm.js
 /vm.min.js
+/playground/assets
 /playground/media
 /playground/vendor.js
 /playground/vm.js
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index f96dfd514..ea47a3ba9 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -378,7 +378,7 @@ Runtime.prototype.dispose = function () {
 
 /**
  * Dispose of a target.
- * @param {!Target} target Target to dispose of.
+ * @param {!Target} disposingTarget Target to dispose of.
  */
 Runtime.prototype.disposeTarget = function (disposingTarget) {
     this.targets = this.targets.filter(function (target) {

From 454eb904a35a1119713ffe2ce324a07c48299289 Mon Sep 17 00:00:00 2001
From: Cosmic Web Services <andrewrodebaugh@cosmicsearch.org>
Date: Mon, 17 Oct 2016 13:57:25 -0400
Subject: [PATCH 299/302] Add days since 2000 block (#272)

* Add days since 2000 block

* Empty line addition

* Add semicolin

* Empty line addition

* Tabed

* Remove extra line

* Make it exactly like scratch 2 was

* Fixed spacing
---
 src/blocks/scratch3_sensing.js | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index 15466e3c0..c4e780dd4 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -23,7 +23,8 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
         'sensing_mousey': this.getMouseY,
         'sensing_mousedown': this.getMouseDown,
         'sensing_keypressed': this.getKeyPressed,
-        'sensing_current': this.current
+        'sensing_current': this.current,
+        'sensing_dayssince2000': this.daysSince2000
     };
 };
 
@@ -99,4 +100,15 @@ Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
     return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTION);
 };
 
+Scratch3SensingBlocks.prototype.daysSince2000 = function()
+{
+    var msPerDay = 24 * 60 * 60 * 1000;
+    var start = new Date(2000, 1-1, 1); 
+    var today = new Date(); 
+    var dstAdjust = today.getTimezoneOffset() - start.getTimezoneOffset();
+    var mSecsSinceStart = today.valueOf() - start.valueOf();
+    mSecsSinceStart += ((today.getTimezoneOffset() - dstAdjust) * 60 * 1000);
+    return mSecsSinceStart / msPerDay;
+};
+
 module.exports = Scratch3SensingBlocks;

From 352c6516d3d18818fbc744c13497f1e3400e4050 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 17 Oct 2016 16:44:33 -0400
Subject: [PATCH 300/302] Fix parent setting in sb2 importer (#283)

---
 src/import/sb2import.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/import/sb2import.js b/src/import/sb2import.js
index b052a4ee9..b97144d20 100644
--- a/src/import/sb2import.js
+++ b/src/import/sb2import.js
@@ -292,8 +292,14 @@ function parseBlock (sb2block) {
                     // Single block occupies the input.
                     innerBlocks = [parseBlock(providedArg)];
                 }
+                var previousBlock = null;
                 for (var j = 0; j < innerBlocks.length; j++) {
-                    innerBlocks[j].parent = activeBlock.id;
+                    if (j == 0) {
+                        innerBlocks[j].parent = activeBlock.id;
+                    } else {
+                        innerBlocks[j].parent = previousBlock;
+                    }
+                    previousBlock = innerBlocks[j].id;
                 }
                 // Obscures any shadow.
                 shadowObscured = true;

From 060d1ab2a5d055827dc8e1fbed321c5e7757007e Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 17 Oct 2016 23:17:55 -0400
Subject: [PATCH 301/302] Updated blocks for new renderer features (#257)

* Add "touching" block, layers blocks

* Keep in fence, if on edge bounce, fix to touching edge

* Fix degtoRad in "if on edge, bounce"

* Fixes from review
---
 src/blocks/scratch3_looks.js   |  10 +++
 src/blocks/scratch3_motion.js  |  57 ++++++++++++++
 src/blocks/scratch3_sensing.js |  14 ++++
 src/sprites/clone.js           | 131 +++++++++++++++++++++++++++++++++
 4 files changed, 212 insertions(+)

diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index 35a9136d1..d119c42ce 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -30,6 +30,8 @@ Scratch3LooksBlocks.prototype.getPrimitives = function() {
         'looks_cleargraphiceffects': this.clearEffects,
         'looks_changesizeby': this.changeSize,
         'looks_setsizeto': this.setSize,
+        'looks_gotofront': this.goToFront,
+        'looks_gobacklayers': this.goBackLayers,
         'looks_size': this.getSize,
         'looks_costumeorder': this.getCostumeIndex,
         'looks_backdroporder': this.getBackdropIndex,
@@ -190,6 +192,14 @@ Scratch3LooksBlocks.prototype.setSize = function (args, util) {
     util.target.setSize(size);
 };
 
+Scratch3LooksBlocks.prototype.goToFront = function (args, util) {
+    util.target.goToFront();
+};
+
+Scratch3LooksBlocks.prototype.goBackLayers = function (args, util) {
+    util.target.goBackLayers(args.NUM);
+};
+
 Scratch3LooksBlocks.prototype.getSize = function (args, util) {
     return util.target.size;
 };
diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index a8687e4f9..829a32e60 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -24,6 +24,7 @@ Scratch3MotionBlocks.prototype.getPrimitives = function() {
         'motion_pointindirection': this.pointInDirection,
         'motion_pointtowards': this.pointTowards,
         'motion_glidesecstoxy': this.glide,
+        'motion_ifonedgebounce': this.ifOnEdgeBounce,
         'motion_setrotationstyle': this.setRotationStyle,
         'motion_changexby': this.changeX,
         'motion_setx': this.setX,
@@ -138,6 +139,62 @@ Scratch3MotionBlocks.prototype.glide = function (args, util) {
     }
 };
 
+Scratch3MotionBlocks.prototype.ifOnEdgeBounce = function (args, util) {
+    var bounds = util.target.getBounds();
+    if (!bounds) {
+        return;
+    }
+    // Measure distance to edges.
+    // Values are positive when the sprite is far away,
+    // and clamped to zero when the sprite is beyond.
+    var stageWidth = this.runtime.constructor.STAGE_WIDTH;
+    var stageHeight = this.runtime.constructor.STAGE_HEIGHT;
+    var distLeft = Math.max(0, stageWidth / 2 + bounds.left);
+    var distTop = Math.max(0, stageHeight / 2 - bounds.top);
+    var distRight = Math.max(0, stageWidth / 2 - bounds.right);
+    var distBottom = Math.max(0, stageHeight / 2 + bounds.bottom);
+    // Find the nearest edge.
+    var nearestEdge = '';
+    var minDist = Infinity;
+    if (distLeft < minDist) {
+        minDist = distLeft;
+        nearestEdge = 'left';
+    }
+    if (distTop < minDist) {
+        minDist = distTop;
+        nearestEdge = 'top';
+    }
+    if (distRight < minDist) {
+        minDist = distRight;
+        nearestEdge = 'right';
+    }
+    if (distBottom < minDist) {
+        minDist = distBottom;
+        nearestEdge = 'bottom';
+    }
+    if (minDist > 0) {
+        return; // Not touching any edge.
+    }
+    // Point away from the nearest edge.
+    var radians = MathUtil.degToRad(90 - util.target.direction);
+    var dx = Math.cos(radians);
+    var dy = -Math.sin(radians);
+    if (nearestEdge == 'left') {
+        dx = Math.max(0.2, Math.abs(dx));
+    } else if (nearestEdge == 'top') {
+        dy = Math.max(0.2, Math.abs(dy));
+    } else if (nearestEdge == 'right') {
+        dx = 0 - Math.max(0.2, Math.abs(dx));
+    } else if (nearestEdge == 'bottom') {
+        dy = 0 - Math.max(0.2, Math.abs(dy));
+    }
+    var newDirection = MathUtil.radToDeg(Math.atan2(dy, dx)) + 90;
+    util.target.setDirection(newDirection);
+    // Keep within the stage.
+    var fencedPosition = util.target.keepInFence(util.target.x, util.target.y);
+    util.target.setXY(fencedPosition[0], fencedPosition[1]);
+};
+
 Scratch3MotionBlocks.prototype.setRotationStyle = function (args, util) {
     util.target.setRotationStyle(args.STYLE);
 };
diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js
index c4e780dd4..293273936 100644
--- a/src/blocks/scratch3_sensing.js
+++ b/src/blocks/scratch3_sensing.js
@@ -14,6 +14,7 @@ function Scratch3SensingBlocks(runtime) {
  */
 Scratch3SensingBlocks.prototype.getPrimitives = function() {
     return {
+        'sensing_touchingobject': this.touchingObject,
         'sensing_touchingcolor': this.touchingColor,
         'sensing_coloristouchingcolor': this.colorTouchingColor,
         'sensing_distanceto': this.distanceTo,
@@ -28,6 +29,19 @@ Scratch3SensingBlocks.prototype.getPrimitives = function() {
     };
 };
 
+Scratch3SensingBlocks.prototype.touchingObject = function (args, util) {
+    var requestedObject = args.TOUCHINGOBJECTMENU;
+    if (requestedObject == '_mouse_') {
+        var mouseX = util.ioQuery('mouse', 'getX');
+        var mouseY = util.ioQuery('mouse', 'getY');
+        return util.target.isTouchingPoint(mouseX, mouseY);
+    } else if (requestedObject == '_edge_') {
+        return util.target.isTouchingEdge();
+    } else {
+        return util.target.isTouchingSprite(requestedObject);
+    }
+};
+
 Scratch3SensingBlocks.prototype.touchingColor = function (args, util) {
     var color = Cast.toRgbColorList(args.COLOR);
     return util.target.isTouchingColor(color);
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index f63bbfe09..4f760decd 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -351,6 +351,76 @@ Clone.prototype.getName = function () {
     return this.sprite.name;
 };
 
+/**
+ * Return the clone's tight bounding box.
+ * Includes top, left, bottom, right attributes in Scratch coordinates.
+ * @return {?Object} Tight bounding box of clone, or null.
+ */
+Clone.prototype.getBounds = function () {
+    if (this.renderer) {
+        return this.runtime.renderer.getBounds(this.drawableID);
+    }
+    return null;
+};
+
+/**
+ * Return whether the clone is touching a point.
+ * @param {number} x X coordinate of test point.
+ * @param {number} y Y coordinate of test point.
+ * @return {Boolean} True iff the clone is touching the point.
+ */
+Clone.prototype.isTouchingPoint = function (x, y) {
+    if (this.renderer) {
+        // @todo: Update once pick is in Scratch coordinates.
+        // Limits test to this Drawable, so this will return true
+        // even if the clone is obscured by another Drawable.
+        var pickResult = this.runtime.renderer.pick(
+            x + this.runtime.constructor.STAGE_WIDTH / 2,
+            -y + this.runtime.constructor.STAGE_HEIGHT / 2,
+            null, null,
+            [this.drawableID]
+        );
+        return pickResult === this.drawableID;
+    }
+    return false;
+};
+
+/**
+ * Return whether the clone is touching a stage edge.
+ * @return {Boolean} True iff the clone is touching the stage edge.
+ */
+Clone.prototype.isTouchingEdge = function () {
+    if (this.renderer) {
+        var stageWidth = this.runtime.constructor.STAGE_WIDTH;
+        var stageHeight = this.runtime.constructor.STAGE_HEIGHT;
+        var bounds = this.getBounds();
+        if (bounds.left < -stageWidth / 2 ||
+            bounds.right > stageWidth / 2 ||
+            bounds.top > stageHeight / 2 ||
+            bounds.bottom < -stageHeight / 2) {
+            return true;
+        }
+    }
+    return false;
+};
+
+/**
+ * Return whether the clone is touching a named sprite.
+ * @param {string} spriteName Name fo the sprite.
+ * @return {Boolean} True iff the clone is touching a clone of the sprite.
+ */
+Clone.prototype.isTouchingSprite = function (spriteName) {
+    var firstClone = this.runtime.getSpriteTargetByName(spriteName);
+    if (!firstClone || !this.renderer) {
+        return false;
+    }
+    var drawableCandidates = firstClone.sprite.clones.map(function(clone) {
+        return clone.drawableID;
+    });
+    return this.renderer.isTouchingDrawables(
+        this.drawableID, drawableCandidates);
+};
+
 /**
  * Return whether the clone is touching a color.
  * @param {Array.<number>} rgb [r,g,b], values between 0-255.
@@ -380,6 +450,67 @@ Clone.prototype.colorIsTouchingColor = function (targetRgb, maskRgb) {
     return false;
 };
 
+/**
+ * Move clone to the front layer.
+ */
+Clone.prototype.goToFront = function () {
+    if (this.renderer) {
+        this.renderer.setDrawableOrder(this.drawableID, Infinity);
+    }
+};
+
+/**
+ * Move clone back a number of layers.
+ * @param {number} nLayers How many layers to go back.
+ */
+Clone.prototype.goBackLayers = function (nLayers) {
+    if (this.renderer) {
+        this.renderer.setDrawableOrder(this.drawableID, -nLayers, true, 1);
+    }
+};
+
+/**
+ * Keep a desired position within a fence.
+ * @param {number} newX New desired X position.
+ * @param {number} newY New desired Y position.
+ * @param {Object=} opt_fence Optional fence with left, right, top bottom.
+ * @return {Array.<number>} Fenced X and Y coordinates.
+ */
+Clone.prototype.keepInFence = function (newX, newY, opt_fence) {
+    var fence = opt_fence;
+    if (!fence) {
+        fence = {
+            left: -this.runtime.constructor.STAGE_WIDTH / 2,
+            right: this.runtime.constructor.STAGE_WIDTH / 2,
+            top: this.runtime.constructor.STAGE_HEIGHT / 2,
+            bottom: -this.runtime.constructor.STAGE_HEIGHT / 2
+        };
+    }
+    var bounds = this.getBounds();
+    if (!bounds) return;
+    // Adjust the known bounds to the target position.
+    bounds.left += (newX - this.x);
+    bounds.right += (newX - this.x);
+    bounds.top += (newY - this.y);
+    bounds.bottom += (newY - this.y);
+    // Find how far we need to move the target position.
+    var dx = 0;
+    var dy = 0;
+    if (bounds.left < fence.left) {
+        dx += fence.left - bounds.left;
+    }
+    if (bounds.right > fence.right) {
+        dx += fence.right - bounds.right;
+    }
+    if (bounds.top > fence.top) {
+        dy += fence.top - bounds.top;
+    }
+    if (bounds.bottom < fence.bottom) {
+        dy += fence.bottom - bounds.bottom;
+    }
+    return [newX + dx, newY + dy];
+};
+
 /**
  * Make a clone of this clone, copying any run-time properties.
  * If we've hit the global clone limit, returns null.

From e49f076fa1cf2f15839755f1edea471c5f19f249 Mon Sep 17 00:00:00 2001
From: Tim Mickel <tim.mickel@gmail.com>
Date: Mon, 17 Oct 2016 23:23:16 -0400
Subject: [PATCH 302/302] Interpreter fixes, enhancements, features (#280)

* Thread stepping rework; interp.redraw equivalent

* Add turbo mode and pause mode

* Yielding behavior to match Scratch 2.0

* Implement warp-mode procedure threads

* Add check for recursive call

* Inline wait block timer

* Revert to setInterval and always drawing

* Restore yielding in glide

* 30TPS compatibility mode

* 5-call count recursion limit

* Removing dead primitive code

* To simplify, access runtime.threads inline in `stepThreads`.

* Warp mode/timer fixes; recursive check fixes; clean-up

* Add basic single-stepping

* Add single-stepping speed slider

* Allow yielding threads to run in single-stepping

* Restore inactive threads tracking for block glows

* Add clock pausing during pause mode

* Documentation and clean-up throughout

* Don't look for block glows in `thread.topBlock`.

* Add null check for block glows; rename `_updateScriptGlows` to reflect block glowing

* Use the current executed block for glow, instead of stack

* Add more comments to `stepToProcedure`, and re-arrange to match 2.0

* Tweak to Blocks.prototype.getTopLevelScript

* Revert previous

* Fix threads array to be resilient to changes during `stepThreads`

* Restore inactive threads filtering

* Fix typo in "procedure"

* !! instead of == true
---
 playground/index.html             |  13 ++
 playground/playground.js          |  23 +++
 src/blocks/scratch3_control.js    |  94 +++-------
 src/blocks/scratch3_event.js      |   2 +-
 src/blocks/scratch3_looks.js      |   2 +-
 src/blocks/scratch3_motion.js     |   4 +-
 src/blocks/scratch3_procedures.js |   9 +-
 src/engine/execute.js             |  58 +++---
 src/engine/runtime.js             | 296 +++++++++++++++++++++++++-----
 src/engine/sequencer.js           | 284 +++++++++++++++++-----------
 src/engine/thread.js              | 101 +++++++---
 src/index.js                      |  47 +++++
 src/io/clock.js                   |  23 ++-
 src/sprites/clone.js              |  30 +++
 14 files changed, 705 insertions(+), 281 deletions(-)

diff --git a/playground/index.html b/playground/index.html
index 645980893..46fa57cb4 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -15,6 +15,19 @@
             <button id="greenflag">Green flag</button>
             <button id="stopall">Stop</button>
         </div>
+        <div>
+            Turbo: <input id='turbomode' type='checkbox' />
+        </div>
+        <div>
+            Pause: <input id='pausemode' type='checkbox' />
+        </div>
+        <div>
+            Compatibility (30 TPS):  <input id='compatmode' type='checkbox' />
+        </div>
+        <div>
+            Single stepping:  <input id='singlestepmode' type='checkbox' />
+            <input id='singlestepspeed' type='range' min='1' max='20' value='10' />
+        </div>
         <br />
         <ul id="playgroundLinks">
             <li><a id="renderexplorer-link" href="#">Renderer</a></li>
diff --git a/playground/playground.js b/playground/playground.js
index 949a02c5a..577877ae1 100644
--- a/playground/playground.js
+++ b/playground/playground.js
@@ -245,6 +245,29 @@ window.onload = function() {
     document.getElementById('stopall').addEventListener('click', function() {
         vm.stopAll();
     });
+    document.getElementById('turbomode').addEventListener('change', function() {
+        var turboOn = document.getElementById('turbomode').checked;
+        vm.setTurboMode(turboOn);
+    });
+    document.getElementById('pausemode').addEventListener('change', function() {
+        var pauseOn = document.getElementById('pausemode').checked;
+        vm.setPauseMode(pauseOn);
+    });
+    document.getElementById('compatmode').addEventListener('change',
+    function() {
+        var compatibilityMode = document.getElementById('compatmode').checked;
+        vm.setCompatibilityMode(compatibilityMode);
+    });
+    document.getElementById('singlestepmode').addEventListener('change',
+    function() {
+        var singleStep = document.getElementById('singlestepmode').checked;
+        vm.setSingleSteppingMode(singleStep);
+    });
+    document.getElementById('singlestepspeed').addEventListener('input',
+    function() {
+        var speed = document.getElementById('singlestepspeed').value;
+        vm.setSingleSteppingSpeed(speed);
+    });
 
     var tabBlockExplorer = document.getElementById('tab-blockexplorer');
     var tabThreadExplorer = document.getElementById('tab-threadexplorer');
diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js
index a2bab50e1..571b1478f 100644
--- a/src/blocks/scratch3_control.js
+++ b/src/blocks/scratch3_control.js
@@ -1,5 +1,5 @@
 var Cast = require('../util/cast');
-var Promise = require('promise');
+var Timer = require('../util/timer');
 
 function Scratch3ControlBlocks(runtime) {
     /**
@@ -23,7 +23,6 @@ Scratch3ControlBlocks.prototype.getPrimitives = function() {
         'control_if': this.if,
         'control_if_else': this.ifElse,
         'control_stop': this.stop,
-        'control_create_clone_of_menu': this.createCloneMenu,
         'control_create_clone_of': this.createClone,
         'control_delete_this_clone': this.deleteClone
     };
@@ -46,90 +45,60 @@ Scratch3ControlBlocks.prototype.repeat = function(args, util) {
     // Only execute once per frame.
     // When the branch finishes, `repeat` will be executed again and
     // the second branch will be taken, yielding for the rest of the frame.
-    if (!util.stackFrame.executedInFrame) {
-        util.stackFrame.executedInFrame = true;
-        // Decrease counter
-        util.stackFrame.loopCounter--;
-        // If we still have some left, start the branch.
-        if (util.stackFrame.loopCounter >= 0) {
-            util.startBranch();
-        }
-    } else {
-        util.stackFrame.executedInFrame = false;
-        util.yieldFrame();
+    // Decrease counter
+    util.stackFrame.loopCounter--;
+    // If we still have some left, start the branch.
+    if (util.stackFrame.loopCounter >= 0) {
+        util.startBranch(1, true);
     }
 };
 
 Scratch3ControlBlocks.prototype.repeatUntil = function(args, util) {
     var condition = Cast.toBoolean(args.CONDITION);
-    // Only execute once per frame.
-    // When the branch finishes, `repeat` will be executed again and
-    // the second branch will be taken, yielding for the rest of the frame.
-    if (!util.stackFrame.executedInFrame) {
-        util.stackFrame.executedInFrame = true;
-        // If the condition is true, start the branch.
-        if (!condition) {
-            util.startBranch();
-        }
-    } else {
-        util.stackFrame.executedInFrame = false;
-        util.yieldFrame();
+    // If the condition is true, start the branch.
+    if (!condition) {
+        util.startBranch(1, true);
     }
 };
 
 Scratch3ControlBlocks.prototype.waitUntil = function(args, util) {
     var condition = Cast.toBoolean(args.CONDITION);
-    // Only execute once per frame.
     if (!condition) {
-        util.yieldFrame();
+        util.yield();
     }
 };
 
 Scratch3ControlBlocks.prototype.forever = function(args, util) {
-    // Only execute once per frame.
-    // When the branch finishes, `forever` will be executed again and
-    // the second branch will be taken, yielding for the rest of the frame.
-    if (!util.stackFrame.executedInFrame) {
-        util.stackFrame.executedInFrame = true;
-        util.startBranch();
-    } else {
-        util.stackFrame.executedInFrame = false;
-        util.yieldFrame();
-    }
+    util.startBranch(1, true);
 };
 
-Scratch3ControlBlocks.prototype.wait = function(args) {
-    var duration = Cast.toNumber(args.DURATION);
-    return new Promise(function(resolve) {
-        setTimeout(function() {
-            resolve();
-        }, 1000 * duration);
-    });
+Scratch3ControlBlocks.prototype.wait = function(args, util) {
+    if (!util.stackFrame.timer) {
+        util.stackFrame.timer = new Timer();
+        util.stackFrame.timer.start();
+        util.yield();
+        this.runtime.requestRedraw();
+    } else {
+        var duration = Math.max(0, 1000 * Cast.toNumber(args.DURATION));
+        if (util.stackFrame.timer.timeElapsed() < duration) {
+            util.yield();
+        }
+    }
 };
 
 Scratch3ControlBlocks.prototype.if = function(args, util) {
     var condition = Cast.toBoolean(args.CONDITION);
-    // Only execute one time. `if` will be returned to
-    // when the branch finishes, but it shouldn't execute again.
-    if (util.stackFrame.executedInFrame === undefined) {
-        util.stackFrame.executedInFrame = true;
-        if (condition) {
-            util.startBranch();
-        }
+    if (condition) {
+        util.startBranch(1, false);
     }
 };
 
 Scratch3ControlBlocks.prototype.ifElse = function(args, util) {
     var condition = Cast.toBoolean(args.CONDITION);
-    // Only execute one time. `ifElse` will be returned to
-    // when the branch finishes, but it shouldn't execute again.
-    if (util.stackFrame.executedInFrame === undefined) {
-        util.stackFrame.executedInFrame = true;
-        if (condition) {
-            util.startBranch(1);
-        } else {
-            util.startBranch(2);
-        }
+    if (condition) {
+        util.startBranch(1, false);
+    } else {
+        util.startBranch(2, false);
     }
 };
 
@@ -145,11 +114,6 @@ Scratch3ControlBlocks.prototype.stop = function(args, util) {
     }
 };
 
-// @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_') {
diff --git a/src/blocks/scratch3_event.js b/src/blocks/scratch3_event.js
index dfc612914..7f56e3baf 100644
--- a/src/blocks/scratch3_event.js
+++ b/src/blocks/scratch3_event.js
@@ -82,7 +82,7 @@ Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
         return instance.runtime.isActiveThread(thread);
     });
     if (waiting) {
-        util.yieldFrame();
+        util.yield();
     }
 };
 
diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js
index d119c42ce..a1d433e94 100644
--- a/src/blocks/scratch3_looks.js
+++ b/src/blocks/scratch3_looks.js
@@ -153,7 +153,7 @@ Scratch3LooksBlocks.prototype.switchBackdropAndWait = function (args, util) {
         return instance.runtime.isActiveThread(thread);
     });
     if (waiting) {
-        util.yieldFrame();
+        util.yield();
     }
 };
 
diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js
index 829a32e60..68078578b 100644
--- a/src/blocks/scratch3_motion.js
+++ b/src/blocks/scratch3_motion.js
@@ -119,7 +119,7 @@ Scratch3MotionBlocks.prototype.glide = function (args, util) {
             util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
             return;
         }
-        util.yieldFrame();
+        util.yield();
     } else {
         var timeElapsed = util.stackFrame.timer.timeElapsed();
         if (timeElapsed < util.stackFrame.duration * 1000) {
@@ -131,7 +131,7 @@ Scratch3MotionBlocks.prototype.glide = function (args, util) {
                 util.stackFrame.startX + dx,
                 util.stackFrame.startY + dy
             );
-            util.yieldFrame();
+            util.yield();
         } else {
             // Finished: move to final position.
             util.target.setXY(util.stackFrame.endX, util.stackFrame.endY);
diff --git a/src/blocks/scratch3_procedures.js b/src/blocks/scratch3_procedures.js
index eb33e322b..19a6df370 100644
--- a/src/blocks/scratch3_procedures.js
+++ b/src/blocks/scratch3_procedures.js
@@ -24,23 +24,20 @@ Scratch3ProcedureBlocks.prototype.defNoReturn = function () {
 
 Scratch3ProcedureBlocks.prototype.callNoReturn = function (args, util) {
     if (!util.stackFrame.executed) {
-        var procedureName = args.mutation.proccode;
-        var paramNames = util.getProcedureParamNames(procedureName);
+        var procedureCode = args.mutation.proccode;
+        var paramNames = util.getProcedureParamNames(procedureCode);
         for (var i = 0; i < paramNames.length; i++) {
             if (args.hasOwnProperty('input' + i)) {
                 util.pushParam(paramNames[i], args['input' + i]);
             }
         }
         util.stackFrame.executed = true;
-        util.startProcedure(procedureName);
+        util.startProcedure(procedureCode);
     }
 };
 
 Scratch3ProcedureBlocks.prototype.param = function (args, util) {
     var value = util.getParam(args.mutation.paramname);
-    if (!value) {
-        return 0;
-    }
     return value;
 };
 
diff --git a/src/engine/execute.js b/src/engine/execute.js
index c857b73d7..6ef0599de 100644
--- a/src/engine/execute.js
+++ b/src/engine/execute.js
@@ -90,7 +90,7 @@ var execute = function (sequencer, thread) {
                 runtime.visualReport(currentBlockId, resolvedValue);
             }
             // Finished any yields.
-            thread.setStatus(Thread.STATUS_RUNNING);
+            thread.status = Thread.STATUS_RUNNING;
         }
     };
 
@@ -133,15 +133,22 @@ var execute = function (sequencer, thread) {
         var input = inputs[inputName];
         var inputBlockId = input.block;
         // Is there no value for this input waiting in the stack frame?
-        if (typeof currentStackFrame.reported[inputName] === 'undefined') {
+        if (typeof currentStackFrame.reported[inputName] === 'undefined'
+            && inputBlockId) {
             // If there's not, we need to evaluate the block.
-            var reporterYielded = (
-                sequencer.stepToReporter(thread, inputBlockId, inputName)
-            );
-            // If the reporter yielded, return immediately;
-            // it needs time to finish and report its value.
-            if (reporterYielded) {
+            // Push to the stack to evaluate the reporter block.
+            thread.pushStack(inputBlockId);
+            // Save name of input for `Thread.pushReportedValue`.
+            currentStackFrame.waitingReporter = inputName;
+            // Actually execute the block.
+            execute(sequencer, thread);
+            if (thread.status === Thread.STATUS_PROMISE_WAIT) {
                 return;
+            } else {
+                // Execution returned immediately,
+                // and presumably a value was reported, so pop the stack.
+                currentStackFrame.waitingReporter = null;
+                thread.popStack();
             }
         }
         argValues[inputName] = currentStackFrame.reported[inputName];
@@ -164,17 +171,10 @@ var execute = function (sequencer, thread) {
         stackFrame: currentStackFrame.executionContext,
         target: target,
         yield: function() {
-            thread.setStatus(Thread.STATUS_YIELD);
+            thread.status = Thread.STATUS_YIELD;
         },
-        yieldFrame: function() {
-            thread.setStatus(Thread.STATUS_YIELD_FRAME);
-        },
-        done: function() {
-            thread.setStatus(Thread.STATUS_RUNNING);
-            sequencer.proceedThread(thread);
-        },
-        startBranch: function (branchNum) {
-            sequencer.stepToBranch(thread, branchNum);
+        startBranch: function (branchNum, isLoop) {
+            sequencer.stepToBranch(thread, branchNum, isLoop);
         },
         stopAll: function () {
             runtime.stopAll();
@@ -185,11 +185,11 @@ var execute = function (sequencer, thread) {
         stopThread: function() {
             sequencer.retireThread(thread);
         },
-        startProcedure: function (procedureName) {
-            sequencer.stepToProcedure(thread, procedureName);
+        startProcedure: function (procedureCode) {
+            sequencer.stepToProcedure(thread, procedureCode);
         },
-        getProcedureParamNames: function (procedureName) {
-            return blockContainer.getProcedureParamNames(procedureName);
+        getProcedureParamNames: function (procedureCode) {
+            return blockContainer.getProcedureParamNames(procedureCode);
         },
         pushParam: function (paramName, paramValue) {
             thread.pushParam(paramName, paramValue);
@@ -221,18 +221,24 @@ var execute = function (sequencer, thread) {
     if (isPromise(primitiveReportedValue)) {
         if (thread.status === Thread.STATUS_RUNNING) {
             // Primitive returned a promise; automatically yield thread.
-            thread.setStatus(Thread.STATUS_YIELD);
+            thread.status = Thread.STATUS_PROMISE_WAIT;
         }
         // Promise handlers
         primitiveReportedValue.then(function(resolvedValue) {
             handleReport(resolvedValue);
-            sequencer.proceedThread(thread);
+            if (typeof resolvedValue !== 'undefined') {
+                thread.popStack();
+            } else {
+                var popped = thread.popStack();
+                var nextBlockId = thread.target.blocks.getNextBlock(popped);
+                thread.pushStack(nextBlockId);
+            }
         }, function(rejectionReason) {
             // Promise rejected: the primitive had some error.
             // Log it and proceed.
             console.warn('Primitive rejected promise: ', rejectionReason);
-            thread.setStatus(Thread.STATUS_RUNNING);
-            sequencer.proceedThread(thread);
+            thread.status = Thread.STATUS_RUNNING;
+            thread.popStack();
         });
     } else if (thread.status === Thread.STATUS_RUNNING) {
         handleReport(primitiveReportedValue);
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index ea47a3ba9..14df35528 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -27,8 +27,6 @@ function Runtime () {
     // Bind event emitter
     EventEmitter.call(this);
 
-    // State for the runtime
-
     /**
      * Target management and storage.
      * @type {Array.<!Target>}
@@ -45,33 +43,131 @@ function Runtime () {
     /** @type {!Sequencer} */
     this.sequencer = new Sequencer(this);
 
+    /**
+     * Storage container for flyout blocks.
+     * These will execute on `_editingTarget.`
+     * @type {!Blocks}
+     */
     this.flyoutBlocks = new Blocks();
 
+    /**
+     * Currently known editing target for the VM.
+     * @type {?Target}
+     */
+    this._editingTarget = null;
+
     /**
      * Map to look up a block primitive's implementation function by its opcode.
      * This is a two-step lookup: package name first, then primitive name.
      * @type {Object.<string, Function>}
      */
     this._primitives = {};
+
+    /**
+     * Map to look up hat blocks' metadata.
+     * Keys are opcode for hat, values are metadata objects.
+     * @type {Object.<string, Object>}
+     */
     this._hats = {};
+
+    /**
+     * Currently known values for edge-activated hats.
+     * Keys are block ID for the hat; values are the currently known values.
+     * @type {Object.<string, *>}
+     */
     this._edgeActivatedHatValues = {};
+
+    /**
+     * A list of script block IDs that were glowing during the previous frame.
+     * @type {!Array.<!string>}
+     */
+    this._scriptGlowsPreviousFrame = [];
+
+    /**
+     * A list of block IDs that were glowing during the previous frame.
+     * @type {!Array.<!string>}
+     */
+    this._blockGlowsPreviousFrame = [];
+
+    /**
+     * Currently known number of clones, used to enforce clone limit.
+     * @type {number}
+     */
+    this._cloneCounter = 0;
+
+    /**
+     * Whether the project is in "turbo mode."
+     * @type {Boolean}
+     */
+    this.turboMode = false;
+
+    /**
+     * Whether the project is in "pause mode."
+     * @type {Boolean}
+     */
+    this.pauseMode = false;
+
+    /**
+     * Whether the project is in "compatibility mode" (30 TPS).
+     * @type {Boolean}
+     */
+    this.compatibilityMode = false;
+
+    /**
+     * Whether the project is in "single stepping mode."
+     * @type {Boolean}
+     */
+    this.singleStepping = false;
+
+    /**
+     * How fast in ms "single stepping mode" should run, in ms.
+     * Can be updated dynamically.
+     * @type {!number}
+     */
+    this.singleStepInterval = 1000 / 10;
+
+    /**
+     * A reference to the current runtime stepping interval, set
+     * by a `setInterval`.
+     * @type {!number}
+     */
+    this._steppingInterval = null;
+
+    /**
+     * Current length of a step.
+     * Changes as mode switches, and used by the sequencer to calculate
+     * WORK_TIME.
+     * @type {!number}
+     */
+    this.currentStepTime = null;
+
+    /**
+     * Whether any primitive has requested a redraw.
+     * Affects whether `Sequencer.stepThreads` will yield
+     * after stepping each thread.
+     * Reset on every frame.
+     * @type {boolean}
+     */
+    this.redrawRequested = false;
+
+    // Register all given block packages.
     this._registerBlockPackages();
 
+    // Register and initialize "IO devices", containers for processing
+    // I/O related data.
+    /** @type {Object.<string, Object>} */
     this.ioDevices = {
         'clock': new Clock(),
         'keyboard': new Keyboard(this),
         'mouse': new Mouse(this)
     };
-
-    this._scriptGlowsPreviousFrame = [];
-    this._editingTarget = null;
-    /**
-     * Currently known number of clones.
-     * @type {number}
-     */
-    this._cloneCounter = 0;
 }
 
+/**
+ * Inherit from EventEmitter
+ */
+util.inherits(Runtime, EventEmitter);
+
 /**
  * Width of the stage, in pixels.
  * @const {number}
@@ -115,15 +211,15 @@ Runtime.BLOCK_GLOW_OFF = 'BLOCK_GLOW_OFF';
 Runtime.VISUAL_REPORT = 'VISUAL_REPORT';
 
 /**
- * Inherit from EventEmitter
- */
-util.inherits(Runtime, EventEmitter);
-
-/**
- * How rapidly we try to step threads, in ms.
+ * How rapidly we try to step threads by default, in ms.
  */
 Runtime.THREAD_STEP_INTERVAL = 1000 / 60;
 
+/**
+ * In compatibility mode, how rapidly we try to step threads, in ms.
+ */
+Runtime.THREAD_STEP_INTERVAL_COMPATIBILITY = 1000 / 30;
+
 /**
  * How many clones can be created at a time.
  * @const {number}
@@ -175,9 +271,6 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
     return this._primitives[opcode];
 };
 
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
 /**
  * Return whether an opcode represents a hat block.
  * @param {!string} opcode The opcode to look up.
@@ -235,7 +328,7 @@ Runtime.prototype.attachRenderer = function (renderer) {
  */
 Runtime.prototype._pushThread = function (id, target) {
     var thread = new Thread(id);
-    thread.setTarget(target);
+    thread.target = target;
     thread.pushStack(id);
     this.threads.push(thread);
     return thread;
@@ -449,6 +542,10 @@ Runtime.prototype.stopAll = function () {
  * inactive threads after each iteration.
  */
 Runtime.prototype._step = function () {
+    if (this.pauseMode) {
+        // Don't do any execution while in pause mode.
+        return;
+    }
     // Find all edge-activated hats, and add them to threads to be evaluated.
     for (var hatType in this._hats) {
         var hat = this._hats[hatType];
@@ -456,37 +553,113 @@ Runtime.prototype._step = function () {
             this.startHats(hatType);
         }
     }
-    var inactiveThreads = this.sequencer.stepThreads(this.threads);
-    this._updateScriptGlows();
-    for (var i = 0; i < inactiveThreads.length; i++) {
-        this._removeThread(inactiveThreads[i]);
+    this.redrawRequested = false;
+    var inactiveThreads = this.sequencer.stepThreads();
+    this._updateGlows(inactiveThreads);
+};
+
+/**
+ * Set the current editing target known by the runtime.
+ * @param {!Target} editingTarget New editing target.
+ */
+Runtime.prototype.setEditingTarget = function (editingTarget) {
+    this._editingTarget = editingTarget;
+    // Script glows must be cleared.
+    this._scriptGlowsPreviousFrame = [];
+    this._updateGlows();
+};
+
+/**
+ * Set whether we are in pause mode.
+ * @param {boolean} pauseModeOn True iff in pause mode.
+ */
+Runtime.prototype.setPauseMode = function (pauseModeOn) {
+    // Inform the project clock/timer to pause/resume its time.
+    if (this.ioDevices.clock) {
+        if (pauseModeOn && !this.pauseMode) {
+            this.ioDevices.clock.pause();
+        }
+        if (!pauseModeOn && this.pauseMode) {
+            this.ioDevices.clock.resume();
+        }
+    }
+    this.pauseMode = pauseModeOn;
+};
+
+/**
+ * Set whether we are in 30 TPS compatibility mode.
+ * @param {boolean} compatibilityModeOn True iff in compatibility mode.
+ */
+Runtime.prototype.setCompatibilityMode = function (compatibilityModeOn) {
+    this.compatibilityMode = compatibilityModeOn;
+    if (this._steppingInterval) {
+        self.clearInterval(this._steppingInterval);
+        this.start();
     }
 };
 
-Runtime.prototype.setEditingTarget = function (editingTarget) {
-    this._scriptGlowsPreviousFrame = [];
-    this._editingTarget = editingTarget;
-    this._updateScriptGlows();
+/**
+ * Set whether we are in single-stepping mode.
+ * @param {boolean} singleSteppingOn True iff in single-stepping mode.
+ */
+Runtime.prototype.setSingleSteppingMode = function (singleSteppingOn) {
+    this.singleStepping = singleSteppingOn;
+    if (this._steppingInterval) {
+        self.clearInterval(this._steppingInterval);
+        this.start();
+    }
 };
 
-Runtime.prototype._updateScriptGlows = function () {
+/**
+ * Set the speed during single-stepping mode.
+ * @param {number} speed Interval length to step threads, in ms.
+ */
+Runtime.prototype.setSingleSteppingSpeed = function (speed) {
+    this.singleStepInterval = 1000 / speed;
+    if (this._steppingInterval) {
+        self.clearInterval(this._steppingInterval);
+        this.start();
+    }
+};
+
+/**
+ * Emit glows/glow clears for blocks and scripts after a single tick.
+ * Looks at `this.threads` and notices which have turned on/off new glows.
+ * @param {Array.<Thread>=} opt_extraThreads Optional list of inactive threads.
+ */
+Runtime.prototype._updateGlows = function (opt_extraThreads) {
+    var searchThreads = [];
+    searchThreads.push.apply(searchThreads, this.threads);
+    if (opt_extraThreads) {
+        searchThreads.push.apply(searchThreads, opt_extraThreads);
+    }
     // Set of scripts that request a glow this frame.
     var requestedGlowsThisFrame = [];
+    var requestedBlockGlowsThisFrame = [];
     // Final set of scripts glowing during this frame.
     var finalScriptGlows = [];
+    var finalBlockGlows = [];
     // Find all scripts that should be glowing.
-    for (var i = 0; i < this.threads.length; i++) {
-        var thread = this.threads[i];
+    for (var i = 0; i < searchThreads.length; i++) {
+        var thread = searchThreads[i];
         var target = thread.target;
-        if (thread.requestScriptGlowInFrame && target == this._editingTarget) {
-            var blockForThread = thread.peekStack() || thread.topBlock;
-            var script = target.blocks.getTopLevelScript(blockForThread);
-            if (!script) {
-                // Attempt to find in flyout blocks.
-                script = this.flyoutBlocks.getTopLevelScript(blockForThread);
+        if (target == this._editingTarget) {
+            var blockForThread = thread.blockGlowInFrame;
+            if (thread.requestScriptGlowInFrame) {
+                var script = target.blocks.getTopLevelScript(blockForThread);
+                if (!script) {
+                    // Attempt to find in flyout blocks.
+                    script = this.flyoutBlocks.getTopLevelScript(
+                        blockForThread
+                    );
+                }
+                if (script) {
+                    requestedGlowsThisFrame.push(script);
+                }
             }
-            if (script) {
-                requestedGlowsThisFrame.push(script);
+            // Only show block glows in single-stepping mode.
+            if (this.singleStepping && blockForThread) {
+                requestedBlockGlowsThisFrame.push(blockForThread);
             }
         }
     }
@@ -509,7 +682,30 @@ Runtime.prototype._updateScriptGlows = function () {
             finalScriptGlows.push(currentFrameGlow);
         }
     }
+    for (var m = 0; m < this._blockGlowsPreviousFrame.length; m++) {
+        var previousBlockGlow = this._blockGlowsPreviousFrame[m];
+        if (requestedBlockGlowsThisFrame.indexOf(previousBlockGlow) < 0) {
+            // Glow turned off.
+            try {
+                this.glowBlock(previousBlockGlow, false);
+            } catch (e) {
+                // Block has been removed.
+            }
+        } else {
+            // Still glowing.
+            finalBlockGlows.push(previousBlockGlow);
+        }
+    }
+    for (var p = 0; p < requestedBlockGlowsThisFrame.length; p++) {
+        var currentBlockFrameGlow = requestedBlockGlowsThisFrame[p];
+        if (this._blockGlowsPreviousFrame.indexOf(currentBlockFrameGlow) < 0) {
+            // Glow turned on.
+            this.glowBlock(currentBlockFrameGlow, true);
+            finalBlockGlows.push(currentBlockFrameGlow);
+        }
+    }
     this._scriptGlowsPreviousFrame = finalScriptGlows;
+    this._blockGlowsPreviousFrame = finalBlockGlows;
 };
 
 /**
@@ -617,22 +813,38 @@ Runtime.prototype.getTargetForStage = function () {
     }
 };
 
+/**
+ * Tell the runtime to request a redraw.
+ * Use after a clone/sprite has completed some visible operation on the stage.
+ */
+Runtime.prototype.requestRedraw = function () {
+    this.redrawRequested = true;
+};
+
 /**
  * Handle an animation frame from the main thread.
  */
 Runtime.prototype.animationFrame = function () {
     if (this.renderer) {
+        // @todo: Only render when this.redrawRequested or clones rendered.
         this.renderer.draw();
     }
 };
 
 /**
- * Set up timers to repeatedly step in a browser
+ * Set up timers to repeatedly step in a browser.
  */
 Runtime.prototype.start = function () {
-    self.setInterval(function() {
+    var interval = Runtime.THREAD_STEP_INTERVAL;
+    if (this.singleStepping) {
+        interval = this.singleStepInterval;
+    } else if (this.compatibilityMode) {
+        interval = Runtime.THREAD_STEP_INTERVAL_COMPATIBILITY;
+    }
+    this.currentStepTime = interval;
+    this._steppingInterval = self.setInterval(function() {
         this._step();
-    }.bind(this), Runtime.THREAD_STEP_INTERVAL);
+    }.bind(this), interval);
 };
 
 module.exports = Runtime;
diff --git a/src/engine/sequencer.js b/src/engine/sequencer.js
index 0e54ca4ab..182b9ee65 100644
--- a/src/engine/sequencer.js
+++ b/src/engine/sequencer.js
@@ -17,87 +17,163 @@ function Sequencer (runtime) {
 }
 
 /**
- * The sequencer does as much work as it can within WORK_TIME milliseconds,
- * then yields. This is essentially a rate-limiter for blocks.
- * In Scratch 2.0, this is set to 75% of the target stage frame-rate (30fps).
- * @const {!number}
+ * Time to run a warp-mode thread, in ms.
+ * @type {number}
  */
-Sequencer.WORK_TIME = 10;
+Sequencer.WARP_TIME = 500;
 
 /**
- * Step through all threads in `this.threads`, running them in order.
- * @param {Array.<Thread>} threads List of which threads to step.
- * @return {Array.<Thread>} All threads which have finished in this iteration.
+ * Step through all threads in `this.runtime.threads`, running them in order.
+ * @return {Array.<!Thread>} List of inactive threads after stepping.
  */
-Sequencer.prototype.stepThreads = function (threads) {
-    // Start counting toward WORK_TIME
+Sequencer.prototype.stepThreads = function () {
+    // Work time is 75% of the thread stepping interval.
+    var WORK_TIME = 0.75 * this.runtime.currentStepTime;
+    // Start counting toward WORK_TIME.
     this.timer.start();
-    // List of threads which have been killed by this step.
+    // Count of active threads.
+    var numActiveThreads = Infinity;
+    // Whether `stepThreads` has run through a full single tick.
+    var ranFirstTick = false;
     var inactiveThreads = [];
-    // If all of the threads are yielding, we should yield.
-    var numYieldingThreads = 0;
-    // Clear all yield statuses that were for the previous frame.
-    for (var t = 0; t < threads.length; t++) {
-        if (threads[t].status === Thread.STATUS_YIELD_FRAME) {
-            threads[t].setStatus(Thread.STATUS_RUNNING);
-        }
-    }
-
-    // While there are still threads to run and we are within WORK_TIME,
-    // continue executing threads.
-    while (threads.length > 0 &&
-           threads.length > numYieldingThreads &&
-           this.timer.timeElapsed() < Sequencer.WORK_TIME) {
-        // New threads at the end of the iteration.
-        var newThreads = [];
-        // Reset yielding thread count.
-        numYieldingThreads = 0;
-        // Attempt to run each thread one time
-        for (var i = 0; i < threads.length; i++) {
-            var activeThread = threads[i];
-            if (activeThread.status === Thread.STATUS_RUNNING) {
-                // Normal-mode thread: step.
-                this.startThread(activeThread);
-            } else if (activeThread.status === Thread.STATUS_YIELD ||
-                       activeThread.status === Thread.STATUS_YIELD_FRAME) {
-                // Yielding thread: do nothing for this step.
-                numYieldingThreads++;
-            }
-            if (activeThread.stack.length === 0 &&
+    // Conditions for continuing to stepping threads:
+    // 1. We must have threads in the list, and some must be active.
+    // 2. Time elapsed must be less than WORK_TIME.
+    // 3. Either turbo mode, or no redraw has been requested by a primitive.
+    while (this.runtime.threads.length > 0 &&
+           numActiveThreads > 0 &&
+           this.timer.timeElapsed() < WORK_TIME &&
+           (this.runtime.turboMode || !this.runtime.redrawRequested)) {
+        numActiveThreads = 0;
+        // Inline copy of the threads, updated on each step.
+        var threadsCopy = this.runtime.threads.slice();
+        // Attempt to run each thread one time.
+        for (var i = 0; i < threadsCopy.length; i++) {
+            var activeThread = threadsCopy[i];
+            if (activeThread.stack.length === 0 ||
                 activeThread.status === Thread.STATUS_DONE) {
-                // Finished with this thread - tell runtime to clean it up.
-                inactiveThreads.push(activeThread);
-            } else {
-                // Keep this thead in the loop.
-                newThreads.push(activeThread);
+                // Finished with this thread.
+                if (inactiveThreads.indexOf(activeThread) < 0) {
+                    inactiveThreads.push(activeThread);
+                }
+                continue;
+            }
+            if (activeThread.status === Thread.STATUS_YIELD_TICK &&
+                !ranFirstTick) {
+                // Clear single-tick yield from the last call of `stepThreads`.
+                activeThread.status = Thread.STATUS_RUNNING;
+            }
+            if (activeThread.status === Thread.STATUS_RUNNING ||
+                activeThread.status === Thread.STATUS_YIELD) {
+                // Normal-mode thread: step.
+                this.stepThread(activeThread);
+                activeThread.warpTimer = null;
+            }
+            if (activeThread.status === Thread.STATUS_RUNNING) {
+                // After stepping, status is still running.
+                // If we're in single-stepping mode, mark the thread as
+                // a single-tick yield so it doesn't re-execute
+                // until the next frame.
+                if (this.runtime.singleStepping) {
+                    activeThread.status = Thread.STATUS_YIELD_TICK;
+                }
+                numActiveThreads++;
             }
         }
-        // Effectively filters out threads that have stopped.
-        threads = newThreads;
+        // We successfully ticked once. Prevents running STATUS_YIELD_TICK
+        // threads on the next tick.
+        ranFirstTick = true;
     }
+    // Filter inactive threads from `this.runtime.threads`.
+    this.runtime.threads = this.runtime.threads.filter(function(thread) {
+        if (inactiveThreads.indexOf(thread) > -1) {
+            return false;
+        }
+        return true;
+    });
     return inactiveThreads;
 };
 
 /**
- * Step the requested thread
- * @param {!Thread} thread Thread object to step
+ * Step the requested thread for as long as necessary.
+ * @param {!Thread} thread Thread object to step.
  */
-Sequencer.prototype.startThread = function (thread) {
+Sequencer.prototype.stepThread = function (thread) {
     var currentBlockId = thread.peekStack();
     if (!currentBlockId) {
         // A "null block" - empty branch.
-        // Yield for the frame.
         thread.popStack();
-        thread.setStatus(Thread.STATUS_YIELD_FRAME);
-        return;
     }
-    // Execute the current block
-    execute(this, thread);
-    // If the block executed without yielding and without doing control flow,
-    // move to done.
-    if (thread.status === Thread.STATUS_RUNNING &&
-        thread.peekStack() === currentBlockId) {
-        this.proceedThread(thread);
+    while (thread.peekStack()) {
+        var isWarpMode = thread.peekStackFrame().warpMode;
+        if (isWarpMode && !thread.warpTimer) {
+            // Initialize warp-mode timer if it hasn't been already.
+            // This will start counting the thread toward `Sequencer.WARP_TIME`.
+            thread.warpTimer = new Timer();
+            thread.warpTimer.start();
+        }
+        // Execute the current block.
+        // Save the current block ID to notice if we did control flow.
+        currentBlockId = thread.peekStack();
+        execute(this, thread);
+        thread.blockGlowInFrame = currentBlockId;
+        // If the thread has yielded or is waiting, yield to other threads.
+        if (thread.status === Thread.STATUS_YIELD) {
+            // Mark as running for next iteration.
+            thread.status = Thread.STATUS_RUNNING;
+            // In warp mode, yielded blocks are re-executed immediately.
+            if (isWarpMode &&
+                thread.warpTimer.timeElapsed() <= Sequencer.WARP_TIME) {
+                continue;
+            }
+            return;
+        } else if (thread.status === Thread.STATUS_PROMISE_WAIT) {
+            // A promise was returned by the primitive. Yield the thread
+            // until the promise resolves. Promise resolution should reset
+            // thread.status to Thread.STATUS_RUNNING.
+            return;
+        }
+        // If no control flow has happened, switch to next block.
+        if (thread.peekStack() === currentBlockId) {
+            thread.goToNextBlock();
+        }
+        // If no next block has been found at this point, look on the stack.
+        while (!thread.peekStack()) {
+            thread.popStack();
+            if (thread.stack.length === 0) {
+                // No more stack to run!
+                thread.status = Thread.STATUS_DONE;
+                return;
+            }
+            if (thread.peekStackFrame().isLoop) {
+                // The current level of the stack is marked as a loop.
+                // Return to yield for the frame/tick in general.
+                // Unless we're in warp mode - then only return if the
+                // warp timer is up.
+                if (!isWarpMode ||
+                    thread.warpTimer.timeElapsed() > Sequencer.WARP_TIME) {
+                    // Don't do anything to the stack, since loops need
+                    // to be re-executed.
+                    return;
+                } else {
+                    // Don't go to the next block for this level of the stack,
+                    // since loops need to be re-executed.
+                    continue;
+                }
+            } else if (thread.peekStackFrame().waitingReporter) {
+                // This level of the stack was waiting for a value.
+                // This means a reporter has just returned - so don't go
+                // to the next block for this level of the stack.
+                return;
+            }
+            // Get next block of existing block on the stack.
+            thread.goToNextBlock();
+        }
+        // In single-stepping mode, force `stepThread` to only run one block
+        // at a time.
+        if (this.runtime.singleStepping) {
+            return;
+        }
     }
 };
 
@@ -105,8 +181,9 @@ Sequencer.prototype.startThread = function (thread) {
  * Step a thread into a block's branch.
  * @param {!Thread} thread Thread object to step to branch.
  * @param {Number} branchNum Which branch to step to (i.e., 1, 2).
+ * @param {Boolean} isLoop Whether this block is a loop.
  */
-Sequencer.prototype.stepToBranch = function (thread, branchNum) {
+Sequencer.prototype.stepToBranch = function (thread, branchNum, isLoop) {
     if (!branchNum) {
         branchNum = 1;
     }
@@ -115,11 +192,11 @@ Sequencer.prototype.stepToBranch = function (thread, branchNum) {
         currentBlockId,
         branchNum
     );
+    thread.peekStackFrame().isLoop = isLoop;
     if (branchId) {
         // Push branch ID to the thread's stack.
         thread.pushStack(branchId);
     } else {
-        // Push null, so we come back to the current block.
         thread.pushStack(null);
     }
 };
@@ -127,56 +204,39 @@ Sequencer.prototype.stepToBranch = function (thread, branchNum) {
 /**
  * Step a procedure.
  * @param {!Thread} thread Thread object to step to procedure.
- * @param {!string} procedureName Name of procedure defined in this target.
+ * @param {!string} procedureCode Procedure code of procedure to step to.
  */
-Sequencer.prototype.stepToProcedure = function (thread, procedureName) {
-    var definition = thread.target.blocks.getProcedureDefinition(procedureName);
+Sequencer.prototype.stepToProcedure = function (thread, procedureCode) {
+    var definition = thread.target.blocks.getProcedureDefinition(procedureCode);
+    if (!definition) {
+        return;
+    }
+    // Check if the call is recursive.
+    // If so, set the thread to yield after pushing.
+    var isRecursive = thread.isRecursiveCall(procedureCode);
+    // To step to a procedure, we put its definition on the stack.
+    // Execution for the thread will proceed through the definition hat
+    // and on to the main definition of the procedure.
+    // When that set of blocks finishes executing, it will be popped
+    // from the stack by the sequencer, returning control to the caller.
     thread.pushStack(definition);
-    // Check if the call is recursive. If so, yield.
-    // @todo: Have behavior match Scratch 2.0.
-    if (thread.stack.indexOf(definition) > -1) {
-        thread.setStatus(Thread.STATUS_YIELD_FRAME);
-    }
-};
-
-/**
- * Step a thread into an input reporter, and manage its status appropriately.
- * @param {!Thread} thread Thread object to step to reporter.
- * @param {!string} blockId ID of reporter block.
- * @param {!string} inputName Name of input on parent block.
- * @return {boolean} True if yielded, false if it finished immediately.
- */
-Sequencer.prototype.stepToReporter = function (thread, blockId, inputName) {
-    var currentStackFrame = thread.peekStackFrame();
-    // Push to the stack to evaluate the reporter block.
-    thread.pushStack(blockId);
-    // Save name of input for `Thread.pushReportedValue`.
-    currentStackFrame.waitingReporter = inputName;
-    // Actually execute the block.
-    this.startThread(thread);
-    // If a reporter yielded, caller must wait for it to unyield.
-    // The value will be populated once the reporter unyields,
-    // and passed up to the currentStackFrame on next execution.
-    return thread.status === Thread.STATUS_YIELD;
-};
-
-/**
- * Finish stepping a thread and proceed it to the next block.
- * @param {!Thread} thread Thread object to proceed.
- */
-Sequencer.prototype.proceedThread = function (thread) {
-    var currentBlockId = thread.peekStack();
-    // Mark the status as done and proceed to the next block.
-    // Pop from the stack - finished this level of execution.
-    thread.popStack();
-    // Push next connected block, if there is one.
-    var nextBlockId = thread.target.blocks.getNextBlock(currentBlockId);
-    if (nextBlockId) {
-        thread.pushStack(nextBlockId);
-    }
-    // If we can't find a next block to run, mark the thread as done.
-    if (!thread.peekStack()) {
-        thread.setStatus(Thread.STATUS_DONE);
+    // In known warp-mode threads, only yield when time is up.
+    if (thread.peekStackFrame().warpMode &&
+        thread.warpTimer.timeElapsed() > Sequencer.WARP_TIME) {
+        thread.status = Thread.STATUS_YIELD;
+    } else {
+        // Look for warp-mode flag on definition, and set the thread
+        // to warp-mode if needed.
+        var definitionBlock = thread.target.blocks.getBlock(definition);
+        var doWarp = definitionBlock.mutation.warp;
+        if (doWarp) {
+            thread.peekStackFrame().warpMode = true;
+        } else {
+            // In normal-mode threads, yield any time we have a recursive call.
+            if (isRecursive) {
+                thread.status = Thread.STATUS_YIELD;
+            }
+        }
     }
 };
 
@@ -188,7 +248,7 @@ Sequencer.prototype.retireThread = function (thread) {
     thread.stack = [];
     thread.stackFrame = [];
     thread.requestScriptGlowInFrame = false;
-    thread.setStatus(Thread.STATUS_DONE);
+    thread.status = Thread.STATUS_DONE;
 };
 
 module.exports = Sequencer;
diff --git a/src/engine/thread.js b/src/engine/thread.js
index 6a08361fd..9aeb559f3 100644
--- a/src/engine/thread.js
+++ b/src/engine/thread.js
@@ -40,6 +40,19 @@ function Thread (firstBlock) {
      * @type {boolean}
      */
     this.requestScriptGlowInFrame = false;
+
+    /**
+     * Which block ID should glow during this frame, if any.
+     * @type {?string}
+     */
+    this.blockGlowInFrame = null;
+
+    /**
+     * A timer for when the thread enters warp mode.
+     * Substitutes the sequencer's count toward WORK_TIME on a per-thread basis.
+     * @type {?Timer}
+     */
+    this.warpTimer = null;
 }
 
 /**
@@ -51,25 +64,31 @@ function Thread (firstBlock) {
 Thread.STATUS_RUNNING = 0;
 
 /**
- * Thread status for a yielded thread.
- * Threads are in this state when a primitive has yielded; execution is paused
- * until the relevant primitive unyields.
+ * Threads are in this state when a primitive is waiting on a promise;
+ * execution is paused until the promise changes thread status.
  * @const
  */
-Thread.STATUS_YIELD = 1;
+Thread.STATUS_PROMISE_WAIT = 1;
 
 /**
- * Thread status for a single-frame yield.
+ * Thread status for yield.
  * @const
  */
-Thread.STATUS_YIELD_FRAME = 2;
+Thread.STATUS_YIELD = 2;
+
+/**
+ * Thread status for a single-tick yield. This will be cleared when the
+ * thread is resumed.
+ * @const
+ */
+Thread.STATUS_YIELD_TICK = 3;
 
 /**
  * Thread status for a finished/done thread.
  * Thread is in this state when there are no more blocks to execute.
  * @const
  */
-Thread.STATUS_DONE = 3;
+Thread.STATUS_DONE = 4;
 
 /**
  * Push stack and update stack frames appropriately.
@@ -80,7 +99,14 @@ Thread.prototype.pushStack = function (blockId) {
     // Push an empty stack frame, if we need one.
     // Might not, if we just popped the stack.
     if (this.stack.length > this.stackFrames.length) {
+        // Copy warp mode from any higher level.
+        var warpMode = false;
+        if (this.stackFrames[this.stackFrames.length - 1]) {
+            warpMode = this.stackFrames[this.stackFrames.length - 1].warpMode;
+        }
         this.stackFrames.push({
+            isLoop: false, // Whether this level of the stack is a loop.
+            warpMode: warpMode, // Whether this level is in warp mode.
             reported: {}, // Collects reported input values.
             waitingReporter: null, // Name of waiting reporter.
             params: {}, // Procedure parameters.
@@ -125,22 +151,32 @@ Thread.prototype.peekParentStackFrame = function () {
 
 /**
  * Push a reported value to the parent of the current stack frame.
- * @param {!Any} value Reported value to push.
+ * @param {*} value Reported value to push.
  */
 Thread.prototype.pushReportedValue = function (value) {
     var parentStackFrame = this.peekParentStackFrame();
     if (parentStackFrame) {
         var waitingReporter = parentStackFrame.waitingReporter;
         parentStackFrame.reported[waitingReporter] = value;
-        parentStackFrame.waitingReporter = null;
     }
 };
 
+/**
+ * Add a parameter to the stack frame.
+ * Use when calling a procedure with parameter values.
+ * @param {!string} paramName Name of parameter.
+ * @param {*} value Value to set for parameter.
+ */
 Thread.prototype.pushParam = function (paramName, value) {
     var stackFrame = this.peekStackFrame();
     stackFrame.params[paramName] = value;
 };
 
+/**
+ * Get a parameter at the lowest possible level of the stack.
+ * @param {!string} paramName Name of parameter.
+ * @return {*} value Value for parameter.
+ */
 Thread.prototype.getParam = function (paramName) {
     for (var i = this.stackFrames.length - 1; i >= 0; i--) {
         var frame = this.stackFrames[i];
@@ -159,28 +195,43 @@ Thread.prototype.atStackTop = function () {
     return this.peekStack() === this.topBlock;
 };
 
+
 /**
- * Set thread status.
- * @param {number} status Enum representing thread status.
+ * Switch the thread to the next block at the current level of the stack.
+ * For example, this is used in a standard sequence of blocks,
+ * where execution proceeds from one block to the next.
  */
-Thread.prototype.setStatus = function (status) {
-    this.status = status;
+Thread.prototype.goToNextBlock = function () {
+    var nextBlockId = this.target.blocks.getNextBlock(this.peekStack());
+    // Copy warp mode to next block.
+    var warpMode = this.peekStackFrame().warpMode;
+    // The current block is on the stack - pop it and push the next.
+    // Note that this could push `null` - that is handled by the sequencer.
+    this.popStack();
+    this.pushStack(nextBlockId);
+    if (this.peekStackFrame()) {
+        this.peekStackFrame().warpMode = warpMode;
+    }
 };
 
 /**
- * Set thread target.
- * @param {?Target} target Target for this thread.
+ * Attempt to determine whether a procedure call is recursive,
+ * by examining the stack.
+ * @param {!string} procedureCode Procedure code of procedure being called.
+ * @return {boolean} True if the call appears recursive.
  */
-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;
+Thread.prototype.isRecursiveCall = function (procedureCode) {
+    var callCount = 5; // Max number of enclosing procedure calls to examine.
+    var sp = this.stack.length - 1;
+    for (var i = sp - 1; i >= 0; i--) {
+        var block = this.target.blocks.getBlock(this.stack[i]);
+        if (block.opcode == 'procedures_callnoreturn' &&
+            block.mutation.proccode == procedureCode)  {
+            return true;
+        }
+        if (--callCount < 0) return false;
+    }
+    return false;
 };
 
 module.exports = Thread;
diff --git a/src/index.js b/src/index.js
index 818ea4f1a..014dc2b23 100644
--- a/src/index.js
+++ b/src/index.js
@@ -66,6 +66,53 @@ VirtualMachine.prototype.greenFlag = function () {
     this.runtime.greenFlag();
 };
 
+/**
+ * Set whether the VM is in "turbo mode."
+ * When true, loops don't yield to redraw.
+ * @param {Boolean} turboModeOn Whether turbo mode should be set.
+ */
+VirtualMachine.prototype.setTurboMode = function (turboModeOn) {
+    this.runtime.turboMode = !!turboModeOn;
+};
+
+/**
+ * Set whether the VM is in "pause mode."
+ * When true, nothing is stepped.
+ * @param {Boolean} pauseModeOn Whether pause mode should be set.
+ */
+VirtualMachine.prototype.setPauseMode = function (pauseModeOn) {
+    this.runtime.setPauseMode(!!pauseModeOn);
+};
+
+/**
+ * Set whether the VM is in 2.0 "compatibility mode."
+ * When true, ticks go at 2.0 speed (30 TPS).
+ * @param {Boolean} compatibilityModeOn Whether compatibility mode is set.
+ */
+VirtualMachine.prototype.setCompatibilityMode = function (compatibilityModeOn) {
+    this.runtime.setCompatibilityMode(!!compatibilityModeOn);
+};
+
+/**
+ * Set whether the VM is in "single stepping mode."
+ * When true, blocks execute slowly and are highlighted visually.
+ * @param {Boolean} singleSteppingOn Whether single-stepping mode is set.
+ */
+VirtualMachine.prototype.setSingleSteppingMode = function (singleSteppingOn) {
+    this.runtime.setSingleSteppingMode(!!singleSteppingOn);
+};
+
+
+/**
+ * Set single-stepping mode speed.
+ * When in single-stepping mode, adjusts the speed of execution.
+ * @param {Number} speed Interval length in ms.
+ */
+VirtualMachine.prototype.setSingleSteppingSpeed = function (speed) {
+    this.runtime.setSingleSteppingSpeed(speed);
+};
+
+
 /**
  * Stop all threads and running activities.
  */
diff --git a/src/io/clock.js b/src/io/clock.js
index b3bf1e0be..ce4c8f553 100644
--- a/src/io/clock.js
+++ b/src/io/clock.js
@@ -1,14 +1,35 @@
 var Timer = require('../util/timer');
 
-function Clock () {
+function Clock (runtime) {
     this._projectTimer = new Timer();
     this._projectTimer.start();
+    this._pausedTime = null;
+    this._paused = false;
+    /**
+     * Reference to the owning Runtime.
+     * @type{!Runtime}
+     */
+    this.runtime = runtime;
 }
 
 Clock.prototype.projectTimer = function () {
+    if (this._paused) {
+        return this._pausedTime / 1000;
+    }
     return this._projectTimer.timeElapsed() / 1000;
 };
 
+Clock.prototype.pause = function () {
+    this._paused = true;
+    this._pausedTime = this._projectTimer.timeElapsed();
+};
+
+Clock.prototype.resume = function () {
+    this._paused = false;
+    var dt = this._projectTimer.timeElapsed() - this._pausedTime;
+    this._projectTimer.startTime += dt;
+};
+
 Clock.prototype.resetProjectTimer = function () {
     this._projectTimer.start();
 };
diff --git a/src/sprites/clone.js b/src/sprites/clone.js
index 4f760decd..13d9434a9 100644
--- a/src/sprites/clone.js
+++ b/src/sprites/clone.js
@@ -152,6 +152,9 @@ Clone.prototype.setXY = function (x, y) {
         this.renderer.updateDrawableProperties(this.drawableID, {
             position: [this.x, this.y]
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -191,6 +194,9 @@ Clone.prototype.setDirection = function (direction) {
             direction: renderedDirectionScale.direction,
             scale: renderedDirectionScale.scale
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -224,6 +230,9 @@ Clone.prototype.setVisible = function (visible) {
         this.renderer.updateDrawableProperties(this.drawableID, {
             visible: this.visible
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -243,6 +252,9 @@ Clone.prototype.setSize = function (size) {
             direction: renderedDirectionScale.direction,
             scale: renderedDirectionScale.scale
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -258,6 +270,9 @@ Clone.prototype.setEffect = function (effectName, value) {
         var props = {};
         props[effectName] = this.effects[effectName];
         this.renderer.updateDrawableProperties(this.drawableID, props);
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -270,6 +285,9 @@ Clone.prototype.clearEffects = function () {
     }
     if (this.renderer) {
         this.renderer.updateDrawableProperties(this.drawableID, this.effects);
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -287,6 +305,9 @@ Clone.prototype.setCostume = function (index) {
         this.renderer.updateDrawableProperties(this.drawableID, {
             skin: this.sprite.costumes[this.currentCostume].skin
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -308,6 +329,9 @@ Clone.prototype.setRotationStyle = function (rotationStyle) {
             direction: renderedDirectionScale.direction,
             scale: renderedDirectionScale.scale
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -339,6 +363,9 @@ Clone.prototype.updateAllDrawableProperties = function () {
             visible: this.visible,
             skin: this.sprite.costumes[this.currentCostume].skin
         });
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };
 
@@ -552,6 +579,9 @@ Clone.prototype.dispose = function () {
     this.runtime.changeCloneCounter(-1);
     if (this.renderer && this.drawableID !== null) {
         this.renderer.destroyDrawable(this.drawableID);
+        if (this.visible) {
+            this.runtime.requestRedraw();
+        }
     }
 };