UNPKG

noddity

Version:

A client-side cms with a flat-file backend

2 lines 537 kB
(function e(t,r,n){function i(o,a){if(!r[o]){if(!t[o]){var u=typeof require=="function"&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var f=r[o]={exports:{}};t[o][0].call(f.exports,function(e){var r=t[o][1][e];return i(r?r:e)},f,f.exports,e,t,r,n)}return r[o].exports}var s=typeof require=="function"&&require;for(var o=0;o<n.length;o++)i(n[o]);return i})({1:[function(e,t,r){var n=e("levelup");var i=e("fruitdown");t.exports={clearCache:function s(){var e=n("noddity-content",{db:i});e.createKeyStream().on("data",function(t){e.del(t)})}}},{fruitdown:50,levelup:103}],2:[function(e,t,r){var n=e("noddity-butler");var i=e("levelup");var s=e("noddity-linkifier");var o=e("fruitdown");var a=e("./mainViewModel");var u=e("subleveldown");var l=e("xtend");var f=noddityConfig;var c=i("noddity-content",{db:o});f.title=f.name=f.title||f.name;var h=f.title.replace(/[^\w]+/g,"");var p=f.debug?{refreshEvery:30*1e3}:{cacheCheckIntervalMs:60*1e3};var d=l(p,{parallelPostRequests:4,loadPostsOnIndexChange:false});var v=new n(f.noddityRoot,u(c,h),d);var g=new s(f.pathPrefix+f.pagePathPrefix);a(v,g);if(f.sidebar){console.warn('The "sidebar" config.js setting is not supported any more - you should add ::'+f.sidebar+":: to your "+f.template+" template")}if(f.debug){debug=e("./debug")}},{"./debug":1,"./mainViewModel":3,fruitdown:50,levelup:103,"noddity-butler":107,"noddity-linkifier":111,subleveldown:206,xtend:224}],3:[function(e,t,r){var n=e("noddity-render-dom");var i=e("./routing");var s=e("ractive");var o=noddityConfig;s.DEBUG=o.debug;t.exports=function u(e,t){var r="";var u={butler:e,linkifier:t,el:"body",data:o};var l=false;function f(){if(!l){l=true;e.on("index changed",function(){e.getPosts()})}}e.refreshIndex();var c=new s({el:"title",template:"{{name}}{{#current.metadata.title}} | {{current.metadata.title}}{{/current.metadata.title}}"});function h(e,t){c.reset(o);if(!e&&t){c.set("current",t)}}e.on("post change",function(e){if(e.filename===r){h(null,e)}});t.on("link",function(t){e.getPost(t,function(){})});n("post",u,function(t,r){if(t){console.error(t);document.body.innerHTML="<h1>ERROR</h1>"+t.message}var n=i();n.on("current",function(t,i){var s={parameters:i||{}};r(t,s,function(i){if(i){if(t!==o.errorPage){n.emit("404")}}else{a(r.ractive,"#!/"+o.pagePathPrefix,t);n.emit("loaded",t)}e.getPost(t,h);e.refreshPost(t);f()})});r.on("error",console.error.bind(console,"setCurrent error"))})};function a(e,t,r){e.findAll("a[href]").forEach(function(e){var n=e.getAttribute("href");if(n&&n[0]==="#"&&n.indexOf(t)!==0){e.setAttribute("href",t+r+n)}})}},{"./routing":4,"noddity-render-dom":112,ractive:129}],4:[function(e,t,r){var n=e("events").EventEmitter;var i=e("hash-brown-router");var s=noddityConfig;t.exports=function(){var e=i();var t=new n;var r=null;t.on("404",function(){e.replace("!/"+s.pagePathPrefix+s.errorPage)});t.on("loaded",function(e){scrollTo(0,0)});e.add("!/",function(e){t.emit("current","index.md",e)});e.add("!/"+s.pagePathPrefix+":name([^#]+)#:anchor",function(e){var n=decodeURIComponent(e.name);if(r===n){o(e.anchor)}else{t.emit("current",n,e);r=n;t.once("loaded",function(){o(e.anchor)})}});e.add("!/"+s.pagePathPrefix+":name([^#]+)",function(e){var r=decodeURIComponent(e.name);t.emit("current",r,e)});e.on("not found",function(e){t.emit("404",e)});setTimeout(e.evaluateCurrent.bind(null,"!/"),0);return t};function o(e){var t=document.getElementById(e);if(t){t.scrollIntoView()}}},{events:45,"hash-brown-router":56}],5:[function(e,t,r){(function(e){function r(e){this._db=e;this._operations=[];this._written=false}r.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")};r.prototype.put=function(e,t){this._checkWritten();var r=this._db._checkKeyValue(e,"key",this._db._isBuffer);if(r)throw r;r=this._db._checkKeyValue(t,"value",this._db._isBuffer);if(r)throw r;if(!this._db._isBuffer(e))e=String(e);if(!this._db._isBuffer(t))t=String(t);if(typeof this._put=="function")this._put(e,t);else this._operations.push({type:"put",key:e,value:t});return this};r.prototype.del=function(e){this._checkWritten();var t=this._db._checkKeyValue(e,"key",this._db._isBuffer);if(t)throw t;if(!this._db._isBuffer(e))e=String(e);if(typeof this._del=="function")this._del(e);else this._operations.push({type:"del",key:e});return this};r.prototype.clear=function(){this._checkWritten();this._operations=[];if(typeof this._clear=="function")this._clear();return this};r.prototype.write=function(t,r){this._checkWritten();if(typeof t=="function")r=t;if(typeof r!="function")throw new Error("write() requires a callback argument");if(typeof t!="object")t={};this._written=true;if(typeof this._write=="function")return this._write(r);if(typeof this._db._batch=="function")return this._db._batch(this._operations,t,r);e.nextTick(r)};t.exports=r}).call(this,e("_process"))},{_process:123}],6:[function(e,t,r){(function(e){function r(e){this.db=e;this._ended=false;this._nexting=false}r.prototype.next=function(t){var r=this;if(typeof t!="function")throw new Error("next() requires a callback argument");if(r._ended)return t(new Error("cannot call next() after end()"));if(r._nexting)return t(new Error("cannot call next() before previous next() has completed"));r._nexting=true;if(typeof r._next=="function"){return r._next(function(){r._nexting=false;t.apply(null,arguments)})}e.nextTick(function(){r._nexting=false;t()})};r.prototype.end=function(t){if(typeof t!="function")throw new Error("end() requires a callback argument");if(this._ended)return t(new Error("end() already called on iterator"));this._ended=true;if(typeof this._end=="function")return this._end(t);e.nextTick(t)};t.exports=r}).call(this,e("_process"))},{_process:123}],7:[function(e,t,r){(function(r,n){var i=e("xtend"),s=e("./abstract-iterator"),o=e("./abstract-chained-batch");function a(e){if(!arguments.length||e===undefined)throw new Error("constructor requires at least a location argument");if(typeof e!="string")throw new Error("constructor requires a location string argument");this.location=e}a.prototype.open=function(e,t){if(typeof e=="function")t=e;if(typeof t!="function")throw new Error("open() requires a callback argument");if(typeof e!="object")e={};if(typeof this._open=="function")return this._open(e,t);n.nextTick(t)};a.prototype.close=function(e){if(typeof e!="function")throw new Error("close() requires a callback argument");if(typeof this._close=="function")return this._close(e);n.nextTick(e)};a.prototype.get=function(e,t,r){var i;if(typeof t=="function")r=t;if(typeof r!="function")throw new Error("get() requires a callback argument");if(i=this._checkKeyValue(e,"key",this._isBuffer))return r(i);if(!this._isBuffer(e))e=String(e);if(typeof t!="object")t={};if(typeof this._get=="function")return this._get(e,t,r);n.nextTick(function(){r(new Error("NotFound"))})};a.prototype.put=function(e,t,r,i){var s;if(typeof r=="function")i=r;if(typeof i!="function")throw new Error("put() requires a callback argument");if(s=this._checkKeyValue(e,"key",this._isBuffer))return i(s);if(s=this._checkKeyValue(t,"value",this._isBuffer))return i(s);if(!this._isBuffer(e))e=String(e);if(!this._isBuffer(t)&&!n.browser)t=String(t);if(typeof r!="object")r={};if(typeof this._put=="function")return this._put(e,t,r,i);n.nextTick(i)};a.prototype.del=function(e,t,r){var i;if(typeof t=="function")r=t;if(typeof r!="function")throw new Error("del() requires a callback argument");if(i=this._checkKeyValue(e,"key",this._isBuffer))return r(i);if(!this._isBuffer(e))e=String(e);if(typeof t!="object")t={};if(typeof this._del=="function")return this._del(e,t,r);n.nextTick(r)};a.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if(typeof t=="function")r=t;if(typeof r!="function")throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return r(new Error("batch(array) requires an array argument"));if(typeof t!="object")t={};var i=0,s=e.length,o,a;for(;i<s;i++){o=e[i];if(typeof o!="object")continue;if(a=this._checkKeyValue(o.type,"type",this._isBuffer))return r(a);if(a=this._checkKeyValue(o.key,"key",this._isBuffer))return r(a);if(o.type=="put"){if(a=this._checkKeyValue(o.value,"value",this._isBuffer))return r(a)}}if(typeof this._batch=="function")return this._batch(e,t,r);n.nextTick(r)};a.prototype.approximateSize=function(e,t,r){if(e==null||t==null||typeof e=="function"||typeof t=="function"){throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments")}if(typeof r!="function")throw new Error("approximateSize() requires a callback argument");if(!this._isBuffer(e))e=String(e);if(!this._isBuffer(t))t=String(t);if(typeof this._approximateSize=="function")return this._approximateSize(e,t,r);n.nextTick(function(){r(null,0)})};a.prototype._setupIteratorOptions=function(e){var t=this;e=i(e);["start","end","gt","gte","lt","lte"].forEach(function(r){if(e[r]&&t._isBuffer(e[r])&&e[r].length===0)delete e[r]});e.reverse=!!e.reverse;if(e.reverse&&e.lt)e.start=e.lt;if(e.reverse&&e.lte)e.start=e.lte;if(!e.reverse&&e.gt)e.start=e.gt;if(!e.reverse&&e.gte)e.start=e.gte;if(e.reverse&&e.lt&&!e.lte||!e.reverse&&e.gt&&!e.gte)e.exclusiveStart=true;return e};a.prototype.iterator=function(e){if(typeof e!="object")e={};e=this._setupIteratorOptions(e);if(typeof this._iterator=="function")return this._iterator(e);return new s(this)};a.prototype._chainedBatch=function(){return new o(this)};a.prototype._isBuffer=function(e){return r.isBuffer(e)};a.prototype._checkKeyValue=function(e,t){if(e===null||e===undefined)return new Error(t+" cannot be `null` or `undefined`");if(e===null||e===undefined)return new Error(t+" cannot be `null` or `undefined`");if(this._isBuffer(e)){if(e.length===0)return new Error(t+" cannot be an empty Buffer")}else if(String(e)==="")return new Error(t+" cannot be an empty String")};t.exports.AbstractLevelDOWN=a;t.exports.AbstractIterator=s;t.exports.AbstractChainedBatch=o}).call(this,{isBuffer:e("../is-buffer/index.js")},e("_process"))},{"../is-buffer/index.js":59,"./abstract-chained-batch":5,"./abstract-iterator":6,_process:123,xtend:8}],8:[function(e,t,r){t.exports=n;function n(){var e={};for(var t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(r.hasOwnProperty(n)){e[n]=r[n]}}}return e}},{}],9:[function(e,t,r){"use strict";t.exports=n;function n(e){return function(){var t=arguments.length;if(t){var r=[];var n=-1;while(++n<t){r[n]=arguments[n]}return e.call(this,r)}else{return e.call(this,[])}}}},{}],10:[function(e,t,r){"use strict";var n=e("es-abstract/es6");t.exports=function i(e){var t=n.ToObject(this);var r=n.ToInteger(n.ToLength(t.length));if(!n.IsCallable(e)){throw new TypeError("Array#find: predicate must be a function")}if(r===0)return undefined;var i=arguments[1];for(var s=0,o;s<r;s++){o=t[s];if(n.Call(e,i,[o,s,t]))return o}return undefined}},{"es-abstract/es6":35}],11:[function(e,t,r){"use strict";var n=e("define-properties");var i=e("es-abstract/es6");var s=e("./implementation");var o=e("./polyfill");var a=e("./shim");var u=Array.prototype.slice;var l=function f(e,t){i.RequireObjectCoercible(e);return s.apply(e,t)};n(l,{implementation:s,getPolyfill:o,shim:a});t.exports=l},{"./implementation":10,"./polyfill":12,"./shim":13,"define-properties":27,"es-abstract/es6":35}],12:[function(e,t,r){"use strict";t.exports=function n(){var t=Array.prototype.find&&[,1].find(function(e,t){return t===0});return t?Array.prototype.find:e("./implementation")}},{"./implementation":10}],13:[function(e,t,r){"use strict";var n=e("define-properties");var i=e("./polyfill");t.exports=function s(){var e=i();n(Array.prototype,{find:e},{find:function(){return Array.prototype.find!==e}});return e}},{"./polyfill":12,"define-properties":27}],14:[function(e,t,r){(function(e){"use strict";var r=function(e,t,r){if(!Array.isArray(e))throw new TypeError("each() expects array as first argument");if(typeof t!=="function")throw new TypeError("each() expects function as second argument");if(typeof r!=="function")r=Function.prototype;if(e.length===0)return r(undefined,e);var n=new Array(e.length);var i=0;var s=false;e.forEach(function(o,a){t(o,function(t,o){if(s)return;if(t){s=true;return r(t)}n[a]=o;i+=1;if(i===e.length)return r(undefined,n)})})};if(typeof define!=="undefined"&&define.amd){define([],function(){return r})}else if(typeof t!=="undefined"&&t.exports){t.exports=r}else{e.asyncEach=r}})(this)},{}],15:[function(e,t,r){(function(e,n){if(typeof define==="function"&&define.amd){define([],function(){return e["Autolinker"]=n()})}else if(typeof r==="object"){t.exports=n()}else{e["Autolinker"]=n()}})(this,function(){var e=function(t){e.Util.assign(this,t)};e.prototype={constructor:e,urls:true,email:true,twitter:true,newWindow:true,stripPrefix:true,truncate:undefined,className:"",htmlParser:undefined,matchParser:undefined,tagBuilder:undefined,link:function(e){var t=this.getHtmlParser(),r=t.parse(e),n=0,i=[];for(var s=0,o=r.length;s<o;s++){var a=r[s],u=a.getType(),l=a.getText();if(u==="element"){if(a.getTagName()==="a"){if(!a.isClosing()){n++}else{n=Math.max(n-1,0)}}i.push(l)}else if(u==="entity"){i.push(l)}else{if(n===0){var f=this.linkifyStr(l);i.push(f)}else{i.push(l)}}}return i.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(t){var r;if(this.replaceFn){r=this.replaceFn.call(this,this,t)}if(typeof r==="string"){return r}else if(r===false){return t.getMatchedText()}else if(r instanceof e.HtmlTag){return r.toString()}else{var n=this.getTagBuilder(),i=n.build(t);return i.toString()}},getHtmlParser:function(){var t=this.htmlParser;if(!t){t=this.htmlParser=new e.htmlParser.HtmlParser}return t},getMatchParser:function(){var t=this.matchParser;if(!t){t=this.matchParser=new e.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})}return t},getTagBuilder:function(){var t=this.tagBuilder;if(!t){t=this.tagBuilder=new e.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})}return t}};e.link=function(t,r){var n=new e(r);return n.link(t)};e.match={};e.htmlParser={};e.matchParser={};e.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e},extend:function(t,r){var n=t.prototype;var i=function(){};i.prototype=n;var s;if(r.hasOwnProperty("constructor")){s=r.constructor}else{s=function(){n.constructor.apply(this,arguments)}}var o=s.prototype=new i;o.constructor=s;o.superclass=n;delete r.constructor;e.Util.assign(o,r);return s},ellipsis:function(e,t,r){if(e.length>t){r=r==null?"..":r;e=e.substring(0,t-r.length)+r}return e},indexOf:function(e,t){if(Array.prototype.indexOf){return e.indexOf(t)}else{for(var r=0,n=e.length;r<n;r++){if(e[r]===t)return r}return-1}},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");var r=[],n=0,i;while(i=t.exec(e)){r.push(e.substring(n,i.index));r.push(i[0]);n=i.index+i[0].length}r.push(e.substring(n));return r}};e.HtmlTag=e.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(t){e.Util.assign(this,t);this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){this.tagName=e;return this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){var r=this.getAttrs();r[e]=t;return this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(t){var r=this.getAttrs();e.Util.assign(r,t);return this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(t){var r=this.getClass(),n=this.whitespaceRegex,i=e.Util.indexOf,s=!r?[]:r.split(n),o=t.split(n),a;while(a=o.shift()){if(i(s,a)===-1){s.push(a)}}this.getAttrs()["class"]=s.join(" ");return this},removeClass:function(t){var r=this.getClass(),n=this.whitespaceRegex,i=e.Util.indexOf,s=!r?[]:r.split(n),o=t.split(n),a;while(s.length&&(a=o.shift())){var u=i(s,a);if(u!==-1){s.splice(u,1)}}this.getAttrs()["class"]=s.join(" ");return this},getClass:function(){return this.getAttrs()["class"]||""},hasClass:function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},setInnerHtml:function(e){this.innerHtml=e;return this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();t=t?" "+t:"";return["<",e,t,">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var r in e){if(e.hasOwnProperty(r)){t.push(r+'="'+e[r]+'"')}}return t.join(" ")}});e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){var r=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())});return r},createAttrs:function(e,t){var r={href:t};var n=this.createCssClass(e);if(n){r["class"]=n}if(this.newWindow){r["target"]="_blank"}return r},createCssClass:function(e){var t=this.className;if(!t)return"";else return t+" "+t+"-"+e},processAnchorText:function(e){e=this.doTruncate(e);return e},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}});e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z][0-9a-zA-Z:]*/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,r=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,n=t.source+"(?:\\s*=\\s*"+r.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",n,"|",r.source+")",")*",">",")","|","(?:","<(/)?","("+e.source+")","(?:","\\s+",n,")*","\\s*/?",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,parse:function(e){var t=this.htmlRegex,r,n=0,i,s=[];while((r=t.exec(e))!==null){var o=r[0],a=r[1]||r[3],u=!!r[2],l=e.substring(n,r.index);if(l){i=this.parseTextAndEntityNodes(l);s.push.apply(s,i)}s.push(this.createElementNode(o,a,u));n=r.index+o.length}if(n<e.length){var f=e.substring(n);if(f){i=this.parseTextAndEntityNodes(f);s.push.apply(s,i)}}return s},parseTextAndEntityNodes:function(t){var r=[],n=e.Util.splitAndCapture(t,this.htmlCharacterEntitiesRegex);for(var i=0,s=n.length;i<s;i+=2){var o=n[i],a=n[i+1];if(o)r.push(this.createTextNode(o));if(a)r.push(this.createEntityNode(a))}return r},createElementNode:function(t,r,n){return new e.htmlParser.ElementNode({text:t,tagName:r.toLowerCase(),closing:n})},createEntityNode:function(t){return new e.htmlParser.EntityNode({text:t})},createTextNode:function(t){return new e.htmlParser.TextNode({text:t})}});e.htmlParser.HtmlNode=e.Util.extend(Object,{text:"",constructor:function(t){e.Util.assign(this,t)},getType:e.Util.abstractMethod,getText:function(){return this.text}});e.htmlParser.ElementNode=e.Util.extend(e.htmlParser.HtmlNode,{tagName:"",closing:false,getType:function(){return"element"},getTagName:function(){return this.tagName},isClosing:function(){return this.closing}});e.htmlParser.EntityNode=e.Util.extend(e.htmlParser.HtmlNode,{getType:function(){return"entity"}});e.htmlParser.TextNode=e.Util.extend(e.htmlParser.HtmlNode,{getType:function(){return"text"}});e.matchParser.MatchParser=e.Util.extend(Object,{urls:true,email:true,twitter:true,stripPrefix:true,matcherRegex:function(){var e=/(^|[^\w])@(\w{1,15})/,t=/(?:[\-;:&=\+\$,\w\.]+@)/,r=/(?:[A-Za-z][-.+A-Za-z0-9]+:(?![A-Za-z][-.+A-Za-z0-9]+:\/\/)(?!\d+\/?)(?:\/\/)?)/,n=/(?:www\.)/,i=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,s=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,o=/[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]?!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]]/;return new RegExp(["(",e.source,")","|","(",t.source,i.source,s.source,")","|","(","(?:","(",r.source,i.source,")","|","(?:","(.?//)?",n.source,i.source,")","|","(?:","(.?//)?",i.source,s.source,")",")","(?:"+o.source+")?",")"].join(""),"gi")}(),charBeforeProtocolRelMatchRegex:/^(.)?\/\//,constructor:function(t){e.Util.assign(this,t);this.matchValidator=new e.MatchValidator},replace:function(e,t,r){var n=this;return e.replace(this.matcherRegex,function(e,i,s,o,a,u,l,f,c){var h=n.processCandidateMatch(e,i,s,o,a,u,l,f,c);if(!h){return e}else{var p=t.call(r,h.match);return h.prefixStr+p+h.suffixStr}})},processCandidateMatch:function(t,r,n,i,s,o,a,u,l){var f=u||l,c,h="",p="";if(r&&!this.twitter||s&&!this.email||o&&!this.urls||!this.matchValidator.isValidMatch(o,a,f)){return null}if(this.matchHasUnbalancedClosingParen(t)){t=t.substr(0,t.length-1);p=")"}if(s){c=new e.match.Email({matchedText:t,email:s})}else if(r){if(n){h=n;t=t.slice(1)}c=new e.match.Twitter({matchedText:t,twitterHandle:i})}else{if(f){var d=f.match(this.charBeforeProtocolRelMatchRegex)[1]||"";if(d){h=d;t=t.slice(1)}}c=new e.match.Url({matchedText:t,url:t,protocolUrlMatch:!!a,protocolRelativeMatch:!!f,stripPrefix:this.stripPrefix})}return{prefixStr:h,suffixStr:p,match:c}},matchHasUnbalancedClosingParen:function(e){var t=e.charAt(e.length-1);if(t===")"){var r=e.match(/\(/g),n=e.match(/\)/g),i=r&&r.length||0,s=n&&n.length||0;if(i<s){return true}}return false}});e.MatchValidator=e.Util.extend(Object,{invalidProtocolRelMatchRegex:/^[\w]\/\//,hasFullProtocolRegex:/^[A-Za-z][-.+A-Za-z0-9]+:\/\//,uriSchemeRegex:/^[A-Za-z][-.+A-Za-z0-9]+:/,hasWordCharAfterProtocolRegex:/:[^\s]*?[A-Za-z]/,isValidMatch:function(e,t,r){if(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)||this.isInvalidProtocolRelativeMatch(r)){return false}return true},isValidUriScheme:function(e){var t=e.match(this.uriSchemeRegex)[0].toLowerCase();return t!=="javascript:"&&t!=="vbscript:"},urlMatchDoesNotHaveProtocolOrDot:function(e,t){return!!e&&(!t||!this.hasFullProtocolRegex.test(t))&&e.indexOf(".")===-1},urlMatchDoesNotHaveAtLeastOneWordChar:function(e,t){if(e&&t){return!this.hasWordCharAfterProtocolRegex.test(e)}else{return false}},isInvalidProtocolRelativeMatch:function(e){return!!e&&this.invalidProtocolRelMatchRegex.test(e)}});e.match.Match=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},getType:e.Util.abstractMethod,getMatchedText:function(){return this.matchedText},getAnchorHref:e.Util.abstractMethod,getAnchorText:e.Util.abstractMethod});e.match.Email=e.Util.extend(e.match.Match,{getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}});e.match.Twitter=e.Util.extend(e.match.Match,{getType:function(){return"twitter"},getTwitterHandle:function(){return this.twitterHandle},getAnchorHref:function(){return"https://twitter.com/"+this.twitterHandle},getAnchorText:function(){return"@"+this.twitterHandle}});e.match.Url=e.Util.extend(e.match.Match,{urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,protocolPrepended:false,getType:function(){return"url"},getUrl:function(){var e=this.url;if(!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended){e=this.url="http://"+e;this.protocolPrepended=true}return e},getAnchorHref:function(){var e=this.getUrl();return e.replace(/&amp;/g,"&")},getAnchorText:function(){var e=this.getUrl();if(this.protocolRelativeMatch){e=this.stripProtocolRelativePrefix(e)}if(this.stripPrefix){e=this.stripUrlPrefix(e)}e=this.removeTrailingSlash(e);return e},stripUrlPrefix:function(e){return e.replace(this.urlPrefixRegex,"")},stripProtocolRelativePrefix:function(e){return e.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(e){if(e.charAt(e.length-1)==="/"){e=e.slice(0,-1)}return e}});return e})},{}],16:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(e){"use strict";var t=typeof Uint8Array!=="undefined"?Uint8Array:Array;var r="+".charCodeAt(0);var i="/".charCodeAt(0);var s="0".charCodeAt(0);var o="a".charCodeAt(0);var a="A".charCodeAt(0);var u="-".charCodeAt(0);var l="_".charCodeAt(0);function f(e){var t=e.charCodeAt(0);if(t===r||t===u)return 62;if(t===i||t===l)return 63;if(t<s)return-1;if(t<s+10)return t-s+26+26;if(t<a+26)return t-a;if(t<o+26)return t-o+26}function c(e){var r,n,i,s,o,a;if(e.length%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var u=e.length;o="="===e.charAt(u-2)?2:"="===e.charAt(u-1)?1:0;a=new t(e.length*3/4-o);i=o>0?e.length-4:e.length;var l=0;function c(e){a[l++]=e}for(r=0,n=0;r<i;r+=4,n+=3){s=f(e.charAt(r))<<18|f(e.charAt(r+1))<<12|f(e.charAt(r+2))<<6|f(e.charAt(r+3));c((s&16711680)>>16);c((s&65280)>>8);c(s&255)}if(o===2){s=f(e.charAt(r))<<2|f(e.charAt(r+1))>>4;c(s&255)}else if(o===1){s=f(e.charAt(r))<<10|f(e.charAt(r+1))<<4|f(e.charAt(r+2))>>2;c(s>>8&255);c(s&255)}return a}function h(e){var t,r=e.length%3,i="",s,o;function a(e){return n.charAt(e)}function u(e){return a(e>>18&63)+a(e>>12&63)+a(e>>6&63)+a(e&63)}for(t=0,o=e.length-r;t<o;t+=3){s=(e[t]<<16)+(e[t+1]<<8)+e[t+2];i+=u(s)}switch(r){case 1:s=e[e.length-1];i+=a(s>>2);i+=a(s<<4&63);i+="==";break;case 2:s=(e[e.length-2]<<8)+e[e.length-1];i+=a(s>>10);i+=a(s>>4&63);i+=a(s<<2&63);i+="=";break}return i}e.toByteArray=c;e.fromByteArray=h})(typeof r==="undefined"?this.base64js={}:r)},{}],17:[function(e,t,r){},{}],18:[function(e,t,r){(function(t){"use strict";var n=e("base64-js");var i=e("ieee754");var s=e("isarray");r.Buffer=l;r.SlowBuffer=k;r.INSPECT_MAX_BYTES=50;l.poolSize=8192;var o={};l.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:a();function a(){function e(){}try{var t=new Uint8Array(1);t.foo=function(){return 42};t.constructor=e;return t.foo()===42&&t.constructor===e&&typeof t.subarray==="function"&&t.subarray(1,1).byteLength===0}catch(r){return false}}function u(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e){if(!(this instanceof l)){if(arguments.length>1)return new l(e,arguments[1]);return new l(e)}if(!l.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined}if(typeof e==="number"){return f(this,e)}if(typeof e==="string"){return c(this,e,arguments.length>1?arguments[1]:"utf8")}return h(this,e)}function f(e,t){e=b(e,t<0?0:w(t)|0);if(!l.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;r++){e[r]=0}}return e}function c(e,t,r){if(typeof r!=="string"||r==="")r="utf8";var n=x(t,r)|0;e=b(e,n);e.write(t,r);return e}function h(e,t){if(l.isBuffer(t))return p(e,t);if(s(t))return d(e,t);if(t==null){throw new TypeError("must start with number, buffer, array or string")}if(typeof ArrayBuffer!=="undefined"){if(t.buffer instanceof ArrayBuffer){return v(e,t)}if(t instanceof ArrayBuffer){return g(e,t)}}if(t.length)return m(e,t);return y(e,t)}function p(e,t){var r=w(t.length)|0;e=b(e,r);t.copy(e,0,0,r);return e}function d(e,t){var r=w(t.length)|0;e=b(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function v(e,t){var r=w(t.length)|0;e=b(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function g(e,t){if(l.TYPED_ARRAY_SUPPORT){t.byteLength;e=l._augment(new Uint8Array(t))}else{e=v(e,new Uint8Array(t))}return e}function m(e,t){var r=w(t.length)|0;e=b(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function y(e,t){var r;var n=0;if(t.type==="Buffer"&&s(t.data)){r=t.data;n=w(r.length)|0}e=b(e,n);for(var i=0;i<n;i+=1){e[i]=r[i]&255}return e}if(l.TYPED_ARRAY_SUPPORT){l.prototype.__proto__=Uint8Array.prototype;l.__proto__=Uint8Array}else{l.prototype.length=undefined;l.prototype.parent=undefined}function b(e,t){if(l.TYPED_ARRAY_SUPPORT){e=l._augment(new Uint8Array(t));e.__proto__=l.prototype}else{e.length=t;e._isBuffer=true}var r=t!==0&&t<=l.poolSize>>>1;if(r)e.parent=o;return e}function w(e){if(e>=u()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+u().toString(16)+" bytes")}return e|0}function k(e,t){if(!(this instanceof k))return new k(e,t);var r=new l(e,t);delete r.parent;return r}l.isBuffer=function te(e){return!!(e!=null&&e._isBuffer)};l.compare=function re(e,t){if(!l.isBuffer(e)||!l.isBuffer(t)){throw new TypeError("Arguments must be Buffers")}if(e===t)return 0;var r=e.length;var n=t.length;var i=0;var s=Math.min(r,n);while(i<s){if(e[i]!==t[i])break;++i}if(i!==s){r=e[i];n=t[i]}if(r<n)return-1;if(n<r)return 1;return 0};l.isEncoding=function ne(e){switch(String(e).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 true;default:return false}};l.concat=function ie(e,t){if(!s(e))throw new TypeError("list argument must be an Array of Buffers.");if(e.length===0){return new l(0)}var r;if(t===undefined){t=0;for(r=0;r<e.length;r++){t+=e[r].length}}var n=new l(t);var i=0;for(r=0;r<e.length;r++){var o=e[r];o.copy(n,i);i+=o.length}return n};function x(e,t){if(typeof e!=="string")e=""+e;var r=e.length;if(r===0)return 0;var n=false;for(;;){switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return Z(e).length;t=(""+t).toLowerCase();n=true}}}l.byteLength=x;function _(e,t,r){var n=false;t=t|0;r=r===undefined||r===Infinity?this.length:r|0;if(!e)e="utf8";if(t<0)t=0;if(r>this.length)r=this.length;if(r<=t)return"";while(true){switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return q(this,t,r);case"ascii":return I(this,t,r);case"binary":return N(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}l.prototype.toString=function se(){var e=this.length|0;if(e===0)return"";if(arguments.length===0)return q(this,0,e);return _.apply(this,arguments)};l.prototype.equals=function oe(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(this===e)return true;return l.compare(this,e)===0};l.prototype.inspect=function ae(){var e="";var t=r.INSPECT_MAX_BYTES;if(this.length>0){e=this.toString("hex",0,t).match(/.{2}/g).join(" ");if(this.length>t)e+=" ... "}return"<Buffer "+e+">"};l.prototype.compare=function ue(e){ if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(this===e)return 0;return l.compare(this,e)};l.prototype.indexOf=function le(e,t){if(t>2147483647)t=2147483647;else if(t<-2147483648)t=-2147483648;t>>=0;if(this.length===0)return-1;if(t>=this.length)return-1;if(t<0)t=Math.max(this.length+t,0);if(typeof e==="string"){if(e.length===0)return-1;return String.prototype.indexOf.call(this,e,t)}if(l.isBuffer(e)){return r(this,e,t)}if(typeof e==="number"){if(l.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,e,t)}return r(this,[e],t)}function r(e,t,r){var n=-1;for(var i=0;r+i<e.length;i++){if(e[r+i]===t[n===-1?0:i-n]){if(n===-1)n=i;if(i-n+1===t.length)return r+n}else{n=-1}}return-1}throw new TypeError("val must be string, number or Buffer")};l.prototype.get=function fe(e){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(e)};l.prototype.set=function ce(e,t){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(e,t)};function E(e,t,r,n){r=Number(r)||0;var i=e.length-r;if(!n){n=i}else{n=Number(n);if(n>i){n=i}}var s=t.length;if(s%2!==0)throw new Error("Invalid hex string");if(n>s/2){n=s/2}for(var o=0;o<n;o++){var a=parseInt(t.substr(o*2,2),16);if(isNaN(a))throw new Error("Invalid hex string");e[r+o]=a}return o}function A(e,t,r,n){return ee(Z(t,e.length-r),e,r,n)}function S(e,t,r,n){return ee(J(t),e,r,n)}function T(e,t,r,n){return S(e,t,r,n)}function C(e,t,r,n){return ee(X(t),e,r,n)}function j(e,t,r,n){return ee(Q(t,e.length-r),e,r,n)}l.prototype.write=function he(e,t,r,n){if(t===undefined){n="utf8";r=this.length;t=0}else if(r===undefined&&typeof t==="string"){n=t;r=this.length;t=0}else if(isFinite(t)){t=t|0;if(isFinite(r)){r=r|0;if(n===undefined)n="utf8"}else{n=r;r=undefined}}else{var i=n;n=t;t=r|0;r=i}var s=this.length-t;if(r===undefined||r>s)r=s;if(e.length>0&&(r<0||t<0)||t>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!n)n="utf8";var o=false;for(;;){switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return S(this,e,t,r);case"binary":return T(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase();o=true}}};l.prototype.toJSON=function pe(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,r){if(t===0&&r===e.length){return n.fromByteArray(e)}else{return n.fromByteArray(e.slice(t,r))}}function q(e,t,r){r=Math.min(e.length,r);var n=[];var i=t;while(i<r){var s=e[i];var o=null;var a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){var u,l,f,c;switch(a){case 1:if(s<128){o=s}break;case 2:u=e[i+1];if((u&192)===128){c=(s&31)<<6|u&63;if(c>127){o=c}}break;case 3:u=e[i+1];l=e[i+2];if((u&192)===128&&(l&192)===128){c=(s&15)<<12|(u&63)<<6|l&63;if(c>2047&&(c<55296||c>57343)){o=c}}break;case 4:u=e[i+1];l=e[i+2];f=e[i+3];if((u&192)===128&&(l&192)===128&&(f&192)===128){c=(s&15)<<18|(u&63)<<12|(l&63)<<6|f&63;if(c>65535&&c<1114112){o=c}}}}if(o===null){o=65533;a=1}else if(o>65535){o-=65536;n.push(o>>>10&1023|55296);o=56320|o&1023}n.push(o);i+=a}return R(n)}var L=4096;function R(e){var t=e.length;if(t<=L){return String.fromCharCode.apply(String,e)}var r="";var n=0;while(n<t){r+=String.fromCharCode.apply(String,e.slice(n,n+=L))}return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;i++){n+=String.fromCharCode(e[i]&127)}return n}function N(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;i++){n+=String.fromCharCode(e[i])}return n}function P(e,t,r){var n=e.length;if(!t||t<0)t=0;if(!r||r<0||r>n)r=n;var i="";for(var s=t;s<r;s++){i+=Y(e[s])}return i}function D(e,t,r){var n=e.slice(t,r);var i="";for(var s=0;s<n.length;s+=2){i+=String.fromCharCode(n[s]+n[s+1]*256)}return i}l.prototype.slice=function de(e,t){var r=this.length;e=~~e;t=t===undefined?r:~~t;if(e<0){e+=r;if(e<0)e=0}else if(e>r){e=r}if(t<0){t+=r;if(t<0)t=0}else if(t>r){t=r}if(t<e)t=e;var n;if(l.TYPED_ARRAY_SUPPORT){n=l._augment(this.subarray(e,t))}else{var i=t-e;n=new l(i,undefined);for(var s=0;s<i;s++){n[s]=this[s+e]}}if(n.length)n.parent=this.parent||this;return n};function M(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUIntLE=function ve(e,t,r){e=e|0;t=t|0;if(!r)M(e,t,this.length);var n=this[e];var i=1;var s=0;while(++s<t&&(i*=256)){n+=this[e+s]*i}return n};l.prototype.readUIntBE=function ge(e,t,r){e=e|0;t=t|0;if(!r){M(e,t,this.length)}var n=this[e+--t];var i=1;while(t>0&&(i*=256)){n+=this[e+--t]*i}return n};l.prototype.readUInt8=function me(e,t){if(!t)M(e,1,this.length);return this[e]};l.prototype.readUInt16LE=function ye(e,t){if(!t)M(e,2,this.length);return this[e]|this[e+1]<<8};l.prototype.readUInt16BE=function be(e,t){if(!t)M(e,2,this.length);return this[e]<<8|this[e+1]};l.prototype.readUInt32LE=function we(e,t){if(!t)M(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};l.prototype.readUInt32BE=function ke(e,t){if(!t)M(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};l.prototype.readIntLE=function xe(e,t,r){e=e|0;t=t|0;if(!r)M(e,t,this.length);var n=this[e];var i=1;var s=0;while(++s<t&&(i*=256)){n+=this[e+s]*i}i*=128;if(n>=i)n-=Math.pow(2,8*t);return n};l.prototype.readIntBE=function _e(e,t,r){e=e|0;t=t|0;if(!r)M(e,t,this.length);var n=t;var i=1;var s=this[e+--n];while(n>0&&(i*=256)){s+=this[e+--n]*i}i*=128;if(s>=i)s-=Math.pow(2,8*t);return s};l.prototype.readInt8=function Ee(e,t){if(!t)M(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};l.prototype.readInt16LE=function Ae(e,t){if(!t)M(e,2,this.length);var r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};l.prototype.readInt16BE=function Se(e,t){if(!t)M(e,2,this.length);var r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};l.prototype.readInt32LE=function Te(e,t){if(!t)M(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};l.prototype.readInt32BE=function Ce(e,t){if(!t)M(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};l.prototype.readFloatLE=function je(e,t){if(!t)M(e,4,this.length);return i.read(this,e,true,23,4)};l.prototype.readFloatBE=function Oe(e,t){if(!t)M(e,4,this.length);return i.read(this,e,false,23,4)};l.prototype.readDoubleLE=function qe(e,t){if(!t)M(e,8,this.length);return i.read(this,e,true,52,8)};l.prototype.readDoubleBE=function Le(e,t){if(!t)M(e,8,this.length);return i.read(this,e,false,52,8)};function B(e,t,r,n,i,s){if(!l.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||t<s)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range")}l.prototype.writeUIntLE=function Re(e,t,r,n){e=+e;t=t|0;r=r|0;if(!n)B(this,e,t,r,Math.pow(2,8*r),0);var i=1;var s=0;this[t]=e&255;while(++s<r&&(i*=256)){this[t+s]=e/i&255}return t+r};l.prototype.writeUIntBE=function Ie(e,t,r,n){e=+e;t=t|0;r=r|0;if(!n)B(this,e,t,r,Math.pow(2,8*r),0);var i=r-1;var s=1;this[t+i]=e&255;while(--i>=0&&(s*=256)){this[t+i]=e/s&255}return t+r};l.prototype.writeUInt8=function Ne(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,1,255,0);if(!l.TYPED_ARRAY_SUPPORT)e=Math.floor(e);this[t]=e&255;return t+1};function U(e,t,r,n){if(t<0)t=65535+t+1;for(var i=0,s=Math.min(e.length-r,2);i<s;i++){e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}}l.prototype.writeUInt16LE=function Pe(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,2,65535,0);if(l.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{U(this,e,t,true)}return t+2};l.prototype.writeUInt16BE=function De(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,2,65535,0);if(l.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{U(this,e,t,false)}return t+2};function F(e,t,r,n){if(t<0)t=4294967295+t+1;for(var i=0,s=Math.min(e.length-r,4);i<s;i++){e[r+i]=t>>>(n?i:3-i)*8&255}}l.prototype.writeUInt32LE=function Me(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,4,4294967295,0);if(l.TYPED_ARRAY_SUPPORT){this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=e&255}else{F(this,e,t,true)}return t+4};l.prototype.writeUInt32BE=function Be(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,4,4294967295,0);if(l.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{F(this,e,t,false)}return t+4};l.prototype.writeIntLE=function Ue(e,t,r,n){e=+e;t=t|0;if(!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var s=0;var o=1;var a=e<0?1:0;this[t]=e&255;while(++s<r&&(o*=256)){this[t+s]=(e/o>>0)-a&255}return t+r};l.prototype.writeIntBE=function Fe(e,t,r,n){e=+e;t=t|0;if(!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var s=r-1;var o=1;var a=e<0?1:0;this[t+s]=e&255;while(--s>=0&&(o*=256)){this[t+s]=(e/o>>0)-a&255}return t+r};l.prototype.writeInt8=function ze(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,1,127,-128);if(!l.TYPED_ARRAY_SUPPORT)e=Math.floor(e);if(e<0)e=255+e+1;this[t]=e&255;return t+1};l.prototype.writeInt16LE=function Ve(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,2,32767,-32768);if(l.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{U(this,e,t,true)}return t+2};l.prototype.writeInt16BE=function He(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,2,32767,-32768);if(l.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{U(this,e,t,false)}return t+2};l.prototype.writeInt32LE=function We(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,4,2147483647,-2147483648);if(l.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24}else{F(this,e,t,true)}return t+4};l.prototype.writeInt32BE=function $e(e,t,r){e=+e;t=t|0;if(!r)B(this,e,t,4,2147483647,-2147483648);if(e<0)e=4294967295+e+1;if(l.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{F(this,e,t,false)}return t+4};function z(e,t,r,n,i,s){if(t>i||t<s)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range");if(r<0)throw new RangeError("index out of range")}function V(e,t,r,n,s){if(!s){z(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38)}i.write(e,t,r,n,23,4);return r+4}l.prototype.writeFloatLE=function Ge(e,t,r){return V(this,e,t,true,r)};l.prototype.writeFloatBE=function Ke(e,t,r){return V(this,e,t,false,r)};function H(e,t,r,n,s){if(!s){z(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308)}i.write(e,t,r,n,52,8);return r+8}l.prototype.writeDoubleLE=function Ye(e,t,r){return H(this,e,t,true,r)};l.prototype.writeDoubleBE=function Ze(e,t,r){return H(this,e,t,false,r)};l.prototype.copy=function Je(e,t,r,n){if(!r)r=0;if(!n&&n!==0)n=this.length;if(t>=e.length)t=e.length;if(!t)t=0;if(n>0&&n<r)n=r;if(n===r)return 0;if(e.length===0||this.length===0)return 0;if(t<0){throw new RangeError("targetStart out of bounds")}if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");if(n>this.length)n=this.length;if(e.length-t<n-r){n=e.length-t+r}var i=n-r;var s;if(this===e&&r<t&&t<n){for(s=i-1;s>=0;s--){e[s+t]=this[s+r]}}else if(i<1e3||!l.TYPED_ARRAY_SUPPORT){for(s=0;s<i;s++){e[s+t]=this[s+r]}}else{e._set(this.subarray(r,r+i),t)}return i};l.prototype.fill=function Qe(e,t,r){if(!e)e=0;if(!t)t=0;if(!r)r=this.length;if(r<t)throw new RangeError("end < start");if(r===t)return;if(this.length===0)return;if(t<0||t>=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var n;if(typeof e==="number"){for(n=t;n<r;n++){this[n]=e}}else{var i=Z(e.toString());var s=i.length;for(n=t;n<r;n++){this[n]=i[n%s]}}return this};l.prototype.toArrayBuffer=function Xe(){if(typeof Uint8Array!=="undefined"){if(l.TYPED_ARRAY_SUPPORT){return new l(this).buffer}else{var e=new Uint8Array(this.length);for(var t=0,r=e.length;t<r;t+=1){e[t]=this[t]}return e.buffer}}else{throw new TypeError("Buffer.toArrayBuffer not supported in this browser")}};var W=l.prototype;l._augment=function et(e){e.constructor=l;e._isBuffer=true;e._set=e.set;e.get=W.get;e.set=W.set;e.write=W.write;e.toString=W.toString;e.toLocaleString=W.toString;e.toJSON=W.toJSON;e.equals=W.equals;e.compare=W.compare;e.indexOf=W.indexOf;e.copy=W.copy;e.slice=W.slice;e.readUIntLE=W.readUIntLE;e.readUIntBE=W.readUIntBE;e.readUInt8=W.readUInt8;e.readUInt16LE=W.readUInt16LE;e.readUInt16BE=W.readUInt16BE;e.readUInt32LE=W.readUInt32LE;e.readUInt32BE=W.readUInt32BE;e.readIntLE=W.readIntLE;e.readIntBE=W.readIntBE;e.readInt8=W.readInt8;e.readInt16LE=W.readInt16LE;e.readInt16BE=W.readInt16BE;e.readInt32LE=W.readInt32LE;e.readInt32BE=W.readInt32BE;e.readFloatLE=W.readFloatLE;e.readFloatBE=W.readFloatBE;e.readDoubleLE=W.readDoubleLE;e.readDoubleBE=W.readDoubleBE;e.writeUInt8=W.writeUInt8;e.writeUIntLE=W.writeUIntLE;e.writeUIntBE=W.writeUIntBE;e.writeUInt16LE=W.writeUInt16LE;e.writeUInt16BE=W.writeUInt16BE;e.writeUInt32LE=W.writeUInt32LE;e.writeUInt32BE=W.writeUInt32BE;e.writeIntLE=W.writeIntLE;e.writeIntBE=W.writeIntBE;e.writeInt8=W.writeInt8;e.writeInt16LE=W.writeInt16LE;e.writeInt16BE=W.writeInt16BE;e.writeInt32LE=W.writeInt32LE;e.writeInt32BE=W.writeInt32BE;e.writeFloatLE=W.writeFloatLE;e.writeFloatBE=W.writeFloatBE;e.writeDoubleLE=W.writeDoubleLE;e.writeDoubleBE=W.writeDoubleBE;e.fill=W.fill;e.inspect=W.inspect;e.toArrayBuffer=W.toArrayBuffer;return e};var $=/[^+\/0-9A-Za-z-_]/g;function G(e){e=K(e).replace($,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function K(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function Y(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function Z(e,t){t=t||Infinity;var r;var n=e.length;var i=null;var s=[];for(var o=0;o<n;o++){r=e.charCodeAt(o);if(r>55295&&r<57344){if(!i){if(r>56319){if((t-=3)>-1)s.push(239,191,189);continue}else if(o+1===n){if((t-=3)>-1)s.push(239,191,189);continue}i=r;continue}if(r<56320){if((t-=3)>-1)s.push(239,191,189);i=r;continue}r=(i-55296<<10|r-56320)+65536}else if(i){if((t-=3)>-1)s.push(239,191,189)}i=null;if(r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return s}function J(e){var t=[];for(var r=0;r<e.length;r++){t.push(e.charCodeAt(r)&255)}return t}function Q(e,t){var r,n,i;var s=[];for(var o=0;o<e.length;o++){if((t-=2)<0)break;r=e.charCodeAt(o);n=r>>8;i=r%256;s.push(i);s.push(n)}return s}function X(e){return n.toByteArray(G(e))}function ee(e,t,r,n){for(var i=0;i<n;i++){if(i+r>=t.length||i>=e.length)break;t[i+r]=e[i]}return i}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":16,ieee754:57,isarray:19}],19:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)=="[object Array]"}},{}],20:[function(e,t,r){if(typeof t!=="undefined"){t.exports=n}function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype){e[t]=n.prototype[t]}return e}n.prototype.on=n.prototype.addEventListener=function(e,t){this._callbacks=this._callbacks||{};(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t);return this};n.prototype.once=function(e,t){function r(){this.off(e,r);t.apply(this,arguments)}r.fn=t;this.on(e,r);return this};n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length){delete this._callbacks["$"+e];return this}var n;for(var i=0;i<r.length;i++){n=r[i];if(n===t||n.fn===t){r.splice(i,1);break}}return this};n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n){r[n].apply(this,t)}}return this};n.prototype.listeners=function(e){this._callbacks=this._callbacks||{};return this._callbacks["$"+e]||[]};n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],21:[function(e,t,r){(function(e){function t(e){if(Array.isArray){return Array.isArray(e)}return g(e)==="[object Array]"}r.isArray=t;function n(e){return typeof e==="boolean"}r.isBoolean=n;function i(e){return e===null}r.isNull=i;function s(e){return e==null}r.isNullOrUndefined=s;function o(e){return typeof e==="number"}r.isNumber=o;function a(e){return typeof e==="string"}r.isString=a;function u(e){return typeof e==="symbol"}r.isSymbol=u;function l(e){return e===void 0}r.isUndefined=l;function f(e){return g(e)==="[object RegExp]"}r.isRegExp=f;function c(e){return typeof e==="object"&&e!==null}r.isObject=c;function h(e){return g(e)==="[object Date]"}r.isDate=h;function p(e){return g(e)==="[object Error]"||e instanceof Error}r.isError=p;function d(e){return typeof e==="function"}r.isFunction=d;function v(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}r.isPrimitive=v;r.isBuffer=e.isBuffer;function g(e){return Object.prototype.toString.call(e)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":59}],22:[function(e,t,r){var n=e("buffer").Buffer;var i=".PYFGCRLAOEUIDHTNSQJKXBMWVZ_pyfgcrlaoeuidhtnsqjkxbmwvz1234567890".split("").sort().join("");t.exports=function(e,t){e=e||i;t=t||{};if(e.length!==64)throw new Error("a base 64 encoding requires 64 chars");var r=new n(128);r.fill();for(var s=0;s<64;s++){var o=e.charCodeAt(s);r[o]=s}t.encode=function(t){var r="",n=t.length,i=0;for(var s=0;s<n;s++){var o=t[s];switch(s%3){case 0:r+=e[o>>2];i=(o&3)<<4;break;case 1:r+=e[i|o>>4];i=(o&15)<<2;break;case 2:r+=e[i|o>>6];r+=e[o&63];i=0;break}}if(n%3)r+=e[i];return r};t.decode=function(e){var t=e.length,i=0;var s=new n(~~(t/4*