Skip to content

Instantly share code, notes, and snippets.

@yukulele
Created August 29, 2017 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukulele/5c3c0084d995011b99cc0edfe1688bb2 to your computer and use it in GitHub Desktop.
Save yukulele/5c3c0084d995011b99cc0edfe1688bb2 to your computer and use it in GitHub Desktop.
client side prettier
This file has been truncated, but you can view the full file.
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var asn1=exports;asn1.bignum=require("bn.js");asn1.define=require("./asn1/api").define;asn1.base=require("./asn1/base");asn1.constants=require("./asn1/constants");asn1.decoders=require("./asn1/decoders");asn1.encoders=require("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":17}],2:[function(require,module,exports){var asn1=require("../asn1");var inherits=require("inherits");var api=exports;api.define=function define(name,body){return new Entity(name,body)};function Entity(name,body){this.name=name;this.body=body;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(base){var named;try{named=require("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){named=function(entity){this._initNamed(entity)}}inherits(named,base);named.prototype._initNamed=function initnamed(entity){base.call(this,entity)};return new named(this)};Entity.prototype._getDecoder=function _getDecoder(enc){enc=enc||"der";if(!this.decoders.hasOwnProperty(enc))this.decoders[enc]=this._createNamed(asn1.decoders[enc]);return this.decoders[enc]};Entity.prototype.decode=function decode(data,enc,options){return this._getDecoder(enc).decode(data,options)};Entity.prototype._getEncoder=function _getEncoder(enc){enc=enc||"der";if(!this.encoders.hasOwnProperty(enc))this.encoders[enc]=this._createNamed(asn1.encoders[enc]);return this.encoders[enc]};Entity.prototype.encode=function encode(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},{"../asn1":1,inherits:101,vm:166}],3:[function(require,module,exports){var inherits=require("inherits");var Reporter=require("../base").Reporter;var Buffer=require("buffer").Buffer;function DecoderBuffer(base,options){Reporter.call(this,options);if(!Buffer.isBuffer(base)){this.error("Input not Buffer");return}this.base=base;this.offset=0;this.length=base.length}inherits(DecoderBuffer,Reporter);exports.DecoderBuffer=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(save){var res=new DecoderBuffer(this.base);res.offset=save.offset;res.length=this.offset;this.offset=save.offset;Reporter.prototype.restore.call(this,save.reporter);return res};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(fail){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(fail||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");var res=new DecoderBuffer(this.base);res._reporterState=this._reporterState;res.offset=this.offset;res.length=this.offset+bytes;this.offset+=bytes;return res};DecoderBuffer.prototype.raw=function raw(save){return this.base.slice(save?save.offset:this.offset,this.length)};function EncoderBuffer(value,reporter){if(Array.isArray(value)){this.length=0;this.value=value.map(function(item){if(!(item instanceof EncoderBuffer))item=new EncoderBuffer(item,reporter);this.length+=item.length;return item},this)}else if(typeof value==="number"){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value;this.length=1}else if(typeof value==="string"){this.value=value;this.length=Buffer.byteLength(value)}else if(Buffer.isBuffer(value)){this.value=value;this.length=value.length}else{return reporter.error("Unsupported type: "+typeof value)}}exports.EncoderBuffer=EncoderBuffer;EncoderBuffer.prototype.join=function join(out,offset){if(!out)out=new Buffer(this.length);if(!offset)offset=0;if(this.length===0)return out;if(Array.isArray(this.value)){this.value.forEach(function(item){item.join(out,offset);offset+=item.length})}else{if(typeof this.value==="number")out[offset]=this.value;else if(typeof this.value==="string")out.write(this.value,offset);else if(Buffer.isBuffer(this.value))this.value.copy(out,offset);offset+=this.length}return out}},{"../base":4,buffer:47,inherits:101}],4:[function(require,module,exports){var base=exports;base.Reporter=require("./reporter").Reporter;base.DecoderBuffer=require("./buffer").DecoderBuffer;base.EncoderBuffer=require("./buffer").EncoderBuffer;base.Node=require("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(require,module,exports){var Reporter=require("../base").Reporter;var EncoderBuffer=require("../base").EncoderBuffer;var DecoderBuffer=require("../base").DecoderBuffer;var assert=require("minimalistic-assert");var tags=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"];var methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags);var overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(enc,parent){var state={};this._baseState=state;state.enc=enc;state.parent=parent||null;state.children=null;state.tag=null;state.args=null;state.reverseArgs=null;state.choice=null;state.optional=false;state.any=false;state.obj=false;state.use=null;state.useDecoder=null;state.key=null;state["default"]=null;state.explicit=null;state.implicit=null;state.contains=null;if(!state.parent){state.children=[];this._wrap()}}module.exports=Node;var stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var state=this._baseState;var cstate={};stateProps.forEach(function(prop){cstate[prop]=state[prop]});var res=new this.constructor(cstate.parent);res._baseState=cstate;return res};Node.prototype._wrap=function wrap(){var state=this._baseState;methods.forEach(function(method){this[method]=function _wrappedMethod(){var clone=new this.constructor(this);state.children.push(clone);return clone[method].apply(clone,arguments)}},this)};Node.prototype._init=function init(body){var state=this._baseState;assert(state.parent===null);body.call(this);state.children=state.children.filter(function(child){return child._baseState.parent===this},this);assert.equal(state.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(args){var state=this._baseState;var children=args.filter(function(arg){return arg instanceof this.constructor},this);args=args.filter(function(arg){return!(arg instanceof this.constructor)},this);if(children.length!==0){assert(state.children===null);state.children=children;children.forEach(function(child){child._baseState.parent=this},this)}if(args.length!==0){assert(state.args===null);state.args=args;state.reverseArgs=args.map(function(arg){if(typeof arg!=="object"||arg.constructor!==Object)return arg;var res={};Object.keys(arg).forEach(function(key){if(key==(key|0))key|=0;var value=arg[key];res[value]=key});return res})}};overrided.forEach(function(method){Node.prototype[method]=function _overrided(){var state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}});tags.forEach(function(tag){Node.prototype[tag]=function _tagMethod(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);assert(state.tag===null);state.tag=tag;this._useArgs(args);return this}});Node.prototype.use=function use(item){assert(item);var state=this._baseState;assert(state.use===null);state.use=item;return this};Node.prototype.optional=function optional(){var state=this._baseState;state.optional=true;return this};Node.prototype.def=function def(val){var state=this._baseState;assert(state["default"]===null);state["default"]=val;state.optional=true;return this};Node.prototype.explicit=function explicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.explicit=num;return this};Node.prototype.implicit=function implicit(num){var state=this._baseState;assert(state.explicit===null&&state.implicit===null);state.implicit=num;return this};Node.prototype.obj=function obj(){var state=this._baseState;var args=Array.prototype.slice.call(arguments);state.obj=true;if(args.length!==0)this._useArgs(args);return this};Node.prototype.key=function key(newKey){var state=this._baseState;assert(state.key===null);state.key=newKey;return this};Node.prototype.any=function any(){var state=this._baseState;state.any=true;return this};Node.prototype.choice=function choice(obj){var state=this._baseState;assert(state.choice===null);state.choice=obj;this._useArgs(Object.keys(obj).map(function(key){return obj[key]}));return this};Node.prototype.contains=function contains(item){var state=this._baseState;assert(state.use===null);state.contains=item;return this};Node.prototype._decode=function decode(input,options){var state=this._baseState;if(state.parent===null)return input.wrapResult(state.children[0]._decode(input,options));var result=state["default"];var present=true;var prevKey=null;if(state.key!==null)prevKey=input.enterKey(state.key);if(state.optional){var tag=null;if(state.explicit!==null)tag=state.explicit;else if(state.implicit!==null)tag=state.implicit;else if(state.tag!==null)tag=state.tag;if(tag===null&&!state.any){var save=input.save();try{if(state.choice===null)this._decodeGeneric(state.tag,input,options);else this._decodeChoice(input,options);present=true}catch(e){present=false}input.restore(save)}else{present=this._peekTag(input,tag,state.any);if(input.isError(present))return present}}var prevObj;if(state.obj&&present)prevObj=input.enterObject();if(present){if(state.explicit!==null){var explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}var start=input.offset;if(state.use===null&&state.choice===null){if(state.any)var save=input.save();var body=this._decodeTag(input,state.implicit!==null?state.implicit:state.tag,state.any);if(input.isError(body))return body;if(state.any)result=input.raw(save);else input=body}if(options&&options.track&&state.tag!==null)options.track(input.path(),start,input.length,"tagged");if(options&&options.track&&state.tag!==null)options.track(input.path(),input.offset,input.length,"content");if(state.any)result=result;else if(state.choice===null)result=this._decodeGeneric(state.tag,input,options);else result=this._decodeChoice(input,options);if(input.isError(result))return result;if(!state.any&&state.choice===null&&state.children!==null){state.children.forEach(function decodeChildren(child){child._decode(input,options)})}if(state.contains&&(state.tag==="octstr"||state.tag==="bitstr")){var data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}if(state.obj&&present)result=input.leaveObject(prevObj);if(state.key!==null&&(result!==null||present===true))input.leaveKey(prevKey,state.key,result);else if(prevKey!==null)input.exitKey(prevKey);return result};Node.prototype._decodeGeneric=function decodeGeneric(tag,input,options){var state=this._baseState;if(tag==="seq"||tag==="set")return null;if(tag==="seqof"||tag==="setof")return this._decodeList(input,tag,state.args[0],options);else if(/str$/.test(tag))return this._decodeStr(input,tag,options);else if(tag==="objid"&&state.args)return this._decodeObjid(input,state.args[0],state.args[1],options);else if(tag==="objid")return this._decodeObjid(input,null,null,options);else if(tag==="gentime"||tag==="utctime")return this._decodeTime(input,tag,options);else if(tag==="null_")return this._decodeNull(input,options);else if(tag==="bool")return this._decodeBool(input,options);else if(tag==="objDesc")return this._decodeStr(input,tag,options);else if(tag==="int"||tag==="enum")return this._decodeInt(input,state.args&&state.args[0],options);if(state.use!==null){return this._getUse(state.use,input._reporterState.obj)._decode(input,options)}else{return input.error("unknown tag: "+tag)}};Node.prototype._getUse=function _getUse(entity,obj){var state=this._baseState;state.useDecoder=this._use(entity,obj);assert(state.useDecoder._baseState.parent===null);state.useDecoder=state.useDecoder._baseState.children[0];if(state.implicit!==state.useDecoder._baseState.implicit){state.useDecoder=state.useDecoder.clone();state.useDecoder._baseState.implicit=state.implicit}return state.useDecoder};Node.prototype._decodeChoice=function decodeChoice(input,options){var state=this._baseState;var result=null;var match=false;Object.keys(state.choice).some(function(key){var save=input.save();var node=state.choice[key];try{var value=node._decode(input,options);if(input.isError(value))return false;result={type:key,value:value};match=true}catch(e){input.restore(save);return false}return true},this);if(!match)return input.error("Choice not matched");return result};Node.prototype._createEncoderBuffer=function createEncoderBuffer(data){return new EncoderBuffer(data,this.reporter)};Node.prototype._encode=function encode(data,reporter,parent){var state=this._baseState;if(state["default"]!==null&&state["default"]===data)return;var result=this._encodeValue(data,reporter,parent);if(result===undefined)return;if(this._skipDefault(result,reporter,parent))return;return result};Node.prototype._encodeValue=function encode(data,reporter,parent){var state=this._baseState;if(state.parent===null)return state.children[0]._encode(data,reporter||new Reporter);var result=null;this.reporter=reporter;if(state.optional&&data===undefined){if(state["default"]!==null)data=state["default"];else return}var content=null;var primitive=false;if(state.any){result=this._createEncoderBuffer(data)}else if(state.choice){result=this._encodeChoice(data,reporter)}else if(state.contains){content=this._getUse(state.contains,parent)._encode(data,reporter);primitive=true}else if(state.children){content=state.children.map(function(child){if(child._baseState.tag==="null_")return child._encode(null,reporter,data);if(child._baseState.key===null)return reporter.error("Child should have a key");var prevKey=reporter.enterKey(child._baseState.key);if(typeof data!=="object")return reporter.error("Child expected, but input is not object");var res=child._encode(data[child._baseState.key],reporter,data);reporter.leaveKey(prevKey);return res},this).filter(function(child){return child});content=this._createEncoderBuffer(content)}else{if(state.tag==="seqof"||state.tag==="setof"){if(!(state.args&&state.args.length===1))return reporter.error("Too many args for : "+state.tag);if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");var child=this.clone();child._baseState.implicit=null;content=this._createEncoderBuffer(data.map(function(item){var state=this._baseState;return this._getUse(state.args[0],data)._encode(item,reporter)},child))}else if(state.use!==null){result=this._getUse(state.use,parent)._encode(data,reporter)}else{content=this._encodePrimitive(state.tag,data);primitive=true}}var result;if(!state.any&&state.choice===null){var tag=state.implicit!==null?state.implicit:state.tag;var cls=state.implicit===null?"universal":"context";if(tag===null){if(state.use===null)reporter.error("Tag could be ommited only for .use()")}else{if(state.use===null)result=this._encodeComposite(tag,primitive,cls,content)}}if(state.explicit!==null)result=this._encodeComposite(state.explicit,false,"context",result);return result};Node.prototype._encodeChoice=function encodeChoice(data,reporter){var state=this._baseState;var node=state.choice[data.type];if(!node){assert(false,data.type+" not found in "+JSON.stringify(Object.keys(state.choice)))}return node._encode(data.value,reporter)};Node.prototype._encodePrimitive=function encodePrimitive(tag,data){var state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);else if(tag==="objid"&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);else if(tag==="objid")return this._encodeObjid(data,null,null);else if(tag==="gentime"||tag==="utctime")return this._encodeTime(data,tag);else if(tag==="null_")return this._encodeNull();else if(tag==="int"||tag==="enum")return this._encodeInt(data,state.args&&state.reverseArgs[0]);else if(tag==="bool")return this._encodeBool(data);else if(tag==="objDesc")return this._encodeStr(data,tag);else throw new Error("Unsupported tag: "+tag)};Node.prototype._isNumstr=function isNumstr(str){return/^[0-9 ]*$/.test(str)};Node.prototype._isPrintstr=function isPrintstr(str){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str)}},{"../base":4,"minimalistic-assert":107}],6:[function(require,module,exports){var inherits=require("inherits");function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}exports.Reporter=Reporter;Reporter.prototype.isError=function isError(obj){return obj instanceof ReporterError};Reporter.prototype.save=function save(){var state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}};Reporter.prototype.restore=function restore(data){var state=this._reporterState;state.obj=data.obj;state.path=state.path.slice(0,data.pathLen)};Reporter.prototype.enterKey=function enterKey(key){return this._reporterState.path.push(key)};Reporter.prototype.exitKey=function exitKey(index){var state=this._reporterState;state.path=state.path.slice(0,index-1)};Reporter.prototype.leaveKey=function leaveKey(index,key,value){var state=this._reporterState;this.exitKey(index);if(state.obj!==null)state.obj[key]=value};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var state=this._reporterState;var prev=state.obj;state.obj={};return prev};Reporter.prototype.leaveObject=function leaveObject(prev){var state=this._reporterState;var now=state.obj;state.obj=prev;return now};Reporter.prototype.error=function error(msg){var err;var state=this._reporterState;var inherited=msg instanceof ReporterError;if(inherited){err=msg}else{err=new ReporterError(state.path.map(function(elem){return"["+JSON.stringify(elem)+"]"}).join(""),msg.message||msg,msg.stack)}if(!state.options.partial)throw err;if(!inherited)state.errors.push(err);return err};Reporter.prototype.wrapResult=function wrapResult(result){var state=this._reporterState;if(!state.options.partial)return result;return{result:this.isError(result)?null:result,errors:state.errors}};function ReporterError(path,msg){this.path=path;this.rethrow(msg)}inherits(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(msg){this.message=msg+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},{inherits:101}],7:[function(require,module,exports){var constants=require("../constants");exports.tagClass={0:"universal",1:"application",2:"context",3:"private"};exports.tagClassByName=constants._reverse(exports.tagClass);exports.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};exports.tagByName=constants._reverse(exports.tag)},{"../constants":8}],8:[function(require,module,exports){var constants=exports;constants._reverse=function reverse(map){var res={};Object.keys(map).forEach(function(key){if((key|0)==key)key=key|0;var value=map[key];res[value]=key});return res};constants.der=require("./der")},{"./der":7}],9:[function(require,module,exports){var inherits=require("inherits");var asn1=require("../../asn1");var base=asn1.base;var bignum=asn1.bignum;var der=asn1.constants.der;function DERDecoder(entity){this.enc="der";this.name=entity.name;this.entity=entity;this.tree=new DERNode;this.tree._init(entity.body)}module.exports=DERDecoder;DERDecoder.prototype.decode=function decode(data,options){if(!(data instanceof base.DecoderBuffer))data=new base.DecoderBuffer(data,options);return this.tree._decode(data,options)};function DERNode(parent){base.Node.call(this,"der",parent)}inherits(DERNode,base.Node);DERNode.prototype._peekTag=function peekTag(buffer,tag,any){if(buffer.isEmpty())return false;var state=buffer.save();var decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;buffer.restore(state);return decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any};DERNode.prototype._decodeTag=function decodeTag(buffer,tag,any){var decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;var len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag){return buffer.error('Failed to match tag: "'+tag+'"')}if(decodedTag.primitive||len!==null)return buffer.skip(len,'Failed to match body of: "'+tag+'"');var state=buffer.save();var res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');if(buffer.isError(res))return res;len=buffer.offset-state.offset;buffer.restore(state);return buffer.skip(len,'Failed to match body of: "'+tag+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(buffer,fail){while(true){var tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;var len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;var res;if(tag.primitive||len!==null)res=buffer.skip(len);else res=this._skipUntilEnd(buffer,fail);if(buffer.isError(res))return res;if(tag.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(buffer,tag,decoder,options){var result=[];while(!buffer.isEmpty()){var possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;var res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result};DERNode.prototype._decodeStr=function decodeStr(buffer,tag){if(tag==="bitstr"){var unused=buffer.readUInt8();if(buffer.isError(unused))return unused;return{unused:unused,data:buffer.raw()}}else if(tag==="bmpstr"){var raw=buffer.raw();if(raw.length%2===1)return buffer.error("Decoding of string type: bmpstr length mismatch");var str="";for(var i=0;i<raw.length/2;i++){str+=String.fromCharCode(raw.readUInt16BE(i*2))}return str}else if(tag==="numstr"){var numstr=buffer.raw().toString("ascii");if(!this._isNumstr(numstr)){return buffer.error("Decoding of string type: "+"numstr unsupported characters")}return numstr}else if(tag==="octstr"){return buffer.raw()}else if(tag==="objDesc"){return buffer.raw()}else if(tag==="printstr"){var printstr=buffer.raw().toString("ascii");if(!this._isPrintstr(printstr)){return buffer.error("Decoding of string type: "+"printstr unsupported characters")}return printstr}else if(/str$/.test(tag)){return buffer.raw().toString()}else{return buffer.error("Decoding of string type: "+tag+" unsupported")}};DERNode.prototype._decodeObjid=function decodeObjid(buffer,values,relative){var result;var identifiers=[];var ident=0;while(!buffer.isEmpty()){var subident=buffer.readUInt8();ident<<=7;ident|=subident&127;if((subident&128)===0){identifiers.push(ident);ident=0}}if(subident&128)identifiers.push(ident);var first=identifiers[0]/40|0;var second=identifiers[0]%40;if(relative)result=identifiers;else result=[first,second].concat(identifiers.slice(1));if(values){var tmp=values[result.join(" ")];if(tmp===undefined)tmp=values[result.join(".")];if(tmp!==undefined)result=tmp}return result};DERNode.prototype._decodeTime=function decodeTime(buffer,tag){var str=buffer.raw().toString();if(tag==="gentime"){var year=str.slice(0,4)|0;var mon=str.slice(4,6)|0;var day=str.slice(6,8)|0;var hour=str.slice(8,10)|0;var min=str.slice(10,12)|0;var sec=str.slice(12,14)|0}else if(tag==="utctime"){var year=str.slice(0,2)|0;var mon=str.slice(2,4)|0;var day=str.slice(4,6)|0;var hour=str.slice(6,8)|0;var min=str.slice(8,10)|0;var sec=str.slice(10,12)|0;if(year<70)year=2e3+year;else year=1900+year}else{return buffer.error("Decoding "+tag+" time is not supported yet")}return Date.UTC(year,mon-1,day,hour,min,sec,0)};DERNode.prototype._decodeNull=function decodeNull(buffer){return null};DERNode.prototype._decodeBool=function decodeBool(buffer){var res=buffer.readUInt8();if(buffer.isError(res))return res;else return res!==0};DERNode.prototype._decodeInt=function decodeInt(buffer,values){var raw=buffer.raw();var res=new bignum(raw);if(values)res=values[res.toString(10)]||res;return res};DERNode.prototype._use=function use(entity,obj){if(typeof entity==="function")entity=entity(obj);return entity._getDecoder("der").tree};function derDecodeTag(buf,fail){var tag=buf.readUInt8(fail);if(buf.isError(tag))return tag;var cls=der.tagClass[tag>>6];var primitive=(tag&32)===0;if((tag&31)===31){var oct=tag;tag=0;while((oct&128)===128){oct=buf.readUInt8(fail);if(buf.isError(oct))return oct;tag<<=7;tag|=oct&127}}else{tag&=31}var tagStr=der.tag[tag];return{cls:cls,primitive:primitive,tag:tag,tagStr:tagStr}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&len===128)return null;if((len&128)===0){return len}var num=len&127;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i<num;i++){len<<=8;var j=buf.readUInt8(fail);if(buf.isError(j))return j;len|=j}return len}},{"../../asn1":1,inherits:101}],10:[function(require,module,exports){var decoders=exports;decoders.der=require("./der");decoders.pem=require("./pem")},{"./der":9,"./pem":11}],11:[function(require,module,exports){var inherits=require("inherits");var Buffer=require("buffer").Buffer;var DERDecoder=require("./der");function PEMDecoder(entity){DERDecoder.call(this,entity);this.enc="pem"}inherits(PEMDecoder,DERDecoder);module.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(data,options){var lines=data.toString().split(/[\r\n]+/g);var label=options.label.toUpperCase();var re=/^-----(BEGIN|END) ([^-]+)-----$/;var start=-1;var end=-1;for(var i=0;i<lines.length;i++){var match=lines[i].match(re);if(match===null)continue;if(match[2]!==label)continue;if(start===-1){if(match[1]!=="BEGIN")break;start=i}else{if(match[1]!=="END")break;end=i;break}}if(start===-1||end===-1)throw new Error("PEM section not found for: "+label);var base64=lines.slice(start+1,end).join("");base64.replace(/[^a-z0-9\+\/=]+/gi,"");var input=new Buffer(base64,"base64");return DERDecoder.prototype.decode.call(this,input,options)}},{"./der":9,buffer:47,inherits:101}],12:[function(require,module,exports){var inherits=require("inherits");var Buffer=require("buffer").Buffer;var asn1=require("../../asn1");var base=asn1.base;var der=asn1.constants.der;function DEREncoder(entity){this.enc="der";this.name=entity.name;this.entity=entity;this.tree=new DERNode;this.tree._init(entity.body)}module.exports=DEREncoder;DEREncoder.prototype.encode=function encode(data,reporter){return this.tree._encode(data,reporter).join()};function DERNode(parent){base.Node.call(this,"der",parent)}inherits(DERNode,base.Node);DERNode.prototype._encodeComposite=function encodeComposite(tag,primitive,cls,content){var encodedTag=encodeTag(tag,primitive,cls,this.reporter);if(content.length<128){var header=new Buffer(2);header[0]=encodedTag;header[1]=content.length;return this._createEncoderBuffer([header,content])}var lenOctets=1;for(var i=content.length;i>=256;i>>=8)lenOctets++;var header=new Buffer(1+1+lenOctets);header[0]=encodedTag;header[1]=128|lenOctets;for(var i=1+lenOctets,j=content.length;j>0;i--,j>>=8)header[i]=j&255;return this._createEncoderBuffer([header,content])};DERNode.prototype._encodeStr=function encodeStr(str,tag){if(tag==="bitstr"){return this._createEncoderBuffer([str.unused|0,str.data])}else if(tag==="bmpstr"){var buf=new Buffer(str.length*2);for(var i=0;i<str.length;i++){buf.writeUInt16BE(str.charCodeAt(i),i*2)}return this._createEncoderBuffer(buf)}else if(tag==="numstr"){if(!this._isNumstr(str)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(str)}else if(tag==="printstr"){if(!this._isPrintstr(str)){return this.reporter.error("Encoding of string type: printstr supports "+"only latin upper and lower case letters, "+"digits, space, apostrophe, left and rigth "+"parenthesis, plus sign, comma, hyphen, "+"dot, slash, colon, equal sign, "+"question mark")}return this._createEncoderBuffer(str)}else if(/str$/.test(tag)){return this._createEncoderBuffer(str)}else if(tag==="objDesc"){return this._createEncoderBuffer(str)}else{return this.reporter.error("Encoding of string type: "+tag+" unsupported")}};DERNode.prototype._encodeObjid=function encodeObjid(id,values,relative){if(typeof id==="string"){if(!values)return this.reporter.error("string objid given, but no values map found");if(!values.hasOwnProperty(id))return this.reporter.error("objid not found in values map");id=values[id].split(/[\s\.]+/g);for(var i=0;i<id.length;i++)id[i]|=0}else if(Array.isArray(id)){id=id.slice();for(var i=0;i<id.length;i++)id[i]|=0}if(!Array.isArray(id)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(id))}if(!relative){if(id[1]>=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,id[0]*40+id[1])}var size=0;for(var i=0;i<id.length;i++){var ident=id[i];for(size++;ident>=128;ident>>=7)size++}var objid=new Buffer(size);var offset=objid.length-1;for(var i=id.length-1;i>=0;i--){var ident=id[i];objid[offset--]=ident&127;while((ident>>=7)>0)objid[offset--]=128|ident&127}return this._createEncoderBuffer(objid)};function two(num){if(num<10)return"0"+num;else return num}DERNode.prototype._encodeTime=function encodeTime(time,tag){var str;var date=new Date(time);if(tag==="gentime"){str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else if(tag==="utctime"){str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+tag+" time is not supported yet")}return this._encodeStr(str,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(num,values){if(typeof num==="string"){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num))}num=values[num]}if(typeof num!=="number"&&!Buffer.isBuffer(num)){var numArray=num.toArray();if(!num.sign&&numArray[0]&128){numArray.unshift(0)}num=new Buffer(numArray)}if(Buffer.isBuffer(num)){var size=num.length;if(num.length===0)size++;var out=new Buffer(size);num.copy(out);if(num.length===0)out[0]=0;return this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);var size=1;for(var i=num;i>=256;i>>=8)size++;var out=new Array(size);for(var i=out.length-1;i>=0;i--){out[i]=num&255;num>>=8}if(out[0]&128){out.unshift(0)}return this._createEncoderBuffer(new Buffer(out))};DERNode.prototype._encodeBool=function encodeBool(value){return this._createEncoderBuffer(value?255:0)};DERNode.prototype._use=function use(entity,obj){if(typeof entity==="function")entity=entity(obj);return entity._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(dataBuffer,reporter,parent){var state=this._baseState;var i;if(state["default"]===null)return false;var data=dataBuffer.join();if(state.defaultBuffer===undefined)state.defaultBuffer=this._encodeValue(state["default"],reporter,parent).join();if(data.length!==state.defaultBuffer.length)return false;for(i=0;i<data.length;i++)if(data[i]!==state.defaultBuffer[i])return false;return true};function encodeTag(tag,primitive,cls,reporter){var res;if(tag==="seqof")tag="seq";else if(tag==="setof")tag="set";if(der.tagByName.hasOwnProperty(tag))res=der.tagByName[tag];else if(typeof tag==="number"&&(tag|0)===tag)res=tag;else return reporter.error("Unknown tag: "+tag);if(res>=31)return reporter.error("Multi-octet tag encoding unsupported");if(!primitive)res|=32;res|=der.tagClassByName[cls||"universal"]<<6;return res}},{"../../asn1":1,buffer:47,inherits:101}],13:[function(require,module,exports){var encoders=exports;encoders.der=require("./der");encoders.pem=require("./pem")},{"./der":12,"./pem":14}],14:[function(require,module,exports){var inherits=require("inherits");var DEREncoder=require("./der");function PEMEncoder(entity){DEREncoder.call(this,entity);this.enc="pem"}inherits(PEMEncoder,DEREncoder);module.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(data,options){var buf=DEREncoder.prototype.encode.call(this,data);var p=buf.toString("base64");var out=["-----BEGIN "+options.label+"-----"];for(var i=0;i<p.length;i+=64)out.push(p.slice(i,i+64));out.push("-----END "+options.label+"-----");return out.join("\n")}},{"./der":12,inherits:101}],15:[function(require,module,exports){(function(global){"use strict";function compare(a,b){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}function isBuffer(b){if(global.Buffer&&typeof global.Buffer.isBuffer==="function"){return global.Buffer.isBuffer(b)}return!!(b!=null&&b._isBuffer)}var util=require("util/");var hasOwn=Object.prototype.hasOwnProperty;var pSlice=Array.prototype.slice;var functionsHaveNames=function(){return function foo(){}.name==="foo"}();function pToString(obj){return Object.prototype.toString.call(obj)}function isView(arrbuf){if(isBuffer(arrbuf)){return false}if(typeof global.ArrayBuffer!=="function"){return false}if(typeof ArrayBuffer.isView==="function"){return ArrayBuffer.isView(arrbuf)}if(!arrbuf){return false}if(arrbuf instanceof DataView){return true}if(arrbuf.buffer&&arrbuf.buffer instanceof ArrayBuffer){return true}return false}var assert=module.exports=ok;var regex=/\s*function\s+([^\(\s]*)\s*/;function getName(func){if(!util.isFunction(func)){return}if(functionsHaveNames){return func.name}var str=func.toString();var match=str.match(regex);return match&&match[1]}assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=getName(stackStartFunction);var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function truncate(s,n){if(typeof s==="string"){return s.length<n?s:s.slice(0,n)}else{return s}}function inspect(something){if(functionsHaveNames||!util.isFunction(something)){return util.inspect(something)}var rawname=getName(something);var name=rawname?": "+rawname:"";return"[Function"+name+"]"}function getMessage(self){return truncate(inspect(self.actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}assert.fail=fail;function ok(value,message){if(!value)fail(value,true,message,"==",assert.ok)}assert.ok=ok;assert.equal=function equal(actual,expected,message){if(actual!=expected)fail(actual,expected,message,"==",assert.equal)};assert.notEqual=function notEqual(actual,expected,message){if(actual==expected){fail(actual,expected,message,"!=",assert.notEqual)}};assert.deepEqual=function deepEqual(actual,expected,message){if(!_deepEqual(actual,expected,false)){fail(actual,expected,message,"deepEqual",assert.deepEqual)}};assert.deepStrictEqual=function deepStrictEqual(actual,expected,message){if(!_deepEqual(actual,expected,true)){fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)}};function _deepEqual(actual,expected,strict,memos){if(actual===expected){return true}else if(isBuffer(actual)&&isBuffer(expected)){return compare(actual,expected)===0}else if(util.isDate(actual)&&util.isDate(expected)){return actual.getTime()===expected.getTime()}else if(util.isRegExp(actual)&&util.isRegExp(expected)){return actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase}else if((actual===null||typeof actual!=="object")&&(expected===null||typeof expected!=="object")){return strict?actual===expected:actual==expected}else if(isView(actual)&&isView(expected)&&pToString(actual)===pToString(expected)&&!(actual instanceof Float32Array||actual instanceof Float64Array)){return compare(new Uint8Array(actual.buffer),new Uint8Array(expected.buffer))===0}else if(isBuffer(actual)!==isBuffer(expected)){return false}else{memos=memos||{actual:[],expected:[]};var actualIndex=memos.actual.indexOf(actual);if(actualIndex!==-1){if(actualIndex===memos.expected.indexOf(expected)){return true}}memos.actual.push(actual);memos.expected.push(expected);return objEquiv(actual,expected,strict,memos)}}function isArguments(object){return Object.prototype.toString.call(object)=="[object Arguments]"}function objEquiv(a,b,strict,actualVisitedObjects){if(a===null||a===undefined||b===null||b===undefined)return false;if(util.isPrimitive(a)||util.isPrimitive(b))return a===b;if(strict&&Object.getPrototypeOf(a)!==Object.getPrototypeOf(b))return false;var aIsArgs=isArguments(a);var bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return false;if(aIsArgs){a=pSlice.call(a);b=pSlice.call(b);return _deepEqual(a,b,strict)}var ka=objectKeys(a);var kb=objectKeys(b);var key,i;if(ka.length!==kb.length)return false;ka.sort();kb.sort();for(i=ka.length-1;i>=0;i--){if(ka[i]!==kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected,false)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.notDeepStrictEqual=notDeepStrictEqual;function notDeepStrictEqual(actual,expected,message){if(_deepEqual(actual,expected,true)){fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}}assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}try{if(actual instanceof expected){return true}}catch(e){}if(Error.isPrototypeOf(expected)){return false}return expected.call({},actual)===true}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}function _throws(shouldThrow,block,expected,message){var actual;if(typeof block!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof expected==="string"){message=expected;expected=null}actual=_tryBlock(block);message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}var userProvidedMessage=typeof message==="string";var isUnwantedException=!shouldThrow&&util.isError(actual);var isUnexpectedException=!shouldThrow&&actual&&!expected;if(isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws(true,block,error,message)};assert.doesNotThrow=function(block,error,message){_throws(false,block,error,message)};assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"util/":165}],16:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;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;function placeHoldersCount(b64){var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4){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&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}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&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}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;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],17:[function(require,module,exports){(function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{Buffer=require("buffer").Buffer}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++}if(base===16){this._parseHex(number,start)}else{this._parseBase(number,base,start)}if(number[0]==="-"){this.negative=1}this.strip();if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initNumber=function _initNumber(number,base,endian){if(number<0){this.negative=1;number=-number}if(number<67108864){this.words=[number&67108863];this.length=1}else if(number<4503599627370496){this.words=[number&67108863,number/67108864&67108863];this.length=2}else{assert(number<9007199254740992);this.words=[number&67108863,number/67108864&67108863,1];this.length=3}if(endian!=="le")return;this._initArray(this.toArray(),base,endian)};BN.prototype._initArray=function _initArray(number,base,endian){assert(typeof number.length==="number");if(number.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(number.length/3);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var j,w;var off=0;if(endian==="be"){for(i=number.length-1,j=0;i>=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<<off&67108863;this.words[j+1]=w>>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i<number.length;i+=3){w=number[i]|number[i+1]<<8|number[i+2]<<16;this.words[j]|=w<<off&67108863;this.words[j+1]=w>>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this.strip()};function parseHex(str,start,end){var r=0;var len=Math.min(str.length,end);for(var i=start;i<len;i++){var c=str.charCodeAt(i)-48;r<<=4;if(c>=49&&c<=54){r|=c-49+10}else if(c>=17&&c<=22){r|=c-17+10}else{r|=c&15}}return r}BN.prototype._parseHex=function _parseHex(number,start){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var j,w;var off=0;for(i=number.length-6,j=0;i>=start;i-=6){w=parseHex(number,i,i+6);this.words[j]|=w<<off&67108863;this.words[j+1]|=w>>>26-off&4194303;off+=24;if(off>=26){off-=26;j++}}if(i+6!==start){w=parseHex(number,start,i+6);this.words[j]|=w<<off&67108863;this.words[j+1]|=w>>>26-off&4194303}this.strip()};function parseBase(str,start,end,mul){var r=0;var len=Math.min(str.length,end);for(var i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul;if(c>=49){r+=c-49+10}else if(c>=17){r+=c-17+10}else{r+=c}}return r}BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0];this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base){limbLen++}limbLen--;limbPow=limbPow/base|0;var total=number.length-start;var mod=total%limbLen;var end=Math.min(total,total-mod)+start;var word=0;for(var i=start;i<end;i+=limbLen){word=parseBase(number,i,i+limbLen,base);this.imuln(limbPow);if(this.words[0]+word<67108864){this.words[0]+=word}else{this._iaddn(word)}}if(mod!==0){var pow=1;word=parseBase(number,i,number.length,base);for(i=0;i<mod;i++){pow*=base}this.imuln(pow);if(this.words[0]+word<67108864){this.words[0]+=word}else{this._iaddn(word)}}};BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++){dest.words[i]=this.words[i]}dest.length=this.length;dest.negative=this.negative;dest.red=this.red};BN.prototype.clone=function clone(){var r=new BN(null);this.copy(r);return r};BN.prototype._expand=function _expand(size){while(this.length<size){this.words[this.length++]=0}return this};BN.prototype.strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"];var groupSizes=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];var groupBases=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i<this.length;i++){var w=this.words[i];var word=((w<<off|carry)&16777215).toString(16);carry=w>>>24-off&16777215;if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}off+=2;if(off>=26){off-=26;i--}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(endian,length){assert(typeof Buffer!=="undefined");return this.toArrayLike(Buffer,endian,length)};BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");this.strip();var littleEndian=endian==="le";var res=new ArrayType(reqLength);var b,i;var q=this.clone();if(!littleEndian){for(i=0;i<reqLength-byteLength;i++){res[i]=0}for(i=0;!q.isZero();i++){b=q.andln(255);q.iushrn(8);res[reqLength-i-1]=b}}else{for(i=0;!q.isZero();i++){b=q.andln(255);q.iushrn(8);res[i]=b}for(;i<reqLength;i++){res[i]=0}}return res};if(Math.clz32){BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}}else{BN.prototype._countBits=function _countBits(w){var t=w;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit<w.length;bit++){var off=bit/26|0;var wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);r+=b;if(b!==26)break}return r};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(width){if(this.negative!==0){return this.abs().inotn(width).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(width){if(this.testn(width-1)){return this.notn(width).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(num){while(this.length<num.length){this.words[this.length++]=0}for(var i=0;i<num.length;i++){this.words[i]=this.words[i]|num.words[i]}return this.strip()};BN.prototype.ior=function ior(num){assert((this.negative|num.negative)===0);return this.iuor(num)};BN.prototype.or=function or(num){if(this.length>num.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;i<b.length;i++){this.words[i]=this.words[i]&num.words[i]}this.length=b.length;return this.strip()};BN.prototype.iand=function iand(num){assert((this.negative|num.negative)===0);return this.iuand(num)};BN.prototype.and=function and(num){if(this.length>num.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;i<b.length;i++){this.words[i]=a.words[i]^b.words[i]}if(this!==a){for(;i<a.length;i++){this.words[i]=a.words[i]}}this.length=a.length;return this.strip()};BN.prototype.ixor=function ixor(num){assert((this.negative|num.negative)===0);return this.iuxor(num)};BN.prototype.xor=function xor(num){if(this.length>num.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i<bytesNeeded;i++){this.words[i]=~this.words[i]&67108863}if(bitsLeft>0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this.strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<<wbit}else{this.words[off]=this.words[off]&~(1<<wbit)}return this.strip()};BN.prototype.iadd=function iadd(num){var r;if(this.negative!==0&&num.negative===0){this.negative=0;r=this.isub(num);this.negative^=1;return this._normSign()}else if(this.negative===0&&num.negative!==0){num.negative=0;r=this.isub(num);num.negative=1;return r._normSign()}var a,b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i<b.length;i++){r=(a.words[i]|0)+(b.words[i]|0)+carry;this.words[i]=r&67108863;carry=r>>>26}for(;carry!==0&&i<a.length;i++){r=(a.words[i]|0)+carry;this.words[i]=r&67108863;carry=r>>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;i<a.length;i++){this.words[i]=a.words[i]}}return this};BN.prototype.add=function add(num){var res;if(num.negative!==0&&this.negative===0){num.negative=0;res=this.sub(num);num.negative^=1;return res}else if(num.negative===0&&this.negative!==0){this.negative=0;res=num.sub(this);this.negative=1;return res}if(this.length>num.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i<b.length;i++){r=(a.words[i]|0)-(b.words[i]|0)+carry;carry=r>>26;this.words[i]=r&67108863}for(;carry!==0&&i<a.length;i++){r=(a.words[i]|0)+carry;carry=r>>26;this.words[i]=r&67108863}if(carry===0&&i<a.length&&a!==this){for(;i<a.length;i++){this.words[i]=a.words[i]}}this.length=Math.max(this.length,i);if(a!==this){this.negative=1}return this.strip()};BN.prototype.sub=function sub(num){return this.clone().isub(num)};function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len;len=len-1|0;var a=self.words[0]|0;var b=num.words[0]|0;var r=a*b;var lo=r&67108863;var carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){var ncarry=carry>>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out.strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1;o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j;var a=self.words[i]|0;var b=num.words[j]|0;var r=a*b;var lo=r&67108863;ncarry=ncarry+(r/67108864|0)|0;lo=lo+rword|0;rword=lo&67108863;ncarry=ncarry+(lo>>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};function FFTM(x,y){this.x=x;this.y=y}FFTM.prototype.makeRBT=function makeRBT(N){var t=new Array(N);var l=BN.prototype._countBits(N)-1;for(var i=0;i<N;i++){t[i]=this.revBin(i,l,N)}return t};FFTM.prototype.revBin=function revBin(x,l,N){if(x===0||x===N-1)return x;var rb=0;for(var i=0;i<l;i++){rb|=(x&1)<<l-i-1;x>>=1}return rb};FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++){rtws[i]=rws[rbt[i]];itws[i]=iws[rbt[i]]}};FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1){var l=s<<1;var rtwdf=Math.cos(2*Math.PI/l);var itwdf=Math.sin(2*Math.PI/l);for(var p=0;p<N;p+=l){var rtwdf_=rtwdf;var itwdf_=itwdf;for(var j=0;j<s;j++){var re=rtws[p+j];var ie=itws[p+j];var ro=rtws[p+j+s];var io=itws[p+j+s];var rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro;ro=rx;rtws[p+j]=re+ro;itws[p+j]=ie+io;rtws[p+j+s]=re-ro;itws[p+j+s]=ie-io;if(j!==l){rx=rtwdf*rtwdf_-itwdf*itwdf_;itwdf_=rtwdf*itwdf_+itwdf*rtwdf_;rtwdf_=rx}}}}};FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=Math.max(m,n)|1;var odd=N&1;var i=0;for(N=N/2|0;N;N=N>>>1){i++}return 1<<i+1+odd};FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(N<=1)return;for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1];rws[N-i-1]=t;t=iws[i];iws[i]=-iws[N-i-1];iws[N-i-1]=-t}};FFTM.prototype.normalize13b=function normalize13b(ws,N){var carry=0;for(var i=0;i<N/2;i++){var w=Math.round(ws[2*i+1]/N)*8192+Math.round(ws[2*i]/N)+carry;ws[i]=w&67108863;if(w<67108864){carry=0}else{carry=w/67108864|0}}return ws};FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){var carry=0;for(var i=0;i<len;i++){carry=carry+(ws[i]|0);rws[2*i]=carry&8191;carry=carry>>>13;rws[2*i+1]=carry&8191;carry=carry>>>13}for(i=2*len;i<N;++i){rws[i]=0}assert(carry===0);assert((carry&~8191)===0)};FFTM.prototype.stub=function stub(N){var ph=new Array(N);for(var i=0;i<N;i++){ph[i]=0}return ph};FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length);var rbt=this.makeRBT(N);var _=this.stub(N);var rws=new Array(N);var rwst=new Array(N);var iwst=new Array(N);var nrws=new Array(N);var nrwst=new Array(N);var niwst=new Array(N);var rmws=out.words;rmws.length=N;this.convert13b(x.words,x.length,rws,N);this.convert13b(y.words,y.length,nrws,N);this.transform(rws,_,rwst,iwst,N,rbt);this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i];rwst[i]=rx}this.conjugate(rwst,iwst,N);this.transform(rwst,iwst,rmws,_,N,rbt);this.conjugate(rmws,_,N);this.normalize13b(rmws,N);out.negative=x.negative^y.negative;out.length=x.length+y.length;return out.strip()};BN.prototype.mul=function mul(num){var out=new BN(null);out.words=new Array(this.length+num.length);return this.mulTo(num,out)};BN.prototype.mulf=function mulf(num){var out=new BN(null);out.words=new Array(this.length+num.length);return jumboMulTo(this,num,out)};BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)};BN.prototype.imuln=function imuln(num){assert(typeof num==="number");assert(num<67108864);var carry=0;for(var i=0;i<this.length;i++){var w=(this.words[i]|0)*num;var lo=(w&67108863)+(carry&67108863);carry>>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i<w.length;i++,res=res.sqr()){if(w[i]!==0)break}if(++i<w.length){for(var q=res.sqr();i<w.length;i++,q=q.sqr()){if(w[i]===0)continue;res=res.mul(q)}}return res};BN.prototype.iushln=function iushln(bits){assert(typeof bits==="number"&&bits>=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask;var c=(this.words[i]|0)-newCarry<<r;this.words[i]=c|carry;carry=newCarry>>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i<s;i++){this.words[i]=0}this.length+=s}return this.strip()};BN.prototype.ishln=function ishln(bits){assert(this.negative===0);return this.iushln(bits)};BN.prototype.iushrn=function iushrn(bits,hint,extended){assert(typeof bits==="number"&&bits>=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<<r;var maskedWords=extended;h-=s;h=Math.max(0,h);if(maskedWords){for(var i=0;i<s;i++){maskedWords.words[i]=this.words[i]}maskedWords.length=s}if(s===0){}else if(this.length>s){this.length-=s;for(i=0;i<this.length;i++){this.words[i]=this.words[i+s]}}else{this.words[0]=0;this.length=1}var carry=0;for(i=this.length-1;i>=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<<r;if(this.length<=s)return false;var w=this.words[s];return!!(w&q)};BN.prototype.imaskn=function imaskn(bits){assert(typeof bits==="number"&&bits>=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()};BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)};BN.prototype.iaddn=function iaddn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.isubn(-num);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<num){this.words[0]=num-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(num);this.negative=1;return this}return this._iaddn(num)};BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i<this.length&&this.words[i]<0;i++){this.words[i]+=67108864;this.words[i+1]-=1}}return this.strip()};BN.prototype.addn=function addn(num){return this.clone().iaddn(num)};BN.prototype.subn=function subn(num){return this.clone().isubn(num)};BN.prototype.iabs=function iabs(){this.negative=0;return this};BN.prototype.abs=function abs(){return this.clone().iabs()};BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var len=num.length+shift;var i;this._expand(len);var w;var carry=0;for(i=0;i<num.length;i++){w=(this.words[i+shift]|0)+carry;var right=(num.words[i]|0)*mul;w-=right&67108863;carry=(w>>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i<this.length-shift;i++){w=(this.words[i+shift]|0)+carry;carry=w>>26;this.words[i+shift]=w&67108863}if(carry===0)return this.strip();assert(carry===-1);carry=0;for(i=0;i<this.length;i++){w=-(this.words[i]|0)+carry;carry=w>>26;this.words[i]=w&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i<q.length;i++){q.words[i]=0}}var diff=a.clone()._ishlnsubmul(b,1,m);if(diff.negative===0){a=diff;if(q){q.words[m]=1}}for(var j=m-1;j>=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q.strip()}a.strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modn=function modn(num){assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return acc};BN.prototype.idivn=function idivn(num){assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}return this.strip()};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-- >0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-- >0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-- >0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-- >0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<<r;if(this.length<=s){this._expand(s+1);this.words[s]|=q;return this}var carry=q;for(var i=s;carry!==0&&i<this.length;i++){var w=this.words[i]|0;w+=carry;carry=w>>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this.strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:w<num?-1:1}if(this.negative!==0)return-res|0;return res};BN.prototype.cmp=function cmp(num){if(this.negative!==0&&num.negative===0)return-1;if(this.negative===0&&num.negative!==0)return 1;var res=this.ucmp(num);if(this.negative!==0)return-res|0;return res};BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;var res=0;for(var i=this.length-1;i>=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(a<b){res=-1}else if(a>b){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);if(cmp===0){r.words[0]=0;r.length=1}else if(cmp>0){r.isub(this.p)}else{r.strip()}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i<outLen;i++){output.words[i]=input.words[i]}output.length=outLen;if(input.length<=9){input.words[0]=0;input.length=1;return}var prev=input.words[9];output.words[output.length++]=prev&mask;for(i=10;i<input.length;i++){var next=input.words[i]|0;input.words[i-10]=(next&mask)<<4|prev>>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i<num.length;i++){var w=num.words[i]|0;lo+=w*977;num.words[i]=lo&67108863;lo=w*64+(lo/67108864|0)}if(num.words[num.length-1]===0){num.length--;if(num.words[num.length-1]===0){num.length--}}return num};function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}inherits(P224,MPrime);function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}inherits(P192,MPrime);function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}inherits(P25519,MPrime);P25519.prototype.imulK=function imulK(num){var carry=0;for(var i=0;i<num.length;i++){var hi=(num.words[i]|0)*19+carry;var lo=hi&67108863;hi>>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);return a.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b);c=b.redSqr();t=t.redMul(c);m=i}return r};Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);if(inv.negative!==0){inv.negative=0;return this.imod(inv).redNeg()}else{return this.imod(inv)}};Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(num.cmpn(1)===0)return a.clone();var windowSize=4;var wnd=new Array(1<<windowSize);wnd[0]=new BN(1).toRed(this);wnd[1]=a;for(var i=2;i<wnd.length;i++){wnd[i]=this.mul(wnd[i-1],a)}var res=wnd[0];var current=0;var currentLen=0;var start=num.bitLength()%26;if(start===0){start=26}for(i=num.length-1;i>=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&&current===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}})(typeof module==="undefined"||module,this)},{buffer:19}],18:[function(require,module,exports){var r;module.exports=function rand(len){if(!r)r=new Rand(null);return r.generate(len)};function Rand(rand){this.rand=rand}module.exports.Rand=Rand;Rand.prototype.generate=function generate(len){return this._rand(len)};Rand.prototype._rand=function _rand(n){if(this.rand.getBytes)return this.rand.getBytes(n);var res=new Uint8Array(n);for(var i=0;i<res.length;i++)res[i]=this.rand.getByte();return res};if(typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);self.crypto.getRandomValues(arr);return arr}}else if(self.msCrypto&&self.msCrypto.getRandomValues){Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);self.msCrypto.getRandomValues(arr);return arr}}else if(typeof window==="object"){Rand.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var crypto=require("crypto");if(typeof crypto.randomBytes!=="function")throw new Error("Not supported");Rand.prototype._rand=function _rand(n){return crypto.randomBytes(n)}}catch(e){}}},{crypto:19}],19:[function(require,module,exports){},{}],20:[function(require,module,exports){(function(Buffer){var uint_max=Math.pow(2,32);function fixup_uint32(x){var ret,x_pos;ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function scrub_vec(v){for(var i=0;i<v.length;v++){v[i]=0}return false}function Global(){this.SBOX=[];this.INV_SBOX=[];this.SUB_MIX=[[],[],[],[]];this.INV_SUB_MIX=[[],[],[],[]];this.init();this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}Global.prototype.init=function(){var d,i,sx,t,x,x2,x4,x8,xi,_i;d=function(){var _i,_results;_results=[];for(i=_i=0;_i<256;i=++_i){if(i<128){_results.push(i<<1)}else{_results.push(i<<1^283)}}return _results}();x=0;xi=0;for(i=_i=0;_i<256;i=++_i){sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^sx&255^99;this.SBOX[x]=sx;this.INV_SBOX[sx]=x;x2=d[x];x4=d[x2];x8=d[x4];t=d[sx]*257^sx*16843008;this.SUB_MIX[0][x]=t<<24|t>>>8;this.SUB_MIX[1][x]=t<<16|t>>>16;this.SUB_MIX[2][x]=t<<8|t>>>24;this.SUB_MIX[3][x]=t;t=x8*16843009^x4*65537^x2*257^x*16843008;this.INV_SUB_MIX[0][sx]=t<<24|t>>>8;this.INV_SUB_MIX[1][sx]=t<<16|t>>>16;this.INV_SUB_MIX[2][sx]=t<<8|t>>>24;this.INV_SUB_MIX[3][sx]=t;if(x===0){x=xi=1}else{x=x2^d[d[d[x8^x2]]];xi^=d[d[xi]]}}return true};var G=new Global;AES.blockSize=4*4;AES.prototype.blockSize=AES.blockSize;AES.keySize=256/8;AES.prototype.keySize=AES.keySize;function bufferToArray(buf){var len=buf.length/4;var out=new Array(len);var i=-1;while(++i<len){out[i]=buf.readUInt32BE(i*4)}return out}function AES(key){this._key=bufferToArray(key);this._doReset()}AES.prototype._doReset=function(){var invKsRow,keySize,keyWords,ksRow,ksRows,t;keyWords=this._key;keySize=keyWords.length;this._nRounds=keySize+6;ksRows=(this._nRounds+1)*4;this._keySchedule=[];for(ksRow=0;ksRow<ksRows;ksRow++){this._keySchedule[ksRow]=ksRow<keySize?keyWords[ksRow]:(t=this._keySchedule[ksRow-1],ksRow%keySize===0?(t=t<<8|t>>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255],t^=G.RCON[ksRow/keySize|0]<<24):keySize>6&&ksRow%keySize===4?t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[t&255]:void 0,this._keySchedule[ksRow-keySize]^t)}this._invKeySchedule=[];for(invKsRow=0;invKsRow<ksRows;invKsRow++){ksRow=ksRows-invKsRow;t=this._keySchedule[ksRow-(invKsRow%4?0:4)];this._invKeySchedule[invKsRow]=invKsRow<4||ksRow<=4?t:G.INV_SUB_MIX[0][G.SBOX[t>>>24]]^G.INV_SUB_MIX[1][G.SBOX[t>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[t>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[t&255]]}return true};AES.prototype.encryptBlock=function(M){M=bufferToArray(new Buffer(M));var out=this._doCryptBlock(M,this._keySchedule,G.SUB_MIX,G.SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf};AES.prototype.decryptBlock=function(M){M=bufferToArray(new Buffer(M));var temp=[M[3],M[1]];M[1]=temp[0];M[3]=temp[1];var out=this._doCryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[3],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[1],12);return buf};AES.prototype.scrub=function(){scrub_vec(this._keySchedule);scrub_vec(this._invKeySchedule);scrub_vec(this._key)};AES.prototype._doCryptBlock=function(M,keySchedule,SUB_MIX,SBOX){var ksRow,s0,s1,s2,s3,t0,t1,t2,t3;s0=M[0]^keySchedule[0];s1=M[1]^keySchedule[1];s2=M[2]^keySchedule[2];s3=M[3]^keySchedule[3];ksRow=4;for(var round=1;round<this._nRounds;round++){t0=SUB_MIX[0][s0>>>24]^SUB_MIX[1][s1>>>16&255]^SUB_MIX[2][s2>>>8&255]^SUB_MIX[3][s3&255]^keySchedule[ksRow++];t1=SUB_MIX[0][s1>>>24]^SUB_MIX[1][s2>>>16&255]^SUB_MIX[2][s3>>>8&255]^SUB_MIX[3][s0&255]^keySchedule[ksRow++];t2=SUB_MIX[0][s2>>>24]^SUB_MIX[1][s3>>>16&255]^SUB_MIX[2][s0>>>8&255]^SUB_MIX[3][s1&255]^keySchedule[ksRow++];t3=SUB_MIX[0][s3>>>24]^SUB_MIX[1][s0>>>16&255]^SUB_MIX[2][s1>>>8&255]^SUB_MIX[3][s2&255]^keySchedule[ksRow++];s0=t0;s1=t1;s2=t2;s3=t3}t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[s3&255])^keySchedule[ksRow++];t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[s0&255])^keySchedule[ksRow++];t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[s1&255])^keySchedule[ksRow++];t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[s2&255])^keySchedule[ksRow++];return[fixup_uint32(t0),fixup_uint32(t1),fixup_uint32(t2),fixup_uint32(t3)]};exports.AES=AES}).call(this,require("buffer").Buffer)},{buffer:47}],21:[function(require,module,exports){(function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");var GHASH=require("./ghash");var xor=require("buffer-xor");inherits(StreamCipher,Transform);module.exports=StreamCipher;function StreamCipher(mode,key,iv,decrypt){if(!(this instanceof StreamCipher)){return new StreamCipher(mode,key,iv)}Transform.call(this);this._finID=Buffer.concat([iv,new Buffer([0,0,0,1])]);iv=Buffer.concat([iv,new Buffer([0,0,0,2])]);this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);this._cache=new Buffer("");this._secCache=new Buffer("");this._decrypt=decrypt;this._alen=0;this._len=0;iv.copy(this._prev);this._mode=mode;var h=new Buffer(4);h.fill(0);this._ghash=new GHASH(this._cipher.encryptBlock(h));this._authTag=null;this._called=false}StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;if(rump<16){rump=new Buffer(rump);rump.fill(0);this._ghash.update(rump)}}this._called=true;var out=this._mode.encrypt(this,chunk);if(this._decrypt){this._ghash.update(chunk)}else{this._ghash.update(out)}this._len+=chunk.length;return out};StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag){throw new Error("Unsupported state or unable to authenticate data")}var tag=xor(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(xorTest(tag,this._authTag)){throw new Error("Unsupported state or unable to authenticate data")}}else{this._authTag=tag}this._cipher.scrub()};StreamCipher.prototype.getAuthTag=function getAuthTag(){if(!this._decrypt&&Buffer.isBuffer(this._authTag)){return this._authTag}else{throw new Error("Attempting to get auth tag in unsupported state")}};StreamCipher.prototype.setAuthTag=function setAuthTag(tag){if(this._decrypt){this._authTag=tag}else{throw new Error("Attempting to set auth tag in unsupported state")}};StreamCipher.prototype.setAAD=function setAAD(buf){if(!this._called){this._ghash.update(buf);this._alen+=buf.length}else{throw new Error("Attempting to set AAD in unsupported state")}};function xorTest(a,b){var out=0;if(a.length!==b.length){out++}var len=Math.min(a.length,b.length);var i=-1;while(++i<len){out+=a[i]^b[i]}return out}}).call(this,require("buffer").Buffer)},{"./aes":20,"./ghash":25,buffer:47,"buffer-xor":46,"cipher-base":48,inherits:101}],22:[function(require,module,exports){var ciphers=require("./encrypter");exports.createCipher=exports.Cipher=ciphers.createCipher;exports.createCipheriv=exports.Cipheriv=ciphers.createCipheriv;var deciphers=require("./decrypter");exports.createDecipher=exports.Decipher=deciphers.createDecipher;exports.createDecipheriv=exports.Decipheriv=deciphers.createDecipheriv;var modes=require("./modes");function getCiphers(){return Object.keys(modes)}exports.listCiphers=exports.getCiphers=getCiphers},{"./decrypter":23,"./encrypter":24,"./modes":26}],23:[function(require,module,exports){(function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");var modes=require("./modes");var StreamCipher=require("./streamCipher");var AuthCipher=require("./authCipher");var ebtk=require("evp_bytestokey");inherits(Decipher,Transform);function Decipher(mode,key,iv){if(!(this instanceof Decipher)){return new Decipher(mode,key,iv)}Transform.call(this);this._cache=new Splitter;this._last=void 0;this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);iv.copy(this._prev);this._mode=mode;this._autopadding=true}Decipher.prototype._update=function(data){this._cache.add(data);var chunk;var thing;var out=[];while(chunk=this._cache.get(this._autopadding)){thing=this._mode.decrypt(this,chunk);out.push(thing)}return Buffer.concat(out)};Decipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding){return unpad(this._mode.decrypt(this,chunk))}else if(chunk){throw new Error("data not multiple of block length")}};Decipher.prototype.setAutoPadding=function(setTo){this._autopadding=!!setTo;return this};function Splitter(){if(!(this instanceof Splitter)){return new Splitter}this.cache=new Buffer("")}Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])};Splitter.prototype.get=function(autoPadding){var out;if(autoPadding){if(this.cache.length>16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}else{if(this.cache.length>=16){out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}}return null};Splitter.prototype.flush=function(){if(this.cache.length){return this.cache}};function unpad(last){var padded=last[15];var i=-1;while(++i<padded){if(last[i+(16-padded)]!==padded){throw new Error("unable to decrypt data")}}if(padded===16){return}return last.slice(0,16-padded)}var modelist={ECB:require("./modes/ecb"),CBC:require("./modes/cbc"),CFB:require("./modes/cfb"),CFB8:require("./modes/cfb8"),CFB1:require("./modes/cfb1"),OFB:require("./modes/ofb"),CTR:require("./modes/ctr"),GCM:require("./modes/ctr")};function createDecipheriv(suite,password,iv){var config=modes[suite.toLowerCase()];if(!config){throw new TypeError("invalid suite type")}if(typeof iv==="string"){iv=new Buffer(iv)}if(typeof password==="string"){password=new Buffer(password)}if(password.length!==config.key/8){throw new TypeError("invalid key length "+password.length)}if(iv.length!==config.iv){throw new TypeError("invalid iv length "+iv.length)}if(config.type==="stream"){return new StreamCipher(modelist[config.mode],password,iv,true)}else if(config.type==="auth"){return new AuthCipher(modelist[config.mode],password,iv,true)}return new Decipher(modelist[config.mode],password,iv)}function createDecipher(suite,password){var config=modes[suite.toLowerCase()];if(!config){throw new TypeError("invalid suite type")}var keys=ebtk(password,false,config.key,config.iv);return createDecipheriv(suite,keys.key,keys.iv)}exports.createDecipher=createDecipher;exports.createDecipheriv=createDecipheriv}).call(this,require("buffer").Buffer)},{"./aes":20,"./authCipher":21,"./modes":26,"./modes/cbc":27,"./modes/cfb":28,"./modes/cfb1":29,"./modes/cfb8":30,"./modes/ctr":31,"./modes/ecb":32,"./modes/ofb":33,"./streamCipher":34,buffer:47,"cipher-base":48,evp_bytestokey:84,inherits:101}],24:[function(require,module,exports){(function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");var modes=require("./modes");var ebtk=require("evp_bytestokey");var StreamCipher=require("./streamCipher");var AuthCipher=require("./authCipher");inherits(Cipher,Transform);function Cipher(mode,key,iv){if(!(this instanceof Cipher)){return new Cipher(mode,key,iv)}Transform.call(this);this._cache=new Splitter;this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);iv.copy(this._prev);this._mode=mode;this._autopadding=true}Cipher.prototype._update=function(data){this._cache.add(data);var chunk;var thing;var out=[];while(chunk=this._cache.get()){thing=this._mode.encrypt(this,chunk);out.push(thing)}return Buffer.concat(out)};Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding){chunk=this._mode.encrypt(this,chunk);this._cipher.scrub();return chunk}else if(chunk.toString("hex")!=="10101010101010101010101010101010"){this._cipher.scrub();throw new Error("data not multiple of block length")}};Cipher.prototype.setAutoPadding=function(setTo){this._autopadding=!!setTo;return this};function Splitter(){if(!(this instanceof Splitter)){return new Splitter}this.cache=new Buffer("")}Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])};Splitter.prototype.get=function(){if(this.cache.length>15){var out=this.cache.slice(0,16);this.cache=this.cache.slice(16);return out}return null};Splitter.prototype.flush=function(){var len=16-this.cache.length;var padBuff=new Buffer(len);var i=-1;while(++i<len){padBuff.writeUInt8(len,i)}var out=Buffer.concat([this.cache,padBuff]);return out};var modelist={ECB:require("./modes/ecb"),CBC:require("./modes/cbc"),CFB:require("./modes/cfb"),CFB8:require("./modes/cfb8"),CFB1:require("./modes/cfb1"),OFB:require("./modes/ofb"),CTR:require("./modes/ctr"),GCM:require("./modes/ctr")};function createCipheriv(suite,password,iv){var config=modes[suite.toLowerCase()];if(!config){throw new TypeError("invalid suite type")}if(typeof iv==="string"){iv=new Buffer(iv)}if(typeof password==="string"){password=new Buffer(password)}if(password.length!==config.key/8){throw new TypeError("invalid key length "+password.length)}if(iv.length!==config.iv){throw new TypeError("invalid iv length "+iv.length)}if(config.type==="stream"){return new StreamCipher(modelist[config.mode],password,iv)}else if(config.type==="auth"){return new AuthCipher(modelist[config.mode],password,iv)}return new Cipher(modelist[config.mode],password,iv)}function createCipher(suite,password){var config=modes[suite.toLowerCase()];if(!config){throw new TypeError("invalid suite type")}var keys=ebtk(password,false,config.key,config.iv);return createCipheriv(suite,keys.key,keys.iv)}exports.createCipheriv=createCipheriv;exports.createCipher=createCipher}).call(this,require("buffer").Buffer)},{"./aes":20,"./authCipher":21,"./modes":26,"./modes/cbc":27,"./modes/cfb":28,"./modes/cfb1":29,"./modes/cfb8":30,"./modes/ctr":31,"./modes/ecb":32,"./modes/ofb":33,"./streamCipher":34,buffer:47,"cipher-base":48,evp_bytestokey:84,inherits:101}],25:[function(require,module,exports){(function(Buffer){var zeros=new Buffer(16);zeros.fill(0);module.exports=GHASH;function GHASH(key){this.h=key;this.state=new Buffer(16);this.state.fill(0);this.cache=new Buffer("")}GHASH.prototype.ghash=function(block){var i=-1;while(++i<block.length){this.state[i]^=block[i]}this._multiply()};GHASH.prototype._multiply=function(){var Vi=toArray(this.h);var Zi=[0,0,0,0];var j,xi,lsb_Vi;var i=-1;while(++i<128){xi=(this.state[~~(i/8)]&1<<7-i%8)!==0;if(xi){Zi=xor(Zi,Vi)}lsb_Vi=(Vi[3]&1)!==0;for(j=3;j>0;j--){Vi[j]=Vi[j]>>>1|(Vi[j-1]&1)<<31}Vi[0]=Vi[0]>>>1;if(lsb_Vi){Vi[0]=Vi[0]^225<<24}}this.state=fromArray(Zi)};GHASH.prototype.update=function(buf){this.cache=Buffer.concat([this.cache,buf]);var chunk;while(this.cache.length>=16){chunk=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(chunk)}};GHASH.prototype.final=function(abl,bl){if(this.cache.length){this.ghash(Buffer.concat([this.cache,zeros],16))}this.ghash(fromArray([0,abl,0,bl]));return this.state};function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}function fromArray(out){out=out.map(fixup_uint32);var buf=new Buffer(16);buf.writeUInt32BE(out[0],0);buf.writeUInt32BE(out[1],4);buf.writeUInt32BE(out[2],8);buf.writeUInt32BE(out[3],12);return buf}var uint_max=Math.pow(2,32);function fixup_uint32(x){var ret,x_pos;ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x;return ret}function xor(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}}).call(this,require("buffer").Buffer)},{buffer:47}],26:[function(require,module,exports){exports["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"};exports["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"};exports["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"};exports["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"};exports["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"};exports["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"};exports["aes128"]=exports["aes-128-cbc"];exports["aes192"]=exports["aes-192-cbc"];exports["aes256"]=exports["aes-256-cbc"];exports["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"};exports["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"};exports["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"};exports["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"};exports["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"};exports["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"};exports["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"};exports["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"};exports["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"};exports["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"};exports["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"};exports["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"};exports["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"};exports["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"};exports["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"};exports["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"};exports["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"};exports["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],27:[function(require,module,exports){var xor=require("buffer-xor");exports.encrypt=function(self,block){var data=xor(block,self._prev);self._prev=self._cipher.encryptBlock(data);return self._prev};exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},{"buffer-xor":46}],28:[function(require,module,exports){(function(Buffer){var xor=require("buffer-xor");exports.encrypt=function(self,data,decrypt){var out=new Buffer("");var len;while(data.length){if(self._cache.length===0){self._cache=self._cipher.encryptBlock(self._prev);self._prev=new Buffer("")}if(self._cache.length<=data.length){len=self._cache.length;out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]);data=data.slice(len)}else{out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}}return out};function encryptStart(self,data,decrypt){var len=data.length;var out=xor(data,self._cache);self._cache=self._cache.slice(len);self._prev=Buffer.concat([self._prev,decrypt?data:out]);return out}}).call(this,require("buffer").Buffer)},{buffer:47,"buffer-xor":46}],29:[function(require,module,exports){(function(Buffer){function encryptByte(self,byteParam,decrypt){var pad;var i=-1;var len=8;var out=0;var bit,value;while(++i<len){pad=self._cipher.encryptBlock(self._prev);bit=byteParam&1<<7-i?128:0;value=pad[0]^bit;out+=(value&128)>>i%8;self._prev=shiftIn(self._prev,decrypt?bit:value)}return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i<len){out[i]=encryptByte(self,chunk[i],decrypt)}return out};function shiftIn(buffer,value){var len=buffer.length;var i=-1;var out=new Buffer(buffer.length);buffer=Buffer.concat([buffer,new Buffer([value])]);while(++i<len){out[i]=buffer[i]<<1|buffer[i+1]>>7}return out}}).call(this,require("buffer").Buffer)},{buffer:47}],30:[function(require,module,exports){(function(Buffer){function encryptByte(self,byteParam,decrypt){var pad=self._cipher.encryptBlock(self._prev);var out=pad[0]^byteParam;self._prev=Buffer.concat([self._prev.slice(1),new Buffer([decrypt?byteParam:out])]);return out}exports.encrypt=function(self,chunk,decrypt){var len=chunk.length;var out=new Buffer(len);var i=-1;while(++i<len){out[i]=encryptByte(self,chunk[i],decrypt)}return out}}).call(this,require("buffer").Buffer)},{buffer:47}],31:[function(require,module,exports){(function(Buffer){var xor=require("buffer-xor");function incr32(iv){var len=iv.length;var item;while(len--){item=iv.readUInt8(len);if(item===255){iv.writeUInt8(0,len)}else{item++;iv.writeUInt8(item,len);break}}}function getBlock(self){var out=self._cipher.encryptBlock(self._prev);incr32(self._prev);return out}exports.encrypt=function(self,chunk){while(self._cache.length<chunk.length){self._cache=Buffer.concat([self._cache,getBlock(self)])}var pad=self._cache.slice(0,chunk.length);self._cache=self._cache.slice(chunk.length);return xor(chunk,pad)}}).call(this,require("buffer").Buffer)},{buffer:47,"buffer-xor":46}],32:[function(require,module,exports){exports.encrypt=function(self,block){return self._cipher.encryptBlock(block)};exports.decrypt=function(self,block){return self._cipher.decryptBlock(block)}},{}],33:[function(require,module,exports){(function(Buffer){var xor=require("buffer-xor");function getBlock(self){self._prev=self._cipher.encryptBlock(self._prev);return self._prev}exports.encrypt=function(self,chunk){while(self._cache.length<chunk.length){self._cache=Buffer.concat([self._cache,getBlock(self)])}var pad=self._cache.slice(0,chunk.length);self._cache=self._cache.slice(chunk.length);return xor(chunk,pad)}}).call(this,require("buffer").Buffer)},{buffer:47,"buffer-xor":46}],34:[function(require,module,exports){(function(Buffer){var aes=require("./aes");var Transform=require("cipher-base");var inherits=require("inherits");inherits(StreamCipher,Transform);module.exports=StreamCipher;function StreamCipher(mode,key,iv,decrypt){if(!(this instanceof StreamCipher)){return new StreamCipher(mode,key,iv)}Transform.call(this);this._cipher=new aes.AES(key);this._prev=new Buffer(iv.length);this._cache=new Buffer("");this._secCache=new Buffer("");this._decrypt=decrypt;iv.copy(this._prev);this._mode=mode}StreamCipher.prototype._update=function(chunk){return this._mode.encrypt(this,chunk,this._decrypt)};StreamCipher.prototype._final=function(){this._cipher.scrub()}}).call(this,require("buffer").Buffer)},{"./aes":20,buffer:47,"cipher-base":48,inherits:101}],35:[function(require,module,exports){var ebtk=require("evp_bytestokey");var aes=require("browserify-aes/browser");var DES=require("browserify-des");var desModes=require("browserify-des/modes");var aesModes=require("browserify-aes/modes");function createCipher(suite,password){var keyLen,ivLen;suite=suite.toLowerCase();if(aesModes[suite]){keyLen=aesModes[suite].key;ivLen=aesModes[suite].iv}else if(desModes[suite]){keyLen=desModes[suite].key*8;ivLen=desModes[suite].iv}else{throw new TypeError("invalid suite type")}var keys=ebtk(password,false,keyLen,ivLen);return createCipheriv(suite,keys.key,keys.iv)}function createDecipher(suite,password){var keyLen,ivLen;suite=suite.toLowerCase();if(aesModes[suite]){keyLen=aesModes[suite].key;ivLen=aesModes[suite].iv}else if(desModes[suite]){keyLen=desModes[suite].key*8;ivLen=desModes[suite].iv}else{throw new TypeError("invalid suite type")}var keys=ebtk(password,false,keyLen,ivLen);return createDecipheriv(suite,keys.key,keys.iv)}function createCipheriv(suite,key,iv){suite=suite.toLowerCase();if(aesModes[suite]){return aes.createCipheriv(suite,key,iv)}else if(desModes[suite]){return new DES({key:key,iv:iv,mode:suite})}else{throw new TypeError("invalid suite type")}}function createDecipheriv(suite,key,iv){suite=suite.toLowerCase();if(aesModes[suite]){return aes.createDecipheriv(suite,key,iv)}else if(desModes[suite]){return new DES({key:key,iv:iv,mode:suite,decrypt:true})}else{throw new TypeError("invalid suite type")}}exports.createCipher=exports.Cipher=createCipher;exports.createCipheriv=exports.Cipheriv=createCipheriv;exports.createDecipher=exports.Decipher=createDecipher;exports.createDecipheriv=exports.Decipheriv=createDecipheriv;function getCiphers(){return Object.keys(desModes).concat(aes.getCiphers())}exports.listCiphers=exports.getCiphers=getCiphers},{"browserify-aes/browser":22,"browserify-aes/modes":26,"browserify-des":36,"browserify-des/modes":37,evp_bytestokey:84}],36:[function(require,module,exports){(function(Buffer){var CipherBase=require("cipher-base");var des=require("des.js");var inherits=require("inherits");var modes={"des-ede3-cbc":des.CBC.instantiate(des.EDE),"des-ede3":des.EDE,"des-ede-cbc":des.CBC.instantiate(des.EDE),"des-ede":des.EDE,"des-cbc":des.CBC.instantiate(des.DES),"des-ecb":des.DES};modes.des=modes["des-cbc"];modes.des3=modes["des-ede3-cbc"];module.exports=DES;inherits(DES,CipherBase);function DES(opts){CipherBase.call(this);var modeName=opts.mode.toLowerCase();var mode=modes[modeName];var type;if(opts.decrypt){type="decrypt"}else{type="encrypt"}var key=opts.key;if(modeName==="des-ede"||modeName==="des-ede-cbc"){key=Buffer.concat([key,key.slice(0,8)])}var iv=opts.iv;this._des=mode.create({key:key,iv:iv,type:type})}DES.prototype._update=function(data){return new Buffer(this._des.update(data))};DES.prototype._final=function(){return new Buffer(this._des.final())}}).call(this,require("buffer").Buffer)},{buffer:47,"cipher-base":48,"des.js":57,inherits:101}],37:[function(require,module,exports){exports["des-ecb"]={key:8,iv:0};exports["des-cbc"]=exports.des={key:8,iv:8};exports["des-ede3-cbc"]=exports.des3={key:24,iv:8};exports["des-ede3"]={key:24,iv:0};exports["des-ede-cbc"]={key:16,iv:8};exports["des-ede"]={key:16,iv:0}},{}],38:[function(require,module,exports){(function(Buffer){var bn=require("bn.js");var randomBytes=require("randombytes");module.exports=crt;function blind(priv){var r=getr(priv);var blinder=r.toRed(bn.mont(priv.modulus)).redPow(new bn(priv.publicExponent)).fromRed();return{blinder:blinder,unblinder:r.invm(priv.modulus)}}function crt(msg,priv){var blinds=blind(priv);var len=priv.modulus.byteLength();var mod=bn.mont(priv.modulus);var blinded=new bn(msg).mul(blinds.blinder).umod(priv.modulus);var c1=blinded.toRed(bn.mont(priv.prime1));var c2=blinded.toRed(bn.mont(priv.prime2));var qinv=priv.coefficient;var p=priv.prime1;var q=priv.prime2;var m1=c1.redPow(priv.exponent1);var m2=c2.redPow(priv.exponent2);m1=m1.fromRed();m2=m2.fromRed();var h=m1.isub(m2).imul(qinv).umod(p);h.imul(q);m2.iadd(h);return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false,len))}crt.getr=getr;function getr(priv){var len=priv.modulus.byteLength();var r=new bn(randomBytes(len));while(r.cmp(priv.modulus)>=0||!r.umod(priv.prime1)||!r.umod(priv.prime2)){r=new bn(randomBytes(len))}return r}}).call(this,require("buffer").Buffer)},{"bn.js":17,buffer:47,randombytes:136}],39:[function(require,module,exports){module.exports=require("./browser/algorithms.json")},{"./browser/algorithms.json":40}],40:[function(require,module,exports){module.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],41:[function(require,module,exports){module.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],42:[function(require,module,exports){(function(Buffer){var createHash=require("create-hash");var stream=require("stream");var inherits=require("inherits");var sign=require("./sign");var verify=require("./verify");var algorithms=require("./algorithms.json");Object.keys(algorithms).forEach(function(key){algorithms[key].id=new Buffer(algorithms[key].id,"hex");algorithms[key.toLowerCase()]=algorithms[key]});function Sign(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hashType=data.hash;this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Sign,stream.Writable);Sign.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Sign.prototype.update=function update(data,enc){if(typeof data==="string")data=new Buffer(data,enc);this._hash.update(data);return this};Sign.prototype.sign=function signMethod(key,enc){this.end();var hash=this._hash.digest();var sig=sign(hash,key,this._hashType,this._signType,this._tag);return enc?sig.toString(enc):sig};function Verify(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hash=createHash(data.hash);this._tag=data.id;this._signType=data.sign}inherits(Verify,stream.Writable);Verify.prototype._write=function _write(data,_,done){this._hash.update(data);done()};Verify.prototype.update=function update(data,enc){if(typeof data==="string")data=new Buffer(data,enc);this._hash.update(data);return this};Verify.prototype.verify=function verifyMethod(key,sig,enc){if(typeof sig==="string")sig=new Buffer(sig,enc);this.end();var hash=this._hash.digest();return verify(sig,hash,key,this._signType,this._tag)};function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}module.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}}).call(this,require("buffer").Buffer)},{"./algorithms.json":40,"./sign":43,"./verify":44,buffer:47,"create-hash":51,inherits:101,stream:160}],43:[function(require,module,exports){(function(Buffer){var createHmac=require("create-hmac");var crt=require("browserify-rsa");var EC=require("elliptic").ec;var BN=require("bn.js");var parseKeys=require("parse-asn1");var curves=require("./curves.json");function sign(hash,key,hashType,signType,tag){var priv=parseKeys(key);if(priv.curve){if(signType!=="ecdsa"&&signType!=="ecdsa/rsa")throw new Error("wrong private key type");return ecSign(hash,priv)}else if(priv.type==="dsa"){if(signType!=="dsa")throw new Error("wrong private key type");return dsaSign(hash,priv,hashType)}else{if(signType!=="rsa"&&signType!=="ecdsa/rsa")throw new Error("wrong private key type")}hash=Buffer.concat([tag,hash]);var len=priv.modulus.byteLength();var pad=[0,1];while(hash.length+pad.length+1<len)pad.push(255);pad.push(0);var i=-1;while(++i<hash.length)pad.push(hash[i]);var out=crt(pad,priv);return out}function ecSign(hash,priv){var curveId=curves[priv.curve.join(".")];if(!curveId)throw new Error("unknown curve "+priv.curve.join("."));var curve=new EC(curveId);var key=curve.keyFromPrivate(priv.privateKey);var out=key.sign(hash);return new Buffer(out.toDER())}function dsaSign(hash,priv,algo){var x=priv.params.priv_key;var p=priv.params.p;var q=priv.params.q;var g=priv.params.g;var r=new BN(0);var k;var H=bits2int(hash,q).mod(q);var s=false;var kv=getKey(x,q,hash,algo);while(s===false){k=makeKey(q,kv,algo);r=makeR(g,k,p,q);s=k.invm(q).imul(H.add(x.mul(r))).mod(q);if(s.cmpn(0)===0){s=false;r=new BN(0)}}return toDER(r,s)}function toDER(r,s){r=r.toArray();s=s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);var total=r.length+s.length+4;var res=[48,total,2,r.length];res=res.concat(r,[2,s.length],s);return new Buffer(res)}function getKey(x,q,hash,algo){x=new Buffer(x.toArray());if(x.length<q.byteLength()){var zeros=new Buffer(q.byteLength()-x.length);zeros.fill(0);x=Buffer.concat([zeros,x])}var hlen=hash.length;var hbits=bits2octets(hash,q);var v=new Buffer(hlen);v.fill(1);var k=new Buffer(hlen);k.fill(0);k=createHmac(algo,k).update(v).update(new Buffer([0])).update(x).update(hbits).digest();v=createHmac(algo,k).update(v).digest();k=createHmac(algo,k).update(v).update(new Buffer([1])).update(x).update(hbits).digest();v=createHmac(algo,k).update(v).digest();return{k:k,v:v}}function bits2int(obits,q){var bits=new BN(obits);var shift=(obits.length<<3)-q.bitLength();if(shift>0)bits.ishrn(shift);return bits}function bits2octets(bits,q){bits=bits2int(bits,q);bits=bits.mod(q);var out=new Buffer(bits.toArray());if(out.length<q.byteLength()){var zeros=new Buffer(q.byteLength()-out.length);zeros.fill(0);out=Buffer.concat([zeros,out])}return out}function makeKey(q,kv,algo){var t;var k;do{t=new Buffer(0);while(t.length*8<q.bitLength()){kv.v=createHmac(algo,kv.k).update(kv.v).digest();t=Buffer.concat([t,kv.v])}k=bits2int(t,q);kv.k=createHmac(algo,kv.k).update(kv.v).update(new Buffer([0])).digest();kv.v=createHmac(algo,kv.k).update(kv.v).digest()}while(k.cmp(q)!==-1);return k}function makeR(g,k,p,q){return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)}module.exports=sign;module.exports.getKey=getKey;module.exports.makeKey=makeKey}).call(this,require("buffer").Buffer)},{"./curves.json":41,"bn.js":17,"browserify-rsa":38,buffer:47,"create-hmac":54,elliptic:67,"parse-asn1":114}],44:[function(require,module,exports){(function(Buffer){var BN=require("bn.js");var EC=require("elliptic").ec;var parseKeys=require("parse-asn1");var curves=require("./curves.json");function verify(sig,hash,key,signType,tag){var pub=parseKeys(key);if(pub.type==="ec"){if(signType!=="ecdsa"&&signType!=="ecdsa/rsa")throw new Error("wrong public key type");return ecVerify(sig,hash,pub)}else if(pub.type==="dsa"){if(signType!=="dsa")throw new Error("wrong public key type");return dsaVerify(sig,hash,pub)}else{if(signType!=="rsa"&&signType!=="ecdsa/rsa")throw new Error("wrong public key type")}hash=Buffer.concat([tag,hash]);var len=pub.modulus.byteLength();var pad=[1];var padNum=0;while(hash.length+pad.length+2<len){pad.push(255);padNum++}pad.push(0);var i=-1;while(++i<hash.length){pad.push(hash[i])}pad=new Buffer(pad);var red=BN.mont(pub.modulus);sig=new BN(sig).toRed(red);sig=sig.redPow(new BN(pub.publicExponent));sig=new Buffer(sig.fromRed().toArray());var out=padNum<8?1:0;len=Math.min(sig.length,pad.length);if(sig.length!==pad.length)out=1;i=-1;while(++i<len)out|=sig[i]^pad[i];return out===0}function ecVerify(sig,hash,pub){var curveId=curves[pub.data.algorithm.curve.join(".")];if(!curveId)throw new Error("unknown curve "+pub.data.algorithm.curve.join("."));var curve=new EC(curveId);var pubkey=pub.data.subjectPrivateKey.data;return curve.verify(hash,sig,pubkey)}function dsaVerify(sig,hash,pub){var p=pub.data.p;var q=pub.data.q;var g=pub.data.g;var y=pub.data.pub_key;var unpacked=parseKeys.signature.decode(sig,"der");var s=unpacked.s;var r=unpacked.r;checkValue(s,q);checkValue(r,q);var montp=BN.mont(p);var w=s.invm(q);var v=g.toRed(montp).redPow(new BN(hash).mul(w).mod(q)).fromRed().mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()).mod(p).mod(q);return v.cmp(r)===0}function checkValue(b,q){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(q)>=q)throw new Error("invalid sig")}module.exports=verify}).call(this,require("buffer").Buffer)},{"./curves.json":41,"bn.js":17,buffer:47,elliptic:67,"parse-asn1":114}],45:[function(require,module,exports){arguments[4][19][0].apply(exports,arguments)},{dup:19}],46:[function(require,module,exports){(function(Buffer){module.exports=function xor(a,b){var length=Math.min(a.length,b.length);var buffer=new Buffer(length);for(var i=0;i<length;++i){buffer[i]=a[i]^b[i]}return buffer}}).call(this,require("buffer").Buffer)},{buffer:47}],47:[function(require,module,exports){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH;Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport();if(!Buffer.TYPED_ARRAY_SUPPORT&&typeof console!=="undefined"&&typeof console.error==="function"){console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you require old browser support.")}function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42}catch(e){return false}}function createBuffer(length){if(length>K_MAX_LENGTH){throw new RangeError("Invalid typed array length")}var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){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(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(value)){return fromArrayBuffer(value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(value,encodingOrOffset)}return fromObject(value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;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(size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(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;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length){buf=buf.slice(0,actual)}return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i<length;i+=1){buf[i]=array[i]&255}return buf}function fromArrayBuffer(array,byteOffset,length){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")}var buf;if(byteOffset===undefined&&length===undefined){buf=new Uint8Array(array)}else if(length===undefined){buf=new Uint8Array(array,byteOffset)}else{buf=new Uint8Array(array,byteOffset,length)}buf.__proto__=Buffer.prototype;return buf}function fromObject(obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;var buf=createBuffer(len);if(buf.length===0){return buf}obj.copy(buf,0,0,len);return buf}if(obj){if(isArrayBufferView(obj)||"length"in obj){if(typeof obj.length!=="number"||numberIsNaN(obj.length)){return createBuffer(0)}return fromArrayLike(obj)}if(obj.type==="Buffer"&&Array.isArray(obj.data)){return fromArrayLike(obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=K_MAX_LENGTH){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+K_MAX_LENGTH.toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true};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(!Array.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(isArrayBufferView(string)||isArrayBuffer(string)){return string.byteLength}if(typeof string!=="string"){string=""+string}var len=string.length;if(len===0)return 0;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;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}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}}}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;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};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(numberIsNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}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}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(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}}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(numberIsNaN(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){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset>>>0;if(isFinite(length)){length=length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}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":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>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}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]&127)}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=this.subarray(start,end);newBuf.__proto__=Buffer.prototype;return newBuf};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*=256)){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*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(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*=256)){val+=this[offset+i]*mul}mul*=128;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*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;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){offset=offset>>>0;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){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;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&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}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&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;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&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}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&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;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){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}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){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}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)};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;if(end===start)return 0;if(target.length===0||this.length===0)return 0;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");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){for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3){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};Buffer.prototype.fill=function fill(val,start,end,encoding){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(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:new Buffer(val,encoding);var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len]}}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function base64clean(str){str=str.trim().replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}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);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){byteArray.push(str.charCodeAt(i)&255)}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 isArrayBuffer(obj){return obj instanceof ArrayBuffer||obj!=null&&obj.constructor!=null&&obj.constructor.name==="ArrayBuffer"&&typeof obj.byteLength==="number"}function isArrayBufferView(obj){return typeof ArrayBuffer.isView==="function"&&ArrayBuffer.isView(obj)}function numberIsNaN(obj){return obj!==obj}},{"base64-js":16,ieee754:99}],48:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;var Transform=require("stream").Transform;var StringDecoder=require("string_decoder").StringDecoder;var inherits=require("inherits");function CipherBase(hashMode){Transform.call(this);this.hashMode=typeof hashMode==="string";if(this.hashMode){this[hashMode]=this._finalOrDigest}else{this.final=this._finalOrDigest}if(this._final){this.__final=this._final;this._final=null}this._decoder=null;this._encoding=null}inherits(CipherBase,Transform);CipherBase.prototype.update=function(data,inputEnc,outputEnc){if(typeof data==="string"){data=Buffer.from(data,inputEnc)}var outData=this._update(data);if(this.hashMode)return this;if(outputEnc){outData=this._toString(outData,outputEnc)}return outData};CipherBase.prototype.setAutoPadding=function(){};CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};CipherBase.prototype._transform=function(data,_,next){var err;try{if(this.hashMode){this._update(data)}else{this.push(this._update(data))}}catch(e){err=e}finally{next(err)}};CipherBase.prototype._flush=function(done){var err;try{this.push(this.__final())}catch(e){err=e}done(err)};CipherBase.prototype._finalOrDigest=function(outputEnc){var outData=this.__final()||Buffer.alloc(0);if(outputEnc){outData=this._toString(outData,outputEnc,true)}return outData};CipherBase.prototype._toString=function(value,enc,fin){if(!this._decoder){this._decoder=new StringDecoder(enc);this._encoding=enc}if(this._encoding!==enc)throw new Error("can't switch encodings");var out=this._decoder.write(value);if(fin){out+=this._decoder.end()}return out};module.exports=CipherBase},{inherits:101,"safe-buffer":151,stream:160,string_decoder:161}],49:[function(require,module,exports){(function(Buffer){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"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":102}],50:[function(require,module,exports){(function(Buffer){var elliptic=require("elliptic");var BN=require("bn.js");module.exports=function createECDH(curve){return new ECDH(curve)};var aliases={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};aliases.p224=aliases.secp224r1;aliases.p256=aliases.secp256r1=aliases.prime256v1;aliases.p192=aliases.secp192r1=aliases.prime192v1;aliases.p384=aliases.secp384r1;aliases.p521=aliases.secp521r1;function ECDH(curve){this.curveType=aliases[curve];if(!this.curveType){this.curveType={name:curve}}this.curve=new elliptic.ec(this.curveType.name);this.keys=void 0}ECDH.prototype.generateKeys=function(enc,format){this.keys=this.curve.genKeyPair();return this.getPublicKey(enc,format)};ECDH.prototype.computeSecret=function(other,inenc,enc){inenc=inenc||"utf8";if(!Buffer.isBuffer(other)){other=new Buffer(other,inenc)}var otherPub=this.curve.keyFromPublic(other).getPublic();var out=otherPub.mul(this.keys.getPrivate()).getX();return formatReturnValue(out,enc,this.curveType.byteLength)};ECDH.prototype.getPublicKey=function(enc,format){var key=this.keys.getPublic(format==="compressed",true);if(format==="hybrid"){if(key[key.length-1]%2){key[0]=7}else{key[0]=6}}return formatReturnValue(key,enc)};ECDH.prototype.getPrivateKey=function(enc){return formatReturnValue(this.keys.getPrivate(),enc)};ECDH.prototype.setPublicKey=function(pub,enc){enc=enc||"utf8";if(!Buffer.isBuffer(pub)){pub=new Buffer(pub,enc)}this.keys._importPublic(pub);return this};ECDH.prototype.setPrivateKey=function(priv,enc){enc=enc||"utf8";if(!Buffer.isBuffer(priv)){priv=new Buffer(priv,enc)}var _priv=new BN(priv);_priv=_priv.toString(16);this.keys._importPrivate(_priv);return this};function formatReturnValue(bn,enc,len){if(!Array.isArray(bn)){bn=bn.toArray()}var buf=new Buffer(bn);if(len&&buf.length<len){var zeros=new Buffer(len-buf.length);zeros.fill(0);buf=Buffer.concat([zeros,buf])}if(!enc){return buf}else{return buf.toString(enc)}}}).call(this,require("buffer").Buffer)},{"bn.js":17,buffer:47,elliptic:67}],51:[function(require,module,exports){(function(Buffer){"use strict";var inherits=require("inherits");var md5=require("./md5");var RIPEMD160=require("ripemd160");var sha=require("sha.js");var Base=require("cipher-base");function HashNoConstructor(hash){Base.call(this,"digest");this._hash=hash;this.buffers=[]}inherits(HashNoConstructor,Base);HashNoConstructor.prototype._update=function(data){this.buffers.push(data)};HashNoConstructor.prototype._final=function(){var buf=Buffer.concat(this.buffers);var r=this._hash(buf);this.buffers=null;return r};function Hash(hash){Base.call(this,"digest");this._hash=hash}inherits(Hash,Base);Hash.prototype._update=function(data){this._hash.update(data)};Hash.prototype._final=function(){return this._hash.digest()};module.exports=function createHash(alg){alg=alg.toLowerCase();if(alg==="md5")return new HashNoConstructor(md5);if(alg==="rmd160"||alg==="ripemd160")return new Hash(new RIPEMD160);return new Hash(sha(alg))}}).call(this,require("buffer").Buffer)},{"./md5":53,buffer:47,"cipher-base":48,inherits:101,ripemd160:150,"sha.js":153}],52:[function(require,module,exports){(function(Buffer){"use strict";var intSize=4;var zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var charSize=8;var hashSize=16;function toArray(buf){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}var arr=new Array(buf.length>>>2);for(var i=0,j=0;i<buf.length;i+=intSize,j++){arr[j]=buf.readInt32LE(i)}return arr}module.exports=function hash(buf,fn){var arr=fn(toArray(buf),buf.length*charSize);buf=new Buffer(hashSize);for(var i=0;i<arr.length;i++){buf.writeInt32LE(arr[i],i<<2,true)}return buf}}).call(this,require("buffer").Buffer)},{buffer:47}],53:[function(require,module,exports){"use strict";var makeHash=require("./make-hash");function core_md5(x,len){x[len>>5]|=128<<len%32;x[(len+64>>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}return[a,b,c,d]}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn(b&c|~b&d,a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn(b&d|c&~d,a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|~d),a,b,x,s,t)}function safe_add(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt}module.exports=function md5(buf){return makeHash(buf,core_md5)}},{"./make-hash":52}],54:[function(require,module,exports){"use strict";var inherits=require("inherits");var Legacy=require("./legacy");var Base=require("cipher-base");var Buffer=require("safe-buffer").Buffer;var md5=require("create-hash/md5");var RIPEMD160=require("ripemd160");var sha=require("sha.js");var ZEROS=Buffer.alloc(128);function Hmac(alg,key){Base.call(this,"digest");if(typeof key==="string"){key=Buffer.from(key)}var blocksize=alg==="sha512"||alg==="sha384"?128:64;this._alg=alg;this._key=key;if(key.length>blocksize){var hash=alg==="rmd160"?new RIPEMD160:sha(alg);key=hash.update(key).digest()}else if(key.length<blocksize){key=Buffer.concat([key,ZEROS],blocksize)}var ipad=this._ipad=Buffer.allocUnsafe(blocksize);var opad=this._opad=Buffer.allocUnsafe(blocksize);for(var i=0;i<blocksize;i++){ipad[i]=key[i]^54;opad[i]=key[i]^92}this._hash=alg==="rmd160"?new RIPEMD160:sha(alg);this._hash.update(ipad)}inherits(Hmac,Base);Hmac.prototype._update=function(data){this._hash.update(data)};Hmac.prototype._final=function(){var h=this._hash.digest();var hash=this._alg==="rmd160"?new RIPEMD160:sha(this._alg);return hash.update(this._opad).update(h).digest()};module.exports=function createHmac(alg,key){alg=alg.toLowerCase();if(alg==="rmd160"||alg==="ripemd160"){return new Hmac("rmd160",key)}if(alg==="md5"){return new Legacy(md5,key)}return new Hmac(alg,key)}},{"./legacy":55,"cipher-base":48,"create-hash/md5":53,inherits:101,ripemd160:150,"safe-buffer":151,"sha.js":153}],55:[function(require,module,exports){"use strict";var inherits=require("inherits");var Buffer=require("safe-buffer").Buffer;var Base=require("cipher-base");var ZEROS=Buffer.alloc(128);var blocksize=64;function Hmac(alg,key){Base.call(this,"digest");if(typeof key==="string"){key=Buffer.from(key)}this._alg=alg;this._key=key;if(key.length>blocksize){key=alg(key)}else if(key.length<blocksize){key=Buffer.concat([key,ZEROS],blocksize)}var ipad=this._ipad=Buffer.allocUnsafe(blocksize);var opad=this._opad=Buffer.allocUnsafe(blocksize);for(var i=0;i<blocksize;i++){ipad[i]=key[i]^54;opad[i]=key[i]^92}this._hash=[ipad]}inherits(Hmac,Base);Hmac.prototype._update=function(data){this._hash.push(data)};Hmac.prototype._final=function(){var h=this._alg(Buffer.concat(this._hash));return this._alg(Buffer.concat([this._opad,h]))};module.exports=Hmac},{"cipher-base":48,inherits:101,"safe-buffer":151}],56:[function(require,module,exports){"use strict";exports.randomBytes=exports.rng=exports.pseudoRandomBytes=exports.prng=require("randombytes");exports.createHash=exports.Hash=require("create-hash");exports.createHmac=exports.Hmac=require("create-hmac");var algos=require("browserify-sign/algos");var algoKeys=Object.keys(algos);var hashes=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(algoKeys);exports.getHashes=function(){return hashes};var p=require("pbkdf2");exports.pbkdf2=p.pbkdf2;exports.pbkdf2Sync=p.pbkdf2Sync;var aes=require("browserify-cipher");exports.Cipher=aes.Cipher;exports.createCipher=aes.createCipher;exports.Cipheriv=aes.Cipheriv;exports.createCipheriv=aes.createCipheriv;exports.Decipher=aes.Decipher;exports.createDecipher=aes.createDecipher;exports.Decipheriv=aes.Decipheriv;exports.createDecipheriv=aes.createDecipheriv;exports.getCiphers=aes.getCiphers;exports.listCiphers=aes.listCiphers;var dh=require("diffie-hellman");exports.DiffieHellmanGroup=dh.DiffieHellmanGroup;exports.createDiffieHellmanGroup=dh.createDiffieHellmanGroup;exports.getDiffieHellman=dh.getDiffieHellman;exports.createDiffieHellman=dh.createDiffieHellman;exports.DiffieHellman=dh.DiffieHellman;var sign=require("browserify-sign");exports.createSign=sign.createSign;exports.Sign=sign.Sign;exports.createVerify=sign.createVerify;exports.Verify=sign.Verify;exports.createECDH=require("create-ecdh");var publicEncrypt=require("public-encrypt");exports.publicEncrypt=publicEncrypt.publicEncrypt;exports.privateEncrypt=publicEncrypt.privateEncrypt;exports.publicDecrypt=publicEncrypt.publicDecrypt;exports.privateDecrypt=publicEncrypt.privateDecrypt;exports.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))};exports.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":35,"browserify-sign":42,"browserify-sign/algos":39,"create-ecdh":50,"create-hash":51,"create-hmac":54,"diffie-hellman":63,pbkdf2:116,"public-encrypt":130,randombytes:136}],57:[function(require,module,exports){"use strict";exports.utils=require("./des/utils");exports.Cipher=require("./des/cipher");exports.DES=require("./des/des");exports.CBC=require("./des/cbc");exports.EDE=require("./des/ede")},{"./des/cbc":58,"./des/cipher":59,"./des/des":60,"./des/ede":61,"./des/utils":62}],58:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");var proto={};function CBCState(iv){assert.equal(iv.length,8,"Invalid IV length");this.iv=new Array(8);for(var i=0;i<this.iv.length;i++)this.iv[i]=iv[i]}function instantiate(Base){function CBC(options){Base.call(this,options);this._cbcInit()}inherits(CBC,Base);var keys=Object.keys(proto);for(var i=0;i<keys.length;i++){var key=keys[i];CBC.prototype[key]=proto[key]}CBC.create=function create(options){return new CBC(options)};return CBC}exports.instantiate=instantiate;proto._cbcInit=function _cbcInit(){var state=new CBCState(this.options.iv);this._cbcState=state};proto._update=function _update(inp,inOff,out,outOff){var state=this._cbcState;var superProto=this.constructor.super_.prototype;var iv=state.iv;if(this.type==="encrypt"){for(var i=0;i<this.blockSize;i++)iv[i]^=inp[inOff+i];superProto._update.call(this,iv,0,out,outOff);for(var i=0;i<this.blockSize;i++)iv[i]=out[outOff+i]}else{superProto._update.call(this,inp,inOff,out,outOff);for(var i=0;i<this.blockSize;i++)out[outOff+i]^=iv[i];for(var i=0;i<this.blockSize;i++)iv[i]=inp[inOff+i]}}},{inherits:101,"minimalistic-assert":107}],59:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");function Cipher(options){this.options=options;this.type=this.options.type;this.blockSize=8;this._init();this.buffer=new Array(this.blockSize);this.bufferOff=0}module.exports=Cipher;Cipher.prototype._init=function _init(){};Cipher.prototype.update=function update(data){if(data.length===0)return[];if(this.type==="decrypt")return this._updateDecrypt(data);else return this._updateEncrypt(data)};Cipher.prototype._buffer=function _buffer(data,off){var min=Math.min(this.buffer.length-this.bufferOff,data.length-off);for(var i=0;i<min;i++)this.buffer[this.bufferOff+i]=data[off+i];this.bufferOff+=min;return min};Cipher.prototype._flushBuffer=function _flushBuffer(out,off){this._update(this.buffer,0,out,off);this.bufferOff=0;return this.blockSize};Cipher.prototype._updateEncrypt=function _updateEncrypt(data){var inputOff=0;var outputOff=0;var count=(this.bufferOff+data.length)/this.blockSize|0;var out=new Array(count*this.blockSize);if(this.bufferOff!==0){inputOff+=this._buffer(data,inputOff);if(this.bufferOff===this.buffer.length)outputOff+=this._flushBuffer(out,outputOff)}var max=data.length-(data.length-inputOff)%this.blockSize;for(;inputOff<max;inputOff+=this.blockSize){this._update(data,inputOff,out,outputOff);outputOff+=this.blockSize}for(;inputOff<data.length;inputOff++,this.bufferOff++)this.buffer[this.bufferOff]=data[inputOff];return out};Cipher.prototype._updateDecrypt=function _updateDecrypt(data){var inputOff=0;var outputOff=0;var count=Math.ceil((this.bufferOff+data.length)/this.blockSize)-1;var out=new Array(count*this.blockSize);for(;count>0;count--){inputOff+=this._buffer(data,inputOff);outputOff+=this._flushBuffer(out,outputOff)}inputOff+=this._buffer(data,inputOff);return out};Cipher.prototype.final=function final(buffer){var first;if(buffer)first=this.update(buffer);var last;if(this.type==="encrypt")last=this._finalEncrypt();else last=this._finalDecrypt();if(first)return first.concat(last);else return last};Cipher.prototype._pad=function _pad(buffer,off){if(off===0)return false;while(off<buffer.length)buffer[off++]=0;return true};Cipher.prototype._finalEncrypt=function _finalEncrypt(){if(!this._pad(this.buffer,this.bufferOff))return[];var out=new Array(this.blockSize);this._update(this.buffer,0,out,0);return out};Cipher.prototype._unpad=function _unpad(buffer){return buffer};Cipher.prototype._finalDecrypt=function _finalDecrypt(){assert.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var out=new Array(this.blockSize);this._flushBuffer(out,0);return this._unpad(out)}},{"minimalistic-assert":107}],60:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");var des=require("../des");var utils=des.utils;var Cipher=des.Cipher;function DESState(){this.tmp=new Array(2);this.keys=null}function DES(options){Cipher.call(this,options);var state=new DESState;this._desState=state;this.deriveKeys(state,options.key)}inherits(DES,Cipher);module.exports=DES;DES.create=function create(options){return new DES(options)};var shiftTable=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];DES.prototype.deriveKeys=function deriveKeys(state,key){state.keys=new Array(16*2);assert.equal(key.length,this.blockSize,"Invalid key length");var kL=utils.readUInt32BE(key,0);var kR=utils.readUInt32BE(key,4);utils.pc1(kL,kR,state.tmp,0);kL=state.tmp[0];kR=state.tmp[1];for(var i=0;i<state.keys.length;i+=2){var shift=shiftTable[i>>>1];kL=utils.r28shl(kL,shift);kR=utils.r28shl(kR,shift);utils.pc2(kL,kR,state.keys,i)}};DES.prototype._update=function _update(inp,inOff,out,outOff){var state=this._desState;var l=utils.readUInt32BE(inp,inOff);var r=utils.readUInt32BE(inp,inOff+4);utils.ip(l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];if(this.type==="encrypt")this._encrypt(state,l,r,state.tmp,0);else this._decrypt(state,l,r,state.tmp,0);l=state.tmp[0];r=state.tmp[1];utils.writeUInt32BE(out,l,outOff);utils.writeUInt32BE(out,r,outOff+4)};DES.prototype._pad=function _pad(buffer,off){var value=buffer.length-off;for(var i=off;i<buffer.length;i++)buffer[i]=value;return true};DES.prototype._unpad=function _unpad(buffer){var pad=buffer[buffer.length-1];for(var i=buffer.length-pad;i<buffer.length;i++)assert.equal(buffer[i],pad);return buffer.slice(0,buffer.length-pad)};DES.prototype._encrypt=function _encrypt(state,lStart,rStart,out,off){var l=lStart;var r=rStart;for(var i=0;i<state.keys.length;i+=2){var keyL=state.keys[i];var keyR=state.keys[i+1];utils.expand(r,state.tmp,0);keyL^=state.tmp[0];keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR);var f=utils.permute(s);var t=r;r=(l^f)>>>0;l=t}utils.rip(r,l,out,off)};DES.prototype._decrypt=function _decrypt(state,lStart,rStart,out,off){var l=rStart;var r=lStart;for(var i=state.keys.length-2;i>=0;i-=2){var keyL=state.keys[i];var keyR=state.keys[i+1];utils.expand(l,state.tmp,0);keyL^=state.tmp[0];keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR);var f=utils.permute(s);var t=l;l=(r^f)>>>0;r=t}utils.rip(l,r,out,off)}},{"../des":57,inherits:101,"minimalistic-assert":107}],61:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");var des=require("../des");var Cipher=des.Cipher;var DES=des.DES;function EDEState(type,key){assert.equal(key.length,24,"Invalid key length");var k1=key.slice(0,8);var k2=key.slice(8,16);var k3=key.slice(16,24);if(type==="encrypt"){this.ciphers=[DES.create({type:"encrypt",key:k1}),DES.create({type:"decrypt",key:k2}),DES.create({type:"encrypt",key:k3})]}else{this.ciphers=[DES.create({type:"decrypt",key:k3}),DES.create({type:"encrypt",key:k2}),DES.create({type:"decrypt",key:k1})]}}function EDE(options){Cipher.call(this,options);var state=new EDEState(this.type,this.options.key);this._edeState=state}inherits(EDE,Cipher);module.exports=EDE;EDE.create=function create(options){return new EDE(options)};EDE.prototype._update=function _update(inp,inOff,out,outOff){var state=this._edeState;state.ciphers[0]._update(inp,inOff,out,outOff);state.ciphers[1]._update(out,outOff,out,outOff);state.ciphers[2]._update(out,outOff,out,outOff)};EDE.prototype._pad=DES.prototype._pad;EDE.prototype._unpad=DES.prototype._unpad},{"../des":57,inherits:101,"minimalistic-assert":107}],62:[function(require,module,exports){"use strict";exports.readUInt32BE=function readUInt32BE(bytes,off){var res=bytes[0+off]<<24|bytes[1+off]<<16|bytes[2+off]<<8|bytes[3+off];return res>>>0};exports.writeUInt32BE=function writeUInt32BE(bytes,value,off){bytes[0+off]=value>>>24;bytes[1+off]=value>>>16&255;bytes[2+off]=value>>>8&255;bytes[3+off]=value&255};exports.ip=function ip(inL,inR,out,off){var outL=0;var outR=0;for(var i=6;i>=0;i-=2){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>>j+i&1}}for(var i=6;i>=0;i-=2){for(var j=1;j<=25;j+=8){outR<<=1;outR|=inR>>>j+i&1}for(var j=1;j<=25;j+=8){outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.rip=function rip(inL,inR,out,off){var outL=0;var outR=0;for(var i=0;i<4;i++){for(var j=24;j>=0;j-=8){outL<<=1;outL|=inR>>>j+i&1;outL<<=1;outL|=inL>>>j+i&1}}for(var i=4;i<8;i++){for(var j=24;j>=0;j-=8){outR<<=1;outR|=inR>>>j+i&1;outR<<=1;outR|=inL>>>j+i&1}}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.pc1=function pc1(inL,inR,out,off){var outL=0;var outR=0;for(var i=7;i>=5;i--){for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outL<<=1;outL|=inR>>j+i&1}for(var i=1;i<=3;i++){for(var j=0;j<=24;j+=8){outR<<=1;outR|=inR>>j+i&1}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}}for(var j=0;j<=24;j+=8){outR<<=1;outR|=inL>>j+i&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.r28shl=function r28shl(num,shift){return num<<shift&268435455|num>>>28-shift};var pc2table=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];exports.pc2=function pc2(inL,inR,out,off){var outL=0;var outR=0;var len=pc2table.length>>>1;for(var i=0;i<len;i++){outL<<=1;outL|=inL>>>pc2table[i]&1}for(var i=len;i<pc2table.length;i++){outR<<=1;outR|=inR>>>pc2table[i]&1}out[off+0]=outL>>>0;out[off+1]=outR>>>0};exports.expand=function expand(r,out,off){var outL=0;var outR=0;outL=(r&1)<<5|r>>>27;for(var i=23;i>=15;i-=4){outL<<=6;outL|=r>>>i&63}for(var i=11;i>=3;i-=4){outR|=r>>>i&63;outR<<=6}outR|=(r&31)<<1|r>>>31;out[off+0]=outL>>>0;out[off+1]=outR>>>0};var sTable=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];exports.substitute=function substitute(inL,inR){var out=0;for(var i=0;i<4;i++){var b=inL>>>18-i*6&63;var sb=sTable[i*64+b];out<<=4;out|=sb}for(var i=0;i<4;i++){var b=inR>>>18-i*6&63;var sb=sTable[4*64+i*64+b];out<<=4;out|=sb}return out>>>0};var permuteTable=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];exports.permute=function permute(num){var out=0;for(var i=0;i<permuteTable.length;i++){out<<=1;out|=num>>>permuteTable[i]&1}return out>>>0};exports.padSplit=function padSplit(num,size,group){var str=num.toString(2);while(str.length<size)str="0"+str;var out=[];for(var i=0;i<size;i+=group)out.push(str.slice(i,i+group));return out.join(" ")}},{}],63:[function(require,module,exports){(function(Buffer){var generatePrime=require("./lib/generatePrime");var primes=require("./lib/primes.json");var DH=require("./lib/dh");function getDiffieHellman(mod){var prime=new Buffer(primes[mod].prime,"hex");var gen=new Buffer(primes[mod].gen,"hex");return new DH(prime,gen)}var ENCODINGS={binary:true,hex:true,base64:true};function createDiffieHellman(prime,enc,generator,genc){if(Buffer.isBuffer(enc)||ENCODINGS[enc]===undefined){return createDiffieHellman(prime,"binary",enc,generator)}enc=enc||"binary";genc=genc||"binary";generator=generator||new Buffer([2]);if(!Buffer.isBuffer(generator)){generator=new Buffer(generator,genc)}if(typeof prime==="number"){return new DH(generatePrime(prime,generator),generator,true)}if(!Buffer.isBuffer(prime)){prime=new Buffer(prime,enc)}return new DH(prime,generator,true)}exports.DiffieHellmanGroup=exports.createDiffieHellmanGroup=exports.getDiffieHellman=getDiffieHellman;exports.createDiffieHellman=exports.DiffieHellman=createDiffieHellman}).call(this,require("buffer").Buffer)},{"./lib/dh":64,"./lib/generatePrime":65,"./lib/primes.json":66,buffer:47}],64:[function(require,module,exports){(function(Buffer){var BN=require("bn.js");var MillerRabin=require("miller-rabin");var millerRabin=new MillerRabin;var TWENTYFOUR=new BN(24);var ELEVEN=new BN(11);var TEN=new BN(10);var THREE=new BN(3);var SEVEN=new BN(7);var primes=require("./generatePrime");var randomBytes=require("randombytes");module.exports=DH;function setPublicKey(pub,enc){enc=enc||"utf8";if(!Buffer.isBuffer(pub)){pub=new Buffer(pub,enc)}this._pub=new BN(pub);return this}function setPrivateKey(priv,enc){enc=enc||"utf8";if(!Buffer.isBuffer(priv)){priv=new Buffer(priv,enc)}this._priv=new BN(priv);return this}var primeCache={};function checkPrime(prime,generator){var gen=generator.toString("hex");var hex=[gen,prime.toString(16)].join("_");if(hex in primeCache){return primeCache[hex]}var error=0;if(prime.isEven()||!primes.simpleSieve||!primes.fermatTest(prime)||!millerRabin.test(prime)){error+=1;if(gen==="02"||gen==="05"){error+=8}else{error+=4}primeCache[hex]=error;return error}if(!millerRabin.test(prime.shrn(1))){error+=2}var rem;switch(gen){case"02":if(prime.mod(TWENTYFOUR).cmp(ELEVEN)){error+=8}break;case"05":rem=prime.mod(TEN);if(rem.cmp(THREE)&&rem.cmp(SEVEN)){error+=8}break;default:error+=4}primeCache[hex]=error;return error}function DH(prime,generator,malleable){this.setGenerator(generator);this.__prime=new BN(prime);this._prime=BN.mont(this.__prime);this._primeLen=prime.length;this._pub=undefined;this._priv=undefined;this._primeCode=undefined;if(malleable){this.setPublicKey=setPublicKey;this.setPrivateKey=setPrivateKey}else{this._primeCode=8}}Object.defineProperty(DH.prototype,"verifyError",{enumerable:true,get:function(){if(typeof this._primeCode!=="number"){this._primeCode=checkPrime(this.__prime,this.__gen)}return this._primeCode}});DH.prototype.generateKeys=function(){if(!this._priv){this._priv=new BN(randomBytes(this._primeLen))}this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed();return this.getPublicKey()};DH.prototype.computeSecret=function(other){other=new BN(other);other=other.toRed(this._prime);var secret=other.redPow(this._priv).fromRed();var out=new Buffer(secret.toArray());var prime=this.getPrime();if(out.length<prime.length){var front=new Buffer(prime.length-out.length);front.fill(0);out=Buffer.concat([front,out])}return out};DH.prototype.getPublicKey=function getPublicKey(enc){return formatReturnValue(this._pub,enc)};DH.prototype.getPrivateKey=function getPrivateKey(enc){return formatReturnValue(this._priv,enc)};DH.prototype.getPrime=function(enc){return formatReturnValue(this.__prime,enc)};DH.prototype.getGenerator=function(enc){return formatReturnValue(this._gen,enc)};DH.prototype.setGenerator=function(gen,enc){enc=enc||"utf8";if(!Buffer.isBuffer(gen)){gen=new Buffer(gen,enc)}this.__gen=gen;this._gen=new BN(gen);return this};function formatReturnValue(bn,enc){var buf=new Buffer(bn.toArray());if(!enc){return buf}else{return buf.toString(enc)}}}).call(this,require("buffer").Buffer)},{"./generatePrime":65,"bn.js":17,buffer:47,"miller-rabin":106,randombytes:136}],65:[function(require,module,exports){var randomBytes=require("randombytes");module.exports=findPrime;findPrime.simpleSieve=simpleSieve;findPrime.fermatTest=fermatTest;var BN=require("bn.js");var TWENTYFOUR=new BN(24);var MillerRabin=require("miller-rabin");var millerRabin=new MillerRabin;var ONE=new BN(1);var TWO=new BN(2);var FIVE=new BN(5);var SIXTEEN=new BN(16);var EIGHT=new BN(8);var TEN=new BN(10);var THREE=new BN(3);var SEVEN=new BN(7);var ELEVEN=new BN(11);var FOUR=new BN(4);var TWELVE=new BN(12);var primes=null;function _getPrimes(){if(primes!==null)return primes;var limit=1048576;var res=[];res[0]=2;for(var i=1,k=3;k<limit;k+=2){var sqrt=Math.ceil(Math.sqrt(k));for(var j=0;j<i&&res[j]<=sqrt;j++)if(k%res[j]===0)break;if(i!==j&&res[j]<=sqrt)continue;res[i++]=k}primes=res;return res}function simpleSieve(p){var primes=_getPrimes();for(var i=0;i<primes.length;i++)if(p.modn(primes[i])===0){if(p.cmpn(primes[i])===0){return true}else{return false}}return true}function fermatTest(p){var red=BN.mont(p);return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1)===0}function findPrime(bits,gen){if(bits<16){if(gen===2||gen===5){return new BN([140,123])}else{return new BN([140,39])}}gen=new BN(gen);var num,n2;while(true){num=new BN(randomBytes(Math.ceil(bits/8)));while(num.bitLength()>bits){num.ishrn(1)}if(num.isEven()){num.iadd(ONE)}if(!num.testn(1)){num.iadd(TWO)}if(!gen.cmp(TWO)){while(num.mod(TWENTYFOUR).cmp(ELEVEN)){num.iadd(FOUR)}}else if(!gen.cmp(FIVE)){while(num.mod(TEN).cmp(THREE)){num.iadd(FOUR)}}n2=num.shrn(1);if(simpleSieve(n2)&&simpleSieve(num)&&fermatTest(n2)&&fermatTest(num)&&millerRabin.test(n2)&&millerRabin.test(num)){return num}}}},{"bn.js":17,"miller-rabin":106,randombytes:136}],66:[function(require,module,exports){module.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],67:[function(require,module,exports){"use strict";var elliptic=exports;elliptic.version=require("../package.json").version;elliptic.utils=require("./elliptic/utils");elliptic.rand=require("brorand");elliptic.curve=require("./elliptic/curve");elliptic.curves=require("./elliptic/curves");elliptic.ec=require("./elliptic/ec");elliptic.eddsa=require("./elliptic/eddsa")},{"../package.json":82,"./elliptic/curve":70,"./elliptic/curves":73,"./elliptic/ec":74,"./elliptic/eddsa":77,"./elliptic/utils":81,brorand:18}],68:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var getNAF=utils.getNAF;var getJSF=utils.getJSF;var assert=utils.assert;function BaseCurve(type,conf){this.type=type;this.p=new BN(conf.p,16);this.red=conf.prime?BN.red(conf.prime):BN.mont(this.p);this.zero=new BN(0).toRed(this.red);this.one=new BN(1).toRed(this.red);this.two=new BN(2).toRed(this.red);this.n=conf.n&&new BN(conf.n,16);this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);var adjustCount=this.n&&this.p.div(this.n);if(!adjustCount||adjustCount.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}module.exports=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert(p.precomputed);var doubles=p._getDoubles();var naf=getNAF(k,1);var I=(1<<doubles.step+1)-(doubles.step%2===0?2:1);I/=3;var repr=[];for(var j=0;j<naf.length;j+=doubles.step){var nafW=0;for(var k=j+doubles.step-1;k>=j;k--)nafW=(nafW<<1)+naf[k];repr.push(nafW)}var a=this.jpoint(null,null,null);var b=this.jpoint(null,null,null);for(var i=I;i>0;i--){for(var j=0;j<repr.length;j++){var nafW=repr[j];if(nafW===i)b=b.mixedAdd(doubles.points[j]);else if(nafW===-i)b=b.mixedAdd(doubles.points[j].neg())}a=a.add(b)}return a.toP()};BaseCurve.prototype._wnafMul=function _wnafMul(p,k){var w=4;var nafPoints=p._getNAFPoints(w);w=nafPoints.wnd;var wnd=nafPoints.points;var naf=getNAF(k,w);var acc=this.jpoint(null,null,null);for(var i=naf.length-1;i>=0;i--){for(var k=0;i>=0&&naf[i]===0;i--)k++;if(i>=0)k++;acc=acc.dblp(k);if(i<0)break;var z=naf[i];assert(z!==0);if(p.type==="affine"){if(z>0)acc=acc.mixedAdd(wnd[z-1>>1]);else acc=acc.mixedAdd(wnd[-z-1>>1].neg())}else{if(z>0)acc=acc.add(wnd[z-1>>1]);else acc=acc.add(wnd[-z-1>>1].neg())}}return p.type==="affine"?acc.toP():acc};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var wndWidth=this._wnafT1;var wnd=this._wnafT2;var naf=this._wnafT3;var max=0;for(var i=0;i<len;i++){var p=points[i];var nafPoints=p._getNAFPoints(defW);wndWidth[i]=nafPoints.wnd;wnd[i]=nafPoints.points}for(var i=len-1;i>=1;i-=2){var a=i-1;var b=i;if(wndWidth[a]!==1||wndWidth[b]!==1){naf[a]=getNAF(coeffs[a],wndWidth[a]);naf[b]=getNAF(coeffs[b],wndWidth[b]);max=Math.max(naf[a].length,max);max=Math.max(naf[b].length,max);continue}var comb=[points[a],null,null,points[b]];if(points[a].y.cmp(points[b].y)===0){comb[1]=points[a].add(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}else if(points[a].y.cmp(points[b].y.redNeg())===0){comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].add(points[b].neg())}else{comb[1]=points[a].toJ().mixedAdd(points[b]);comb[2]=points[a].toJ().mixedAdd(points[b].neg())}var index=[-3,-1,-5,-7,0,7,5,1,3];var jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max);naf[a]=new Array(max);naf[b]=new Array(max);for(var j=0;j<max;j++){var ja=jsf[0][j]|0;var jb=jsf[1][j]|0;naf[a][j]=index[(ja+1)*3+(jb+1)];naf[b][j]=0;wnd[a]=comb}}var acc=this.jpoint(null,null,null);var tmp=this._wnafT4;for(var i=max;i>=0;i--){var k=0;while(i>=0){var zero=true;for(var j=0;j<len;j++){tmp[j]=naf[j][i]|0;if(tmp[j]!==0)zero=false}if(!zero)break;k++;i--}if(i>=0)k++;acc=acc.dblp(k);if(i<0)break;for(var j=0;j<len;j++){var z=tmp[j];var p;if(z===0)continue;else if(z>0)p=wnd[j][z-1>>1];else if(z<0)p=wnd[j][-z-1>>1].neg();if(p.type==="affine")acc=acc.mixedAdd(p);else acc=acc.add(p)}}for(var i=0;i<len;i++)wnd[i]=null;if(jacobianResult)return acc;else return acc.toP()};function BasePoint(curve,type){this.curve=curve;this.type=type;this.precomputed=null}BaseCurve.BasePoint=BasePoint;BasePoint.prototype.eq=function eq(){throw new Error("Not implemented")};BasePoint.prototype.validate=function validate(){return this.curve.validate(this)};BaseCurve.prototype.decodePoint=function decodePoint(bytes,enc){bytes=utils.toArray(bytes,enc);var len=this.p.byteLength();if((bytes[0]===4||bytes[0]===6||bytes[0]===7)&&bytes.length-1===2*len){if(bytes[0]===6)assert(bytes[bytes.length-1]%2===0);else if(bytes[0]===7)assert(bytes[bytes.length-1]%2===1);var res=this.point(bytes.slice(1,1+len),bytes.slice(1+len,1+2*len));return res}else if((bytes[0]===2||bytes[0]===3)&&bytes.length-1===len){return this.pointFromX(bytes.slice(1,1+len),bytes[0]===3)}throw new Error("Unknown point format")};BasePoint.prototype.encodeCompressed=function encodeCompressed(enc){return this.encode(enc,true)};BasePoint.prototype._encode=function _encode(compact){var len=this.curve.p.byteLength();var x=this.getX().toArray("be",len);if(compact)return[this.getY().isEven()?2:3].concat(x);return[4].concat(x,this.getY().toArray("be",len))};BasePoint.prototype.encode=function encode(enc,compact){return utils.encode(this._encode(compact),enc)};BasePoint.prototype.precompute=function precompute(power){if(this.precomputed)return this;var precomputed={doubles:null,naf:null,beta:null};precomputed.naf=this._getNAFPoints(8);precomputed.doubles=this._getDoubles(4,power);precomputed.beta=this._getBeta();this.precomputed=precomputed;return this};BasePoint.prototype._hasDoubles=function _hasDoubles(k){if(!this.precomputed)return false;var doubles=this.precomputed.doubles;if(!doubles)return false;return doubles.points.length>=Math.ceil((k.bitLength()+1)/doubles.step)};BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var doubles=[this];var acc=this;for(var i=0;i<power;i+=step){for(var j=0;j<step;j++)acc=acc.dbl();doubles.push(acc)}return{step:step,points:doubles}};BasePoint.prototype._getNAFPoints=function _getNAFPoints(wnd){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var res=[this];var max=(1<<wnd)-1;var dbl=max===1?null:this.dbl();for(var i=1;i<max;i++)res[i]=res[i-1].add(dbl);return{wnd:wnd,points:res}};BasePoint.prototype._getBeta=function _getBeta(){return null};BasePoint.prototype.dblp=function dblp(k){var r=this;for(var i=0;i<k;i++)r=r.dbl();return r}},{"../../elliptic":67,"bn.js":17}],69:[function(require,module,exports){"use strict";var curve=require("../curve");var elliptic=require("../../elliptic");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var assert=elliptic.utils.assert;function EdwardsCurve(conf){this.twisted=(conf.a|0)!==1;this.mOneA=this.twisted&&(conf.a|0)===-1;this.extended=this.mOneA;Base.call(this,"edwards",conf);this.a=new BN(conf.a,16).umod(this.red.m);this.a=this.a.toRed(this.red);this.c=new BN(conf.c,16).toRed(this.red);this.c2=this.c.redSqr();this.d=new BN(conf.d,16).toRed(this.red);this.dd=this.d.redAdd(this.d);assert(!this.twisted||this.c.fromRed().cmpn(1)===0);this.oneC=(conf.c|0)===1}inherits(EdwardsCurve,Base);module.exports=EdwardsCurve;EdwardsCurve.prototype._mulA=function _mulA(num){if(this.mOneA)return num.redNeg();else return this.a.redMul(num)};EdwardsCurve.prototype._mulC=function _mulC(num){if(this.oneC)return num;else return this.c.redMul(num)};EdwardsCurve.prototype.jpoint=function jpoint(x,y,z,t){return this.point(x,y,z,t)};EdwardsCurve.prototype.pointFromX=function pointFromX(x,odd){x=new BN(x,16);if(!x.red)x=x.toRed(this.red);var x2=x.redSqr();var rhs=this.c2.redSub(this.a.redMul(x2));var lhs=this.one.redSub(this.c2.redMul(this.d).redMul(x2));var y2=rhs.redMul(lhs.redInvm());var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};EdwardsCurve.prototype.pointFromY=function pointFromY(y,odd){y=new BN(y,16);if(!y.red)y=y.toRed(this.red);var y2=y.redSqr();var lhs=y2.redSub(this.one);var rhs=y2.redMul(this.d).redAdd(this.one);var x2=lhs.redMul(rhs.redInvm());if(x2.cmp(this.zero)===0){if(odd)throw new Error("invalid point");else return this.point(this.zero,y)}var x=x2.redSqrt();if(x.redSqr().redSub(x2).cmp(this.zero)!==0)throw new Error("invalid point");if(x.isOdd()!==odd)x=x.redNeg();return this.point(x,y)};EdwardsCurve.prototype.validate=function validate(point){if(point.isInfinity())return true;point.normalize();var x2=point.x.redSqr();var y2=point.y.redSqr();var lhs=x2.redMul(this.a).redAdd(y2);var rhs=this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));return lhs.cmp(rhs)===0};function Point(curve,x,y,z,t){Base.BasePoint.call(this,curve,"projective");if(x===null&&y===null&&z===null){this.x=this.curve.zero;this.y=this.curve.one;this.z=this.curve.one;this.t=this.curve.zero;this.zOne=true}else{this.x=new BN(x,16);this.y=new BN(y,16);this.z=z?new BN(z,16):this.curve.one;this.t=t&&new BN(t,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);this.zOne=this.z===this.curve.one;if(this.curve.extended&&!this.t){this.t=this.x.redMul(this.y);if(!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}inherits(Point,Base.BasePoint);EdwardsCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)};EdwardsCurve.prototype.point=function point(x,y,z,t){return new Point(this,x,y,z,t)};Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1],obj[2])};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.x.cmpn(0)===0&&this.y.cmp(this.z)===0};Point.prototype._extDbl=function _extDbl(){var a=this.x.redSqr();var b=this.y.redSqr();var c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a);var e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);var g=d.redAdd(b);var f=g.redSub(c);var h=d.redSub(b);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projDbl=function _projDbl(){var b=this.x.redAdd(this.y).redSqr();var c=this.x.redSqr();var d=this.y.redSqr();var nx;var ny;var nz;if(this.curve.twisted){var e=this.curve._mulA(c);var f=e.redAdd(d);if(this.zOne){nx=b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));ny=f.redMul(e.redSub(d));nz=f.redSqr().redSub(f).redSub(f)}else{var h=this.z.redSqr();var j=f.redSub(h).redISub(h);nx=b.redSub(c).redISub(d).redMul(j);ny=f.redMul(e.redSub(d));nz=f.redMul(j)}}else{var e=c.redAdd(d);var h=this.curve._mulC(this.c.redMul(this.z)).redSqr();var j=e.redSub(h).redSub(h);nx=this.curve._mulC(b.redISub(e)).redMul(j);ny=this.curve._mulC(e).redMul(c.redISub(d));nz=e.redMul(j)}return this.curve.point(nx,ny,nz)};Point.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};Point.prototype._extAdd=function _extAdd(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x));var b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));var c=this.t.redMul(this.curve.dd).redMul(p.t);var d=this.z.redMul(p.z.redAdd(p.z));var e=b.redSub(a);var f=d.redSub(c);var g=d.redAdd(c);var h=b.redAdd(a);var nx=e.redMul(f);var ny=g.redMul(h);var nt=e.redMul(h);var nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)};Point.prototype._projAdd=function _projAdd(p){var a=this.z.redMul(p.z);var b=a.redSqr();var c=this.x.redMul(p.x);var d=this.y.redMul(p.y);var e=this.curve.d.redMul(c).redMul(d);var f=b.redSub(e);var g=b.redAdd(e);var tmp=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);var nx=a.redMul(f).redMul(tmp);var ny;var nz;if(this.curve.twisted){ny=a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));nz=f.redMul(g)}else{ny=a.redMul(g).redMul(d.redSub(c));nz=this.curve._mulC(f).redMul(g)}return this.curve.point(nx,ny,nz)};Point.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;if(this.curve.extended)return this._extAdd(p);else return this._projAdd(p)};Point.prototype.mul=function mul(k){if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,false)};Point.prototype.jmulAdd=function jmulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,true)};Point.prototype.normalize=function normalize(){if(this.zOne)return this;var zi=this.z.redInvm();this.x=this.x.redMul(zi);this.y=this.y.redMul(zi);if(this.t)this.t=this.t.redMul(zi);this.z=this.curve.one;this.zOne=true;return this};Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()};Point.prototype.getY=function getY(){this.normalize();return this.y.fromRed()};Point.prototype.eq=function eq(other){return this===other||this.getX().cmp(other.getX())===0&&this.getY().cmp(other.getY())===0};Point.prototype.eqXToP=function eqXToP(x){var rx=x.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(rx)===0)return true;var xc=x.clone();var t=this.curve.redN.redMul(this.z);for(;;){xc.iadd(this.curve.n);if(xc.cmp(this.curve.p)>=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add},{"../../elliptic":67,"../curve":70,"bn.js":17,inherits:101}],70:[function(require,module,exports){"use strict";var curve=exports;curve.base=require("./base");curve.short=require("./short");curve.mont=require("./mont");curve.edwards=require("./edwards")},{"./base":68,"./edwards":69,"./mont":71,"./short":72}],71:[function(require,module,exports){"use strict";var curve=require("../curve");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var elliptic=require("../../elliptic");var utils=elliptic.utils;function MontCurve(conf){Base.call(this,"mont",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.i4=new BN(4).toRed(this.red).redInvm();this.two=new BN(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}inherits(MontCurve,Base);module.exports=MontCurve;MontCurve.prototype.validate=function validate(point){var x=point.normalize().x;var x2=x.redSqr();var rhs=x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);var y=rhs.redSqrt();return y.redSqr().cmp(rhs)===0};function Point(curve,x,z){Base.BasePoint.call(this,curve,"projective");if(x===null&&z===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new BN(x,16);this.z=new BN(z,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}inherits(Point,Base.BasePoint);MontCurve.prototype.decodePoint=function decodePoint(bytes,enc){return this.point(utils.toArray(bytes,enc),1)};MontCurve.prototype.point=function point(x,z){return new Point(this,x,z)};MontCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)};Point.prototype.precompute=function precompute(){};Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())};Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1]||curve.one)};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};Point.prototype.dbl=function dbl(){var a=this.x.redAdd(this.z);var aa=a.redSqr();var b=this.x.redSub(this.z);var bb=b.redSqr();var c=aa.redSub(bb);var nx=aa.redMul(bb);var nz=c.redMul(bb.redAdd(this.curve.a24.redMul(c)));return this.curve.point(nx,nz)};Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")};Point.prototype.diffAdd=function diffAdd(p,diff){var a=this.x.redAdd(this.z);var b=this.x.redSub(this.z);var c=p.x.redAdd(p.z);var d=p.x.redSub(p.z);var da=d.redMul(a);var cb=c.redMul(b);var nx=diff.z.redMul(da.redAdd(cb).redSqr());var nz=diff.x.redMul(da.redISub(cb).redSqr());return this.curve.point(nx,nz)};Point.prototype.mul=function mul(k){var t=k.clone();var a=this;var b=this.curve.point(null,null);var c=this;for(var bits=[];t.cmpn(0)!==0;t.iushrn(1))bits.push(t.andln(1));for(var i=bits.length-1;i>=0;i--){if(bits[i]===0){a=a.diffAdd(b,c);b=b.dbl()}else{b=a.diffAdd(b,c);a=a.dbl()}}return b};Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.eq=function eq(other){return this.getX().cmp(other.getX())===0};Point.prototype.normalize=function normalize(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()}},{"../../elliptic":67,"../curve":70,"bn.js":17,inherits:101}],72:[function(require,module,exports){"use strict";var curve=require("../curve");var elliptic=require("../../elliptic");var BN=require("bn.js");var inherits=require("inherits");var Base=curve.base;var assert=elliptic.utils.assert;function ShortCurve(conf){Base.call(this,"short",conf);this.a=new BN(conf.a,16).toRed(this.red);this.b=new BN(conf.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(conf);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}inherits(ShortCurve,Base);module.exports=ShortCurve;ShortCurve.prototype._getEndomorphism=function _getEndomorphism(conf){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var beta;var lambda;if(conf.beta){beta=new BN(conf.beta,16).toRed(this.red)}else{var betas=this._getEndoRoots(this.p);beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1];beta=beta.toRed(this.red)}if(conf.lambda){lambda=new BN(conf.lambda,16)}else{var lambdas=this._getEndoRoots(this.n);if(this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))===0){lambda=lambdas[0]}else{lambda=lambdas[1];assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))===0)}}var basis;if(conf.basis){basis=conf.basis.map(function(vec){return{a:new BN(vec.a,16),b:new BN(vec.b,16)}})}else{basis=this._getEndoBasis(lambda)}return{beta:beta,lambda:lambda,basis:basis}};ShortCurve.prototype._getEndoRoots=function _getEndoRoots(num){var red=num===this.p?this.red:BN.mont(num);var tinv=new BN(2).toRed(red).redInvm();var ntinv=tinv.redNeg();var s=new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);var l1=ntinv.redAdd(s).fromRed();var l2=ntinv.redSub(s).fromRed();return[l1,l2]};ShortCurve.prototype._getEndoBasis=function _getEndoBasis(lambda){var aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2));var u=lambda;var v=this.n.clone();var x1=new BN(1);var y1=new BN(0);var x2=new BN(0);var y2=new BN(1);var a0;var b0;var a1;var b1;var a2;var b2;var prevR;var i=0;var r;var x;while(u.cmpn(0)!==0){var q=v.div(u);r=v.sub(q.mul(u));x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0){a0=prevR.neg();b0=x1;a1=r.neg();b1=x}else if(a1&&++i===2){break}prevR=r;v=u;u=r;x2=x1;x1=x;y2=y1;y1=y}a2=r.neg();b2=x;var len1=a1.sqr().add(b1.sqr());var len2=a2.sqr().add(b2.sqr());if(len2.cmp(len1)>=0){a2=a0;b2=b0}if(a1.negative){a1=a1.neg();b1=b1.neg()}if(a2.negative){a2=a2.neg();b2=b2.neg()}return[{a:a1,b:b1},{a:a2,b:b2}]};ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis;var v1=basis[0];var v2=basis[1];var c1=v2.b.mul(k).divRound(this.n);var c2=v1.b.neg().mul(k).divRound(this.n);var p1=c1.mul(v1.a);var p2=c2.mul(v2.a);var q1=c1.mul(v1.b);var q2=c2.mul(v2.b);var k1=k.sub(p1).sub(p2);var k2=q1.add(q2).neg();return{k1:k1,k2:k2}};ShortCurve.prototype.pointFromX=function pointFromX(x,odd){x=new BN(x,16);if(!x.red)x=x.toRed(this.red);var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);var y=y2.redSqrt();if(y.redSqr().redSub(y2).cmp(this.zero)!==0)throw new Error("invalid point");var isOdd=y.fromRed().isOdd();if(odd&&!isOdd||!odd&&isOdd)y=y.redNeg();return this.point(x,y)};ShortCurve.prototype.validate=function validate(point){if(point.inf)return true;var x=point.x;var y=point.y;var ax=this.a.redMul(x);var rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return y.redSqr().redISub(rhs).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){var npoints=this._endoWnafT1;var ncoeffs=this._endoWnafT2;for(var i=0;i<points.length;i++){var split=this._endoSplit(coeffs[i]);var p=points[i];var beta=p._getBeta();if(split.k1.negative){split.k1.ineg();p=p.neg(true)}if(split.k2.negative){split.k2.ineg();beta=beta.neg(true)}npoints[i*2]=p;npoints[i*2+1]=beta;ncoeffs[i*2]=split.k1;ncoeffs[i*2+1]=split.k2}var res=this._wnafMulAdd(1,npoints,ncoeffs,i*2,jacobianResult);for(var j=0;j<i*2;j++){npoints[j]=null;ncoeffs[j]=null}return res};function Point(curve,x,y,isRed){Base.BasePoint.call(this,curve,"affine");if(x===null&&y===null){this.x=null;this.y=null;this.inf=true}else{this.x=new BN(x,16);this.y=new BN(y,16);if(isRed){this.x.forceRed(this.curve.red);this.y.forceRed(this.curve.red)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=false}}inherits(Point,Base.BasePoint);ShortCurve.prototype.point=function point(x,y,isRed){return new Point(this,x,y,isRed)};ShortCurve.prototype.pointFromJSON=function pointFromJSON(obj,red){return Point.fromJSON(this,obj,red)};Point.prototype._getBeta=function _getBeta(){if(!this.curve.endo)return;var pre=this.precomputed;if(pre&&pre.beta)return pre.beta;var beta=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(pre){var curve=this.curve;var endoMul=function(p){return curve.point(p.x.redMul(curve.endo.beta),p.y)};pre.beta=beta;beta.precomputed={beta:null,naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(endoMul)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(endoMul)}}}return beta};Point.prototype.toJSON=function toJSON(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]};Point.fromJSON=function fromJSON(curve,obj,red){if(typeof obj==="string")obj=JSON.parse(obj);var res=curve.point(obj[0],obj[1],red);if(!obj[2])return res;function obj2point(obj){return curve.point(obj[0],obj[1],red)}var pre=obj[2];res.precomputed={beta:null,doubles:pre.doubles&&{step:pre.doubles.step,points:[res].concat(pre.doubles.points.map(obj2point))},naf:pre.naf&&{wnd:pre.naf.wnd,points:[res].concat(pre.naf.points.map(obj2point))}};return res};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var c=this.y.redSub(p.y);if(c.cmpn(0)!==0)c=c.redMul(this.x.redSub(p.x).redInvm());var nx=c.redSqr().redISub(this.x).redISub(p.x);var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(ys1.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a;var x2=this.x.redSqr();var dyinv=ys1.redInvm();var c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);var nx=c.redSqr().redISub(this.x.redAdd(this.x));var ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(k){k=new BN(k,16);if(this._hasDoubles(k))return this.curve._fixedNafMul(this,k);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[k]);else return this.curve._wnafMul(this,k)};Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs);else return this.curve._wnafMulAdd(1,points,coeffs,2)};Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2];var coeffs=[k1,k2];if(this.curve.endo)return this.curve._endoWnafMulAdd(points,coeffs,true);else return this.curve._wnafMulAdd(1,points,coeffs,2,true)};Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)};Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed;var negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var res=this.curve.jpoint(this.x,this.y,this.curve.one);return res};function JPoint(curve,x,y,z){Base.BasePoint.call(this,curve,"jacobian");if(x===null&&y===null&&z===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new BN(0)}else{this.x=new BN(x,16);this.y=new BN(y,16);this.z=new BN(z,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}inherits(JPoint,Base.BasePoint);ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm();var zinv2=zinv.redSqr();var ax=this.x.redMul(zinv2);var ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr();var z2=this.z.redSqr();var u1=this.x.redMul(pz2);var u2=p.x.redMul(z2);var s1=this.y.redMul(pz2.redMul(p.z));var s2=p.y.redMul(z2.redMul(this.z));var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr();var u1=this.x;var u2=p.x.redMul(z2);var s1=this.y;var s2=p.y.redMul(z2).redMul(this.z);var h=u1.redSub(u2);var r=s1.redSub(s2);if(h.cmpn(0)===0){if(r.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h2=h.redSqr();var h3=h2.redMul(h);var v=u1.redMul(h2);var nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);var ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));var nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.dblp=function dblp(pow){if(pow===0)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var r=this;for(var i=0;i<pow;i++)r=r.dbl();return r}var a=this.curve.a;var tinv=this.curve.tinv;var jx=this.x;var jy=this.y;var jz=this.z;var jz4=jz.redSqr().redSqr();var jyd=jy.redAdd(jy);for(var i=0;i<pow;i++){var jx2=jx.redSqr();var jyd2=jyd.redSqr();var jyd4=jyd2.redSqr();var c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));var t1=jx.redMul(jyd2);var nx=c.redSqr().redISub(t1.redAdd(t1));var t2=t1.redISub(nx);var dny=c.redMul(t2);dny=dny.redIAdd(dny).redISub(jyd4);var nz=jyd.redMul(jz);if(i+1<pow)jz4=jz4.redMul(jyd4);jx=nx;jz=nz;jyd=dny}return this.curve.jpoint(jx,jyd.redMul(tinv),jz)};JPoint.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()};JPoint.prototype._zeroDbl=function _zeroDbl(){var nx;var ny;var nz;if(this.zOne){var xx=this.x.redSqr();var yy=this.y.redSqr();var yyyy=yy.redSqr();var s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx);var t=m.redSqr().redISub(s).redISub(s);var yyyy8=yyyy.redIAdd(yyyy);yyyy8=yyyy8.redIAdd(yyyy8);yyyy8=yyyy8.redIAdd(yyyy8);nx=t;ny=m.redMul(s.redISub(t)).redISub(yyyy8);nz=this.y.redAdd(this.y)}else{var a=this.x.redSqr();var b=this.y.redSqr();var c=b.redSqr();var d=this.x.redAdd(b).redSqr().redISub(a).redISub(c);d=d.redIAdd(d);var e=a.redAdd(a).redIAdd(a);var f=e.redSqr();var c8=c.redIAdd(c);c8=c8.redIAdd(c8);c8=c8.redIAdd(c8);nx=f.redISub(d).redISub(d);ny=e.redMul(d.redISub(nx)).redISub(c8);nz=this.y.redMul(this.z);nz=nz.redIAdd(nz)}return this.curve.jpoint(nx,ny,nz)};JPoint.prototype._threeDbl=function _threeDbl(){var nx;var ny;var nz;if(this.zOne){var xx=this.x.redSqr();var yy=this.y.redSqr();var yyyy=yy.redSqr();var s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);var t=m.redSqr().redISub(s).redISub(s);nx=t;var yyyy8=yyyy.redIAdd(yyyy);yyyy8=yyyy8.redIAdd(yyyy8);yyyy8=yyyy8.redIAdd(yyyy8);ny=m.redMul(s.redISub(t)).redISub(yyyy8);nz=this.y.redAdd(this.y)}else{var delta=this.z.redSqr();var gamma=this.y.redSqr();var beta=this.x.redMul(gamma);var alpha=this.x.redSub(delta).redMul(this.x.redAdd(delta));alpha=alpha.redAdd(alpha).redIAdd(alpha);var beta4=beta.redIAdd(beta);beta4=beta4.redIAdd(beta4);var beta8=beta4.redAdd(beta4);nx=alpha.redSqr().redISub(beta8);nz=this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);var ggamma8=gamma.redSqr();ggamma8=ggamma8.redIAdd(ggamma8);ggamma8=ggamma8.redIAdd(ggamma8);ggamma8=ggamma8.redIAdd(ggamma8);ny=alpha.redMul(beta4.redISub(nx)).redISub(ggamma8)}return this.curve.jpoint(nx,ny,nz)};JPoint.prototype._dbl=function _dbl(){var a=this.curve.a;var jx=this.x;var jy=this.y;var jz=this.z;var jz4=jz.redSqr().redSqr();var jx2=jx.redSqr();var jy2=jy.redSqr();var c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));var jxd4=jx.redAdd(jx);jxd4=jxd4.redIAdd(jxd4);var t1=jxd4.redMul(jy2);var nx=c.redSqr().redISub(t1.redAdd(t1));var t2=t1.redISub(nx);var jyd8=jy2.redSqr();jyd8=jyd8.redIAdd(jyd8);jyd8=jyd8.redIAdd(jyd8);jyd8=jyd8.redIAdd(jyd8);var ny=c.redMul(t2).redISub(jyd8);var nz=jy.redAdd(jy).redMul(jz);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.trpl=function trpl(){if(!this.curve.zeroA)return this.dbl().add(this);var xx=this.x.redSqr();var yy=this.y.redSqr();var zz=this.z.redSqr();var yyyy=yy.redSqr();var m=xx.redAdd(xx).redIAdd(xx);var mm=m.redSqr();var e=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);e=e.redIAdd(e);e=e.redAdd(e).redIAdd(e);e=e.redISub(mm);var ee=e.redSqr();var t=yyyy.redIAdd(yyyy);t=t.redIAdd(t);t=t.redIAdd(t);t=t.redIAdd(t);var u=m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);var yyu4=yy.redMul(u);yyu4=yyu4.redIAdd(yyu4);yyu4=yyu4.redIAdd(yyu4);var nx=this.x.redMul(ee).redISub(yyu4);nx=nx.redIAdd(nx);nx=nx.redIAdd(nx);var ny=this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));ny=ny.redIAdd(ny);ny=ny.redIAdd(ny);ny=ny.redIAdd(ny);var nz=this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);return this.curve.jpoint(nx,ny,nz)};JPoint.prototype.mul=function mul(k,kbase){k=new BN(k,kbase);return this.curve._wnafMul(this,k)};JPoint.prototype.eq=function eq(p){if(p.type==="affine")return this.eq(p.toJ());if(this===p)return true;var z2=this.z.redSqr();var pz2=p.z.redSqr();if(this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0)!==0)return false;var z3=z2.redMul(this.z);var pz3=pz2.redMul(p.z);return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0)===0};JPoint.prototype.eqXToP=function eqXToP(x){var zs=this.z.redSqr();var rx=x.toRed(this.curve.red).redMul(zs);if(this.x.cmp(rx)===0)return true;var xc=x.clone();var t=this.curve.redN.redMul(zs);for(;;){xc.iadd(this.curve.n);if(xc.cmp(this.curve.p)>=0)return false;rx.redIAdd(t);if(this.x.cmp(rx)===0)return true}return false};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0}},{"../../elliptic":67,"../curve":70,"bn.js":17,inherits:101}],73:[function(require,module,exports){"use strict";var curves=exports;var hash=require("hash.js");var elliptic=require("../elliptic");var assert=elliptic.utils.assert;function PresetCurve(options){if(options.type==="short")this.curve=new elliptic.curve.short(options);else if(options.type==="edwards")this.curve=new elliptic.curve.edwards(options);else this.curve=new elliptic.curve.mont(options);this.g=this.curve.g;this.n=this.curve.n;this.hash=options.hash;assert(this.g.validate(),"Invalid curve");assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}curves.PresetCurve=PresetCurve;function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:true,enumerable:true,get:function(){var curve=new PresetCurve(options);Object.defineProperty(curves,name,{configurable:true,enumerable:true,value:curve});return curve}})}defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["9"]});defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var pre;try{pre=require("./precomputed/secp256k1")}catch(e){pre=undefined}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},{"../elliptic":67,"./precomputed/secp256k1":80,"hash.js":86}],74:[function(require,module,exports){"use strict";var BN=require("bn.js");var HmacDRBG=require("hmac-drbg");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var KeyPair=require("./key");var Signature=require("./signature");function EC(options){if(!(this instanceof EC))return new EC(options);if(typeof options==="string"){assert(elliptic.curves.hasOwnProperty(options),"Unknown curve "+options);options=elliptic.curves[options]}if(options instanceof elliptic.curves.PresetCurve)options={curve:options};this.curve=options.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=options.curve.g;this.g.precompute(options.curve.n.bitLength()+1);this.hash=options.hash||options.curve.hash}module.exports=EC;EC.prototype.keyPair=function keyPair(options){return new KeyPair(this,options)};EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return KeyPair.fromPrivate(this,priv,enc)};EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return KeyPair.fromPublic(this,pub,enc)};EC.prototype.genKeyPair=function genKeyPair(options){if(!options)options={};var drbg=new HmacDRBG({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||elliptic.rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()});var bytes=this.n.byteLength();var ns2=this.n.sub(new BN(2));do{var priv=new BN(drbg.generate(bytes));if(priv.cmp(ns2)>0)continue;priv.iaddn(1);return this.keyFromPrivate(priv)}while(true)};EC.prototype._truncateToN=function truncateToN(msg,truncOnly){var delta=msg.byteLength()*8-this.n.bitLength();if(delta>0)msg=msg.ushrn(delta);if(!truncOnly&&msg.cmp(this.n)>=0)return msg.sub(this.n);else return msg};EC.prototype.sign=function sign(msg,key,enc,options){if(typeof enc==="object"){options=enc;enc=null}if(!options)options={};key=this.keyFromPrivate(key,enc);msg=this._truncateToN(new BN(msg,16));var bytes=this.n.byteLength();var bkey=key.getPrivate().toArray("be",bytes);var nonce=msg.toArray("be",bytes);var drbg=new HmacDRBG({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc||"utf8"});var ns1=this.n.sub(new BN(1));for(var iter=0;true;iter++){var k=options.k?options.k(iter):new BN(drbg.generate(this.n.byteLength()));k=this._truncateToN(k,true);if(k.cmpn(1)<=0||k.cmp(ns1)>=0)continue;var kp=this.g.mul(k);if(kp.isInfinity())continue;var kpX=kp.getX();var r=kpX.umod(this.n);if(r.cmpn(0)===0)continue;var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));s=s.umod(this.n);if(s.cmpn(0)===0)continue;var recoveryParam=(kp.getY().isOdd()?1:0)|(kpX.cmp(r)!==0?2:0);if(options.canonical&&s.cmp(this.nh)>0){s=this.n.sub(s);recoveryParam^=1}return new Signature({r:r,s:s,recoveryParam:recoveryParam})}};EC.prototype.verify=function verify(msg,signature,key,enc){msg=this._truncateToN(new BN(msg,16));key=this.keyFromPublic(key,enc);signature=new Signature(signature,"hex");var r=signature.r;var s=signature.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var sinv=s.invm(this.n);var u1=sinv.mul(msg).umod(this.n);var u2=sinv.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var p=this.g.mulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.getX().umod(this.n).cmp(r)===0}var p=this.g.jmulAdd(u1,key.getPublic(),u2);if(p.isInfinity())return false;return p.eqXToP(r)};EC.prototype.recoverPubKey=function(msg,signature,j,enc){assert((3&j)===j,"The recovery param is more than two bits");signature=new Signature(signature,enc);var n=this.n;var e=new BN(msg);var r=signature.r;var s=signature.s;var isYOdd=j&1;var isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");if(isSecondKey)r=this.curve.pointFromX(r.add(this.curve.n),isYOdd);else r=this.curve.pointFromX(r,isYOdd);var rInv=signature.r.invm(n);var s1=n.sub(e).mul(rInv).umod(n);var s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)};EC.prototype.getKeyRecoveryParam=function(e,signature,Q,enc){signature=new Signature(signature,enc);if(signature.recoveryParam!==null)return signature.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":67,"./key":75,"./signature":76,"bn.js":17,"hmac-drbg":98}],75:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;function KeyPair(ec,options){this.ec=ec;this.priv=null;this.pub=null;if(options.priv)this._importPrivate(options.priv,options.privEnc);if(options.pub)this._importPublic(options.pub,options.pubEnc)}module.exports=KeyPair;KeyPair.fromPublic=function fromPublic(ec,pub,enc){if(pub instanceof KeyPair)return pub;return new KeyPair(ec,{pub:pub,pubEnc:enc})};KeyPair.fromPrivate=function fromPrivate(ec,priv,enc){if(priv instanceof KeyPair)return priv;return new KeyPair(ec,{priv:priv,privEnc:enc})};KeyPair.prototype.validate=function validate(){var pub=this.getPublic();if(pub.isInfinity())return{result:false,reason:"Invalid public key"};if(!pub.validate())return{result:false,reason:"Public key is not a point"};if(!pub.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};KeyPair.prototype.getPublic=function getPublic(compact,enc){if(typeof compact==="string"){enc=compact;compact=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!enc)return this.pub;return this.pub.encode(enc,compact)};KeyPair.prototype.getPrivate=function getPrivate(enc){if(enc==="hex")return this.priv.toString(16,2);else return this.priv};KeyPair.prototype._importPrivate=function _importPrivate(key,enc){this.priv=new BN(key,enc||16);this.priv=this.priv.umod(this.ec.curve.n)};KeyPair.prototype._importPublic=function _importPublic(key,enc){if(key.x||key.y){if(this.ec.curve.type==="mont"){assert(key.x,"Need x coordinate")}else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards"){assert(key.x&&key.y,"Need both x and y coordinate")}this.pub=this.ec.curve.point(key.x,key.y);return}this.pub=this.ec.curve.decodePoint(key,enc)};KeyPair.prototype.derive=function derive(pub){return pub.mul(this.priv).getX()};KeyPair.prototype.sign=function sign(msg,enc,options){return this.ec.sign(msg,this,enc,options)};KeyPair.prototype.verify=function verify(msg,signature){return this.ec.verify(msg,signature,this)};KeyPair.prototype.inspect=function inspect(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":67,"bn.js":17}],76:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;function Signature(options,enc){if(options instanceof Signature)return options;if(this._importDER(options,enc))return;assert(options.r&&options.s,"Signature without r or s");this.r=new BN(options.r,16);this.s=new BN(options.s,16);if(options.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=options.recoveryParam}module.exports=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(initial&128)){return initial}var octetLen=initial&15;var val=0;for(var i=0,off=p.place;i<octetLen;i++,off++){val<<=8;val|=buf[off]}p.place=off;return val}function rmPadding(buf){var i=0;var len=buf.length-1;while(!buf[i]&&!(buf[i+1]&128)&&i<len){i++}if(i===0){return buf}return buf.slice(i)}Signature.prototype._importDER=function _importDER(data,enc){data=utils.toArray(data,enc);var p=new Position;if(data[p.place++]!==48){return false}var len=getLength(data,p);if(len+p.place!==data.length){return false}if(data[p.place++]!==2){return false}var rlen=getLength(data,p);var r=data.slice(p.place,rlen+p.place);p.place+=rlen;if(data[p.place++]!==2){return false}var slen=getLength(data,p);if(data.length!==slen+p.place){return false}var s=data.slice(p.place,slen+p.place);if(r[0]===0&&r[1]&128){r=r.slice(1)}if(s[0]===0&&s[1]&128){s=s.slice(1)}this.r=new BN(r);this.s=new BN(s);this.recoveryParam=null;return true};function constructLength(arr,len){if(len<128){arr.push(len);return}var octets=1+(Math.log(len)/Math.LN2>>>3);arr.push(octets|128);while(--octets){arr.push(len>>>(octets<<3)&255)}arr.push(len)}Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray();var s=this.s.toArray();if(r[0]&128)r=[0].concat(r);if(s[0]&128)s=[0].concat(s);r=rmPadding(r);s=rmPadding(s);while(!s[0]&&!(s[1]&128)){s=s.slice(1)}var arr=[2];constructLength(arr,r.length);arr=arr.concat(r);arr.push(2);constructLength(arr,s.length);var backHalf=arr.concat(s);var res=[48];constructLength(res,backHalf.length);res=res.concat(backHalf);return utils.encode(res,enc)}},{"../../elliptic":67,"bn.js":17}],77:[function(require,module,exports){"use strict";var hash=require("hash.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var parseBytes=utils.parseBytes;var KeyPair=require("./key");var Signature=require("./signature");function EDDSA(curve){assert(curve==="ed25519","only tested with ed25519 so far");if(!(this instanceof EDDSA))return new EDDSA(curve);var curve=elliptic.curves[curve].curve;this.curve=curve;this.g=curve.g;this.g.precompute(curve.n.bitLength()+1);this.pointClass=curve.point().constructor;this.encodingLength=Math.ceil(curve.n.bitLength()/8);this.hash=hash.sha512}module.exports=EDDSA;EDDSA.prototype.sign=function sign(message,secret){message=parseBytes(message);var key=this.keyFromSecret(secret);var r=this.hashInt(key.messagePrefix(),message);var R=this.g.mul(r);var Rencoded=this.encodePoint(R);var s_=this.hashInt(Rencoded,key.pubBytes(),message).mul(key.priv());var S=r.add(s_).umod(this.curve.n);return this.makeSignature({R:R,S:S,Rencoded:Rencoded})};EDDSA.prototype.verify=function verify(message,sig,pub){message=parseBytes(message);sig=this.makeSignature(sig);var key=this.keyFromPublic(pub);var h=this.hashInt(sig.Rencoded(),key.pubBytes(),message);var SG=this.g.mul(sig.S());var RplusAh=sig.R().add(key.pub().mul(h));return RplusAh.eq(SG)};EDDSA.prototype.hashInt=function hashInt(){var hash=this.hash();for(var i=0;i<arguments.length;i++)hash.update(arguments[i]);return utils.intFromLE(hash.digest()).umod(this.curve.n)};EDDSA.prototype.keyFromPublic=function keyFromPublic(pub){return KeyPair.fromPublic(this,pub)};EDDSA.prototype.keyFromSecret=function keyFromSecret(secret){return KeyPair.fromSecret(this,secret)};EDDSA.prototype.makeSignature=function makeSignature(sig){if(sig instanceof Signature)return sig;return new Signature(this,sig)};EDDSA.prototype.encodePoint=function encodePoint(point){var enc=point.getY().toArray("le",this.encodingLength);enc[this.encodingLength-1]|=point.getX().isOdd()?128:0;return enc};EDDSA.prototype.decodePoint=function decodePoint(bytes){bytes=utils.parseBytes(bytes);var lastIx=bytes.length-1;var normed=bytes.slice(0,lastIx).concat(bytes[lastIx]&~128);var xIsOdd=(bytes[lastIx]&128)!==0;var y=utils.intFromLE(normed);return this.curve.pointFromY(y,xIsOdd)};EDDSA.prototype.encodeInt=function encodeInt(num){return num.toArray("le",this.encodingLength)};EDDSA.prototype.decodeInt=function decodeInt(bytes){return utils.intFromLE(bytes)};EDDSA.prototype.isPoint=function isPoint(val){return val instanceof this.pointClass}},{"../../elliptic":67,"./key":78,"./signature":79,"hash.js":86}],78:[function(require,module,exports){"use strict";var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var parseBytes=utils.parseBytes;var cachedProperty=utils.cachedProperty;function KeyPair(eddsa,params){this.eddsa=eddsa;this._secret=parseBytes(params.secret);if(eddsa.isPoint(params.pub))this._pub=params.pub;else this._pubBytes=parseBytes(params.pub)}KeyPair.fromPublic=function fromPublic(eddsa,pub){if(pub instanceof KeyPair)return pub;return new KeyPair(eddsa,{pub:pub})};KeyPair.fromSecret=function fromSecret(eddsa,secret){if(secret instanceof KeyPair)return secret;return new KeyPair(eddsa,{secret:secret})};KeyPair.prototype.secret=function secret(){return this._secret};cachedProperty(KeyPair,"pubBytes",function pubBytes(){return this.eddsa.encodePoint(this.pub())});cachedProperty(KeyPair,"pub",function pub(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())});cachedProperty(KeyPair,"privBytes",function privBytes(){var eddsa=this.eddsa;var hash=this.hash();var lastIx=eddsa.encodingLength-1;var a=hash.slice(0,eddsa.encodingLength);a[0]&=248;a[lastIx]&=127;a[lastIx]|=64;return a});cachedProperty(KeyPair,"priv",function priv(){return this.eddsa.decodeInt(this.privBytes())});cachedProperty(KeyPair,"hash",function hash(){return this.eddsa.hash().update(this.secret()).digest()});cachedProperty(KeyPair,"messagePrefix",function messagePrefix(){return this.hash().slice(this.eddsa.encodingLength)});KeyPair.prototype.sign=function sign(message){assert(this._secret,"KeyPair can only verify");return this.eddsa.sign(message,this)};KeyPair.prototype.verify=function verify(message,sig){return this.eddsa.verify(message,sig,this)};KeyPair.prototype.getSecret=function getSecret(enc){assert(this._secret,"KeyPair is public only");return utils.encode(this.secret(),enc)};KeyPair.prototype.getPublic=function getPublic(enc){return utils.encode(this.pubBytes(),enc)};module.exports=KeyPair},{"../../elliptic":67}],79:[function(require,module,exports){"use strict";var BN=require("bn.js");var elliptic=require("../../elliptic");var utils=elliptic.utils;var assert=utils.assert;var cachedProperty=utils.cachedProperty;var parseBytes=utils.parseBytes;function Signature(eddsa,sig){this.eddsa=eddsa;if(typeof sig!=="object")sig=parseBytes(sig);if(Array.isArray(sig)){sig={R:sig.slice(0,eddsa.encodingLength),S:sig.slice(eddsa.encodingLength)}}assert(sig.R&&sig.S,"Signature without R or S");if(eddsa.isPoint(sig.R))this._R=sig.R;if(sig.S instanceof BN)this._S=sig.S;this._Rencoded=Array.isArray(sig.R)?sig.R:sig.Rencoded;this._Sencoded=Array.isArray(sig.S)?sig.S:sig.Sencoded}cachedProperty(Signature,"S",function S(){return this.eddsa.decodeInt(this.Sencoded())});cachedProperty(Signature,"R",function R(){return this.eddsa.decodePoint(this.Rencoded())});cachedProperty(Signature,"Rencoded",function Rencoded(){return this.eddsa.encodePoint(this.R())});cachedProperty(Signature,"Sencoded",function Sencoded(){return this.eddsa.encodeInt(this.S())});Signature.prototype.toBytes=function toBytes(){return this.Rencoded().concat(this.Sencoded())};Signature.prototype.toHex=function toHex(){return utils.encode(this.toBytes(),"hex").toUpperCase()};module.exports=Signature},{"../../elliptic":67,"bn.js":17}],80:[function(require,module,exports){module.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],81:[function(require,module,exports){"use strict";var utils=exports;var BN=require("bn.js");var minAssert=require("minimalistic-assert");var minUtils=require("minimalistic-crypto-utils");utils.assert=minAssert;utils.toArray=minUtils.toArray;utils.zero2=minUtils.zero2;utils.toHex=minUtils.toHex;utils.encode=minUtils.encode;function getNAF(num,w){var naf=[];var ws=1<<w+1;var k=num.clone();while(k.cmpn(1)>=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z)}else{z=0}naf.push(z);var shift=k.cmpn(0)!==0&&k.andln(ws-1)===0?w+1:1;for(var i=1;i<shift;i++)naf.push(0);k.iushrn(shift)}return naf}utils.getNAF=getNAF;function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone();k2=k2.clone();var d1=0;var d2=0;while(k1.cmpn(-d1)>0||k2.cmpn(-d2)>0){var m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0}else{var m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0}else{var m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24}jsf[1].push(u2);if(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1)}return jsf}utils.getJSF=getJSF;function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return this[key]!==undefined?this[key]:this[key]=computer.call(this)}}utils.cachedProperty=cachedProperty;function parseBytes(bytes){return typeof bytes==="string"?utils.toArray(bytes,"hex"):bytes}utils.parseBytes=parseBytes;function intFromLE(bytes){return new BN(bytes,"hex","le")}utils.intFromLE=intFromLE},{"bn.js":17,"minimalistic-assert":107,"minimalistic-crypto-utils":108}],82:[function(require,module,exports){module.exports={_args:[[{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},"c:\\Users\\Anne\\Documents\\CLEMENT\\dev\\auto-prettier\\node_modules\\browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:true,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"c:\\Users\\Anne\\Documents\\CLEMENT\\dev\\auto-prettier\\node_modules\\browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],83:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{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){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;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={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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){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}},{}],84:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;var MD5=require("md5.js");function EVP_BytesToKey(password,salt,keyLen,ivLen){if(!Buffer.isBuffer(password))password=Buffer.from(password,"binary");if(salt){if(!Buffer.isBuffer(salt))salt=Buffer.from(salt,"binary");if(salt.length!==8)throw new RangeError("salt should be Buffer with 8 byte length")}var key=Buffer.alloc(keyLen);var iv=Buffer.alloc(ivLen);var tmp=Buffer.alloc(0);while(keyLen>0||ivLen>0){var hash=new MD5;hash.update(tmp);hash.update(password);if(salt)hash.update(salt);tmp=hash.digest();var used=0;if(keyLen>0){var keyStart=key.length-keyLen;used=Math.min(keyLen,tmp.length);tmp.copy(key,keyStart,0,used);keyLen-=used}if(used<tmp.length&&ivLen>0){var ivStart=iv.length-ivLen;var length=Math.min(ivLen,tmp.length-used);tmp.copy(iv,ivStart,used,used+length);ivLen-=length}}tmp.fill(0);return{key:key,iv:iv}}module.exports=EVP_BytesToKey},{"md5.js":104,"safe-buffer":151}],85:[function(require,module,exports){(function(Buffer){"use strict";var Transform=require("stream").Transform;var inherits=require("inherits");function HashBase(blockSize){Transform.call(this);this._block=new Buffer(blockSize);this._blockSize=blockSize;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=false}inherits(HashBase,Transform);HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{if(encoding!=="buffer")chunk=new Buffer(chunk,encoding);this.update(chunk)}catch(err){error=err}callback(error)};HashBase.prototype._flush=function(callback){var error=null;try{this.push(this._digest())}catch(err){error=err}callback(error)};HashBase.prototype.update=function(data,encoding){if(!Buffer.isBuffer(data)&&typeof data!=="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");if(!Buffer.isBuffer(data))data=new Buffer(data,encoding||"binary");var block=this._block;var offset=0;while(this._blockOffset+data.length-offset>=this._blockSize){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update();this._blockOffset=0}while(offset<data.length)block[this._blockOffset++]=data[offset++];for(var j=0,carry=data.length*8;carry>0;++j){this._length[j]+=carry;carry=this._length[j]/4294967296|0;if(carry>0)this._length[j]-=4294967296*carry}return this};HashBase.prototype._update=function(data){throw new Error("_update is not implemented")};HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var digest=this._digest();if(encoding!==undefined)digest=digest.toString(encoding);return digest};HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")};module.exports=HashBase}).call(this,require("buffer").Buffer)},{buffer:47,inherits:101,stream:160}],86:[function(require,module,exports){var hash=exports;hash.utils=require("./hash/utils");hash.common=require("./hash/common");hash.sha=require("./hash/sha");hash.ripemd=require("./hash/ripemd");hash.hmac=require("./hash/hmac");hash.sha1=hash.sha.sha1;hash.sha256=hash.sha.sha256;hash.sha224=hash.sha.sha224;hash.sha384=hash.sha.sha384;hash.sha512=hash.sha.sha512;hash.ripemd160=hash.ripemd.ripemd160},{"./hash/common":87,"./hash/hmac":88,"./hash/ripemd":89,"./hash/sha":90,"./hash/utils":97}],87:[function(require,module,exports){"use strict";var utils=require("./utils");var assert=require("minimalistic-assert");function BlockHash(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian="big";this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}exports.BlockHash=BlockHash;BlockHash.prototype.update=function update(msg,enc){msg=utils.toArray(msg,enc);if(!this.pending)this.pending=msg;else this.pending=this.pending.concat(msg);this.pendingTotal+=msg.length;if(this.pending.length>=this._delta8){msg=this.pending;var r=msg.length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length);if(this.pending.length===0)this.pending=null;msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i<msg.length;i+=this._delta32)this._update(msg,i,i+this._delta32)}return this};BlockHash.prototype.digest=function digest(enc){this.update(this._pad());assert(this.pending===null);return this._digest(enc)};BlockHash.prototype._pad=function pad(){var len=this.pendingTotal;var bytes=this._delta8;var k=bytes-(len+this.padLength)%bytes;var res=new Array(k+this.padLength);res[0]=128;for(var i=1;i<k;i++)res[i]=0;len<<=3;if(this.endian==="big"){for(var t=8;t<this.padLength;t++)res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=len>>>24&255;res[i++]=len>>>16&255;res[i++]=len>>>8&255;res[i++]=len&255}else{res[i++]=len&255;res[i++]=len>>>8&255;res[i++]=len>>>16&255;res[i++]=len>>>24&255;res[i++]=0;res[i++]=0;res[i++]=0;res[i++]=0;for(t=8;t<this.padLength;t++)res[i++]=0}return res}},{"./utils":97,"minimalistic-assert":107}],88:[function(require,module,exports){"use strict";var utils=require("./utils");var assert=require("minimalistic-assert");function Hmac(hash,key,enc){if(!(this instanceof Hmac))return new Hmac(hash,key,enc);this.Hash=hash;this.blockSize=hash.blockSize/8;this.outSize=hash.outSize/8;this.inner=null;this.outer=null;this._init(utils.toArray(key,enc))}module.exports=Hmac;Hmac.prototype._init=function init(key){if(key.length>this.blockSize)key=(new this.Hash).update(key).digest();assert(key.length<=this.blockSize);for(var i=key.length;i<this.blockSize;i++)key.push(0);for(i=0;i<key.length;i++)key[i]^=54;this.inner=(new this.Hash).update(key);for(i=0;i<key.length;i++)key[i]^=106;this.outer=(new this.Hash).update(key)};Hmac.prototype.update=function update(msg,enc){this.inner.update(msg,enc);return this};Hmac.prototype.digest=function digest(enc){this.outer.update(this.inner.digest());return this.outer.digest(enc)}},{"./utils":97,"minimalistic-assert":107}],89:[function(require,module,exports){"use strict";var utils=require("./utils");var common=require("./common");var rotl32=utils.rotl32;var sum32=utils.sum32;var sum32_3=utils.sum32_3;var sum32_4=utils.sum32_4;var BlockHash=common.BlockHash;function RIPEMD160(){if(!(this instanceof RIPEMD160))return new RIPEMD160;BlockHash.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.endian="little"}utils.inherits(RIPEMD160,BlockHash);exports.ripemd160=RIPEMD160;RIPEMD160.blockSize=512;RIPEMD160.outSize=160;RIPEMD160.hmacStrength=192;RIPEMD160.padLength=64;RIPEMD160.prototype._update=function update(msg,start){var A=this.h[0];var B=this.h[1];var C=this.h[2];var D=this.h[3];var E=this.h[4];var Ah=A;var Bh=B;var Ch=C;var Dh=D;var Eh=E;for(var j=0;j<80;j++){var T=sum32(rotl32(sum32_4(A,f(j,B,C,D),msg[r[j]+start],K(j)),s[j]),E);A=E;E=D;D=rotl32(C,10);C=B;B=T;T=sum32(rotl32(sum32_4(Ah,f(79-j,Bh,Ch,Dh),msg[rh[j]+start],Kh(j)),sh[j]),Eh);Ah=Eh;Eh=Dh;Dh=rotl32(Ch,10);Ch=Bh;Bh=T}T=sum32_3(this.h[1],C,Dh);this.h[1]=sum32_3(this.h[2],D,Eh);this.h[2]=sum32_3(this.h[3],E,Ah);this.h[3]=sum32_3(this.h[4],A,Bh);this.h[4]=sum32_3(this.h[0],B,Ch);this.h[0]=T};RIPEMD160.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h,"little");else return utils.split32(this.h,"little")};function f(j,x,y,z){if(j<=15)return x^y^z;else if(j<=31)return x&y|~x&z;else if(j<=47)return(x|~y)^z;else if(j<=63)return x&z|y&~z;else return x^(y|~z)}function K(j){if(j<=15)return 0;else if(j<=31)return 1518500249;else if(j<=47)return 1859775393;else if(j<=63)return 2400959708;else return 2840853838}function Kh(j){if(j<=15)return 1352829926;else if(j<=31)return 1548603684;else if(j<=47)return 1836072691;else if(j<=63)return 2053994217;else return 0}var r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13];var rh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11];var s=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6];var sh=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":87,"./utils":97}],90:[function(require,module,exports){"use strict";exports.sha1=require("./sha/1");exports.sha224=require("./sha/224");exports.sha256=require("./sha/256");exports.sha384=require("./sha/384");exports.sha512=require("./sha/512")},{"./sha/1":91,"./sha/224":92,"./sha/256":93,"./sha/384":94,"./sha/512":95}],91:[function(require,module,exports){"use strict";var utils=require("../utils");var common=require("../common");var shaCommon=require("./common");var rotl32=utils.rotl32;var sum32=utils.sum32;var sum32_5=utils.sum32_5;var ft_1=shaCommon.ft_1;var BlockHash=common.BlockHash;var sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}utils.inherits(SHA1,BlockHash);module.exports=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function _update(msg,start){var W=this.W;for(var i=0;i<16;i++)W[i]=msg[start+i];for(;i<W.length;i++)W[i]=rotl32(W[i-3]^W[i-8]^W[i-14]^W[i-16],1);var a=this.h[0];var b=this.h[1];var c=this.h[2];var d=this.h[3];var e=this.h[4];for(i=0;i<W.length;i++){var s=~~(i/20);var t=sum32_5(rotl32(a,5),ft_1(s,b,c,d),e,W[i],sha1_K[s]);e=d;d=c;c=rotl32(b,30);b=a;a=t}this.h[0]=sum32(this.h[0],a);this.h[1]=sum32(this.h[1],b);this.h[2]=sum32(this.h[2],c);this.h[3]=sum32(this.h[3],d);this.h[4]=sum32(this.h[4],e)};SHA1.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h,"big");else return utils.split32(this.h,"big")}},{"../common":87,"../utils":97,"./common":96}],92:[function(require,module,exports){"use strict";var utils=require("../utils");var SHA256=require("./256");function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}utils.inherits(SHA224,SHA256);module.exports=SHA224;SHA224.blockSize=512;SHA224.outSize=224;SHA224.hmacStrength=192;SHA224.padLength=64;SHA224.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h.slice(0,7),"big");else return utils.split32(this.h.slice(0,7),"big")}},{"../utils":97,"./256":93}],93:[function(require,module,exports){"use strict";var utils=require("../utils");var common=require("../common");var shaCommon=require("./common");var assert=require("minimalistic-assert");var sum32=utils.sum32;var sum32_4=utils.sum32_4;var sum32_5=utils.sum32_5;var ch32=shaCommon.ch32;var maj32=shaCommon.maj32;var s0_256=shaCommon.s0_256;var s1_256=shaCommon.s1_256;var g0_256=shaCommon.g0_256;var g1_256=shaCommon.g1_256;var BlockHash=common.BlockHash;var sha256_K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function SHA256(){if(!(this instanceof SHA256))return new SHA256;BlockHash.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=sha256_K;this.W=new Array(64)}utils.inherits(SHA256,BlockHash);module.exports=SHA256;SHA256.blockSize=512;SHA256.outSize=256;SHA256.hmacStrength=192;SHA256.padLength=64;SHA256.prototype._update=function _update(msg,start){var W=this.W;for(var i=0;i<16;i++)W[i]=msg[start+i];for(;i<W.length;i++)W[i]=sum32_4(g1_256(W[i-2]),W[i-7],g0_256(W[i-15]),W[i-16]);var a=this.h[0];var b=this.h[1];var c=this.h[2];var d=this.h[3];var e=this.h[4];var f=this.h[5];var g=this.h[6];var h=this.h[7];assert(this.k.length===W.length);for(i=0;i<W.length;i++){var T1=sum32_5(h,s1_256(e),ch32(e,f,g),this.k[i],W[i]);var T2=sum32(s0_256(a),maj32(a,b,c));h=g;g=f;f=e;e=sum32(d,T1);d=c;c=b;b=a;a=sum32(T1,T2)}this.h[0]=sum32(this.h[0],a);this.h[1]=sum32(this.h[1],b);this.h[2]=sum32(this.h[2],c);this.h[3]=sum32(this.h[3],d);this.h[4]=sum32(this.h[4],e);this.h[5]=sum32(this.h[5],f);this.h[6]=sum32(this.h[6],g);this.h[7]=sum32(this.h[7],h)};SHA256.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h,"big");else return utils.split32(this.h,"big")}},{"../common":87,"../utils":97,"./common":96,"minimalistic-assert":107}],94:[function(require,module,exports){"use strict";var utils=require("../utils");var SHA512=require("./512");function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}utils.inherits(SHA384,SHA512);module.exports=SHA384;SHA384.blockSize=1024;SHA384.outSize=384;SHA384.hmacStrength=192;SHA384.padLength=128;SHA384.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h.slice(0,12),"big");else return utils.split32(this.h.slice(0,12),"big")}},{"../utils":97,"./512":95}],95:[function(require,module,exports){"use strict";var utils=require("../utils");var common=require("../common");var assert=require("minimalistic-assert");var rotr64_hi=utils.rotr64_hi;var rotr64_lo=utils.rotr64_lo;var shr64_hi=utils.shr64_hi;var shr64_lo=utils.shr64_lo;var sum64=utils.sum64;var sum64_hi=utils.sum64_hi;var sum64_lo=utils.sum64_lo;var sum64_4_hi=utils.sum64_4_hi;var sum64_4_lo=utils.sum64_4_lo;var sum64_5_hi=utils.sum64_5_hi;var sum64_5_lo=utils.sum64_5_lo;var BlockHash=common.BlockHash;var sha512_K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function SHA512(){if(!(this instanceof SHA512))return new SHA512;BlockHash.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=sha512_K;this.W=new Array(160)}utils.inherits(SHA512,BlockHash);module.exports=SHA512;SHA512.blockSize=1024;SHA512.outSize=512;SHA512.hmacStrength=192;SHA512.padLength=128;SHA512.prototype._prepareBlock=function _prepareBlock(msg,start){var W=this.W;for(var i=0;i<32;i++)W[i]=msg[start+i];for(;i<W.length;i+=2){var c0_hi=g1_512_hi(W[i-4],W[i-3]);var c0_lo=g1_512_lo(W[i-4],W[i-3]);var c1_hi=W[i-14];var c1_lo=W[i-13];var c2_hi=g0_512_hi(W[i-30],W[i-29]);var c2_lo=g0_512_lo(W[i-30],W[i-29]);var c3_hi=W[i-32];var c3_lo=W[i-31];W[i]=sum64_4_hi(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo);W[i+1]=sum64_4_lo(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo)}};SHA512.prototype._update=function _update(msg,start){this._prepareBlock(msg,start);var W=this.W;var ah=this.h[0];var al=this.h[1];var bh=this.h[2];var bl=this.h[3];var ch=this.h[4];var cl=this.h[5];var dh=this.h[6];var dl=this.h[7];var eh=this.h[8];var el=this.h[9];var fh=this.h[10];var fl=this.h[11];var gh=this.h[12];var gl=this.h[13];var hh=this.h[14];var hl=this.h[15];assert(this.k.length===W.length);for(var i=0;i<W.length;i+=2){var c0_hi=hh;var c0_lo=hl;var c1_hi=s1_512_hi(eh,el);var c1_lo=s1_512_lo(eh,el);var c2_hi=ch64_hi(eh,el,fh,fl,gh,gl);var c2_lo=ch64_lo(eh,el,fh,fl,gh,gl);var c3_hi=this.k[i];var c3_lo=this.k[i+1];var c4_hi=W[i];var c4_lo=W[i+1];var T1_hi=sum64_5_hi(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo,c4_hi,c4_lo);var T1_lo=sum64_5_lo(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo,c4_hi,c4_lo);c0_hi=s0_512_hi(ah,al);c0_lo=s0_512_lo(ah,al);c1_hi=maj64_hi(ah,al,bh,bl,ch,cl);c1_lo=maj64_lo(ah,al,bh,bl,ch,cl);var T2_hi=sum64_hi(c0_hi,c0_lo,c1_hi,c1_lo);var T2_lo=sum64_lo(c0_hi,c0_lo,c1_hi,c1_lo);hh=gh;hl=gl;gh=fh;gl=fl;fh=eh;fl=el;eh=sum64_hi(dh,dl,T1_hi,T1_lo);el=sum64_lo(dl,dl,T1_hi,T1_lo);dh=ch;dl=cl;ch=bh;cl=bl;bh=ah;bl=al;ah=sum64_hi(T1_hi,T1_lo,T2_hi,T2_lo);al=sum64_lo(T1_hi,T1_lo,T2_hi,T2_lo)}sum64(this.h,0,ah,al);sum64(this.h,2,bh,bl);sum64(this.h,4,ch,cl);sum64(this.h,6,dh,dl);sum64(this.h,8,eh,el);sum64(this.h,10,fh,fl);sum64(this.h,12,gh,gl);sum64(this.h,14,hh,hl)};SHA512.prototype._digest=function digest(enc){if(enc==="hex")return utils.toHex32(this.h,"big");else return utils.split32(this.h,"big")};function ch64_hi(xh,xl,yh,yl,zh){var r=xh&yh^~xh&zh;if(r<0)r+=4294967296;return r}function ch64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^~xl&zl;if(r<0)r+=4294967296;return r}function maj64_hi(xh,xl,yh,yl,zh){var r=xh&yh^xh&zh^yh&zh;if(r<0)r+=4294967296;return r}function maj64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^xl&zl^yl&zl;if(r<0)r+=4294967296;return r}function s0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,28);var c1_hi=rotr64_hi(xl,xh,2);var c2_hi=rotr64_hi(xl,xh,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,28);var c1_lo=rotr64_lo(xl,xh,2);var c2_lo=rotr64_lo(xl,xh,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function s1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,14);var c1_hi=rotr64_hi(xh,xl,18);var c2_hi=rotr64_hi(xl,xh,9);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function s1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,14);var c1_lo=rotr64_lo(xh,xl,18);var c2_lo=rotr64_lo(xl,xh,9);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g0_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,1);var c1_hi=rotr64_hi(xh,xl,8);var c2_hi=shr64_hi(xh,xl,7);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g0_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,1);var c1_lo=rotr64_lo(xh,xl,8);var c2_lo=shr64_lo(xh,xl,7);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}function g1_512_hi(xh,xl){var c0_hi=rotr64_hi(xh,xl,19);var c1_hi=rotr64_hi(xl,xh,29);var c2_hi=shr64_hi(xh,xl,6);var r=c0_hi^c1_hi^c2_hi;if(r<0)r+=4294967296;return r}function g1_512_lo(xh,xl){var c0_lo=rotr64_lo(xh,xl,19);var c1_lo=rotr64_lo(xl,xh,29);var c2_lo=shr64_lo(xh,xl,6);var r=c0_lo^c1_lo^c2_lo;if(r<0)r+=4294967296;return r}},{"../common":87,"../utils":97,"minimalistic-assert":107}],96:[function(require,module,exports){"use strict";var utils=require("../utils");var rotr32=utils.rotr32;function ft_1(s,x,y,z){if(s===0)return ch32(x,y,z);if(s===1||s===3)return p32(x,y,z);if(s===2)return maj32(x,y,z)}exports.ft_1=ft_1;function ch32(x,y,z){return x&y^~x&z}exports.ch32=ch32;function maj32(x,y,z){return x&y^x&z^y&z}exports.maj32=maj32;function p32(x,y,z){return x^y^z}exports.p32=p32;function s0_256(x){return rotr32(x,2)^rotr32(x,13)^rotr32(x,22)}exports.s0_256=s0_256;function s1_256(x){return rotr32(x,6)^rotr32(x,11)^rotr32(x,25)}exports.s1_256=s1_256;function g0_256(x){return rotr32(x,7)^rotr32(x,18)^x>>>3}exports.g0_256=g0_256;function g1_256(x){return rotr32(x,17)^rotr32(x,19)^x>>>10}exports.g1_256=g1_256},{"../utils":97}],97:[function(require,module,exports){"use strict";var assert=require("minimalistic-assert");var inherits=require("inherits");exports.inherits=inherits;function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg==="string"){if(!enc){for(var i=0;i<msg.length;i++){var c=msg.charCodeAt(i);var hi=c>>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}else if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(i=0;i<msg.length;i+=2)res.push(parseInt(msg[i]+msg[i+1],16))}}else{for(i=0;i<msg.length;i++)res[i]=msg[i]|0}return res}exports.toArray=toArray;function toHex(msg){var res="";for(var i=0;i<msg.length;i++)res+=zero2(msg[i].toString(16));return res}exports.toHex=toHex;function htonl(w){var res=w>>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return res>>>0}exports.htonl=htonl;function toHex32(msg,endian){var res="";for(var i=0;i<msg.length;i++){var w=msg[i];if(endian==="little")w=htonl(w);res+=zero8(w.toString(16))}return res}exports.toHex32=toHex32;function zero2(word){if(word.length===1)return"0"+word;else return word}exports.zero2=zero2;function zero8(word){if(word.length===7)return"0"+word;else if(word.length===6)return"00"+word;else if(word.length===5)return"000"+word;else if(word.length===4)return"0000"+word;else if(word.length===3)return"00000"+word;else if(word.length===2)return"000000"+word;else if(word.length===1)return"0000000"+word;else return word}exports.zero8=zero8;function join32(msg,start,end,endian){var len=end-start;assert(len%4===0);var res=new Array(len/4);for(var i=0,k=start;i<res.length;i++,k+=4){var w;if(endian==="big")w=msg[k]<<24|msg[k+1]<<16|msg[k+2]<<8|msg[k+3];else w=msg[k+3]<<24|msg[k+2]<<16|msg[k+1]<<8|msg[k];res[i]=w>>>0}return res}exports.join32=join32;function split32(msg,endian){var res=new Array(msg.length*4);for(var i=0,k=0;i<msg.length;i++,k+=4){var m=msg[i];if(endian==="big"){res[k]=m>>>24;res[k+1]=m>>>16&255;res[k+2]=m>>>8&255;res[k+3]=m&255}else{res[k+3]=m>>>24;res[k+2]=m>>>16&255;res[k+1]=m>>>8&255;res[k]=m&255}}return res}exports.split32=split32;function rotr32(w,b){return w>>>b|w<<32-b}exports.rotr32=rotr32;function rotl32(w,b){return w<<b|w>>>32-b}exports.rotl32=rotl32;function sum32(a,b){return a+b>>>0}exports.sum32=sum32;function sum32_3(a,b,c){return a+b+c>>>0}exports.sum32_3=sum32_3;function sum32_4(a,b,c,d){return a+b+c+d>>>0}exports.sum32_4=sum32_4;function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0}exports.sum32_5=sum32_5;function sum64(buf,pos,ah,al){var bh=buf[pos];var bl=buf[pos+1];var lo=al+bl>>>0;var hi=(lo<al?1:0)+ah+bh;buf[pos]=hi>>>0;buf[pos+1]=lo}exports.sum64=sum64;function sum64_hi(ah,al,bh,bl){var lo=al+bl>>>0;var hi=(lo<al?1:0)+ah+bh;return hi>>>0}exports.sum64_hi=sum64_hi;function sum64_lo(ah,al,bh,bl){var lo=al+bl;return lo>>>0}exports.sum64_lo=sum64_lo;function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo<al?1:0;lo=lo+cl>>>0;carry+=lo<cl?1:0;lo=lo+dl>>>0;carry+=lo<dl?1:0;var hi=ah+bh+ch+dh+carry;return hi>>>0}exports.sum64_4_hi=sum64_4_hi;function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){var lo=al+bl+cl+dl;return lo>>>0}exports.sum64_4_lo=sum64_4_lo;function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0;var lo=al;lo=lo+bl>>>0;carry+=lo<al?1:0;lo=lo+cl>>>0;carry+=lo<cl?1:0;lo=lo+dl>>>0;carry+=lo<dl?1:0;lo=lo+el>>>0;carry+=lo<el?1:0;var hi=ah+bh+ch+dh+eh+carry;return hi>>>0}exports.sum64_5_hi=sum64_5_hi;function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var lo=al+bl+cl+dl+el;return lo>>>0}exports.sum64_5_lo=sum64_5_lo;function rotr64_hi(ah,al,num){var r=al<<32-num|ah>>>num;return r>>>0}exports.rotr64_hi=rotr64_hi;function rotr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.rotr64_lo=rotr64_lo;function shr64_hi(ah,al,num){return ah>>>num}exports.shr64_hi=shr64_hi;function shr64_lo(ah,al,num){var r=ah<<32-num|al>>>num;return r>>>0}exports.shr64_lo=shr64_lo},{inherits:101,"minimalistic-assert":107}],98:[function(require,module,exports){"use strict";var hash=require("hash.js");var utils=require("minimalistic-crypto-utils");var assert=require("minimalistic-assert");function HmacDRBG(options){if(!(this instanceof HmacDRBG))return new HmacDRBG(options);this.hash=options.hash;this.predResist=!!options.predResist;this.outLen=this.hash.outSize;this.minEntropy=options.minEntropy||this.hash.hmacStrength;this._reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var entropy=utils.toArray(options.entropy,options.entropyEnc||"hex");var nonce=utils.toArray(options.nonce,options.nonceEnc||"hex");var pers=utils.toArray(options.pers,options.persEnc||"hex");assert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(entropy,nonce,pers)}module.exports=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++){this.K[i]=0;this.V[i]=1}this._update(seed);this._reseed=1;this.reseedInterval=281474976710656};HmacDRBG.prototype._hmac=function hmac(){return new hash.hmac(this.hash,this.K)};HmacDRBG.prototype._update=function update(seed){var kmac=this._hmac().update(this.V).update([0]);if(seed)kmac=kmac.update(seed);this.K=kmac.digest();this.V=this._hmac().update(this.V).digest();if(!seed)return;this.K=this._hmac().update(this.V).update([1]).update(seed).digest();this.V=this._hmac().update(this.V).digest()};HmacDRBG.prototype.reseed=function reseed(entropy,entropyEnc,add,addEnc){if(typeof entropyEnc!=="string"){addEnc=add;add=entropyEnc;entropyEnc=null}entropy=utils.toArray(entropy,entropyEnc);add=utils.toArray(add,addEnc);assert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(entropy.concat(add||[]));this._reseed=1};HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof enc!=="string"){addEnc=add;add=enc;enc=null}if(add){add=utils.toArray(add,addEnc||"hex");this._update(add)}var temp=[];while(temp.length<len){this.V=this._hmac().update(this.V).digest();temp=temp.concat(this.V)}var res=temp.slice(0,len);this._update(add);this._reseed++;return utils.encode(res,enc)}},{"hash.js":86,"minimalistic-assert":107,"minimalistic-crypto-utils":108}],99:[function(require,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&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],100:[function(require,module,exports){var indexOf=[].indexOf;module.exports=function(arr,obj){if(indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i){if(arr[i]===obj)return i}return-1}},{}],101:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],102:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],103:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],104:[function(require,module,exports){(function(Buffer){"use strict";var inherits=require("inherits");var HashBase=require("hash-base");var ARRAY16=new Array(16);function MD5(){HashBase.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878}inherits(MD5,HashBase);MD5.prototype._update=function(){var M=ARRAY16;for(var i=0;i<16;++i)M[i]=this._block.readInt32LE(i*4);var a=this._a;var b=this._b;var c=this._c;var d=this._d;a=fnF(a,b,c,d,M[0],3614090360,7);d=fnF(d,a,b,c,M[1],3905402710,12);c=fnF(c,d,a,b,M[2],606105819,17);b=fnF(b,c,d,a,M[3],3250441966,22);a=fnF(a,b,c,d,M[4],4118548399,7);d=fnF(d,a,b,c,M[5],1200080426,12);c=fnF(c,d,a,b,M[6],2821735955,17);b=fnF(b,c,d,a,M[7],4249261313,22);a=fnF(a,b,c,d,M[8],1770035416,7);d=fnF(d,a,b,c,M[9],2336552879,12);c=fnF(c,d,a,b,M[10],4294925233,17);b=fnF(b,c,d,a,M[11],2304563134,22);a=fnF(a,b,c,d,M[12],1804603682,7);d=fnF(d,a,b,c,M[13],4254626195,12);c=fnF(c,d,a,b,M[14],2792965006,17);b=fnF(b,c,d,a,M[15],1236535329,22);a=fnG(a,b,c,d,M[1],4129170786,5);d=fnG(d,a,b,c,M[6],3225465664,9);c=fnG(c,d,a,b,M[11],643717713,14);b=fnG(b,c,d,a,M[0],3921069994,20);a=fnG(a,b,c,d,M[5],3593408605,5);d=fnG(d,a,b,c,M[10],38016083,9);c=fnG(c,d,a,b,M[15],3634488961,14);b=fnG(b,c,d,a,M[4],3889429448,20);a=fnG(a,b,c,d,M[9],568446438,5);d=fnG(d,a,b,c,M[14],3275163606,9);c=fnG(c,d,a,b,M[3],4107603335,14);b=fnG(b,c,d,a,M[8],1163531501,20);a=fnG(a,b,c,d,M[13],2850285829,5);d=fnG(d,a,b,c,M[2],4243563512,9);c=fnG(c,d,a,b,M[7],1735328473,14);b=fnG(b,c,d,a,M[12],2368359562,20);a=fnH(a,b,c,d,M[5],4294588738,4);d=fnH(d,a,b,c,M[8],2272392833,11);c=fnH(c,d,a,b,M[11],1839030562,16);b=fnH(b,c,d,a,M[14],4259657740,23);a=fnH(a,b,c,d,M[1],2763975236,4);d=fnH(d,a,b,c,M[4],1272893353,11);c=fnH(c,d,a,b,M[7],4139469664,16);b=fnH(b,c,d,a,M[10],3200236656,23);a=fnH(a,b,c,d,M[13],681279174,4);d=fnH(d,a,b,c,M[0],3936430074,11);c=fnH(c,d,a,b,M[3],3572445317,16);b=fnH(b,c,d,a,M[6],76029189,23);a=fnH(a,b,c,d,M[9],3654602809,4);d=fnH(d,a,b,c,M[12],3873151461,11);c=fnH(c,d,a,b,M[15],530742520,16);b=fnH(b,c,d,a,M[2],3299628645,23);a=fnI(a,b,c,d,M[0],4096336452,6);d=fnI(d,a,b,c,M[7],1126891415,10);c=fnI(c,d,a,b,M[14],2878612391,15);b=fnI(b,c,d,a,M[5],4237533241,21);a=fnI(a,b,c,d,M[12],1700485571,6);d=fnI(d,a,b,c,M[3],2399980690,10);c=fnI(c,d,a,b,M[10],4293915773,15);b=fnI(b,c,d,a,M[1],2240044497,21);a=fnI(a,b,c,d,M[8],1873313359,6);d=fnI(d,a,b,c,M[15],4264355552,10);c=fnI(c,d,a,b,M[6],2734768916,15);b=fnI(b,c,d,a,M[13],1309151649,21);a=fnI(a,b,c,d,M[4],4149444226,6);d=fnI(d,a,b,c,M[11],3174756917,10);c=fnI(c,d,a,b,M[2],718787259,15);b=fnI(b,c,d,a,M[9],3951481745,21);this._a=this._a+a|0;this._b=this._b+b|0;this._c=this._c+c|0;this._d=this._d+d|0};MD5.prototype._digest=function(){this._block[this._blockOffset++]=128;if(this._blockOffset>56){this._block.fill(0,this._blockOffset,64);this._update();this._blockOffset=0}this._block.fill(0,this._blockOffset,56);this._block.writeUInt32LE(this._length[0],56);this._block.writeUInt32LE(this._length[1],60);this._update();var buffer=new Buffer(16);buffer.writeInt32LE(this._a,0);buffer.writeInt32LE(this._b,4);buffer.writeInt32LE(this._c,8);buffer.writeInt32LE(this._d,12);return buffer};function rotl(x,n){return x<<n|x>>>32-n}function fnF(a,b,c,d,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+b|0}function fnG(a,b,c,d,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+b|0}function fnH(a,b,c,d,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+b|0}function fnI(a,b,c,d,m,k,s){return rotl(a+(c^(b|~d))+m+k|0,s)+b|0}module.exports=MD5}).call(this,require("buffer").Buffer)},{buffer:47,"hash-base":105,inherits:101}],105:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer;var Transform=require("stream").Transform;var inherits=require("inherits");function throwIfNotStringOrBuffer(val,prefix){if(!Buffer.isBuffer(val)&&typeof val!=="string"){throw new TypeError(prefix+" must be a string or a buffer")}}function HashBase(blockSize){Transform.call(this);this._block=Buffer.allocUnsafe(blockSize);this._blockSize=blockSize;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=false}inherits(HashBase,Transform);HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{this.update(chunk,encoding)}catch(err){error=err}callback(error)};HashBase.prototype._flush=function(callback){var error=null;try{this.push(this.digest())}catch(err){error=err}callback(error)};HashBase.prototype.update=function(data,encoding){throwIfNotStringOrBuffer(data,"Data");if(this._finalized)throw new Error("Digest already called");if(!Buffer.isBuffer(data))data=Buffer.from(data,encoding);var block=this._block;var offset=0;while(this._blockOffset+data.length-offset>=this._blockSize){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update();this._blockOffset=0}while(offset<data.length)block[this._blockOffset++]=data[offset++];for(var j=0,carry=data.length*8;carry>0;++j){this._length[j]+=carry;carry=this._length[j]/4294967296|0;if(carry>0)this._length[j]-=4294967296*carry}return this};HashBase.prototype._update=function(){throw new Error("_update is not implemented")};HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var digest=this._digest();if(encoding!==undefined)digest=digest.toString(encoding);this._block.fill(0);this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return digest};HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")};module.exports=HashBase},{inherits:101,"safe-buffer":151,stream:160}],106:[function(require,module,exports){var bn=require("bn.js");var brorand=require("brorand");function MillerRabin(rand){this.rand=rand||new brorand.Rand}module.exports=MillerRabin;MillerRabin.create=function create(rand){return new MillerRabin(rand)};MillerRabin.prototype._rand=function _rand(n){var len=n.bitLength();var buf=this.rand.generate(Math.ceil(len/8));buf[0]|=3;var mask=len&7;if(mask!==0)buf[buf.length-1]>>=7-mask;return new bn(buf)};MillerRabin.prototype.test=function test(n,k,cb){var len=n.bitLength();var red=bn.mont(n);var rone=new bn(1).toRed(red);if(!k)k=Math.max(1,len/48|0);var n1=n.subn(1);var n2=n1.subn(1);for(var s=0;!n1.testn(s);s++){}var d=n.shrn(s);var rn1=n1.toRed(red);var prime=true;for(;k>0;k--){var a=this._rand(n2);if(cb)cb(a);var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;i<s;i++){x=x.redSqr();if(x.cmp(rone)===0)return false;if(x.cmp(rn1)===0)break}if(i===s)return false}return prime};MillerRabin.prototype.getDivisor=function getDivisor(n,k){var len=n.bitLength();var red=bn.mont(n);var rone=new bn(1).toRed(red);if(!k)k=Math.max(1,len/48|0);var n1=n.subn(1);var n2=n1.subn(1);for(var s=0;!n1.testn(s);s++){}var d=n.shrn(s);var rn1=n1.toRed(red);for(;k>0;k--){var a=this._rand(n2);var g=n.gcd(a);if(g.cmpn(1)!==0)return g;var x=a.toRed(red).redPow(d);if(x.cmp(rone)===0||x.cmp(rn1)===0)continue;for(var i=1;i<s;i++){x=x.redSqr();if(x.cmp(rone)===0)return x.fromRed().subn(1).gcd(n);if(x.cmp(rn1)===0)break}if(i===s){x=x.redSqr();return x.fromRed().subn(1).gcd(n)}}return false}},{"bn.js":17,brorand:18}],107:[function(require,module,exports){module.exports=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)}},{}],108:[function(require,module,exports){"use strict";var utils=exports;function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if(typeof msg!=="string"){for(var i=0;i<msg.length;i++)res[i]=msg[i]|0;return res}if(enc==="hex"){msg=msg.replace(/[^a-z0-9]+/gi,"");if(msg.length%2!==0)msg="0"+msg;for(var i=0;i<msg.length;i+=2)res.push(parseInt(msg[i]+msg[i+1],16))}else{for(var i=0;i<msg.length;i++){var c=msg.charCodeAt(i);var hi=c>>8;var lo=c&255;if(hi)res.push(hi,lo);else res.push(lo)}}return res}utils.toArray=toArray;function zero2(word){if(word.length===1)return"0"+word;else return word}utils.zero2=zero2;function toHex(msg){var res="";for(var i=0;i<msg.length;i++)res+=zero2(msg[i].toString(16));return res}utils.toHex=toHex;utils.encode=function encode(arr,enc){if(enc==="hex")return toHex(arr);else return arr}},{}],109:[function(require,module,exports){exports.endianness=function(){return"LE"};exports.hostname=function(){if(typeof location!=="undefined"){return location.hostname}else return""};exports.loadavg=function(){return[]};exports.uptime=function(){return 0};exports.freemem=function(){return Number.MAX_VALUE};exports.totalmem=function(){return Number.MAX_VALUE};exports.cpus=function(){return[]};exports.type=function(){return"Browser"};exports.release=function(){if(typeof navigator!=="undefined"){return navigator.appVersion}return""};exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}};exports.arch=function(){return"javascript"};exports.platform=function(){return"browser"};exports.tmpdir=exports.tmpDir=function(){return"/tmp"};exports.EOL="\n"},{}],110:[function(require,module,exports){module.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],111:[function(require,module,exports){"use strict";var asn1=require("asn1.js");exports.certificate=require("./certificate");var RSAPrivateKey=asn1.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});exports.RSAPrivateKey=RSAPrivateKey;var RSAPublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});exports.RSAPublicKey=RSAPublicKey;var PublicKey=asn1.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())});exports.PublicKey=PublicKey;var AlgorithmIdentifier=asn1.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())});var PrivateKeyInfo=asn1.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPrivateKey").octstr())});exports.PrivateKey=PrivateKeyInfo;var EncryptedPrivateKeyInfo=asn1.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});exports.EncryptedPrivateKey=EncryptedPrivateKeyInfo;var DSAPrivateKey=asn1.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});exports.DSAPrivateKey=DSAPrivateKey;exports.DSAparam=asn1.define("DSAparam",function(){this.int()});var ECPrivateKey=asn1.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(ECParameters),this.key("publicKey").optional().explicit(1).bitstr())});exports.ECPrivateKey=ECPrivateKey;var ECParameters=asn1.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});exports.signature=asn1.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":112,"asn1.js":1}],112:[function(require,module,exports){"use strict";var asn=require("asn1.js");var Time=asn.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})});var AttributeTypeValue=asn.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())});var AlgorithmIdentifier=asn.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())});var SubjectPublicKeyInfo=asn.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())});var RelativeDistinguishedName=asn.define("RelativeDistinguishedName",function(){this.setof(AttributeTypeValue)});var RDNSequence=asn.define("RDNSequence",function(){this.seqof(RelativeDistinguishedName)});var Name=asn.define("Name",function(){this.choice({rdnSequence:this.use(RDNSequence)})});var Validity=asn.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Time),this.key("notAfter").use(Time))});var Extension=asn.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(false),this.key("extnValue").octstr())});var TBSCertificate=asn.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(AlgorithmIdentifier),this.key("issuer").use(Name),this.key("validity").use(Validity),this.key("subject").use(Name),this.key("subjectPublicKeyInfo").use(SubjectPublicKeyInfo),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Extension).optional())});var X509Certificate=asn.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(TBSCertificate),this.key("signatureAlgorithm").use(AlgorithmIdentifier),this.key("signatureValue").bitstr())});module.exports=X509Certificate},{"asn1.js":1}],113:[function(require,module,exports){(function(Buffer){var findProc=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m;var startRegex=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m;var fullRegex=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m;var evp=require("evp_bytestokey");var ciphers=require("browserify-aes");module.exports=function(okey,password){var key=okey.toString();var match=key.match(findProc);var decrypted;if(!match){var match2=key.match(fullRegex);decrypted=new Buffer(match2[2].replace(/\r?\n/g,""),"base64")}else{var suite="aes"+match[1];var iv=new Buffer(match[2],"hex");var cipherText=new Buffer(match[3].replace(/\r?\n/g,""),"base64");var cipherKey=evp(password,iv.slice(0,8),parseInt(match[1],10)).key;var out=[];var cipher=ciphers.createDecipheriv(suite,cipherKey,iv);out.push(cipher.update(cipherText));out.push(cipher.final());decrypted=Buffer.concat(out)}var tag=key.match(startRegex)[1];return{tag:tag,data:decrypted}}}).call(this,require("buffer").Buffer)},{"browserify-aes":22,buffer:47,evp_bytestokey:84}],114:[function(require,module,exports){(function(Buffer){var asn1=require("./asn1");var aesid=require("./aesid.json");var fixProc=require("./fixProc");var ciphers=require("browserify-aes");var compat=require("pbkdf2");module.exports=parseKeys;function parseKeys(buffer){var password;if(typeof buffer==="object"&&!Buffer.isBuffer(buffer)){password=buffer.passphrase;buffer=buffer.key}if(typeof buffer==="string"){buffer=new Buffer(buffer)}var stripped=fixProc(buffer,password);var type=stripped.tag;var data=stripped.data;var subtype,ndata;switch(type){case"CERTIFICATE":ndata=asn1.certificate.decode(data,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!ndata){ndata=asn1.PublicKey.decode(data,"der")}subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":ndata.subjectPrivateKey=ndata.subjectPublicKey;return{type:"ec",data:ndata};case"1.2.840.10040.4.1":ndata.algorithm.params.pub_key=asn1.DSAparam.decode(ndata.subjectPublicKey.data,"der");return{type:"dsa",data:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"ENCRYPTED PRIVATE KEY":data=asn1.EncryptedPrivateKey.decode(data,"der");data=decrypt(data,password);case"PRIVATE KEY":ndata=asn1.PrivateKey.decode(data,"der");subtype=ndata.algorithm.algorithm.join(".");switch(subtype){case"1.2.840.113549.1.1.1":return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:ndata.algorithm.curve,privateKey:asn1.ECPrivateKey.decode(ndata.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":ndata.algorithm.params.priv_key=asn1.DSAparam.decode(ndata.subjectPrivateKey,"der");return{type:"dsa",params:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}throw new Error("unknown key type "+type);case"RSA PUBLIC KEY":return asn1.RSAPublicKey.decode(data,"der");case"RSA PRIVATE KEY":return asn1.RSAPrivateKey.decode(data,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:asn1.DSAPrivateKey.decode(data,"der")};case"EC PRIVATE KEY":data=asn1.ECPrivateKey.decode(data,"der");return{curve:data.parameters.value,privateKey:data.privateKey};default:throw new Error("unknown key type "+type)}}parseKeys.signature=asn1.signature;function decrypt(data,password){var salt=data.algorithm.decrypt.kde.kdeparams.salt;var iters=parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var algo=aesid[data.algorithm.decrypt.cipher.algo.join(".")];var iv=data.algorithm.decrypt.cipher.iv;var cipherText=data.subjectPrivateKey;var keylen=parseInt(algo.split("-")[1],10)/8;var key=compat.pbkdf2Sync(password,salt,iters,keylen);var cipher=ciphers.createDecipheriv(algo,key,iv);var out=[];out.push(cipher.update(cipherText));out.push(cipher.final());return Buffer.concat(out)}}).call(this,require("buffer").Buffer)},{"./aesid.json":110,"./asn1":111,"./fixProc":113,"browserify-aes":22,buffer:47,pbkdf2:116}],115:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:129}],116:[function(require,module,exports){exports.pbkdf2=require("./lib/async");exports.pbkdf2Sync=require("./lib/sync")},{"./lib/async":117,"./lib/sync":120}],117:[function(require,module,exports){(function(process,global){var checkParameters=require("./precondition");var defaultEncoding=require("./default-encoding");var sync=require("./sync");var Buffer=require("safe-buffer").Buffer;var ZERO_BUF;var subtle=global.crypto&&global.crypto.subtle;var toBrowser={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"};var checks=[];function checkNative(algo){if(global.process&&!global.process.browser){return Promise.resolve(false)}if(!subtle||!subtle.importKey||!subtle.deriveBits){return Promise.resolve(false)}if(checks[algo]!==undefined){return checks[algo]}ZERO_BUF=ZERO_BUF||Buffer.alloc(8);var prom=browserPbkdf2(ZERO_BUF,ZERO_BUF,10,128,algo).then(function(){return true}).catch(function(){return false});checks[algo]=prom;return prom}function browserPbkdf2(password,salt,iterations,length,algo){return subtle.importKey("raw",password,{name:"PBKDF2"},false,["deriveBits"]).then(function(key){return subtle.deriveBits({name:"PBKDF2",salt:salt,iterations:iterations,hash:{name:algo}},key,length<<3)}).then(function(res){return Buffer.from(res)})}function resolvePromise(promise,callback){promise.then(function(out){process.nextTick(function(){callback(null,out)})},function(e){process.nextTick(function(){callback(e)})})}module.exports=function(password,salt,iterations,keylen,digest,callback){if(!Buffer.isBuffer(password))password=Buffer.from(password,defaultEncoding);if(!Buffer.isBuffer(salt))salt=Buffer.from(salt,defaultEncoding);checkParameters(iterations,keylen);if(typeof digest==="function"){callback=digest;digest=undefined}if(typeof callback!=="function")throw new Error("No callback provided to pbkdf2");digest=digest||"sha1";var algo=toBrowser[digest.toLowerCase()];if(!algo||typeof global.Promise!=="function"){return process.nextTick(function(){var out;try{out=sync(password,salt,iterations,keylen,digest)}catch(e){return callback(e)}callback(null,out)})}resolvePromise(checkNative(algo).then(function(resp){if(resp){return browserPbkdf2(password,salt,iterations,keylen,algo)}else{return sync(password,salt,iterations,keylen,digest)}}),callback)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./default-encoding":118,"./precondition":119,"./sync":120,_process:129,"safe-buffer":151}],118:[function(require,module,exports){(function(process){var defaultEncoding;if(process.browser){defaultEncoding="utf-8"}else{var pVersionMajor=parseInt(process.version.split(".")[0].slice(1),10);defaultEncoding=pVersionMajor>=6?"utf-8":"binary"}module.exports=defaultEncoding}).call(this,require("_process"))},{_process:129}],119:[function(require,module,exports){var MAX_ALLOC=Math.pow(2,30)-1;module.exports=function(iterations,keylen){if(typeof iterations!=="number"){throw new TypeError("Iterations not a number")}if(iterations<0){throw new TypeError("Bad iterations")}if(typeof keylen!=="number"){throw new TypeError("Key length not a number")}if(keylen<0||keylen>MAX_ALLOC||keylen!==keylen){throw new TypeError("Bad key length")}}},{}],120:[function(require,module,exports){var md5=require("create-hash/md5");var rmd160=require("ripemd160");var sha=require("sha.js");var checkParameters=require("./precondition");var defaultEncoding=require("./default-encoding");var Buffer=require("safe-buffer").Buffer;var ZEROS=Buffer.alloc(128);var sizes={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Hmac(alg,key,saltLen){var hash=getDigest(alg);var blocksize=alg==="sha512"||alg==="sha384"?128:64;if(key.length>blocksize){key=hash(key)}else if(key.length<blocksize){key=Buffer.concat([key,ZEROS],blocksize)}var ipad=Buffer.allocUnsafe(blocksize+sizes[alg]);var opad=Buffer.allocUnsafe(blocksize+sizes[alg]);for(var i=0;i<blocksize;i++){ipad[i]=key[i]^54;opad[i]=key[i]^92}var ipad1=Buffer.allocUnsafe(blocksize+saltLen+4);ipad.copy(ipad1,0,0,blocksize);this.ipad1=ipad1;this.ipad2=ipad;this.opad=opad;this.alg=alg;this.blocksize=blocksize;this.hash=hash;this.size=sizes[alg]}Hmac.prototype.run=function(data,ipad){data.copy(ipad,this.blocksize);var h=this.hash(ipad);h.copy(this.opad,this.blocksize);return this.hash(this.opad)};function getDigest(alg){function shaFunc(data){return sha(alg).update(data).digest()}if(alg==="rmd160"||alg==="ripemd160")return rmd160;if(alg==="md5")return md5;return shaFunc}function pbkdf2(password,salt,iterations,keylen,digest){if(!Buffer.isBuffer(password))password=Buffer.from(password,defaultEncoding);if(!Buffer.isBuffer(salt))salt=Buffer.from(salt,defaultEncoding);checkParameters(iterations,keylen);digest=digest||"sha1";var hmac=new Hmac(digest,password,salt.length);var DK=Buffer.allocUnsafe(keylen);var block1=Buffer.allocUnsafe(salt.length+4);salt.copy(block1,0,0,salt.length);var destPos=0;var hLen=sizes[digest];var l=Math.ceil(keylen/hLen);for(var i=1;i<=l;i++){block1.writeUInt32BE(i,salt.length);var T=hmac.run(block1,hmac.ipad1);var U=T;for(var j=1;j<iterations;j++){U=hmac.run(U,hmac.ipad2);for(var k=0;k<hLen;k++)T[k]^=U[k]}T.copy(DK,destPos);destPos+=hLen}return DK}module.exports=pbkdf2},{"./default-encoding":118,"./precondition":119,"create-hash/md5":53,ripemd160:150,"safe-buffer":151,"sha.js":153}],121:[function(require,module,exports){(function(process){"use strict";function _interopDefault(ex){return ex&&typeof ex==="object"&&"default"in ex?ex["default"]:ex}var require$$0=_interopDefault(require("assert"));var require$$0$1=_interopDefault(require("path"));var os=_interopDefault(require("os"));var fs=_interopDefault(require("fs"));var util=_interopDefault(require("util"));var module$1=_interopDefault(require("module"));var index$2=x=>{if(typeof x!=="string"){throw new TypeError("Expected a string, got "+typeof x)}if(x.charCodeAt(0)===65279){return x.slice(1)}return x};function assertDoc(val){if(!(typeof val==="string"||val!=null&&typeof val.type==="string")){throw new Error("Value "+JSON.stringify(val)+" is not a valid document")}}function concat$1(parts){parts.forEach(assertDoc);return{type:"concat",parts:parts}}function indent$1(contents){assertDoc(contents);return{type:"indent",contents:contents}}function align(n,contents){assertDoc(contents);return{type:"align",contents:contents,n:n}}function group(contents,opts){opts=opts||{};assertDoc(contents);return{type:"group",contents:contents,break:!!opts.shouldBreak,expandedStates:opts.expandedStates}}function conditionalGroup(states,opts){return group(states[0],Object.assign(opts||{},{expandedStates:states}))}function fill(parts){parts.forEach(assertDoc);return{type:"fill",parts:parts}}function ifBreak(breakContents,flatContents){if(breakContents){assertDoc(breakContents)}if(flatContents){assertDoc(flatContents)}return{type:"if-break",breakContents:breakContents,flatContents:flatContents}}function lineSuffix$1(contents){assertDoc(contents);return{type:"line-suffix",contents:contents}}const lineSuffixBoundary={type:"line-suffix-boundary"};const breakParent$1={type:"break-parent"};const line={type:"line"};const softline={type:"line",soft:true};const hardline$1=concat$1([{type:"line",hard:true},breakParent$1]);const literalline=concat$1([{type:"line",hard:true,literal:true},breakParent$1]);const cursor$1={type:"cursor",placeholder:Symbol("cursor")};function join$1(sep,arr){const res=[];for(let i=0;i<arr.length;i++){if(i!==0){res.push(sep)}res.push(arr[i])}return concat$1(res)}function addAlignmentToDoc(doc,size,tabWidth){let aligned=doc;if(size>0){for(let i=0;i<Math.floor(size/tabWidth);++i){aligned=indent$1(aligned)}aligned=align(size%tabWidth,aligned);aligned=align(-Infinity,aligned)}return aligned}var docBuilders$1={concat:concat$1,join:join$1,line:line,softline:softline,hardline:hardline$1,literalline:literalline,group:group,conditionalGroup:conditionalGroup,fill:fill,lineSuffix:lineSuffix$1,lineSuffixBoundary:lineSuffixBoundary,cursor:cursor$1,breakParent:breakParent$1,ifBreak:ifBreak,indent:indent$1,align:align,addAlignmentToDoc:addAlignmentToDoc};function isExportDeclaration(node){if(node){switch(node.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return true}}return false}function getParentExportDeclaration(path){const parentNode=path.getParentNode();if(path.getName()==="declaration"&&isExportDeclaration(parentNode)){return parentNode}return null}function getPenultimate(arr){if(arr.length>1){return arr[arr.length-2]}return null}function getLast(arr){if(arr.length>0){return arr[arr.length-1]}return null}function skip(chars){return(text,index,opts)=>{const backwards=opts&&opts.backwards;if(index===false){return false}const length=text.length;let cursor=index;while(cursor>=0&&cursor<length){const c=text.charAt(cursor);if(chars instanceof RegExp){if(!chars.test(c)){return cursor}}else if(chars.indexOf(c)===-1){return cursor}backwards?cursor--:cursor++}if(cursor===-1||cursor===length){return cursor}return false}}const skipWhitespace=skip(/\s/);const skipSpaces=skip(" \t");const skipToLineEnd=skip(",; \t");const skipEverythingButNewLine=skip(/[^\r\n]/);function skipInlineComment(text,index){if(index===false){return false}if(text.charAt(index)==="/"&&text.charAt(index+1)==="*"){for(let i=index+2;i<text.length;++i){if(text.charAt(i)==="*"&&text.charAt(i+1)==="/"){return i+2}}}return index}function skipTrailingComment(text,index){if(index===false){return false}if(text.charAt(index)==="/"&&text.charAt(index+1)==="/"){return skipEverythingButNewLine(text,index)}return index}function skipNewline(text,index,opts){const backwards=opts&&opts.backwards;if(index===false){return false}const atIndex=text.charAt(index);if(backwards){if(text.charAt(index-1)==="\r"&&atIndex==="\n"){return index-2}if(atIndex==="\n"||atIndex==="\r"||atIndex==="\u2028"||atIndex==="\u2029"){return index-1}}else{if(atIndex==="\r"&&text.charAt(index+1)==="\n"){return index+2}if(atIndex==="\n"||atIndex==="\r"||atIndex==="\u2028"||atIndex==="\u2029"){return index+1}}return index}function hasNewline(text,index,opts){opts=opts||{};const idx=skipSpaces(text,opts.backwards?index-1:index,opts);const idx2=skipNewline(text,idx,opts);return idx!==idx2}function hasNewlineInRange(text,start,end){for(let i=start;i<end;++i){if(text.charAt(i)==="\n"){return true}}return false}function isPreviousLineEmpty(text,node){let idx=locStart$1(node)-1;idx=skipSpaces(text,idx,{backwards:true});idx=skipNewline(text,idx,{backwards:true});idx=skipSpaces(text,idx,{backwards:true});const idx2=skipNewline(text,idx,{backwards:true});return idx!==idx2}function isNextLineEmpty(text,node){let oldIdx=null;let idx=locEnd$1(node);while(idx!==oldIdx){oldIdx=idx;idx=skipToLineEnd(text,idx);idx=skipInlineComment(text,idx);idx=skipSpaces(text,idx)}idx=skipTrailingComment(text,idx);idx=skipNewline(text,idx);return hasNewline(text,idx)}function getNextNonSpaceNonCommentCharacter$1(text,node){let oldIdx=null;let idx=locEnd$1(node);while(idx!==oldIdx){oldIdx=idx;idx=skipSpaces(text,idx);idx=skipInlineComment(text,idx);idx=skipTrailingComment(text,idx);idx=skipNewline(text,idx)}return text.charAt(idx)}function hasSpaces(text,index,opts){opts=opts||{};const idx=skipSpaces(text,opts.backwards?index-1:index,opts);return idx!==index}function locStart$1(node){if(node.declaration&&node.declaration.decorators&&node.declaration.decorators.length>0){return locStart$1(node.declaration.decorators[0])}if(node.decorators&&node.decorators.length>0){return locStart$1(node.decorators[0])}if(node.__location){return node.__location.startOffset}if(node.range){return node.range[0]}if(typeof node.start==="number"){return node.start}if(node.source){return lineColumnToIndex(node.source.start,node.source.input.css)-1}if(node.loc){return node.loc.start}}function locEnd$1(node){const endNode=node.nodes&&getLast(node.nodes);if(endNode&&node.source&&!node.source.end){node=endNode}let loc;if(node.range){loc=node.range[1]}else if(typeof node.end==="number"){loc=node.end}else if(node.source){loc=lineColumnToIndex(node.source.end,node.source.input.css)}if(node.__location){return node.__location.endOffset}if(node.typeAnnotation){return Math.max(loc,locEnd$1(node.typeAnnotation))}if(node.loc&&!loc){return node.loc.end}return loc}function lineColumnToIndex(lineColumn,text){let index=0;for(let i=0;i<lineColumn.line-1;++i){index=text.indexOf("\n",index)+1;if(index===-1){return-1}}return index+lineColumn.column}function setLocStart(node,index){if(node.range){node.range[0]=index}else{node.start=index}}function setLocEnd(node,index){if(node.range){node.range[1]=index}else{node.end=index}}const PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((tier,i)=>{tier.forEach(op=>{PRECEDENCE[op]=i})});function getPrecedence(op){return PRECEDENCE[op]}const equalityOperators={"==":true,"!=":true,"===":true,"!==":true};const multiplicativeOperators={"*":true,"/":true,"%":true};const bitshiftOperators={">>":true,">>>":true,"<<":true};function shouldFlatten(parentOp,nodeOp){if(getPrecedence(nodeOp)!==getPrecedence(parentOp)){return false}if(parentOp==="**"){return false}if(equalityOperators[parentOp]&&equalityOperators[nodeOp]){return false}if(nodeOp==="%"&&multiplicativeOperators[parentOp]||parentOp==="%"&&multiplicativeOperators[nodeOp]){return false}if(bitshiftOperators[parentOp]&&bitshiftOperators[nodeOp]){return false}return true}function isBitwiseOperator(operator){return!!bitshiftOperators[operator]||operator==="|"||operator==="^"||operator==="&"}function startsWithNoLookaheadToken(node,forbidFunctionAndClass){node=getLeftMost(node);switch(node.type){case"ObjectPattern":return!forbidFunctionAndClass;case"FunctionExpression":case"ClassExpression":return forbidFunctionAndClass;case"ObjectExpression":return true;case"MemberExpression":return startsWithNoLookaheadToken(node.object,forbidFunctionAndClass);case"TaggedTemplateExpression":if(node.tag.type==="FunctionExpression"){return false}return startsWithNoLookaheadToken(node.tag,forbidFunctionAndClass);case"CallExpression":if(node.callee.type==="FunctionExpression"){return false}return startsWithNoLookaheadToken(node.callee,forbidFunctionAndClass);case"ConditionalExpression":return startsWithNoLookaheadToken(node.test,forbidFunctionAndClass);case"UpdateExpression":return!node.prefix&&startsWithNoLookaheadToken(node.argument,forbidFunctionAndClass);case"BindExpression":return node.object&&startsWithNoLookaheadToken(node.object,forbidFunctionAndClass);case"SequenceExpression":return startsWithNoLookaheadToken(node.expressions[0],forbidFunctionAndClass);case"TSAsExpression":return startsWithNoLookaheadToken(node.expression,forbidFunctionAndClass);default:return false}}function getLeftMost(node){if(node.left){return getLeftMost(node.left)}return node}function hasBlockComments(node){return node.comments&&node.comments.some(isBlockComment)}function isBlockComment(comment){return comment.type==="Block"||comment.type==="CommentBlock"}function hasClosureCompilerTypeCastComment(text,node){return node.comments&&node.comments.some(comment=>comment.leading&&isBlockComment(comment)&&comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/)&&getNextNonSpaceNonCommentCharacter$1(text,comment)==="(")}function getAlignmentSize(value,tabWidth,startIndex){startIndex=startIndex||0;let size=0;for(let i=startIndex;i<value.length;++i){if(value[i]==="\t"){size=size+tabWidth-size%tabWidth}else{size++}}return size}function printString(raw,options,isDirectiveLiteral){const rawContent=raw.slice(1,-1);const double={quote:'"',regex:/"/g};const single={quote:"'",regex:/'/g};const preferred=options.singleQuote?single:double;const alternate=preferred===single?double:single;let shouldUseAlternateQuote=false;let canChangeDirectiveQuotes=false;if(rawContent.includes(preferred.quote)||rawContent.includes(alternate.quote)){const numPreferredQuotes=(rawContent.match(preferred.regex)||[]).length;const numAlternateQuotes=(rawContent.match(alternate.regex)||[]).length;shouldUseAlternateQuote=numPreferredQuotes>numAlternateQuotes}else{canChangeDirectiveQuotes=true}const enclosingQuote=options.parser==="json"?double.quote:shouldUseAlternateQuote?alternate.quote:preferred.quote;if(isDirectiveLiteral){if(canChangeDirectiveQuotes){return enclosingQuote+rawContent+enclosingQuote}return raw}return makeString(rawContent,enclosingQuote,options.parser!=="postcss")}function makeString(rawContent,enclosingQuote,unescapeUnnecessaryEscapes){const otherQuote=enclosingQuote==='"'?"'":'"';const regex=/\\([\s\S])|(['"])/g;const newContent=rawContent.replace(regex,(match,escaped,quote)=>{if(escaped===otherQuote){return escaped}if(quote===enclosingQuote){return"\\"+quote}if(quote){return quote}return unescapeUnnecessaryEscapes&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped)?escaped:"\\"+escaped});return enclosingQuote+newContent+enclosingQuote}function printNumber(rawNumber){return rawNumber.toLowerCase().replace(/^([\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([\d.]+)e[+-]?0+$/,"$1").replace(/^\./,"0.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var util$3={getPrecedence:getPrecedence,shouldFlatten:shouldFlatten,isBitwiseOperator:isBitwiseOperator,isExportDeclaration:isExportDeclaration,getParentExportDeclaration:getParentExportDeclaration,getPenultimate:getPenultimate,getLast:getLast,getNextNonSpaceNonCommentCharacter:getNextNonSpaceNonCommentCharacter$1,skipWhitespace:skipWhitespace,skipSpaces:skipSpaces,skipNewline:skipNewline,isNextLineEmpty:isNextLineEmpty,isPreviousLineEmpty:isPreviousLineEmpty,hasNewline:hasNewline,hasNewlineInRange:hasNewlineInRange,hasSpaces:hasSpaces,locStart:locStart$1,locEnd:locEnd$1,setLocStart:setLocStart,setLocEnd:setLocEnd,startsWithNoLookaheadToken:startsWithNoLookaheadToken,hasBlockComments:hasBlockComments,isBlockComment:isBlockComment,hasClosureCompilerTypeCastComment:hasClosureCompilerTypeCastComment,getAlignmentSize:getAlignmentSize,printString:printString,printNumber:printNumber};const assert=require$$0;const docBuilders=docBuilders$1;const concat=docBuilders.concat;const hardline=docBuilders.hardline;const breakParent=docBuilders.breakParent;const indent=docBuilders.indent;const lineSuffix=docBuilders.lineSuffix;const join=docBuilders.join;const cursor=docBuilders.cursor;const util$2=util$3;const childNodesCacheKey=Symbol("child-nodes");const locStart=util$2.locStart;const locEnd=util$2.locEnd;const getNextNonSpaceNonCommentCharacter=util$2.getNextNonSpaceNonCommentCharacter;function getSortedChildNodes(node,text,resultArray){if(!node){return}if(resultArray){if(node&&(node.type&&node.type!=="CommentBlock"&&node.type!=="CommentLine"&&node.type!=="Line"&&node.type!=="Block"&&node.type!=="EmptyStatement"&&node.type!=="TemplateElement"||node.kind&&node.kind!=="Comment")){let i;for(i=resultArray.length-1;i>=0;--i){if(locStart(resultArray[i])<=locStart(node)&&locEnd(resultArray[i])<=locEnd(node)){break}}resultArray.splice(i+1,0,node);return}}else if(node[childNodesCacheKey]){return node[childNodesCacheKey]}let names;if(node&&typeof node==="object"){names=Object.keys(node).filter(n=>n!=="enclosingNode"&&n!=="precedingNode"&&n!=="followingNode")}else{return}if(!resultArray){Object.defineProperty(node,childNodesCacheKey,{value:resultArray=[],enumerable:false})}for(let i=0,nameCount=names.length;i<nameCount;++i){getSortedChildNodes(node[names[i]],text,resultArray)}return resultArray}function decorateComment(node,comment,text){const childNodes=getSortedChildNodes(node,text);let precedingNode;let followingNode;let left=0;let right=childNodes.length;while(left<right){const middle=left+right>>1;const child=childNodes[middle];if(locStart(child)-locStart(comment)<=0&&locEnd(comment)-locEnd(child)<=0){comment.enclosingNode=child;decorateComment(child,comment,text);return}if(locEnd(child)-locStart(comment)<=0){precedingNode=child;left=middle+1;continue}if(locEnd(comment)-locStart(child)<=0){followingNode=child;right=middle;continue}throw new Error("Comment location overlaps with node location")}if(comment.enclosingNode&&comment.enclosingNode.type==="TemplateLiteral"){const quasis=comment.enclosingNode.quasis;const commentIndex=findExpressionIndexForComment(quasis,comment);if(precedingNode&&findExpressionIndexForComment(quasis,precedingNode)!==commentIndex){precedingNode=null}if(followingNode&&findExpressionIndexForComment(quasis,followingNode)!==commentIndex){followingNode=null}}if(precedingNode){comment.precedingNode=precedingNode}if(followingNode){comment.followingNode=followingNode}}function attach(comments,ast,text){if(!Array.isArray(comments)){return}const tiesToBreak=[];comments.forEach((comment,i)=>{decorateComment(ast,comment,text);const precedingNode=comment.precedingNode;const enclosingNode=comment.enclosingNode;const followingNode=comment.followingNode;const isLastComment=comments.length-1===i;if(util$2.hasNewline(text,locStart(comment),{backwards:true})){if(handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment)||handleMemberExpressionComments(enclosingNode,followingNode,comment)||handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleTryStatementComments(enclosingNode,followingNode,comment)||handleClassComments(enclosingNode,precedingNode,followingNode,comment)||handleImportSpecifierComments(enclosingNode,comment)||handleObjectPropertyComments(enclosingNode,comment)||handleForComments(enclosingNode,precedingNode,comment)||handleUnionTypeComments(precedingNode,enclosingNode,followingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)||handleImportDeclarationComments(text,enclosingNode,precedingNode,comment)||handleAssignmentPatternComments(enclosingNode,comment)){}else if(followingNode){addLeadingComment(followingNode,comment)}else if(precedingNode){addTrailingComment(precedingNode,comment)}else if(enclosingNode){addDanglingComment(enclosingNode,comment)}else{addDanglingComment(ast,comment)}}else if(util$2.hasNewline(text,locEnd(comment))){if(handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment)||handleConditionalExpressionComments(enclosingNode,precedingNode,followingNode,comment,text)||handleImportSpecifierComments(enclosingNode,comment)||handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleClassComments(enclosingNode,precedingNode,followingNode,comment)||handleLabeledStatementComments(enclosingNode,comment)||handleCallExpressionComments(precedingNode,enclosingNode,comment)||handlePropertyComments(enclosingNode,comment)||handleExportNamedDeclarationComments(enclosingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)||handleClassMethodComments(enclosingNode,comment)||handleTypeAliasComments(enclosingNode,followingNode,comment)||handleVariableDeclaratorComments(enclosingNode,followingNode,comment)){}else if(precedingNode){addTrailingComment(precedingNode,comment)}else if(followingNode){addLeadingComment(followingNode,comment)}else if(enclosingNode){addDanglingComment(enclosingNode,comment)}else{addDanglingComment(ast,comment)}}else{if(handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleObjectPropertyAssignment(enclosingNode,precedingNode,comment)||handleCommentInEmptyParens(text,enclosingNode,comment)||handleMethodNameComments(text,enclosingNode,precedingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)){}else if(precedingNode&&followingNode){const tieCount=tiesToBreak.length;if(tieCount>0){const lastTie=tiesToBreak[tieCount-1];if(lastTie.followingNode!==comment.followingNode){breakTies(tiesToBreak,text)}}tiesToBreak.push(comment)}else if(precedingNode){addTrailingComment(precedingNode,comment)}else if(followingNode){addLeadingComment(followingNode,comment)}else if(enclosingNode){addDanglingComment(enclosingNode,comment)}else{addDanglingComment(ast,comment)}}});breakTies(tiesToBreak,text);comments.forEach(comment=>{delete comment.precedingNode;delete comment.enclosingNode;delete comment.followingNode})}function breakTies(tiesToBreak,text){const tieCount=tiesToBreak.length;if(tieCount===0){return}const precedingNode=tiesToBreak[0].precedingNode;const followingNode=tiesToBreak[0].followingNode;let gapEndPos=locStart(followingNode);let indexOfFirstLeadingComment;for(indexOfFirstLeadingComment=tieCount;indexOfFirstLeadingComment>0;--indexOfFirstLeadingComment){const comment=tiesToBreak[indexOfFirstLeadingComment-1];assert.strictEqual(comment.precedingNode,precedingNode);assert.strictEqual(comment.followingNode,followingNode);const gap=text.slice(locEnd(comment),gapEndPos).trim();if(gap===""||/^\(+$/.test(gap)){gapEndPos=locStart(comment)}else{break}}tiesToBreak.forEach((comment,i)=>{if(i<indexOfFirstLeadingComment){addTrailingComment(precedingNode,comment)}else{addLeadingComment(followingNode,comment)}});tiesToBreak.length=0}function addCommentHelper(node,comment){const comments=node.comments||(node.comments=[]);comments.push(comment);comment.printed=false;if(node.type==="JSXText"){comment.printed=true}}function addLeadingComment(node,comment){comment.leading=true;comment.trailing=false;addCommentHelper(node,comment)}function addDanglingComment(node,comment){comment.leading=false;comment.trailing=false;addCommentHelper(node,comment)}function addTrailingComment(node,comment){comment.leading=false;comment.trailing=true;addCommentHelper(node,comment)}function addBlockStatementFirstComment(node,comment){const body=node.body.filter(n=>n.type!=="EmptyStatement");if(body.length===0){addDanglingComment(node,comment)}else{addLeadingComment(body[0],comment)}}function addBlockOrNotComment(node,comment){if(node.type==="BlockStatement"){addBlockStatementFirstComment(node,comment)}else{addLeadingComment(node,comment)}}function handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment){if(!enclosingNode||enclosingNode.type!=="IfStatement"||!followingNode){return false}if(getNextNonSpaceNonCommentCharacter(text,comment)===")"){addTrailingComment(precedingNode,comment);return true}if(followingNode.type==="BlockStatement"){addBlockStatementFirstComment(followingNode,comment);return true}if(followingNode.type==="IfStatement"){addBlockOrNotComment(followingNode.consequent,comment);return true}return false}function handleTryStatementComments(enclosingNode,followingNode,comment){if(!enclosingNode||enclosingNode.type!=="TryStatement"||!followingNode){return false}if(followingNode.type==="BlockStatement"){addBlockStatementFirstComment(followingNode,comment);return true}if(followingNode.type==="TryStatement"){addBlockOrNotComment(followingNode.finalizer,comment);return true}if(followingNode.type==="CatchClause"){addBlockOrNotComment(followingNode.body,comment);return true}return false}function handleMemberExpressionComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="MemberExpression"&&followingNode&&followingNode.type==="Identifier"){addLeadingComment(enclosingNode,comment);return true}return false}function handleConditionalExpressionComments(enclosingNode,precedingNode,followingNode,comment,text){const isSameLineAsPrecedingNode=precedingNode&&!util$2.hasNewlineInRange(text,locEnd(precedingNode),locStart(comment));if((!precedingNode||!isSameLineAsPrecedingNode)&&enclosingNode&&enclosingNode.type==="ConditionalExpression"&&followingNode){addLeadingComment(followingNode,comment);return true}return false}function handleObjectPropertyAssignment(enclosingNode,precedingNode,comment){if(enclosingNode&&(enclosingNode.type==="ObjectProperty"||enclosingNode.type==="Property")&&enclosingNode.shorthand&&enclosingNode.key===precedingNode&&enclosingNode.value.type==="AssignmentPattern"){addTrailingComment(enclosingNode.value.left,comment);return true}return false}function handleClassComments(enclosingNode,precedingNode,followingNode,comment){if(enclosingNode&&(enclosingNode.type==="ClassDeclaration"||enclosingNode.type==="ClassExpression")&&(enclosingNode.decorators&&enclosingNode.decorators.length>0)&&!(followingNode&&followingNode.type==="Decorator")){if(!enclosingNode.decorators||enclosingNode.decorators.length===0){addLeadingComment(enclosingNode,comment)}else{addTrailingComment(enclosingNode.decorators[enclosingNode.decorators.length-1],comment)}return true}return false}function handleMethodNameComments(text,enclosingNode,precedingNode,comment){if(enclosingNode&&precedingNode&&(enclosingNode.type==="Property"||enclosingNode.type==="MethodDefinition")&&precedingNode.type==="Identifier"&&enclosingNode.key===precedingNode&&getNextNonSpaceNonCommentCharacter(text,precedingNode)!==":"){addTrailingComment(precedingNode,comment);return true}return false}function handleCommentInEmptyParens(text,enclosingNode,comment){if(getNextNonSpaceNonCommentCharacter(text,comment)!==")"){return false}if(enclosingNode&&((enclosingNode.type==="FunctionDeclaration"||enclosingNode.type==="FunctionExpression"||enclosingNode.type==="ArrowFunctionExpression"||enclosingNode.type==="ClassMethod"||enclosingNode.type==="ObjectMethod")&&enclosingNode.params.length===0||enclosingNode.type==="CallExpression"&&enclosingNode.arguments.length===0)){addDanglingComment(enclosingNode,comment);return true}if(enclosingNode&&(enclosingNode.type==="MethodDefinition"&&enclosingNode.value.params.length===0)){addDanglingComment(enclosingNode.value,comment);return true}return false}function handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment){if(precedingNode&&precedingNode.type==="FunctionTypeParam"&&enclosingNode&&enclosingNode.type==="FunctionTypeAnnotation"&&followingNode&&followingNode.type!=="FunctionTypeParam"){addTrailingComment(precedingNode,comment);return true}if(precedingNode&&(precedingNode.type==="Identifier"||precedingNode.type==="AssignmentPattern")&&enclosingNode&&(enclosingNode.type==="ArrowFunctionExpression"||enclosingNode.type==="FunctionExpression"||enclosingNode.type==="FunctionDeclaration"||enclosingNode.type==="ObjectMethod"||enclosingNode.type==="ClassMethod")&&getNextNonSpaceNonCommentCharacter(text,comment)===")"){addTrailingComment(precedingNode,comment);return true}return false}function handleImportSpecifierComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ImportSpecifier"){addLeadingComment(enclosingNode,comment);return true}return false}function handleObjectPropertyComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ObjectProperty"){addLeadingComment(enclosingNode,comment);return true}return false}function handleLabeledStatementComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="LabeledStatement"){addLeadingComment(enclosingNode,comment);return true}return false}function handleCallExpressionComments(precedingNode,enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="CallExpression"&&precedingNode&&enclosingNode.callee===precedingNode&&enclosingNode.arguments.length>0){addLeadingComment(enclosingNode.arguments[0],comment);return true}return false}function handleUnionTypeComments(precedingNode,enclosingNode,followingNode,comment){if(enclosingNode&&(enclosingNode.type==="UnionTypeAnnotation"||enclosingNode.type==="TSUnionType")){addTrailingComment(precedingNode,comment);return true}return false}function handlePropertyComments(enclosingNode,comment){if(enclosingNode&&(enclosingNode.type==="Property"||enclosingNode.type==="ObjectProperty")){addLeadingComment(enclosingNode,comment);return true}return false}function handleExportNamedDeclarationComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ExportNamedDeclaration"){addLeadingComment(enclosingNode,comment);return true}return false}function handleOnlyComments(enclosingNode,ast,comment,isLastComment){if(ast&&ast.body&&ast.body.length===0){if(isLastComment){addDanglingComment(ast,comment)}else{addLeadingComment(ast,comment)}return true}else if(enclosingNode&&enclosingNode.type==="Program"&&enclosingNode.body.length===0&&enclosingNode.directives&&enclosingNode.directives.length===0){if(isLastComment){addDanglingComment(enclosingNode,comment)}else{addLeadingComment(enclosingNode,comment)}return true}return false}function handleForComments(enclosingNode,precedingNode,comment){if(enclosingNode&&(enclosingNode.type==="ForInStatement"||enclosingNode.type==="ForOfStatement")){addLeadingComment(enclosingNode,comment);return true}return false}function handleImportDeclarationComments(text,enclosingNode,precedingNode,comment){if(precedingNode&&enclosingNode&&enclosingNode.type==="ImportDeclaration"&&util$2.hasNewline(text,util$2.locEnd(comment))){addTrailingComment(precedingNode,comment);return true}return false}function handleAssignmentPatternComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="AssignmentPattern"){addLeadingComment(enclosingNode,comment);return true}return false}function handleClassMethodComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ClassMethod"){addTrailingComment(enclosingNode,comment);return true}return false}function handleTypeAliasComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="TypeAlias"){addLeadingComment(enclosingNode,comment);return true}return false}function handleVariableDeclaratorComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="VariableDeclarator"&&followingNode&&(followingNode.type==="ObjectExpression"||followingNode.type==="ArrayExpression")){addLeadingComment(followingNode,comment);return true}return false}function printComment(commentPath,options){const comment=commentPath.getValue();comment.printed=true;switch(comment.type||comment.kind){case"Comment":return"#"+comment.value.trimRight();case"CommentBlock":case"Block":return"/*"+comment.value+"*/";case"CommentLine":case"Line":if(options.originalText.slice(util$2.locStart(comment)).startsWith("#!")){return"#!"+comment.value.trimRight()}return"//"+comment.value.trimRight();default:throw new Error("Not a comment: "+JSON.stringify(comment))}}function findExpressionIndexForComment(quasis,comment){const startPos=locStart(comment)-1;for(let i=1;i<quasis.length;++i){if(startPos<getQuasiRange(quasis[i]).start){return i-1}}return 0}function getQuasiRange(expr){if(expr.start!==undefined){return{start:expr.start,end:expr.end}}return{start:expr.range[0],end:expr.range[1]}}function printLeadingComment(commentPath,print,options){const comment=commentPath.getValue();const contents=printComment(commentPath,options);if(!contents){return""}const isBlock=util$2.isBlockComment(comment);if(isBlock){return concat([contents,util$2.hasNewline(options.originalText,locEnd(comment))?hardline:" "])}return concat([contents,hardline])}function printTrailingComment(commentPath,print,options){const comment=commentPath.getValue();const contents=printComment(commentPath,options);if(!contents){return""}const isBlock=util$2.isBlockComment(comment);if(util$2.hasNewline(options.originalText,locStart(comment),{backwards:true})){const isLineBeforeEmpty=util$2.isPreviousLineEmpty(options.originalText,comment);return lineSuffix(concat([hardline,isLineBeforeEmpty?hardline:"",contents]))}else if(isBlock){return concat([" ",contents])}return concat([lineSuffix(" "+contents),!isBlock?breakParent:""])}function printDanglingComments(path,options,sameIndent){const parts=[];const node=path.getValue();if(!node||!node.comments){return""}path.each(commentPath=>{const comment=commentPath.getValue();if(comment&&!comment.leading&&!comment.trailing){parts.push(printComment(commentPath,options))}},"comments");if(parts.length===0){return""}if(sameIndent){return join(hardline,parts)}return indent(concat([hardline,join(hardline,parts)]))}function prependCursorPlaceholder(path,options,printed){if(path.getNode()===options.cursorNode&&path.getValue()){return concat([cursor,printed])}return printed}function printComments(path,print,options,needsSemi){const value=path.getValue();const printed=print(path);const comments=value&&value.comments;if(!comments||comments.length===0){return prependCursorPlaceholder(path,options,printed)}const leadingParts=[];const trailingParts=[needsSemi?";":"",printed];path.each(commentPath=>{const comment=commentPath.getValue();const leading=comment.leading;const trailing=comment.trailing;if(leading){const contents=printLeadingComment(commentPath,print,options);if(!contents){return}leadingParts.push(contents);const text=options.originalText;if(util$2.hasNewline(text,util$2.skipNewline(text,util$2.locEnd(comment)))){leadingParts.push(hardline)}}else if(trailing){trailingParts.push(printTrailingComment(commentPath,print,options))}},"comments");return prependCursorPlaceholder(path,options,concat(leadingParts.concat(trailingParts)))}var comments$1={attach:attach,printComments:printComments,printDanglingComments:printDanglingComments,getSortedChildNodes:getSortedChildNodes};var name="prettier";var version$1="1.6.1";var description="Prettier is an opinionated code formatter";var bin={prettier:"./bin/prettier.js"};var repository="prettier/prettier";var homepage="https://prettier.io";var author="James Long";var license="MIT";var main="./index.js";var dependencies={"babel-code-frame":"7.0.0-alpha.12",babylon:"7.0.0-beta.22",chalk:"2.0.1",cosmiconfig:"2.2.2",dashify:"0.2.2",diff:"3.2.0",esutils:"2.0.2","flow-parser":"0.51.0","get-stream":"3.0.0",globby:"^6.1.0",graphql:"0.10.1",ignore:"^3.3.3","jest-validate":"20.0.3",minimatch:"3.0.4",minimist:"1.2.0",parse5:"3.0.2",postcss:"^6.0.1","postcss-less":"^1.0.0","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.0","postcss-selector-parser":"2.2.3","postcss-values-parser":"git://github.com/lydell/postcss-values-parser.git#af2c80b2bb558a6e7d61540d97f068f9fa162b38","strip-bom":"3.0.0",typescript:"2.5.1","typescript-eslint-parser":"git://github.com/eslint/typescript-eslint-parser.git#801d65585af6995a223136862944095b48f5c567"};var devDependencies={"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1",codecov:"2.2.0","cross-env":"5.0.1","cross-spawn":"5.1.0",eslint:"4.1.1","eslint-friendly-formatter":"3.0.0","eslint-plugin-import":"2.6.1","eslint-plugin-prettier":"2.1.2","eslint-plugin-react":"7.1.0",jest:"20.0.0",mkdirp:"^0.5.1",prettier:"1.6.0",rimraf:"2.6.1",rollup:"0.41.1","rollup-plugin-commonjs":"7.0.0","rollup-plugin-json":"2.1.0","rollup-plugin-node-builtins":"2.0.0","rollup-plugin-node-globals":"1.1.0","rollup-plugin-node-resolve":"2.0.0","rollup-plugin-replace":"1.1.1",shelljs:"0.7.8","sw-toolbox":"3.6.0","uglify-es":"3.0.15",webpack:"2.6.1"};var scripts={test:"jest","test-integration":"jest tests_integration",lint:"cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter",build:"./scripts/build/build.js"};var _package={name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts};var _package$1=Object.freeze({name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts,default:_package});const assert$2=require$$0;const util$6=util$3;const startsWithNoLookaheadToken$1=util$6.startsWithNoLookaheadToken;function FastPath$1(value){assert$2.ok(this instanceof FastPath$1);this.stack=[value]}FastPath$1.prototype.getName=function getName(){const s=this.stack;const len=s.length;if(len>1){return s[len-2]}return null};FastPath$1.prototype.getValue=function getValue(){const s=this.stack;return s[s.length-1]};function getNodeHelper(path,count){const s=path.stack;for(let i=s.length-1;i>=0;i-=2){const value=s[i];if(value&&!Array.isArray(value)&&--count<0){return value}}return null}FastPath$1.prototype.getNode=function getNode(count){return getNodeHelper(this,~~count)};FastPath$1.prototype.getParentNode=function getParentNode(count){return getNodeHelper(this,~~count+1)};FastPath$1.prototype.call=function call(callback){const s=this.stack;const origLen=s.length;let value=s[origLen-1];const argc=arguments.length;for(let i=1;i<argc;++i){const name=arguments[i];value=value[name];s.push(name,value)}const result=callback(this);s.length=origLen;return result};FastPath$1.prototype.each=function each(callback){const s=this.stack;const origLen=s.length;let value=s[origLen-1];const argc=arguments.length;for(let i=1;i<argc;++i){const name=arguments[i];value=value[name];s.push(name,value)}for(let i=0;i<value.length;++i){if(i in value){s.push(i,value[i]);callback(this);s.length-=2}}s.length=origLen};FastPath$1.prototype.map=function map(callback){const s=this.stack;const origLen=s.length;let value=s[origLen-1];const argc=arguments.length;for(let i=1;i<argc;++i){const name=arguments[i];value=value[name];s.push(name,value)}const result=new Array(value.length);for(let i=0;i<value.length;++i){if(i in value){s.push(i,value[i]);result[i]=callback(this,i);s.length-=2}}s.length=origLen;return result};FastPath$1.prototype.needsParens=function(options){const parent=this.getParentNode();if(!parent){return false}const name=this.getName();const node=this.getNode();if(this.getValue()!==node){return false}if(isStatement(node)){return false}if(util$6.hasClosureCompilerTypeCastComment(options.originalText,node)){return true}if(node.type==="Identifier"){return false}if(parent.type==="ParenthesizedExpression"){return false}if((parent.type==="ClassDeclaration"||parent.type==="ClassExpression")&&parent.superClass===node&&(node.type==="ArrowFunctionExpression"||node.type==="AssignmentExpression"||node.type==="AwaitExpression"||node.type==="BinaryExpression"||node.type==="ConditionalExpression"||node.type==="LogicalExpression"||node.type==="NewExpression"||node.type==="ObjectExpression"||node.type==="ParenthesizedExpression"||node.type==="SequenceExpression"||node.type==="TaggedTemplateExpression"||node.type==="UnaryExpression"||node.type==="UpdateExpression"||node.type==="YieldExpression")){return true}if(parent.type==="ArrowFunctionExpression"&&parent.body===node&&node.type!=="SequenceExpression"&&startsWithNoLookaheadToken$1(node,false)||parent.type==="ExpressionStatement"&&startsWithNoLookaheadToken$1(node,true)){return true}switch(node.type){case"CallExpression":{let firstParentNotMemberExpression=parent;let i=0;while(firstParentNotMemberExpression&&firstParentNotMemberExpression.type==="MemberExpression"){firstParentNotMemberExpression=this.getParentNode(++i)}if(firstParentNotMemberExpression.type==="NewExpression"&&firstParentNotMemberExpression.callee===this.getParentNode(i-1)){return true}return false}case"MemberExpression":{return parent.type==="MemberExpression"&&parent.object===node&&node.optional}case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&name==="object"&&parent.object===node;case"UpdateExpression":if(parent.type==="UnaryExpression"){return node.prefix&&(node.operator==="++"&&parent.operator==="+"||node.operator==="--"&&parent.operator==="-")}case"UnaryExpression":switch(parent.type){case"UnaryExpression":return node.operator===parent.operator&&(node.operator==="+"||node.operator==="-");case"MemberExpression":return name==="object"&&parent.object===node;case"TaggedTemplateExpression":return true;case"NewExpression":case"CallExpression":return name==="callee"&&parent.callee===node;case"BinaryExpression":return parent.operator==="**"&&name==="left";default:return false}case"BinaryExpression":{if(parent.type==="UpdateExpression"){return true}const isLeftOfAForStatement=node=>{let i=0;while(node){const parent=this.getParentNode(i++);if(!parent){return false}if(parent.type==="ForStatement"&&parent.init===node){return true}node=parent}return false};if(node.operator==="in"&&isLeftOfAForStatement(node)){return true}}case"TSTypeAssertionExpression":case"TSAsExpression":case"LogicalExpression":switch(parent.type){case"CallExpression":case"NewExpression":return name==="callee"&&parent.callee===node;case"ClassDeclaration":return name==="superClass"&&parent.superClass===node;case"TSTypeAssertionExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BindExpression":case"AwaitExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"MemberExpression":return name==="object"&&parent.object===node;case"AssignmentExpression":return parent.left===node&&(node.type==="TSTypeAssertionExpression"||node.type==="TSAsExpression");case"BinaryExpression":case"LogicalExpression":{if(!node.operator&&node.type!=="TSTypeAssertionExpression"){return true}const po=parent.operator;const pp=util$6.getPrecedence(po);const no=node.operator;const np=util$6.getPrecedence(no);if(pp>np){return true}if(po==="||"&&no==="&&"){return true}if(pp===np&&name==="right"){assert$2.strictEqual(parent.right,node);return true}if(pp===np&&!util$6.shouldFlatten(po,no)){return true}if(util$6.isBitwiseOperator(po)){return true}return false}default:return false}case"TSParenthesizedType":{const grandParent=this.getParentNode(1);if((parent.type==="TypeParameter"||parent.type==="VariableDeclarator"||parent.type==="TypeAnnotation"||parent.type==="GenericTypeAnnotation"||parent.type==="TSTypeReference")&&(node.typeAnnotation.type==="TypeAnnotation"&&node.typeAnnotation.typeAnnotation.type!=="TSFunctionType"&&grandParent.type!=="TSTypeOperator")){return false}if(node.typeAnnotation.type==="TSParenthesizedType"){return false}return true}case"SequenceExpression":switch(parent.type){case"ReturnStatement":return false;case"ForStatement":return false;case"ExpressionStatement":return name!=="expression";case"ArrowFunctionExpression":return name!=="body";default:return true}case"YieldExpression":if(parent.type==="UnaryExpression"||parent.type==="AwaitExpression"||parent.type==="TSAsExpression"||parent.type==="TSNonNullExpression"){return true}case"AwaitExpression":switch(parent.type){case"TaggedTemplateExpression":case"BinaryExpression":case"LogicalExpression":case"SpreadElement":case"SpreadProperty":case"TSAsExpression":case"TSNonNullExpression":return true;case"MemberExpression":return parent.object===node;case"NewExpression":case"CallExpression":return parent.callee===node;case"ConditionalExpression":return parent.test===node;default:return false}case"ArrayTypeAnnotation":return parent.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return parent.type==="ArrayTypeAnnotation"||parent.type==="NullableTypeAnnotation"||parent.type==="IntersectionTypeAnnotation"||parent.type==="UnionTypeAnnotation";case"NullableTypeAnnotation":return parent.type==="ArrayTypeAnnotation";case"FunctionTypeAnnotation":return parent.type==="UnionTypeAnnotation"||parent.type==="IntersectionTypeAnnotation"||parent.type==="ArrayTypeAnnotation";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof node.value==="string"&&parent.type==="ExpressionStatement"&&(options.parser!=="typescript"&&!parent.directive||options.parser==="typescript"&&options.originalText.substr(util$6.locStart(node)-1,1)==="(")){const grandParent=this.getParentNode(1);return grandParent.type==="Program"||grandParent.type==="BlockStatement"}return parent.type==="MemberExpression"&&typeof node.value==="number"&&name==="object"&&parent.object===node;case"AssignmentExpression":{const grandParent=this.getParentNode(1);if(parent.type==="ArrowFunctionExpression"&&parent.body===node){return true}else if(parent.type==="ClassProperty"&&parent.key===node&&parent.computed){return false}else if(parent.type==="TSPropertySignature"&&parent.name===node){return false}else if(parent.type==="ForStatement"&&(parent.init===node||parent.update===node)){return false}else if(parent.type==="ExpressionStatement"){return node.left.type==="ObjectPattern"}else if(parent.type==="TSPropertySignature"&&parent.key===node){return false}else if(parent.type==="AssignmentExpression"){return false}else if(parent.type==="SequenceExpression"&&grandParent&&grandParent.type==="ForStatement"&&(grandParent.init===parent||grandParent.update===parent)){return false}return true}case"ConditionalExpression":switch(parent.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertionExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"NewExpression":case"CallExpression":return name==="callee"&&parent.callee===node;case"ConditionalExpression":return name==="test"&&parent.test===node;case"MemberExpression":return name==="object"&&parent.object===node;default:return false}case"FunctionExpression":switch(parent.type){case"CallExpression":return name==="callee";case"TaggedTemplateExpression":return true;case"ExportDefaultDeclaration":return true;default:return false}case"ArrowFunctionExpression":switch(parent.type){case"CallExpression":return name==="callee";case"NewExpression":return name==="callee";case"MemberExpression":return name==="object";case"TSAsExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"BinaryExpression":case"AwaitExpression":case"TSTypeAssertionExpression":return true;case"ConditionalExpression":return name==="test";default:return false}case"ClassExpression":return parent.type==="ExportDefaultDeclaration"}return false};function isStatement(node){return node.type==="BlockStatement"||node.type==="BreakStatement"||node.type==="ClassBody"||node.type==="ClassDeclaration"||node.type==="ClassMethod"||node.type==="ClassProperty"||node.type==="ContinueStatement"||node.type==="DebuggerStatement"||node.type==="DeclareClass"||node.type==="DeclareExportAllDeclaration"||node.type==="DeclareExportDeclaration"||node.type==="DeclareFunction"||node.type==="DeclareInterface"||node.type==="DeclareModule"||node.type==="DeclareModuleExports"||node.type==="DeclareVariable"||node.type==="DoWhileStatement"||node.type==="ExportAllDeclaration"||node.type==="ExportDefaultDeclaration"||node.type==="ExportNamedDeclaration"||node.type==="ExpressionStatement"||node.type==="ForAwaitStatement"||node.type==="ForInStatement"||node.type==="ForOfStatement"||node.type==="ForStatement"||node.type==="FunctionDeclaration"||node.type==="IfStatement"||node.type==="ImportDeclaration"||node.type==="InterfaceDeclaration"||node.type==="LabeledStatement"||node.type==="MethodDefinition"||node.type==="ReturnStatement"||node.type==="SwitchStatement"||node.type==="ThrowStatement"||node.type==="TryStatement"||node.type==="TSAbstractClassDeclaration"||node.type==="TSEnumDeclaration"||node.type==="TSImportEqualsDeclaration"||node.type==="TSInterfaceDeclaration"||node.type==="TSModuleDeclaration"||node.type==="TSNamespaceExportDeclaration"||node.type==="TSNamespaceFunctionDeclaration"||node.type==="TypeAlias"||node.type==="VariableDeclaration"||node.type==="WhileStatement"||node.type==="WithStatement"}var fastPath=FastPath$1;function traverseDoc(doc,onEnter,onExit,shouldTraverseConditionalGroups){function traverseDocRec(doc){let shouldRecurse=true;if(onEnter){if(onEnter(doc)===false){shouldRecurse=false}}if(shouldRecurse){if(doc.type==="concat"||doc.type==="fill"){for(let i=0;i<doc.parts.length;i++){traverseDocRec(doc.parts[i])}}else if(doc.type==="if-break"){if(doc.breakContents){traverseDocRec(doc.breakContents)}if(doc.flatContents){traverseDocRec(doc.flatContents)}}else if(doc.type==="group"&&doc.expandedStates){if(shouldTraverseConditionalGroups){doc.expandedStates.forEach(traverseDocRec)}else{traverseDocRec(doc.contents)}}else if(doc.contents){traverseDocRec(doc.contents)}}if(onExit){onExit(doc)}}traverseDocRec(doc)}function mapDoc(doc,func){doc=func(doc);if(doc.type==="concat"||doc.type==="fill"){return Object.assign({},doc,{parts:doc.parts.map(d=>mapDoc(d,func))})}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents&&mapDoc(doc.breakContents,func),flatContents:doc.flatContents&&mapDoc(doc.flatContents,func)})}else if(doc.contents){return Object.assign({},doc,{contents:mapDoc(doc.contents,func)})}return doc}function findInDoc(doc,fn,defaultValue){let result=defaultValue;let hasStopped=false;traverseDoc(doc,doc=>{const maybeResult=fn(doc);if(maybeResult!==undefined){hasStopped=true;result=maybeResult}if(hasStopped){return false}});return result}function isEmpty$1(n){return typeof n==="string"&&n.length===0}function isLineNext$1(doc){return findInDoc(doc,doc=>{if(typeof doc==="string"){return false}if(doc.type==="line"){return true}},false)}function willBreak$1(doc){return findInDoc(doc,doc=>{if(doc.type==="group"&&doc.break){return true}if(doc.type==="line"&&doc.hard){return true}if(doc.type==="break-parent"){return true}},false)}function breakParentGroup(groupStack){if(groupStack.length>0){const parentGroup=groupStack[groupStack.length-1];if(!parentGroup.expandedStates){parentGroup.break=true}}return null}function propagateBreaks(doc){const alreadyVisited=new Map;const groupStack=[];traverseDoc(doc,doc=>{if(doc.type==="break-parent"){breakParentGroup(groupStack)}if(doc.type==="group"){groupStack.push(doc);if(alreadyVisited.has(doc)){return false}alreadyVisited.set(doc,true)}},doc=>{if(doc.type==="group"){const group=groupStack.pop();if(group.break){breakParentGroup(groupStack)}}},true)}function removeLines(doc){return mapDoc(doc,d=>{if(d.type==="line"&&!d.hard){return d.soft?"":" "}else if(d.type==="if-break"){return d.flatContents||""}return d})}function rawText$1(node){return node.extra?node.extra.raw:node.raw}var docUtils$2={isEmpty:isEmpty$1,willBreak:willBreak$1,isLineNext:isLineNext$1,traverseDoc:traverseDoc,mapDoc:mapDoc,propagateBreaks:propagateBreaks,removeLines:removeLines,rawText:rawText$1};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}var index$6=createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;exports.matchToToken=function(match){var token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}});var ast=createCommonjsModule(function(module){(function(){"use strict";function isExpression(node){if(node==null){return false}switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return true}return false}function isIterationStatement(node){if(node==null){return false}switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return true}return false}function isStatement(node){if(node==null){return false}switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return true}return false}function isSourceElement(node){return isStatement(node)||node!=null&&node.type==="FunctionDeclaration"}function trailingStatement(node){switch(node.type){case"IfStatement":if(node.alternate!=null){return node.alternate}return node.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return node.body}return null}function isProblematicIfStatement(node){var current;if(node.type!=="IfStatement"){return false}if(node.alternate==null){return false}current=node.consequent;do{if(current.type==="IfStatement"){if(current.alternate==null){return true}}current=trailingStatement(current)}while(current);return false}module.exports={isExpression:isExpression,isStatement:isStatement,isIterationStatement:isIterationStatement,isSourceElement:isSourceElement,isProblematicIfStatement:isProblematicIfStatement,trailingStatement:trailingStatement}})()});var code=createCommonjsModule(function(module){(function(){"use strict";var ES6Regex,ES5Regex,NON_ASCII_WHITESPACES,IDENTIFIER_START,IDENTIFIER_PART,ch;ES5Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};ES6Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function isDecimalDigit(ch){return 48<=ch&&ch<=57}function isHexDigit(ch){return 48<=ch&&ch<=57||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function fromCodePoint(cp){if(cp<=65535){return String.fromCharCode(cp)}var cu1=String.fromCharCode(Math.floor((cp-65536)/1024)+55296);var cu2=String.fromCharCode((cp-65536)%1024+56320);return cu1+cu2}IDENTIFIER_START=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_START[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95}IDENTIFIER_PART=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_PART[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95}function isIdentifierStartES5(ch){return ch<128?IDENTIFIER_START[ch]:ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES5(ch){return ch<128?IDENTIFIER_PART[ch]:ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}function isIdentifierStartES6(ch){return ch<128?IDENTIFIER_START[ch]:ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES6(ch){return ch<128?IDENTIFIER_PART[ch]:ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStartES5:isIdentifierStartES5,isIdentifierPartES5:isIdentifierPartES5,isIdentifierStartES6:isIdentifierStartES6,isIdentifierPartES6:isIdentifierPartES6}})()});var keyword=createCommonjsModule(function(module){(function(){"use strict";var code$$1=code;function isStrictModeReservedWordES6(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return true;default:return false}}function isKeywordES5(id,strict){if(!strict&&id==="yield"){return false}return isKeywordES6(id,strict)}function isKeywordES6(id,strict){if(strict&&isStrictModeReservedWordES6(id)){return true}switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function isReservedWordES5(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES5(id,strict)}function isReservedWordES6(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES6(id,strict)}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isIdentifierNameES5(id){var i,iz,ch;if(id.length===0){return false}ch=id.charCodeAt(0);if(!code$$1.isIdentifierStartES5(ch)){return false}for(i=1,iz=id.length;i<iz;++i){ch=id.charCodeAt(i);if(!code$$1.isIdentifierPartES5(ch)){return false}}return true}function decodeUtf16(lead,trail){return(lead-55296)*1024+(trail-56320)+65536}function isIdentifierNameES6(id){var i,iz,ch,lowCh,check;if(id.length===0){return false}check=code$$1.isIdentifierStartES6;for(i=0,iz=id.length;i<iz;++i){ch=id.charCodeAt(i);if(55296<=ch&&ch<=56319){++i;if(i>=iz){return false}lowCh=id.charCodeAt(i);if(!(56320<=lowCh&&lowCh<=57343)){return false}ch=decodeUtf16(ch,lowCh)}if(!check(ch)){return false}check=code$$1.isIdentifierPartES6}return true}function isIdentifierES5(id,strict){return isIdentifierNameES5(id)&&!isReservedWordES5(id,strict)}function isIdentifierES6(id,strict){return isIdentifierNameES6(id)&&!isReservedWordES6(id,strict)}module.exports={isKeywordES5:isKeywordES5,isKeywordES6:isKeywordES6,isReservedWordES5:isReservedWordES5,isReservedWordES6:isReservedWordES6,isRestrictedWord:isRestrictedWord,isIdentifierNameES5:isIdentifierNameES5,isIdentifierNameES6:isIdentifierNameES6,isIdentifierES5:isIdentifierES5,isIdentifierES6:isIdentifierES6}})()});var utils=createCommonjsModule(function(module,exports){(function(){"use strict";exports.ast=ast;exports.code=code;exports.keyword=keyword})()});var matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g;var index$10=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}return str.replace(matchOperatorsRe,"\\$&")};var index$12=createCommonjsModule(function(module){"use strict";function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"["+style[0]+"m",close:"["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});var index$16=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g};var ansiRegex=index$16();var index$14=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str};var ansiRegex$1=index$16;var re=new RegExp(ansiRegex$1().source);var index$18=re.test.bind(re);var argv=process.argv;var terminator=argv.indexOf("--");var hasFlag=function(flag){flag="--"+flag;var pos=argv.indexOf(flag);return pos!==-1&&(terminator!==-1?pos<terminator:true)};var index$20=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){return false}if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}();var escapeStringRegexp=index$10;var ansiStyles=index$12;var stripAnsi=index$14;var hasAnsi=index$18;var supportsColor=index$20;var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open=""}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||!str){return str}var nestedStyles=this._styles;var i=nestedStyles.length;var originalDim=ansiStyles.dim.open;if(isSimpleWindowsTerm&&(nestedStyles.indexOf("gray")!==-1||nestedStyles.indexOf("grey")!==-1)){ansiStyles.dim.open=""}while(i--){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}ansiStyles.dim.open=originalDim;return str}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build.call(this,[name])}}});return ret}defineProps(Chalk.prototype,init());var index$8=new Chalk;var styles_1=ansiStyles;var hasColor=hasAnsi;var stripColor=stripAnsi;var supportsColor_1=supportsColor;index$8.styles=styles_1;index$8.hasColor=hasColor;index$8.stripColor=stripColor;index$8.supportsColor=supportsColor_1;var index$4=createCommonjsModule(function(module,exports){"use strict";exports.__esModule=true;exports.codeFrameColumns=codeFrameColumns;exports.default=function(rawLines,lineNumber,colNumber){var opts=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!deprecationWarningShown){deprecationWarningShown=true;var deprecationError=new Error("Passing lineNumber and colNumber is deprecated to babel-code-frame. Please use `codeFrameColumns`.");deprecationError.name="DeprecationWarning";if(process.emitWarning){process.emitWarning(deprecationError)}else{console.warn(deprecationError)}}colNumber=Math.max(colNumber,0);var location={start:{column:colNumber,line:lineNumber}};return codeFrameColumns(rawLines,location,opts)};var _jsTokens=index$6;var _jsTokens2=_interopRequireDefault(_jsTokens);var _esutils=utils;var _esutils2=_interopRequireDefault(_esutils);var _chalk=index$8;var _chalk2=_interopRequireDefault(_chalk);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var deprecationWarningShown=false;function getDefs(chalk){return{keyword:chalk.cyan,capitalized:chalk.yellow,jsx_tag:chalk.yellow,punctuator:chalk.yellow,number:chalk.magenta,string:chalk.green,regex:chalk.magenta,comment:chalk.grey,invalid:chalk.white.bgRed.bold,gutter:chalk.grey,marker:chalk.red.bold}}var NEWLINE=/\r\n|[\n\r\u2028\u2029]/;var JSX_TAG=/^[a-z][\w-]*$/i;var BRACKET=/^[()\[\]{}]$/;function getTokenType(match){var _match$slice=match.slice(-2),offset=_match$slice[0],text=_match$slice[1];var token=(0,_jsTokens.matchToToken)(match);if(token.type==="name"){if(_esutils2.default.keyword.isReservedWordES6(token.value)){return"keyword"}if(JSX_TAG.test(token.value)&&(text[offset-1]==="<"||text.substr(offset-2,2)=="</")){return"jsx_tag"}if(token.value[0]!==token.value[0].toLowerCase()){return"capitalized"}}if(token.type==="punctuator"&&BRACKET.test(token.value)){return"bracket"}return token.type}function highlight(defs,text){return text.replace(_jsTokens2.default,function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var type=getTokenType(args);var colorize=defs[type];if(colorize){return args[0].split(NEWLINE).map(function(str){return colorize(str)}).join("\n")}else{return args[0]}})}function getMarkerLines(loc,source,opts){var startLoc=Object.assign({},{column:0,line:-1},loc.start);var endLoc=Object.assign({},startLoc,loc.end);var linesAbove=opts.linesAbove||2;var linesBelow=opts.linesBelow||3;var startLine=startLoc.line;var startColumn=startLoc.column;var endLine=endLoc.line;var endColumn=endLoc.column;var start=Math.max(startLine-(linesAbove+1),0);var end=Math.min(source.length,endLine+linesBelow);if(startLine===-1){start=0}if(endLine===-1){end=source.length}var lineDiff=endLine-startLine;var markerLines={};if(lineDiff){for(var i=0;i<=lineDiff;i++){var lineNumber=i+startLine;if(!startColumn){markerLines[lineNumber]=true}else if(i===0){var sourceLength=source[lineNumber-1].length;markerLines[lineNumber]=[startColumn,sourceLength-startColumn]}else if(i===lineDiff){markerLines[lineNumber]=[0,endColumn]}else{var _sourceLength=source[lineNumber-i].length;markerLines[lineNumber]=[0,_sourceLength]}}}else{if(startColumn===endColumn){if(startColumn){markerLines[startLine]=[startColumn,0]}else{markerLines[startLine]=true}}else{markerLines[startLine]=[startColumn,endColumn-startColumn]}}return{start:start,end:end,markerLines:markerLines}}function codeFrameColumns(rawLines,loc){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var highlighted=opts.highlightCode&&_chalk2.default.supportsColor||opts.forceColor;var chalk=_chalk2.default;if(opts.forceColor){chalk=new _chalk2.default.constructor({enabled:true})}var maybeHighlight=function maybeHighlight(chalkFn,string){return highlighted?chalkFn(string):string};var defs=getDefs(chalk);if(highlighted)rawLines=highlight(defs,rawLines);var lines=rawLines.split(NEWLINE);var _getMarkerLines=getMarkerLines(loc,lines,opts),start=_getMarkerLines.start,end=_getMarkerLines.end,markerLines=_getMarkerLines.markerLines;var numberMaxWidth=String(end).length;var frame=lines.slice(start,end).map(function(line,index){var number=start+1+index;var paddedNumber=(" "+number).slice(-numberMaxWidth);var gutter=" "+paddedNumber+" | ";var hasMarker=markerLines[number];if(hasMarker){var markerLine="";if(Array.isArray(hasMarker)){var markerSpacing=line.slice(0,Math.max(hasMarker[0]-1,0)).replace(/[^\t]/g," ");var numberOfMarkers=hasMarker[1]||1;markerLine=["\n ",maybeHighlight(defs.gutter,gutter.replace(/\d/g," ")),markerSpacing,maybeHighlight(defs.marker,"^").repeat(numberOfMarkers)].join("")}return[maybeHighlight(defs.marker,">"),maybeHighlight(defs.gutter,gutter),line,markerLine].join("")}else{return" "+maybeHighlight(defs.gutter,gutter)+line}}).join("\n");if(highlighted){return chalk.reset(frame)}else{return frame}}});const path=require$$0$1;const parsers={get flow(){return require("./parser-flow")},get graphql(){return require("./parser-graphql")},get parse5(){return require("./parser-parse5")},get babylon(){return require("./parser-babylon")},get typescript(){return require("./parser-typescript")},get postcss(){return require("./parser-postcss")},get json(){return require("./parser-babylon")}};function resolveParseFunction(opts){if(typeof opts.parser==="function"){return opts.parser}if(typeof opts.parser==="string"){if(parsers.hasOwnProperty(opts.parser)){return parsers[opts.parser]}try{return require(path.resolve(process.cwd(),opts.parser))}catch(err){throw new Error(`Couldn't resolve parser "${opts.parser}"`)}}return parsers.babylon}function parse(text,opts){const parseFunction=resolveParseFunction(opts);try{return parseFunction(text,parsers,opts)}catch(error){const loc=error.loc;if(loc){const codeFrame=index$4;error.codeFrame=codeFrame.codeFrameColumns(text,loc,{highlightCode:true});error.message+="\n"+error.codeFrame;throw error}throw error.stack}}var parser$1={parse:parse};const util$7=util$3;const docUtils$1=docUtils$2;const docBuilders$4=docBuilders$1;const comments$4=comments$1;const indent$3=docBuilders$4.indent;const hardline$3=docBuilders$4.hardline;const softline$2=docBuilders$4.softline;const concat$3=docBuilders$4.concat;function printSubtree(subtreeParser,path,print,options){const next=Object.assign({},{transformDoc:doc=>doc},subtreeParser);next.options=Object.assign({},options,next.options,{originalText:next.text});const ast=parser$1.parse(next.text,next.options);const astComments=ast.comments;delete ast.comments;comments$4.attach(astComments,ast,next.text,next.options);const nextDoc=printer.printAstToDoc(ast,next.options);return next.transformDoc(nextDoc,{path:path,print:print})}function getSubtreeParser(path,options){switch(options.parser){case"parse5":return fromHtmlParser2(path,options);case"babylon":case"flow":case"typescript":return fromBabylonFlowOrTypeScript(path,options)}}function fromBabylonFlowOrTypeScript(path){const node=path.getValue();switch(node.type){case"TemplateLiteral":{const isCss=[isStyledJsx,isStyledComponents].some(isIt=>isIt(path));if(isCss){const rawQuasis=node.quasis.map(q=>q.value.raw);const text=rawQuasis.join("@prettier-placeholder");return{options:{parser:"postcss"},transformDoc:transformCssDoc,text:text}}break}case"TemplateElement":{const parent=path.getParentNode();const parentParent=path.getParentNode(1);if(parentParent&&parentParent.type==="TaggedTemplateExpression"&&parent.quasis.length===1&&(parentParent.tag.type==="MemberExpression"&&parentParent.tag.object.name==="graphql"&&parentParent.tag.property.name==="experimental"||parentParent.tag.type==="Identifier"&&(parentParent.tag.name==="gql"||parentParent.tag.name==="graphql"))){return{options:{parser:"graphql"},transformDoc:doc=>concat$3([indent$3(concat$3([softline$2,stripTrailingHardline(doc)])),softline$2]),text:parent.quasis[0].value.raw}}break}}}function fromHtmlParser2(path,options){const node=path.getValue();switch(node.type){case"text":{const parent=path.getParentNode();if(parent.type==="script"&&(!parent.attribs.lang&&!parent.attribs.lang||parent.attribs.type==="text/javascript"||parent.attribs.type==="application/javascript")){const parser=options.parser==="flow"?"flow":"babylon";return{options:{parser:parser},transformDoc:doc=>concat$3([hardline$3,doc]),text:getText(options,node)}}if(parent.type==="script"&&(parent.attribs.type==="application/x-typescript"||parent.attribs.lang==="ts")){return{options:{parser:"typescript"},transformDoc:doc=>concat$3([hardline$3,doc]),text:getText(options,node)}}if(parent.type==="style"){return{options:{parser:"postcss"},transformDoc:doc=>concat$3([hardline$3,stripTrailingHardline(doc)]),text:getText(options,node)}}break}case"attribute":{if(/(^@)|(^v-)|:/.test(node.key)&&!/^\w+$/.test(node.value)){return{text:node.value,options:{parser:parseJavaScriptExpression,singleQuote:true},transformDoc:doc=>{return concat$3([node.key,'="',util$7.hasNewlineInRange(node.value,0,node.value.length)?doc:docUtils$1.removeLines(doc),'"'])}}}}}}function transformCssDoc(quasisDoc,parent){const parentNode=parent.path.getValue();const expressionDocs=parentNode.expressions?parent.path.map(parent.print,"expressions"):[];const newDoc=replacePlaceholders(quasisDoc,expressionDocs);if(!newDoc){throw new Error("Couldn't insert all the expressions")}return concat$3(["`",indent$3(concat$3([softline$2,stripTrailingHardline(newDoc)])),softline$2,"`"])}function replacePlaceholders(quasisDoc,expressionDocs){if(!expressionDocs||!expressionDocs.length){return quasisDoc}const expressions=expressionDocs.slice();const newDoc=docUtils$1.mapDoc(quasisDoc,doc=>{if(!doc||!doc.parts||!doc.parts.length){return doc}let parts=doc.parts;if(parts.length>1&&parts[0]==="@"&&typeof parts[1]==="string"&&parts[1].startsWith("prettier-placeholder")){const at=parts[0];const placeholder=parts[1];const rest=parts.slice(2);parts=[at+placeholder].concat(rest)}if(typeof parts[0]==="string"&&parts[0].startsWith("@prettier-placeholder")){const placeholder=parts[0];const rest=parts.slice(1);const suffix=placeholder.slice("@prettier-placeholder".length);const expression=expressions.shift();parts=["${",expression,"}"+suffix].concat(rest)}return Object.assign({},doc,{parts:parts})});return expressions.length===0?newDoc:null}function parseJavaScriptExpression(text,parsers){const ast=parsers.babylon(`(${text})`);return{type:"File",program:ast.program.body[0].expression}}function getText(options,node){return options.originalText.slice(util$7.locStart(node),util$7.locEnd(node))}function stripTrailingHardline(doc){if(doc.type==="concat"&&doc.parts[0].type==="concat"&&doc.parts[0].parts.length===2&&doc.parts[0].parts[1].type==="concat"&&doc.parts[0].parts[1].parts.length===2&&doc.parts[0].parts[1].parts[0].hard&&doc.parts[0].parts[1].parts[1].type==="break-parent"){return doc.parts[0].parts[0]}return doc}function isStyledJsx(path){const node=path.getValue();const parent=path.getParentNode();const parentParent=path.getParentNode(1);return parentParent&&node.quasis&&parent.type==="JSXExpressionContainer"&&parentParent.type==="JSXElement"&&parentParent.openingElement.name.name==="style"&&parentParent.openingElement.attributes.some(attribute=>attribute.name.name==="jsx")}function isStyledComponents(path){const parent=path.getParentNode();if(!parent||parent.type!=="TaggedTemplateExpression"){return false}const tag=parent.tag;switch(tag.type){case"MemberExpression":return isStyledIdentifier(tag.object)||/^[A-Z]/.test(tag.object.name)&&tag.property.name==="extend";case"CallExpression":return isStyledIdentifier(tag.callee)||tag.callee.type==="MemberExpression"&&tag.callee.object.type==="MemberExpression"&&isStyledIdentifier(tag.callee.object.object);case"Identifier":return tag.name==="css";default:return false}}function isStyledIdentifier(node){return node.type==="Identifier"&&node.name==="styled"}var multiparser$1={getSubtreeParser:getSubtreeParser,printSubtree:printSubtree};const docBuilders$5=docBuilders$1;const concat$4=docBuilders$5.concat;const join$3=docBuilders$5.join;const hardline$4=docBuilders$5.hardline;const line$2=docBuilders$5.line;const softline$3=docBuilders$5.softline;const group$2=docBuilders$5.group;const indent$4=docBuilders$5.indent;const ifBreak$2=docBuilders$5.ifBreak;function genericPrint$1(path,options,print){const n=path.getValue();if(!n){return""}if(typeof n==="string"){return n}switch(n.kind){case"Document":{return concat$4([join$3(concat$4([hardline$4,hardline$4]),path.map(print,"definitions")),hardline$4])}case"OperationDefinition":{return concat$4([n.name===null?"":n.operation,n.name?concat$4([" ",path.call(print,"name")]):"",n.variableDefinitions&&n.variableDefinitions.length?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"variableDefinitions"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?n.name===null?"":" ":"",path.call(print,"selectionSet")])}case"FragmentDefinition":{return concat$4(["fragment ",path.call(print,"name")," on ",path.call(print,"typeCondition"),printDirectives(path,print,n)," ",path.call(print,"selectionSet")])}case"SelectionSet":{return concat$4(["{",indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"selections"))])),hardline$4,"}"])}case"Field":{return group$2(concat$4([n.alias?concat$4([path.call(print,"alias"),": "]):"",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?" ":"",path.call(print,"selectionSet")]))}case"Name":{return n.value}case"StringValue":{return concat$4(['"',n.value,'"'])}case"IntValue":case"FloatValue":case"EnumValue":{return n.value}case"BooleanValue":{return n.value?"true":"false"}case"NullValue":{return"null"}case"Variable":{return concat$4(["$",path.call(print,"name")])}case"ListValue":{return group$2(concat$4(["[",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"values"))])),softline$3,"]"]))}case"ObjectValue":{return group$2(concat$4(["{",options.bracketSpacing&&n.fields.length>0?" ":"",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"fields"))])),softline$3,ifBreak$2("",options.bracketSpacing&&n.fields.length>0?" ":""),"}"]))}case"ObjectField":case"Argument":{return concat$4([path.call(print,"name"),": ",path.call(print,"value")])}case"Directive":{return concat$4(["@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):""])}case"NamedType":{return path.call(print,"name")}case"VariableDefinition":{return concat$4([path.call(print,"variable"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):""])}case"TypeExtensionDefinition":{return concat$4(["extend ",path.call(print,"definition")])}case"ObjectTypeDefinition":{return concat$4(["type ",path.call(print,"name"),n.interfaces.length>0?concat$4([" implements ",join$3(", ",path.map(print,"interfaces"))]):"",printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"fields"))])):"",hardline$4,"}"])}case"FieldDefinition":{return concat$4([path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",": ",path.call(print,"type"),printDirectives(path,print,n)])}case"DirectiveDefinition":{return concat$4(["directive ","@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",concat$4([" on ",join$3(" | ",path.map(print,"locations"))])])}case"EnumTypeDefinition":{return concat$4(["enum ",path.call(print,"name"),printDirectives(path,print,n)," {",n.values.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"values"))])):"",hardline$4,"}"])}case"EnumValueDefinition":{return concat$4([path.call(print,"name"),printDirectives(path,print,n)])}case"InputValueDefinition":{return concat$4([path.call(print,"name"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):"",printDirectives(path,print,n)])}case"InputObjectTypeDefinition":{return concat$4(["input ",path.call(print,"name"),printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"fields"))])):"",hardline$4,"}"])}case"SchemaDefinition":{return concat$4(["schema",printDirectives(path,print,n)," {",n.operationTypes.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"operationTypes"))])):"",hardline$4,"}"])}case"OperationTypeDefinition":{return concat$4([path.call(print,"operation"),": ",path.call(print,"type")])}case"InterfaceTypeDefinition":{return concat$4(["interface ",path.call(print,"name"),printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"fields"))])):"",hardline$4,"}"])}case"FragmentSpread":{return concat$4(["...",path.call(print,"name"),printDirectives(path,print,n)])}case"InlineFragment":{return concat$4(["...",n.typeCondition?concat$4([" on ",path.call(print,"typeCondition")]):"",printDirectives(path,print,n)," ",path.call(print,"selectionSet")])}case"UnionTypeDefinition":{return group$2(concat$4(["union ",path.call(print,"name")," =",ifBreak$2(""," "),indent$4(concat$4([ifBreak$2(concat$4([line$2," "])),join$3(concat$4([line$2,"| "]),path.map(print,"types"))]))]))}case"ScalarTypeDefinition":{return concat$4(["scalar ",path.call(print,"name"),printDirectives(path,print,n)])}case"NonNullType":{return concat$4([path.call(print,"type"),"!"])}case"ListType":{return concat$4(["[",path.call(print,"type"),"]"])}default:throw new Error("unknown graphql type: "+JSON.stringify(n.kind))}}function printDirectives(path,print,n){if(n.directives.length===0){return""}return concat$4([" ",group$2(indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2(""," "),softline$3]),path.map(print,"directives"))])))])}var printerGraphql=genericPrint$1;const util$8=util$3;const docBuilders$6=docBuilders$1;const concat$5=docBuilders$6.concat;const join$4=docBuilders$6.join;const hardline$5=docBuilders$6.hardline;const line$3=docBuilders$6.line;const softline$4=docBuilders$6.softline;const group$3=docBuilders$6.group;const indent$5=docBuilders$6.indent;const voidTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};function genericPrint$2(path,options,print){const n=path.getValue();if(!n){return""}if(typeof n==="string"){return n}switch(n.type){case"root":{return printChildren(path,print)}case"directive":{return concat$5(["<",n.data,">",hardline$5])}case"text":{return n.data.replace(/\s+/g," ").trim()}case"script":case"style":case"tag":{const selfClose=voidTags[n.name]?">":" />";const children=printChildren(path,print);const hasNewline=util$8.hasNewlineInRange(options.originalText,util$8.locStart(n),util$8.locEnd(n));return group$3(concat$5([hasNewline?hardline$5:"","<",n.name,printAttributes(path,print),n.children.length?">":selfClose,n.name.toLowerCase()==="html"?concat$5([hardline$5,children]):indent$5(children),n.children.length?concat$5([softline$4,"</",n.name,">"]):hardline$5]))}case"comment":{return concat$5(["\x3c!-- ",n.data.trim()," --\x3e"])}case"attribute":{if(!n.value){return n.key}return concat$5([n.key,'="',n.value,'"'])}default:throw new Error("unknown htmlparser2 type: "+n.type)}}function printAttributes(path,print){const node=path.getValue();return concat$5([node.attributes.length?" ":"",indent$5(join$4(line$3,path.map(print,"attributes")))])}function printChildren(path,print){const children=[];path.each(childPath=>{const child=childPath.getValue();if(child.type!=="text"){children.push(hardline$5)}children.push(childPath.call(print))},"children");return concat$5(children)}var printerHtmlparser2=genericPrint$2;const util$9=util$3;const docBuilders$7=docBuilders$1;const concat$6=docBuilders$7.concat;const join$5=docBuilders$7.join;const line$4=docBuilders$7.line;const hardline$6=docBuilders$7.hardline;const softline$5=docBuilders$7.softline;const group$4=docBuilders$7.group;const fill$2=docBuilders$7.fill;const indent$6=docBuilders$7.indent;const docUtils$4=docUtils$2;const removeLines$1=docUtils$4.removeLines;function genericPrint$3(path,options,print){const n=path.getValue();if(!n){return""}if(typeof n==="string"){return n}switch(n.type){case"css-root":{return concat$6([printNodeSequence(path,options,print),hardline$6])}case"css-comment":{if(n.raws.content){return n.raws.content}const text=options.originalText.slice(util$9.locStart(n),util$9.locEnd(n));const rawText=n.raws.text||n.text;if(text.indexOf(rawText)===-1){if(n.raws.inline){return concat$6(["// ",rawText])}return concat$6(["/* ",rawText," */"])}return text}case"css-rule":{return concat$6([path.call(print,"selector"),n.important?" !important":"",n.nodes?concat$6([" {",n.nodes.length>0?indent$6(concat$6([hardline$6,printNodeSequence(path,options,print)])):"",hardline$6,"}"]):";"])}case"css-decl":{const isValueExtend=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.value.group.group.type==="value-func"&&n.value.group.group.value==="extend";const isComposed=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.prop==="composes";return concat$6([n.raws.before.replace(/[\s;]/g,""),n.prop,":",isValueExtend?"":" ",isComposed?removeLines$1(path.call(print,"value")):path.call(print,"value"),n.important?" !important":"",n.nodes?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"])}case"css-atrule":{const hasParams=n.params&&!(n.params.type==="media-query-list"&&n.params.value==="");return concat$6(["@",n.name,hasParams?concat$6([" ",path.call(print,"params")]):"",n.nodes?concat$6([" {",indent$6(concat$6([n.nodes.length>0?softline$5:"",printNodeSequence(path,options,print)])),softline$5,"}"]):";"])}case"css-import":{return concat$6(["@",n.name," ",n.directives?concat$6([n.directives," "]):"",adjustStrings(n.importPath,options),n.nodes.length>0?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"])}case"media-query-list":{const parts=[];path.each(childPath=>{const node=childPath.getValue();if(node.type==="media-query"&&node.value===""){return}parts.push(childPath.call(print))},"nodes");return group$4(indent$6(join$5(concat$6([",",line$4]),parts)))}case"media-query":{return join$5(" ",path.map(print,"nodes"))}case"media-type":{const parent=path.getParentNode(2);if(parent.type==="css-atrule"&&parent.name.toLowerCase()==="charset"){return n.value}return adjustStrings(n.value,options)}case"media-feature-expression":{if(!n.nodes){return n.value}return concat$6(["(",concat$6(path.map(print,"nodes")),")"])}case"media-feature":{return adjustStrings(n.value.replace(/ +/g," "),options)}case"media-colon":{return concat$6([n.value," "])}case"media-value":{return adjustNumbers(adjustStrings(n.value,options))}case"media-keyword":{return n.value}case"media-url":{return n.value}case"media-unknown":{return adjustStrings(n.value,options)}case"selector-root":{return group$4(join$5(concat$6([",",hardline$6]),path.map(print,"nodes")))}case"selector-comment":{return n.value}case"selector-string":{return adjustStrings(n.value,options)}case"selector-tag":{return n.value}case"selector-id":{return concat$6(["#",n.value])}case"selector-class":{return concat$6([".",n.value])}case"selector-attribute":{return concat$6(["[",n.attribute,n.operator?n.operator:"",n.value?quoteAttributeValue(adjustStrings(n.value,options),options):"",n.insensitive?" i":"","]"])}case"selector-combinator":{if(n.value==="+"||n.value===">"||n.value==="~"){const parent=path.getParentNode();const leading=parent.type==="selector-selector"&&parent.nodes[0]===n?"":line$4;return concat$6([leading,n.value," "])}return n.value.trim()||line$4}case"selector-universal":{return n.value}case"selector-selector":{return group$4(indent$6(concat$6(path.map(print,"nodes"))))}case"selector-pseudo":{return concat$6([n.value,n.nodes&&n.nodes.length>0?concat$6(["(",join$5(", ",path.map(print,"nodes")),")"]):""])}case"selector-nesting":{return printValue(n.value)}case"value-root":{return path.call(print,"group")}case"value-comma_group":{const printed=path.map(print,"groups");const parts=[];for(let i=0;i<n.groups.length;++i){parts.push(printed[i]);if(i!==n.groups.length-1&&n.groups[i+1].raws&&n.groups[i+1].raws.before!==""){if(n.groups[i+1].type==="value-operator"&&["+","-","/","*","%"].indexOf(n.groups[i+1].value)!==-1){parts.push(" ")}else{parts.push(line$4)}}}return group$4(indent$6(fill$2(parts)))}case"value-paren_group":{const parent=path.getParentNode();const isURLCall=parent&&parent.type==="value-func"&&parent.value==="url";if(isURLCall&&(n.groups.length===1||n.groups.length>0&&n.groups[0].type==="value-comma_group"&&n.groups[0].groups.length>0&&n.groups[0].groups[0].type==="value-word"&&n.groups[0].groups[0].value==="data")){return concat$6([n.open?path.call(print,"open"):"",join$5(",",path.map(print,"groups")),n.close?path.call(print,"close"):""])}if(!n.open){const printed=path.map(print,"groups");const res=[];for(let i=0;i<printed.length;i++){if(i!==0){res.push(concat$6([",",line$4]))}res.push(printed[i])}return group$4(indent$6(fill$2(res)))}return group$4(concat$6([n.open?path.call(print,"open"):"",indent$6(concat$6([softline$5,join$5(concat$6([",",line$4]),path.map(print,"groups"))])),softline$5,n.close?path.call(print,"close"):""]))}case"value-value":{return path.call(print,"group")}case"value-func":{return concat$6([n.value,path.call(print,"group")])}case"value-paren":{if(n.raws.before!==""){return concat$6([line$4,n.value])}return n.value}case"value-number":{return concat$6([printNumber$1(n.value),n.unit])}case"value-operator":{return n.value}case"value-word":{if(n.isColor&&n.isHex){return n.value.toLowerCase()}return n.value}case"value-colon":{return n.value}case"value-comma":{return concat$6([n.value," "])}case"value-string":{return util$9.printString(n.raws.quote+n.value+n.raws.quote,options)}case"value-atword":{return concat$6(["@",n.value])}default:throw new Error("unknown postcss type: "+JSON.stringify(n.type))}}function printNodeSequence(path,options,print){const node=path.getValue();const parts=[];let i=0;path.map(pathChild=>{const prevNode=node.nodes[i-1];if(prevNode&&prevNode.type==="css-comment"&&prevNode.text.trim()==="prettier-ignore"){const childNode=pathChild.getValue();parts.push(options.originalText.slice(util$9.locStart(childNode),util$9.locEnd(childNode)))}else{parts.push(pathChild.call(print))}if(i!==node.nodes.length-1){if(node.nodes[i+1].type==="css-comment"&&!util$9.hasNewline(options.originalText,util$9.locStart(node.nodes[i+1]),{backwards:true})||node.nodes[i+1].type==="css-atrule"&&node.nodes[i+1].name==="else"&&node.nodes[i].type!=="css-comment"){parts.push(" ")}else{parts.push(hardline$6);if(util$9.isNextLineEmpty(options.originalText,pathChild.getValue())){parts.push(hardline$6)}}}i++},"nodes");return concat$6(parts)}function printValue(value){return value}const STRING_REGEX=/(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;const NUMBER_REGEX=/(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;const STRING_OR_NUMBER_REGEX=RegExp(`${STRING_REGEX.source}|(${NUMBER_REGEX.source})`,"g");function adjustStrings(value,options){return value.replace(STRING_REGEX,match=>util$9.printString(match,options))}function quoteAttributeValue(value,options){const quote=options.singleQuote?"'":'"';return value.includes('"')||value.includes("'")?value:quote+value+quote}function adjustNumbers(value){return value.replace(STRING_OR_NUMBER_REGEX,(match,quote,number)=>number?printNumber$1(number):match)}function printNumber$1(rawNumber){return util$9.printNumber(rawNumber).replace(/\.0(?=$|e)/,"")}var printerPostcss=genericPrint$3;const assert$1=require$$0;const comments$3=comments$1;const FastPath=fastPath;const multiparser=multiparser$1;const util$5=util$3;const isIdentifierName=utils.keyword.isIdentifierNameES6;const docBuilders$3=docBuilders$1;const concat$2=docBuilders$3.concat;const join$2=docBuilders$3.join;const line$1=docBuilders$3.line;const hardline$2=docBuilders$3.hardline;const softline$1=docBuilders$3.softline;const literalline$1=docBuilders$3.literalline;const group$1=docBuilders$3.group;const indent$2=docBuilders$3.indent;const align$1=docBuilders$3.align;const conditionalGroup$1=docBuilders$3.conditionalGroup;const fill$1=docBuilders$3.fill;const ifBreak$1=docBuilders$3.ifBreak;const breakParent$2=docBuilders$3.breakParent;const lineSuffixBoundary$1=docBuilders$3.lineSuffixBoundary;const addAlignmentToDoc$1=docBuilders$3.addAlignmentToDoc;const docUtils=docUtils$2;const willBreak=docUtils.willBreak;const isLineNext=docUtils.isLineNext;const isEmpty=docUtils.isEmpty;const rawText=docUtils.rawText;function shouldPrintComma(options,level){level=level||"es5";switch(options.trailingComma){case"all":if(level==="all"){return true}case"es5":if(level==="es5"){return true}case"none":default:return false}}function getPrintFunction(options){switch(options.parser){case"graphql":return printerGraphql;case"parse5":return printerHtmlparser2;case"postcss":return printerPostcss;default:return genericPrintNoParens}}function hasIgnoreComment(path){const node=path.getValue();return hasNodeIgnoreComment(node)||hasJsxIgnoreComment(path)}function hasNodeIgnoreComment(node){return node&&node.comments&&node.comments.length>0&&node.comments.some(comment=>comment.value.trim()==="prettier-ignore")}function hasJsxIgnoreComment(path){const node=path.getValue();const parent=path.getParentNode();if(!parent||!node||node.type!=="JSXElement"||parent.type!=="JSXElement"){return false}const index=parent.children.indexOf(node);let prevSibling=null;for(let i=index;i>0;i--){const candidate=parent.children[i-1];if(candidate.type==="JSXText"&&!isMeaningfulJSXText(candidate)){continue}prevSibling=candidate;break}return prevSibling&&prevSibling.type==="JSXExpressionContainer"&&prevSibling.expression.type==="JSXEmptyExpression"&&prevSibling.expression.comments&&prevSibling.expression.comments.find(comment=>comment.value.trim()==="prettier-ignore")}function genericPrint(path,options,printPath,args){assert$1.ok(path instanceof FastPath);const node=path.getValue();if(hasIgnoreComment(path)){return options.originalText.slice(util$5.locStart(node),util$5.locEnd(node))}if(node){const next=multiparser.getSubtreeParser(path,options);if(next){try{return multiparser.printSubtree(next,path,printPath,options)}catch(error){if(process.env.PRETTIER_DEBUG){const e=new Error(error);e.parser=next.options.parser;throw e}}}}let needsParens=false;const linesWithoutParens=getPrintFunction(options)(path,options,printPath,args);if(!node||isEmpty(linesWithoutParens)){return linesWithoutParens}const decorators=[];if(node.decorators&&node.decorators.length>0&&!util$5.getParentExportDeclaration(path)){let separator=hardline$2;path.each(decoratorPath=>{let prefix="@";let decorator=decoratorPath.getValue();if(decorator.expression){decorator=decorator.expression;prefix=""}if(node.decorators.length===1&&node.type!=="ClassDeclaration"&&node.type!=="MethodDefinition"&&node.type!=="ClassMethod"&&(decorator.type==="Identifier"||decorator.type==="MemberExpression"||decorator.type==="CallExpression"&&(decorator.arguments.length===0||decorator.arguments.length===1&&(isStringLiteral(decorator.arguments[0])||decorator.arguments[0].type==="Identifier"||decorator.arguments[0].type==="MemberExpression")))){separator=line$1}decorators.push(prefix,printPath(decoratorPath),separator)},"decorators")}else if(util$5.isExportDeclaration(node)&&node.declaration&&node.declaration.decorators){path.each(decoratorPath=>{const decorator=decoratorPath.getValue();const prefix=decorator.type==="Decorator"?"":"@";decorators.push(prefix,printPath(decoratorPath),hardline$2)},"declaration","decorators")}else{needsParens=path.needsParens(options)}if(node.type){node.needsParens=needsParens}const parts=[];if(needsParens){parts.unshift("(")}parts.push(linesWithoutParens);if(needsParens){parts.push(")")}if(decorators.length>0){return group$1(concat$2(decorators.concat(parts)))}return concat$2(parts)}function genericPrintNoParens(path,options,print,args){const n=path.getValue();const semi=options.semi?";":"";if(!n){return""}if(typeof n==="string"){return n}let parts=[];switch(n.type){case"File":return path.call(print,"program");case"Program":if(n.directives){path.each(childPath=>{parts.push(print(childPath),semi,hardline$2);if(util$5.isNextLineEmpty(options.originalText,childPath.getValue())){parts.push(hardline$2)}},"directives")}parts.push(path.call(bodyPath=>{return printStatementSequence(bodyPath,options,print)},"body"));parts.push(comments$3.printDanglingComments(path,options,true));if(n.body.length||n.comments){parts.push(hardline$2)}return concat$2(parts);case"EmptyStatement":return"";case"ExpressionStatement":if(n.directive){return concat$2([nodeStr(n.expression,options,true),semi])}return concat$2([path.call(print,"expression"),semi]);case"ParenthesizedExpression":return concat$2(["(",path.call(print,"expression"),")"]);case"AssignmentExpression":return printAssignment(n.left,path.call(print,"left"),concat$2([" ",n.operator]),n.right,path.call(print,"right"),options);case"BinaryExpression":case"LogicalExpression":{const parent=path.getParentNode();const parentParent=path.getParentNode(1);const isInsideParenthesis=n!==parent.body&&(parent.type==="IfStatement"||parent.type==="WhileStatement"||parent.type==="DoWhileStatement");const parts=printBinaryishExpressions(path,print,options,false,isInsideParenthesis);if(isInsideParenthesis){return concat$2(parts)}if(parent.type==="UnaryExpression"){return group$1(concat$2([indent$2(concat$2([softline$1,concat$2(parts)])),softline$1]))}if(parent.type==="AssignmentExpression"||parent.type==="VariableDeclarator"||shouldInlineLogicalExpression(n)||parent.type==="ReturnStatement"||parent.type==="JSXExpressionContainer"&&parentParent.type==="JSXAttribute"||n===parent.body&&parent.type==="ArrowFunctionExpression"||n!==parent.body&&parent.type==="ForStatement"||parent.type==="ObjectProperty"||parent.type==="Property"||parent.type==="ConditionalExpression"){return group$1(concat$2(parts))}const rest=concat$2(parts.slice(1));return group$1(concat$2([parts.length>0?parts[0]:"",indent$2(rest)]))}case"AssignmentPattern":return concat$2([path.call(print,"left")," = ",path.call(print,"right")]);case"TSTypeAssertionExpression":return concat$2(["<",path.call(print,"typeAnnotation"),">",path.call(print,"expression")]);case"MemberExpression":{const parent=path.getParentNode();let firstNonMemberParent;let i=0;do{firstNonMemberParent=path.getParentNode(i);i++}while(firstNonMemberParent&&firstNonMemberParent.type==="MemberExpression");const shouldInline=firstNonMemberParent&&(firstNonMemberParent.type==="VariableDeclarator"&&firstNonMemberParent.id.type!=="Identifier"||firstNonMemberParent.type==="AssignmentExpression"&&firstNonMemberParent.left.type!=="Identifier")||n.computed||n.object.type==="Identifier"&&n.property.type==="Identifier"&&parent.type!=="MemberExpression";return concat$2([path.call(print,"object"),shouldInline?printMemberLookup(path,options,print):group$1(indent$2(concat$2([softline$1,printMemberLookup(path,options,print)])))])}case"MetaProperty":return concat$2([path.call(print,"meta"),".",path.call(print,"property")]);case"BindExpression":if(n.object){parts.push(path.call(print,"object"))}parts.push(printBindExpressionCallee(path,options,print));return concat$2(parts);case"Identifier":{const parentNode=path.getParentNode();const isFunctionDeclarationIdentifier=parentNode.type==="DeclareFunction"&&parentNode.id===n;return concat$2([n.name,printOptionalToken(path),n.typeAnnotation&&!isFunctionDeclarationIdentifier?": ":"",path.call(print,"typeAnnotation")])}case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"ExperimentalRestProperty":case"ExperimentalSpreadProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":case"ObjectTypeSpreadProperty":return concat$2(["...",path.call(print,"argument"),n.typeAnnotation?": ":"",path.call(print,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSNamespaceFunctionDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ")}parts.push(printFunctionDeclaration(path,print,options));if(!n.body){parts.push(semi)}return concat$2(parts);case"ArrowFunctionExpression":{if(n.async){parts.push("async ")}if(canPrintParamsWithoutParens(n)){parts.push(path.call(print,"params",0))}else{parts.push(group$1(concat$2([printFunctionParams(path,print,options,args&&(args.expandLastArg||args.expandFirstArg),true),printReturnType(path,print)])))}parts.push(" =>");const body=path.call(bodyPath=>print(bodyPath,args),"body");if(!hasLeadingOwnLineComment(options.originalText,n.body)&&(n.body.type==="ArrayExpression"||n.body.type==="ObjectExpression"||n.body.type==="BlockStatement"||n.body.type==="JSXElement"||isTemplateOnItsOwnLine(n.body,options.originalText)||n.body.type==="ArrowFunctionExpression")){return group$1(concat$2([concat$2(parts)," ",body]))}if(n.body.type==="SequenceExpression"){return group$1(concat$2([concat$2(parts),group$1(concat$2([" (",indent$2(concat$2([softline$1,body])),softline$1,")"]))]))}const shouldAddSoftLine=args&&args.expandLastArg;const shouldAddParens=n.body.type==="ConditionalExpression"&&!util$5.startsWithNoLookaheadToken(n.body,false);return group$1(concat$2([concat$2(parts),group$1(concat$2([indent$2(concat$2([line$1,shouldAddParens?ifBreak$1("","("):"",body,shouldAddParens?ifBreak$1("",")"):""])),shouldAddSoftLine?concat$2([ifBreak$1(shouldPrintComma(options,"all")?",":""),softline$1]):""]))]))}case"MethodDefinition":case"TSAbstractMethodDefinition":if(n.accessibility){parts.push(n.accessibility+" ")}if(n.static){parts.push("static ")}if(n.type==="TSAbstractMethodDefinition"){parts.push("abstract ")}parts.push(printMethod(path,options,print));return concat$2(parts);case"YieldExpression":parts.push("yield");if(n.delegate){parts.push("*")}if(n.argument){parts.push(" ",path.call(print,"argument"))}return concat$2(parts);case"AwaitExpression":return concat$2(["await ",path.call(print,"argument")]);case"ImportSpecifier":if(n.importKind){parts.push(path.call(print,"importKind")," ")}parts.push(path.call(print,"imported"));if(n.local&&n.local.name!==n.imported.name){parts.push(" as ",path.call(print,"local"))}return concat$2(parts);case"ExportSpecifier":parts.push(path.call(print,"local"));if(n.exported&&n.exported.name!==n.local.name){parts.push(" as ",path.call(print,"exported"))}return concat$2(parts);case"ImportNamespaceSpecifier":parts.push("* as ");if(n.local){parts.push(path.call(print,"local"))}else if(n.id){parts.push(path.call(print,"id"))}return concat$2(parts);case"ImportDefaultSpecifier":if(n.local){return path.call(print,"local")}return path.call(print,"id");case"TSExportAssignment":return concat$2(["export = ",path.call(print,"expression"),semi]);case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return printExportDeclaration(path,options,print);case"ExportAllDeclaration":parts.push("export ");if(n.exportKind==="type"){parts.push("type ")}parts.push("* from ",path.call(print,"source"),semi);return concat$2(parts);case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return path.call(print,"exported");case"ImportDeclaration":{parts.push("import ");if(n.importKind&&n.importKind!=="value"){parts.push(n.importKind+" ")}const standalones=[];const grouped=[];if(n.specifiers&&n.specifiers.length>0){path.each(specifierPath=>{const value=specifierPath.getValue();if(value.type==="ImportDefaultSpecifier"||value.type==="ImportNamespaceSpecifier"){standalones.push(print(specifierPath))}else{grouped.push(print(specifierPath))}},"specifiers");if(standalones.length>0){parts.push(join$2(", ",standalones))}if(standalones.length>0&&grouped.length>0){parts.push(", ")}if(grouped.length===1&&standalones.length===0&&n.specifiers&&!n.specifiers.some(node=>node.comments)){parts.push(concat$2(["{",options.bracketSpacing?" ":"",concat$2(grouped),options.bracketSpacing?" ":"","}"]))}else if(grouped.length>=1){parts.push(group$1(concat$2(["{",indent$2(concat$2([options.bracketSpacing?line$1:softline$1,join$2(concat$2([",",line$1]),grouped)])),ifBreak$1(shouldPrintComma(options)?",":""),options.bracketSpacing?line$1:softline$1,"}"])))}parts.push(" from ")}else if(n.importKind&&n.importKind==="type"||/{\s*}/.test(options.originalText.slice(util$5.locStart(n),util$5.locStart(n.source)))){parts.push("{} from ")}parts.push(path.call(print,"source"),semi);return concat$2(parts)}case"Import":return"import";case"BlockStatement":{const naked=path.call(bodyPath=>{return printStatementSequence(bodyPath,options,print)},"body");const hasContent=n.body.find(node=>node.type!=="EmptyStatement");const hasDirectives=n.directives&&n.directives.length>0;const parent=path.getParentNode();const parentParent=path.getParentNode(1);if(!hasContent&&!hasDirectives&&!n.comments&&(parent.type==="ArrowFunctionExpression"||parent.type==="FunctionExpression"||parent.type==="FunctionDeclaration"||parent.type==="ObjectMethod"||parent.type==="ClassMethod"||parent.type==="ForStatement"||parent.type==="WhileStatement"||parent.type==="DoWhileStatement"||parent.type==="CatchClause"&&!parentParent.finalizer)){return"{}"}parts.push("{");if(hasDirectives){path.each(childPath=>{parts.push(indent$2(concat$2([hardline$2,print(childPath),semi])));if(util$5.isNextLineEmpty(options.originalText,childPath.getValue())){parts.push(hardline$2)}},"directives")}if(hasContent){parts.push(indent$2(concat$2([hardline$2,naked])))}parts.push(comments$3.printDanglingComments(path,options));parts.push(hardline$2,"}");return concat$2(parts)}case"ReturnStatement":parts.push("return");if(n.argument){if(returnArgumentHasLeadingComment(options,n.argument)){parts.push(concat$2([" (",indent$2(concat$2([softline$1,path.call(print,"argument")])),line$1,")"]))}else if(n.argument.type==="LogicalExpression"||n.argument.type==="BinaryExpression"||n.argument.type==="SequenceExpression"){parts.push(group$1(concat$2([ifBreak$1(" ("," "),indent$2(concat$2([softline$1,path.call(print,"argument")])),softline$1,ifBreak$1(")")])))}else{parts.push(" ",path.call(print,"argument"))}}if(hasDanglingComments(n)){parts.push(" ",comments$3.printDanglingComments(path,options,true))}parts.push(semi);return concat$2(parts);case"NewExpression":case"CallExpression":{const isNew=n.type==="NewExpression";const optional=printOptionalToken(path);if(!isNew&&n.callee.type==="Identifier"&&n.callee.name==="require"||n.callee.type==="Import"||n.arguments.length===1&&isTemplateOnItsOwnLine(n.arguments[0],options.originalText)||!isNew&&n.callee.type==="Identifier"&&(n.callee.name==="it"||n.callee.name==="test"||n.callee.name==="describe")&&n.arguments.length===2&&(n.arguments[0].type==="StringLiteral"||n.arguments[0].type==="TemplateLiteral"||n.arguments[0].type==="Literal"&&typeof n.arguments[0].value==="string")&&(n.arguments[1].type==="FunctionExpression"||n.arguments[1].type==="ArrowFunctionExpression")&&n.arguments[1].params.length<=1){return concat$2([isNew?"new ":"",path.call(print,"callee"),optional,path.call(print,"typeParameters"),concat$2(["(",join$2(", ",path.map(print,"arguments")),")"])])}if(!isNew&&isMemberish(n.callee)){return printMemberChain(path,options,print)}return concat$2([isNew?"new ":"",path.call(print,"callee"),optional,printFunctionTypeParameters(path,options,print),printArgumentsList(path,options,print)])}case"TSInterfaceDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ")}parts.push(n.abstract?"abstract ":"",printTypeScriptModifiers(path,options,print),"interface ",path.call(print,"id"),n.typeParameters?path.call(print,"typeParameters"):""," ");if(n.heritage.length){parts.push(group$1(indent$2(concat$2([softline$1,"extends ",indent$2(join$2(concat$2([",",line$1]),path.map(print,"heritage")))," "]))))}parts.push(path.call(print,"body"));return concat$2(parts);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":case"TSInterfaceBody":case"TSTypeLiteral":{const isTypeAnnotation=n.type==="ObjectTypeAnnotation";const shouldBreak=n.type==="TSInterfaceBody"||n.type!=="ObjectPattern"&&util$5.hasNewlineInRange(options.originalText,util$5.locStart(n),util$5.locEnd(n));const separator=n.type==="TSInterfaceBody"||n.type==="TSTypeLiteral"?ifBreak$1(semi,";"):",";const fields=[];const leftBrace=n.exact?"{|":"{";const rightBrace=n.exact?"|}":"}";const parent=path.getParentNode(0);let propertiesField;if(n.type==="TSTypeLiteral"){propertiesField="members"}else if(n.type==="TSInterfaceBody"){propertiesField="body"}else{propertiesField="properties"}if(isTypeAnnotation){fields.push("indexers","callProperties")}fields.push(propertiesField);const propsAndLoc=[];fields.forEach(field=>{path.each(childPath=>{const node=childPath.getValue();propsAndLoc.push({node:node,printed:print(childPath),loc:util$5.locStart(node)})},field)});let separatorParts=[];const props=propsAndLoc.sort((a,b)=>a.loc-b.loc).map(prop=>{const result=concat$2(separatorParts.concat(group$1(prop.printed)));separatorParts=[separator,line$1];if(util$5.isNextLineEmpty(options.originalText,prop.node)){separatorParts.push(hardline$2)}return result});const lastElem=util$5.getLast(n[propertiesField]);const canHaveTrailingSeparator=!(lastElem&&(lastElem.type==="RestProperty"||lastElem.type==="RestElement"));let content;if(props.length===0&&!n.typeAnnotation){if(!hasDanglingComments(n)){return concat$2([leftBrace,rightBrace])}content=group$1(concat$2([leftBrace,comments$3.printDanglingComments(path,options),softline$1,rightBrace,printOptionalToken(path)]))}else{content=concat$2([leftBrace,indent$2(concat$2([options.bracketSpacing?line$1:softline$1,concat$2(props)])),ifBreak$1(canHaveTrailingSeparator&&(separator!==","||shouldPrintComma(options))?separator:""),concat$2([options.bracketSpacing?line$1:softline$1,rightBrace]),printOptionalToken(path),n.typeAnnotation?": ":"",path.call(print,"typeAnnotation")])}const parentParentParent=path.getParentNode(2);if(n.type==="ObjectPattern"&&parent&&shouldHugArguments(parent)&&parent.params[0]===n||shouldHugType(n)&&parentParentParent&&shouldHugArguments(parentParentParent)&&parentParentParent.params[0].typeAnnotation.typeAnnotation===n){return content}return group$1(content,{shouldBreak:shouldBreak})}case"ObjectProperty":case"Property":if(n.method||n.kind==="get"||n.kind==="set"){return printMethod(path,options,print)}if(n.shorthand){parts.push(path.call(print,"value"))}else{let printedLeft;if(n.computed){printedLeft=concat$2(["[",path.call(print,"key"),"]"])}else{printedLeft=printPropertyKey(path,options,print)}parts.push(printAssignment(n.key,printedLeft,":",n.value,path.call(print,"value"),options))}return concat$2(parts);case"ClassMethod":if(n.static){parts.push("static ")}parts=parts.concat(printObjectMethod(path,options,print));return concat$2(parts);case"ObjectMethod":return printObjectMethod(path,options,print);case"Decorator":return concat$2(["@",path.call(print,"expression")]);case"ArrayExpression":case"ArrayPattern":if(n.elements.length===0){if(!hasDanglingComments(n)){parts.push("[]")}else{parts.push(group$1(concat$2(["[",comments$3.printDanglingComments(path,options),softline$1,"]"])))}}else{const lastElem=util$5.getLast(n.elements);const canHaveTrailingComma=!(lastElem&&lastElem.type==="RestElement");const needsForcedTrailingComma=canHaveTrailingComma&&lastElem===null;parts.push(group$1(concat$2(["[",indent$2(concat$2([softline$1,printArrayItems(path,options,"elements",print)])),needsForcedTrailingComma?",":"",ifBreak$1(canHaveTrailingComma&&!needsForcedTrailingComma&&shouldPrintComma(options)?",":""),comments$3.printDanglingComments(path,options,true),softline$1,"]"])))}parts.push(printOptionalToken(path));if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"))}return concat$2(parts);case"SequenceExpression":{const parent=path.getParentNode(0);if(parent.type==="ExpressionStatement"||parent.type==="ForStatement"){const parts=[];path.each(p=>{if(p.getName()===0){parts.push(print(p))}else{parts.push(",",indent$2(concat$2([line$1,print(p)])))}},"expressions");return group$1(concat$2(parts))}return group$1(concat$2([join$2(concat$2([",",line$1]),path.map(print,"expressions"))]))}case"ThisExpression":return"this";case"Super":return"super";case"NullLiteral":return"null";case"RegExpLiteral":return printRegex(n);case"NumericLiteral":return util$5.printNumber(n.extra.raw);case"BooleanLiteral":case"StringLiteral":case"Literal":{if(n.regex){return printRegex(n.regex)}if(typeof n.value==="number"){return util$5.printNumber(n.raw)}if(typeof n.value!=="string"){return""+n.value}const grandParent=path.getParentNode(1);const isTypeScriptDirective=options.parser==="typescript"&&typeof n.value==="string"&&grandParent&&(grandParent.type==="Program"||grandParent.type==="BlockStatement");return nodeStr(n,options,isTypeScriptDirective)}case"Directive":return path.call(print,"value");case"DirectiveLiteral":return nodeStr(n,options);case"UnaryExpression":parts.push(n.operator);if(/[a-z]$/.test(n.operator)){parts.push(" ")}parts.push(path.call(print,"argument"));return concat$2(parts);case"UpdateExpression":parts.push(path.call(print,"argument"),n.operator);if(n.prefix){parts.reverse()}return concat$2(parts);case"ConditionalExpression":{let jsxMode=false;const parent=path.getParentNode();let forceNoIndent=parent.type==="ConditionalExpression";let currentParent;let previousParent;let i=0;do{previousParent=currentParent||n;currentParent=path.getParentNode(i);i++}while(currentParent&&currentParent.type==="ConditionalExpression");const firstNonConditionalParent=currentParent||parent;const lastConditionalParent=previousParent;if(n.test.type==="JSXElement"||n.consequent.type==="JSXElement"||n.alternate.type==="JSXElement"||parent.type==="JSXExpressionContainer"||firstNonConditionalParent.type==="JSXExpressionContainer"||conditionalExpressionChainContainsJSX(lastConditionalParent)){jsxMode=true;forceNoIndent=true;const wrap=doc=>concat$2([ifBreak$1("(",""),indent$2(concat$2([softline$1,doc])),softline$1,ifBreak$1(")","")]);const shouldNotWrap=node=>node.type==="ConditionalExpression"||node.type==="NullLiteral"||node.type==="Literal"&&node.value===null;parts.push(" ? ",shouldNotWrap(n.consequent)?path.call(print,"consequent"):wrap(path.call(print,"consequent"))," : ",shouldNotWrap(n.alternate)?path.call(print,"alternate"):wrap(path.call(print,"alternate")))}else{parts.push(line$1,"? ",n.consequent.type==="ConditionalExpression"?ifBreak$1("","("):"",align$1(2,path.call(print,"consequent")),n.consequent.type==="ConditionalExpression"?ifBreak$1("",")"):"",line$1,": ",align$1(2,path.call(print,"alternate")))}const maybeGroup=doc=>jsxMode?parent===firstNonConditionalParent?group$1(doc):doc:group$1(doc);return maybeGroup(concat$2([path.call(print,"test"),forceNoIndent?concat$2(parts):indent$2(concat$2(parts))]))}case"VariableDeclaration":{const printed=path.map(childPath=>{return print(childPath)},"declarations");const parentNode=path.getParentNode();const isParentForLoop=parentNode.type==="ForStatement"||parentNode.type==="ForInStatement"||parentNode.type==="ForOfStatement"||parentNode.type==="ForAwaitStatement";const hasValue=n.declarations.some(decl=>decl.init);let firstVariable;if(printed.length===1){firstVariable=printed[0]}else if(printed.length>1){firstVariable=indent$2(printed[0])}parts=[isNodeStartingWithDeclare(n,options)?"declare ":"",n.kind,firstVariable?concat$2([" ",firstVariable]):"",indent$2(concat$2(printed.slice(1).map(p=>concat$2([",",hasValue&&!isParentForLoop?hardline$2:line$1,p]))))];if(!(isParentForLoop&&parentNode.body!==n)){parts.push(semi)}return group$1(concat$2(parts))}case"VariableDeclarator":return printAssignment(n.id,concat$2([path.call(print,"id"),path.call(print,"typeParameters")])," =",n.init,n.init&&path.call(print,"init"),options);case"WithStatement":return group$1(concat$2(["with (",path.call(print,"object"),")",adjustClause(n.body,path.call(print,"body"))]));case"IfStatement":{const con=adjustClause(n.consequent,path.call(print,"consequent"));const opening=group$1(concat$2(["if (",group$1(concat$2([indent$2(concat$2([softline$1,path.call(print,"test")])),softline$1])),")",con]));parts.push(opening);if(n.alternate){if(n.consequent.type==="BlockStatement"){parts.push(" else")}else{parts.push(hardline$2,"else")}parts.push(group$1(adjustClause(n.alternate,path.call(print,"alternate"),n.alternate.type==="IfStatement")))}return concat$2(parts)}case"ForStatement":{const body=adjustClause(n.body,path.call(print,"body"));const dangling=comments$3.printDanglingComments(path,options,true);const printedComments=dangling?concat$2([dangling,softline$1]):"";if(!n.init&&!n.test&&!n.update){return concat$2([printedComments,group$1(concat$2(["for (;;)",body]))])}return concat$2([printedComments,group$1(concat$2(["for (",group$1(concat$2([indent$2(concat$2([softline$1,path.call(print,"init"),";",line$1,path.call(print,"test"),";",line$1,path.call(print,"update")])),softline$1])),")",body]))])}case"WhileStatement":return group$1(concat$2(["while (",group$1(concat$2([indent$2(concat$2([softline$1,path.call(print,"test")])),softline$1])),")",adjustClause(n.body,path.call(print,"body"))]));case"ForInStatement":return group$1(concat$2([n.each?"for each (":"for (",path.call(print,"left")," in ",path.call(print,"right"),")",adjustClause(n.body,path.call(print,"body"))]));case"ForOfStatement":case"ForAwaitStatement":{const isAwait=n.type==="ForAwaitStatement"||n.await;return group$1(concat$2(["for",isAwait?" await":""," (",path.call(print,"left")," of ",path.call(print,"right"),")",adjustClause(n.body,path.call(print,"body"))]))}case"DoWhileStatement":{const clause=adjustClause(n.body,path.call(print,"body"));const doBody=group$1(concat$2(["do",clause]));parts=[doBody];if(n.body.type==="BlockStatement"){parts.push(" ")}else{parts.push(hardline$2)}parts.push("while (");parts.push(group$1(concat$2([indent$2(concat$2([softline$1,path.call(print,"test")])),softline$1])),")",semi);return concat$2(parts)}case"DoExpression":return concat$2(["do ",path.call(print,"body")]);case"BreakStatement":parts.push("break");if(n.label){parts.push(" ",path.call(print,"label"))}parts.push(semi);return concat$2(parts);case"ContinueStatement":parts.push("continue");if(n.label){parts.push(" ",path.call(print,"label"))}parts.push(semi);return concat$2(parts);case"LabeledStatement":if(n.body.type==="EmptyStatement"){return concat$2([path.call(print,"label"),":;"])}return concat$2([path.call(print,"label"),": ",path.call(print,"body")]);case"TryStatement":return concat$2(["try ",path.call(print,"block"),n.handler?concat$2([" ",path.call(print,"handler")]):"",n.finalizer?concat$2([" finally ",path.call(print,"finalizer")]):""]);case"CatchClause":return concat$2(["catch ",n.param?concat$2(["(",path.call(print,"param"),") "]):"",path.call(print,"body")]);case"ThrowStatement":return concat$2(["throw ",path.call(print,"argument"),semi]);case"SwitchStatement":return concat$2(["switch (",path.call(print,"discriminant"),") {",n.cases.length>0?indent$2(concat$2([hardline$2,join$2(hardline$2,path.map(casePath=>{const caseNode=casePath.getValue();return concat$2([casePath.call(print),n.cases.indexOf(caseNode)!==n.cases.length-1&&util$5.isNextLineEmpty(options.originalText,caseNode)?hardline$2:""])},"cases"))])):"",hardline$2,"}"]);case"SwitchCase":{if(n.test){parts.push("case ",path.call(print,"test"),":")}else{parts.push("default:")}const consequent=n.consequent.filter(node=>node.type!=="EmptyStatement");if(consequent.length>0){const cons=path.call(consequentPath=>{return printStatementSequence(consequentPath,options,print)},"consequent");parts.push(consequent.length===1&&consequent[0].type==="BlockStatement"?concat$2([" ",cons]):indent$2(concat$2([hardline$2,cons])))}return concat$2(parts)}case"DebuggerStatement":return concat$2(["debugger",semi]);case"JSXAttribute":parts.push(path.call(print,"name"));if(n.value){let res;if(isStringLiteral(n.value)){const value=rawText(n.value);res='"'+value.slice(1,-1).replace(/"/g,"&quot;")+'"'}else{res=path.call(print,"value")}parts.push("=",res)}return concat$2(parts);case"JSXIdentifier":if(!n.name){return"this"}return""+n.name;case"JSXNamespacedName":return join$2(":",[path.call(print,"namespace"),path.call(print,"name")]);case"JSXMemberExpression":return join$2(".",[path.call(print,"object"),path.call(print,"property")]);case"TSQualifiedName":return join$2(".",[path.call(print,"left"),path.call(print,"right")]);case"JSXSpreadAttribute":return concat$2(["{...",path.call(print,"argument"),"}"]);case"JSXExpressionContainer":{const parent=path.getParentNode(0);const shouldInline=n.expression.type==="ArrayExpression"||n.expression.type==="ObjectExpression"||n.expression.type==="ArrowFunctionExpression"||n.expression.type==="CallExpression"||n.expression.type==="FunctionExpression"||n.expression.type==="JSXEmptyExpression"||n.expression.type==="TemplateLiteral"||n.expression.type==="TaggedTemplateExpression"||parent.type==="JSXElement"&&(n.expression.type==="ConditionalExpression"||isBinaryish(n.expression));if(shouldInline){return group$1(concat$2(["{",path.call(print,"expression"),lineSuffixBoundary$1,"}"]))}return group$1(concat$2(["{",indent$2(concat$2([softline$1,path.call(print,"expression")])),softline$1,lineSuffixBoundary$1,"}"]))}case"JSXElement":{const elem=comments$3.printComments(path,()=>printJSXElement(path,options,print),options);return maybeWrapJSXElementInParens(path,elem)}case"JSXOpeningElement":{const n=path.getValue();if(n.attributes.length===1&&n.attributes[0].value&&isStringLiteral(n.attributes[0].value)){return group$1(concat$2(["<",path.call(print,"name")," ",concat$2(path.map(print,"attributes")),n.selfClosing?" />":">"]))}return group$1(concat$2(["<",path.call(print,"name"),concat$2([indent$2(concat$2(path.map(attr=>concat$2([line$1,print(attr)]),"attributes"))),n.selfClosing?line$1:options.jsxBracketSameLine?">":softline$1]),n.selfClosing?"/>":options.jsxBracketSameLine?"":">"]))}case"JSXClosingElement":return concat$2(["</",path.call(print,"name"),">"]);case"JSXText":throw new Error("JSXTest should be handled by JSXElement");case"JSXEmptyExpression":{const requiresHardline=n.comments&&!n.comments.every(util$5.isBlockComment);return concat$2([comments$3.printDanglingComments(path,options,!requiresHardline),requiresHardline?hardline$2:""])}case"ClassBody":if(!n.comments&&n.body.length===0){return"{}"}return concat$2(["{",n.body.length>0?indent$2(concat$2([hardline$2,path.call(bodyPath=>{return printStatementSequence(bodyPath,options,print)},"body")])):comments$3.printDanglingComments(path,options),hardline$2,"}"]);case"ClassProperty":case"TSAbstractClassProperty":{if(n.accessibility){parts.push(n.accessibility+" ")}if(n.static){parts.push("static ")}if(n.type==="TSAbstractClassProperty"){parts.push("abstract ")}if(n.readonly){parts.push("readonly ")}const variance=getFlowVariance(n);if(variance){parts.push(variance)}if(n.computed){parts.push("[",path.call(print,"key"),"]")}else{parts.push(printPropertyKey(path,options,print))}if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"))}if(n.value){parts.push(" =",printAssignmentRight(n.value,path.call(print,"value"),false,options))}parts.push(semi);return concat$2(parts)}case"ClassDeclaration":case"ClassExpression":case"TSAbstractClassDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ")}parts.push(concat$2(printClass(path,options,print)));return concat$2(parts);case"TSInterfaceHeritage":parts.push(path.call(print,"id"));if(n.typeParameters){parts.push(path.call(print,"typeParameters"))}return concat$2(parts);case"TemplateElement":return join$2(literalline$1,n.value.raw.split(/\r?\n/g));case"TemplateLiteral":{const expressions=path.map(print,"expressions");parts.push("`");path.each(childPath=>{const i=childPath.getName();parts.push(print(childPath));if(i<expressions.length){let size=0;const value=childPath.getValue().value.raw;const index=value.lastIndexOf("\n");const tabWidth=options.tabWidth;if(index!==-1){size=util$5.getAlignmentSize(value.slice(index+1).match(/^[ \t]*/)[0],tabWidth)}const aligned=addAlignmentToDoc$1(expressions[i],size,tabWidth);parts.push("${",aligned,lineSuffixBoundary$1,"}")}},"quasis");parts.push("`");return concat$2(parts)}case"TaggedTemplateExpression":return concat$2([path.call(print,"tag"),path.call(print,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"TypeAnnotation":if(n.typeAnnotation){return path.call(print,"typeAnnotation")}return"";case"TSTupleType":case"TupleTypeAnnotation":{const typesField=n.type==="TSTupleType"?"elementTypes":"types";return group$1(concat$2(["[",indent$2(concat$2([softline$1,printArrayItems(path,options,typesField,print)])),n.type==="TSTupleType"?"":ifBreak$1(shouldPrintComma(options)?",":""),comments$3.printDanglingComments(path,options,true),softline$1,"]"]))}case"ExistsTypeAnnotation":return"*";case"EmptyTypeAnnotation":return"empty";case"AnyTypeAnnotation":return"any";case"MixedTypeAnnotation":return"mixed";case"ArrayTypeAnnotation":return concat$2([path.call(print,"elementType"),"[]"]);case"BooleanTypeAnnotation":return"boolean";case"BooleanLiteralTypeAnnotation":return""+n.value;case"DeclareClass":return printFlowDeclaration(path,printClass(path,options,print));case"DeclareFunction":if(n.params){return concat$2(["declare ",printFunctionDeclaration(path,print,options),semi])}return printFlowDeclaration(path,["function ",path.call(print,"id"),n.predicate?" ":"",path.call(print,"predicate"),semi]);case"DeclareModule":return printFlowDeclaration(path,["module ",path.call(print,"id")," ",path.call(print,"body")]);case"DeclareModuleExports":return printFlowDeclaration(path,["module.exports",": ",path.call(print,"typeAnnotation"),semi]);case"DeclareVariable":return printFlowDeclaration(path,["var ",path.call(print,"id"),semi]);case"DeclareExportAllDeclaration":return concat$2(["declare export * from ",path.call(print,"source")]);case"DeclareExportDeclaration":return concat$2(["declare ",printExportDeclaration(path,options,print)]);case"DeclareOpaqueType":case"OpaqueType":{parts.push("opaque type ",path.call(print,"id"),path.call(print,"typeParameters"));if(n.supertype){parts.push(": ",path.call(print,"supertype"))}if(n.impltype){parts.push(" = ",path.call(print,"impltype"))}parts.push(semi);if(n.type==="DeclareOpaqueType"){return printFlowDeclaration(path,parts)}return concat$2(parts)}case"FunctionTypeAnnotation":case"TSFunctionType":{const parent=path.getParentNode(0);const parentParent=path.getParentNode(1);const parentParentParent=path.getParentNode(2);let isArrowFunctionTypeAnnotation=n.type==="TSFunctionType"||!(parent.type==="ObjectTypeProperty"&&!getFlowVariance(parent)&&!parent.optional&&util$5.locStart(parent)===util$5.locStart(n)||parent.type==="ObjectTypeCallProperty"||parentParentParent&&parentParentParent.type==="DeclareFunction");let needsColon=isArrowFunctionTypeAnnotation&&parent.type==="TypeAnnotation";const needsParens=needsColon&&isArrowFunctionTypeAnnotation&&parent.type==="TypeAnnotation"&&parentParent.type==="ArrowFunctionExpression";if(isObjectTypePropertyAFunction(parent)){isArrowFunctionTypeAnnotation=true;needsColon=true}if(needsParens){parts.push("(")}parts.push(printFunctionParams(path,print,options,false,true));if(n.returnType||n.predicate||n.typeAnnotation){parts.push(isArrowFunctionTypeAnnotation?" => ":": ",path.call(print,"returnType"),path.call(print,"predicate"),path.call(print,"typeAnnotation"))}if(needsParens){parts.push(")")}return group$1(concat$2(parts))}case"FunctionTypeParam":return concat$2([path.call(print,"name"),printOptionalToken(path),n.name?": ":"",path.call(print,"typeAnnotation")]);case"GenericTypeAnnotation":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"DeclareInterface":case"InterfaceDeclaration":{if(n.type==="DeclareInterface"||isNodeStartingWithDeclare(n,options)){parts.push("declare ")}parts.push("interface ",path.call(print,"id"),path.call(print,"typeParameters"));if(n["extends"].length>0){parts.push(group$1(indent$2(concat$2([line$1,"extends ",join$2(", ",path.map(print,"extends"))]))))}parts.push(" ");parts.push(path.call(print,"body"));return group$1(concat$2(parts))}case"ClassImplements":case"InterfaceExtends":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"TSIntersectionType":case"IntersectionTypeAnnotation":{const types=path.map(print,"types");const result=[];for(let i=0;i<types.length;++i){if(i===0){result.push(types[i])}else if(!isObjectType(n.types[i-1])&&!isObjectType(n.types[i])){result.push(indent$2(concat$2([" &",line$1,types[i]])))}else{result.push(" & ",i>1?indent$2(types[i]):types[i])}}return group$1(concat$2(result))}case"TSUnionType":case"UnionTypeAnnotation":{const parent=path.getParentNode();const shouldIndent=parent.type!=="TypeParameterInstantiation"&&parent.type!=="GenericTypeAnnotation"&&parent.type!=="TSTypeReference"&&!((parent.type==="TypeAlias"||parent.type==="VariableDeclarator")&&hasLeadingOwnLineComment(options.originalText,n));const shouldHug=shouldHugType(n);const printed=path.map(typePath=>{let printedType=typePath.call(print);if(!shouldHug&&shouldIndent){printedType=align$1(2,printedType)}return comments$3.printComments(typePath,()=>printedType,options)},"types");if(shouldHug){return join$2(" | ",printed)}const code=concat$2([ifBreak$1(concat$2([shouldIndent?line$1:"","| "])),join$2(concat$2([line$1,"| "]),printed)]);return group$1(shouldIndent?indent$2(code):code)}case"NullableTypeAnnotation":return concat$2(["?",path.call(print,"typeAnnotation")]);case"TSNullKeyword":case"NullLiteralTypeAnnotation":return"null";case"ThisTypeAnnotation":return"this";case"NumberTypeAnnotation":return"number";case"ObjectTypeCallProperty":if(n.static){parts.push("static ")}parts.push(path.call(print,"value"));return concat$2(parts);case"ObjectTypeIndexer":{const variance=getFlowVariance(n);return concat$2([variance||"","[",path.call(print,"id"),n.id?": ":"",path.call(print,"key"),"]: ",path.call(print,"value")])}case"ObjectTypeProperty":{const variance=getFlowVariance(n);return concat$2([n.static?"static ":"",isGetterOrSetter(n)?n.kind+" ":"",variance||"",printPropertyKey(path,options,print),printOptionalToken(path),isFunctionNotation(n)?"":": ",path.call(print,"value")])}case"QualifiedTypeIdentifier":return concat$2([path.call(print,"qualification"),".",path.call(print,"id")]);case"StringLiteralTypeAnnotation":return nodeStr(n,options);case"NumberLiteralTypeAnnotation":assert$1.strictEqual(typeof n.value,"number");if(n.extra!=null){return util$5.printNumber(n.extra.raw)}return util$5.printNumber(n.raw);case"StringTypeAnnotation":return"string";case"DeclareTypeAlias":case"TypeAlias":{if(n.type==="DeclareTypeAlias"||isNodeStartingWithDeclare(n,options)){parts.push("declare ")}const canBreak=n.right.type==="StringLiteralTypeAnnotation";const printed=printAssignmentRight(n.right,path.call(print,"right"),canBreak,options);parts.push("type ",path.call(print,"id"),path.call(print,"typeParameters")," =",printed,semi);return group$1(concat$2(parts))}case"TypeCastExpression":return concat$2(["(",path.call(print,"expression"),": ",path.call(print,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return printTypeParameters(path,options,print,"params");case"TypeParameter":{const variance=getFlowVariance(n);if(variance){parts.push(variance)}parts.push(path.call(print,"name"));if(n.bound){parts.push(": ");parts.push(path.call(print,"bound"))}if(n.constraint){parts.push(" extends ",path.call(print,"constraint"))}if(n["default"]){parts.push(" = ",path.call(print,"default"))}return concat$2(parts)}case"TypeofTypeAnnotation":return concat$2(["typeof ",path.call(print,"argument")]);case"VoidTypeAnnotation":return"void";case"InferredPredicate":return"%checks";case"DeclaredPredicate":return concat$2(["%checks(",path.call(print,"value"),")"]);case"TSAbstractKeyword":return"abstract";case"TSAnyKeyword":return"any";case"TSAsyncKeyword":return"async";case"TSBooleanKeyword":return"boolean";case"TSConstKeyword":return"const";case"TSDeclareKeyword":return"declare";case"TSExportKeyword":return"export";case"TSNeverKeyword":return"never";case"TSNumberKeyword":return"number";case"TSObjectKeyword":return"object";case"TSProtectedKeyword":return"protected";case"TSPrivateKeyword":return"private";case"TSPublicKeyword":return"public";case"TSReadonlyKeyword":return"readonly";case"TSSymbolKeyword":return"symbol";case"TSStaticKeyword":return"static";case"TSStringKeyword":return"string";case"TSUndefinedKeyword":return"undefined";case"TSVoidKeyword":return"void";case"TSAsExpression":return concat$2([path.call(print,"expression")," as ",path.call(print,"typeAnnotation")]);case"TSArrayType":return concat$2([path.call(print,"elementType"),"[]"]);case"TSPropertySignature":{if(n.export){parts.push("export ")}if(n.accessibility){parts.push(n.accessibility+" ")}if(n.static){parts.push("static ")}if(n.readonly){parts.push("readonly ")}if(n.computed){parts.push("[")}parts.push(printPropertyKey(path,options,print));if(n.computed){parts.push("]")}parts.push(printOptionalToken(path));if(n.typeAnnotation){parts.push(": ");parts.push(path.call(print,"typeAnnotation"))}if(n.initializer){parts.push(" = ",path.call(print,"initializer"))}return concat$2(parts)}case"TSParameterProperty":if(n.accessibility){parts.push(n.accessibility+" ")}if(n.export){parts.push("export ")}if(n.static){parts.push("static ")}if(n.readonly){parts.push("readonly ")}parts.push(path.call(print,"parameter"));return concat$2(parts);case"TSTypeReference":return concat$2([path.call(print,"typeName"),printTypeParameters(path,options,print,"typeParameters")]);case"TSTypeQuery":return concat$2(["typeof ",path.call(print,"exprName")]);case"TSParenthesizedType":{return path.call(print,"typeAnnotation")}case"TSIndexSignature":{const parent=path.getParentNode();return concat$2([n.export?"export ":"",n.accessibility?concat$2([n.accessibility," "]):"",n.static?"static ":"",n.readonly?"readonly ":"","[",path.call(print,"index"),"]: ",path.call(print,"typeAnnotation"),parent.type==="ClassBody"?semi:""])}case"TSTypePredicate":return concat$2([path.call(print,"parameterName")," is ",path.call(print,"typeAnnotation")]);case"TSNonNullExpression":return concat$2([path.call(print,"expression"),"!"]);case"TSThisType":return"this";case"TSLastTypeNode":return path.call(print,"literal");case"TSIndexedAccessType":return concat$2([path.call(print,"objectType"),"[",path.call(print,"indexType"),"]"]);case"TSConstructSignature":case"TSConstructorType":case"TSCallSignature":{if(n.type!=="TSCallSignature"){parts.push("new ")}parts.push(group$1(printFunctionParams(path,print,options,false,true)));if(n.typeAnnotation){const isType=n.type==="TSConstructorType";parts.push(isType?" => ":": ",path.call(print,"typeAnnotation"))}return concat$2(parts)}case"TSTypeOperator":return concat$2(["keyof ",path.call(print,"typeAnnotation")]);case"TSMappedType":return group$1(concat$2(["{",indent$2(concat$2([options.bracketSpacing?line$1:softline$1,n.readonlyToken?concat$2([path.call(print,"readonlyToken")," "]):"",printTypeScriptModifiers(path,options,print),"[",path.call(print,"typeParameter"),"]",n.questionToken?"?":"",": ",path.call(print,"typeAnnotation")])),comments$3.printDanglingComments(path,options,true),options.bracketSpacing?line$1:softline$1,"}"]));case"TSTypeParameter":parts.push(path.call(print,"name"));if(n.constraint){parts.push(" in ",path.call(print,"constraint"))}return concat$2(parts);case"TSMethodSignature":parts.push(n.accessibility?concat$2([n.accessibility," "]):"",n.export?"export ":"",n.static?"static ":"",n.readonly?"readonly ":"",n.computed?"[":"",path.call(print,"key"),n.computed?"]":"",printOptionalToken(path),printFunctionParams(path,print,options,false,true));if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"))}return group$1(concat$2(parts));case"TSNamespaceExportDeclaration":parts.push("export as namespace ",path.call(print,"name"));if(options.semi){parts.push(";")}return group$1(concat$2(parts));case"TSEnumDeclaration":if(n.modifiers){parts.push(printTypeScriptModifiers(path,options,print))}if(n.const){parts.push("const ")}parts.push("enum ",path.call(print,"id")," ");if(n.members.length===0){parts.push(group$1(concat$2(["{",comments$3.printDanglingComments(path,options),softline$1,"}"])))}else{parts.push(group$1(concat$2(["{",indent$2(concat$2([hardline$2,printArrayItems(path,options,"members",print),shouldPrintComma(options,"es5")?",":""])),comments$3.printDanglingComments(path,options,true),hardline$2,"}"])))}return concat$2(parts);case"TSEnumMember":parts.push(path.call(print,"id"));if(n.initializer){parts.push(" = ",path.call(print,"initializer"))}return concat$2(parts);case"TSImportEqualsDeclaration":parts.push(printTypeScriptModifiers(path,options,print),"import ",path.call(print,"name")," = ",path.call(print,"moduleReference"));if(options.semi){parts.push(";")}return group$1(concat$2(parts));case"TSExternalModuleReference":return concat$2(["require(",path.call(print,"expression"),")"]);case"TSModuleDeclaration":{const parent=path.getParentNode();const isExternalModule=isLiteral(n.id);const parentIsDeclaration=parent.type==="TSModuleDeclaration";const bodyIsDeclaration=n.body&&n.body.type==="TSModuleDeclaration";if(parentIsDeclaration){parts.push(".")}else{if(n.declare===true){parts.push("declare ")}parts.push(printTypeScriptModifiers(path,options,print));const isGlobalDeclaration=n.id.type==="Identifier"&&n.id.name==="global"&&!/namespace|module/.test(options.originalText.slice(util$5.locStart(n),util$5.locStart(n.id)));if(!isGlobalDeclaration){parts.push(isExternalModule?"module ":"namespace ")}}parts.push(path.call(print,"id"));if(bodyIsDeclaration){parts.push(path.call(print,"body"))}else if(n.body){parts.push(" {",indent$2(concat$2([line$1,path.call(bodyPath=>comments$3.printDanglingComments(bodyPath,options,true),"body"),group$1(path.call(print,"body"))])),line$1,"}")}else{parts.push(semi)}return concat$2(parts)}case"TSModuleBlock":return path.call(bodyPath=>{return printStatementSequence(bodyPath,options,print)},"body");default:throw new Error("unknown type: "+JSON.stringify(n.type))}}function printStatementSequence(path,options,print){const printed=[];const bodyNode=path.getNode();const isClass=bodyNode.type==="ClassBody";path.map((stmtPath,i)=>{const stmt=stmtPath.getValue();if(!stmt){return}if(stmt.type==="EmptyStatement"){return}const stmtPrinted=print(stmtPath);const text=options.originalText;const parts=[];if(!options.semi&&!isClass&&stmtNeedsASIProtection(stmtPath)){if(stmt.comments&&stmt.comments.some(comment=>comment.leading)){parts.push(print(stmtPath,{needsSemi:true}))}else{parts.push(";",stmtPrinted)}}else{parts.push(stmtPrinted)}if(!options.semi&&isClass){if(classPropMayCauseASIProblems(stmtPath)){parts.push(";")}else if(stmt.type==="ClassProperty"){const nextChild=bodyNode.body[i+1];if(classChildNeedsASIProtection(nextChild)){parts.push(";")}}}if(util$5.isNextLineEmpty(text,stmt)&&!isLastStatement(stmtPath)){parts.push(hardline$2)}printed.push(concat$2(parts))});return join$2(hardline$2,printed)}function printPropertyKey(path,options,print){const node=path.getNode();const key=node.key;if(isStringLiteral(key)&&isIdentifierName(key.value)&&!node.computed&&options.parser!=="json"){return path.call(keyPath=>comments$3.printComments(keyPath,()=>key.value,options),"key")}return path.call(print,"key")}function printMethod(path,options,print){const node=path.getNode();const semi=options.semi?";":"";const kind=node.kind;const parts=[];if(node.type==="ObjectMethod"||node.type==="ClassMethod"){node.value=node}if(node.value.async){parts.push("async ")}if(!kind||kind==="init"||kind==="method"||kind==="constructor"){if(node.value.generator){parts.push("*")}}else{assert$1.ok(kind==="get"||kind==="set");parts.push(kind," ")}let key=printPropertyKey(path,options,print);if(node.computed){key=concat$2(["[",key,"]"])}parts.push(key,concat$2(path.call(valuePath=>[printFunctionTypeParameters(valuePath,options,print),group$1(concat$2([printFunctionParams(valuePath,print,options),printReturnType(valuePath,print)]))],"value")));if(!node.value.body||node.value.body.length===0){parts.push(semi)}else{parts.push(" ",path.call(print,"value","body"))}return concat$2(parts)}function couldGroupArg(arg){return arg.type==="ObjectExpression"&&arg.properties.length>0||arg.type==="ArrayExpression"&&arg.elements.length>0||arg.type==="TSTypeAssertionExpression"||arg.type==="TSAsExpression"||arg.type==="FunctionExpression"||arg.type==="ArrowFunctionExpression"&&(arg.body.type==="BlockStatement"||arg.body.type==="ArrowFunctionExpression"||arg.body.type==="ObjectExpression"||arg.body.type==="ArrayExpression"||arg.body.type==="CallExpression"||arg.body.type==="JSXElement")}function shouldGroupLastArg(args){const lastArg=util$5.getLast(args);const penultimateArg=util$5.getPenultimate(args);return(!lastArg.comments||!lastArg.comments.length)&&couldGroupArg(lastArg)&&(!penultimateArg||penultimateArg.type!==lastArg.type)}function shouldGroupFirstArg(args){if(args.length!==2){return false}const firstArg=args[0];const secondArg=args[1];return(!firstArg.comments||!firstArg.comments.length)&&(firstArg.type==="FunctionExpression"||firstArg.type==="ArrowFunctionExpression"&&firstArg.body.type==="BlockStatement")&&!couldGroupArg(secondArg)}function printArgumentsList(path,options,print){const printed=path.map(print,"arguments");if(printed.length===0){return concat$2(["(",comments$3.printDanglingComments(path,options,true),")"])}const args=path.getValue().arguments;const shouldGroupFirst=shouldGroupFirstArg(args);const shouldGroupLast=shouldGroupLastArg(args);if(shouldGroupFirst||shouldGroupLast){const shouldBreak=shouldGroupFirst?printed.slice(1).some(willBreak):printed.slice(0,-1).some(willBreak);let printedExpanded;let i=0;path.each(argPath=>{if(shouldGroupFirst&&i===0){printedExpanded=[argPath.call(p=>print(p,{expandFirstArg:true}))].concat(printed.slice(1))}if(shouldGroupLast&&i===args.length-1){printedExpanded=printed.slice(0,-1).concat(argPath.call(p=>print(p,{expandLastArg:true})))}i++},"arguments");return concat$2([printed.some(willBreak)?breakParent$2:"",conditionalGroup$1([concat$2(["(",join$2(concat$2([", "]),printedExpanded),")"]),shouldGroupFirst?concat$2(["(",group$1(printedExpanded[0],{shouldBreak:true}),printed.length>1?", ":"",join$2(concat$2([",",line$1]),printed.slice(1)),")"]):concat$2(["(",join$2(concat$2([",",line$1]),printed.slice(0,-1)),printed.length>1?", ":"",group$1(util$5.getLast(printedExpanded),{shouldBreak:true}),")"]),group$1(concat$2(["(",indent$2(concat$2([line$1,join$2(concat$2([",",line$1]),printed)])),shouldPrintComma(options,"all")?",":"",line$1,")"]),{shouldBreak:true})],{shouldBreak:shouldBreak})])}return group$1(concat$2(["(",indent$2(concat$2([softline$1,join$2(concat$2([",",line$1]),printed)])),ifBreak$1(shouldPrintComma(options,"all")?",":""),softline$1,")"]),{shouldBreak:printed.some(willBreak)})}function printFunctionTypeParameters(path,options,print){const fun=path.getValue();if(fun.typeParameters){return path.call(print,"typeParameters")}return""}function printFunctionParams(path,print,options,expandArg,printTypeParams){const fun=path.getValue();const paramsField=fun.parameters?"parameters":"params";const typeParams=printTypeParams?printFunctionTypeParameters(path,options,print):"";let printed=[];if(fun[paramsField]){printed=path.map(print,paramsField)}if(fun.rest){printed.push(concat$2(["...",path.call(print,"rest")]))}if(printed.length===0){return concat$2([typeParams,"(",comments$3.printDanglingComments(path,options,true),")"])}const lastParam=util$5.getLast(fun[paramsField]);if(expandArg&&!(fun[paramsField]&&fun[paramsField].some(n=>n.comments))){return group$1(concat$2([docUtils.removeLines(typeParams),"(",join$2(", ",printed.map(docUtils.removeLines)),")"]))}if(shouldHugArguments(fun)){return concat$2([typeParams,"(",join$2(", ",printed),")"])}const parent=path.getParentNode();const flowTypeAnnotations=["AnyTypeAnnotation","NullLiteralTypeAnnotation","GenericTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","StringTypeAnnotation"];const isFlowShorthandWithOneArg=(isObjectTypePropertyAFunction(parent)||isTypeAnnotationAFunction(parent)||parent.type==="TypeAlias"||parent.type==="UnionTypeAnnotation"||parent.type==="TSUnionType"||parent.type==="IntersectionTypeAnnotation"||parent.type==="FunctionTypeAnnotation"&&parent.returnType===fun)&&fun[paramsField].length===1&&fun[paramsField][0].name===null&&fun[paramsField][0].typeAnnotation&&fun.typeParameters===null&&flowTypeAnnotations.indexOf(fun[paramsField][0].typeAnnotation.type)!==-1&&!(fun[paramsField][0].typeAnnotation.type==="GenericTypeAnnotation"&&fun[paramsField][0].typeAnnotation.typeParameters)&&!fun.rest;if(isFlowShorthandWithOneArg){return concat$2(printed)}const canHaveTrailingComma=!(lastParam&&lastParam.type==="RestElement")&&!fun.rest;return concat$2([typeParams,"(",indent$2(concat$2([softline$1,join$2(concat$2([",",line$1]),printed)])),ifBreak$1(canHaveTrailingComma&&shouldPrintComma(options,"all")?",":""),softline$1,")"])}function canPrintParamsWithoutParens(node){return node.params.length===1&&!node.rest&&!node.typeParameters&&node.params[0].type==="Identifier"&&!node.params[0].typeAnnotation&&!node.params[0].comments&&!node.params[0].optional&&!node.predicate&&!node.returnType}function printFunctionDeclaration(path,print,options){const n=path.getValue();const parts=[];if(n.async){parts.push("async ")}parts.push("function");if(n.generator){parts.push("*")}if(n.id){parts.push(" ",path.call(print,"id"))}parts.push(printFunctionTypeParameters(path,options,print),group$1(concat$2([printFunctionParams(path,print,options),printReturnType(path,print)])),n.body?" ":"",path.call(print,"body"));return concat$2(parts)}function printObjectMethod(path,options,print){const objMethod=path.getValue();const parts=[];if(objMethod.async){parts.push("async ")}if(objMethod.generator){parts.push("*")}if(objMethod.method||objMethod.kind==="get"||objMethod.kind==="set"){return printMethod(path,options,print)}const key=printPropertyKey(path,options,print);if(objMethod.computed){parts.push("[",key,"]")}else{parts.push(key)}parts.push(printFunctionTypeParameters(path,options,print),group$1(concat$2([printFunctionParams(path,print,options),printReturnType(path,print)]))," ",path.call(print,"body"));return concat$2(parts)}function printReturnType(path,print){const n=path.getValue();const parts=[path.call(print,"returnType")];if(n.returnType&&n.returnType.typeAnnotation){parts.unshift(": ")}if(n.predicate){parts.push(n.returnType?" ":": ",path.call(print,"predicate"))}return concat$2(parts)}function printExportDeclaration(path,options,print){const decl=path.getValue();const semi=options.semi?";":"";const parts=["export "];if(decl["default"]||decl.type==="ExportDefaultDeclaration"){parts.push("default ")}parts.push(comments$3.printDanglingComments(path,options,true));if(decl.declaration){parts.push(path.call(print,"declaration"));if(decl.type==="ExportDefaultDeclaration"&&(decl.declaration.type!=="ClassDeclaration"&&decl.declaration.type!=="FunctionDeclaration"&&decl.declaration.type!=="TSAbstractClassDeclaration"&&decl.declaration.type!=="TSNamespaceFunctionDeclaration")){parts.push(semi)}}else{if(decl.specifiers&&decl.specifiers.length>0){const specifiers=[];const defaultSpecifiers=[];const namespaceSpecifiers=[];path.each(specifierPath=>{const specifierType=path.getValue().type;if(specifierType==="ExportSpecifier"){specifiers.push(print(specifierPath))}else if(specifierType==="ExportDefaultSpecifier"){defaultSpecifiers.push(print(specifierPath))}else if(specifierType==="ExportNamespaceSpecifier"){namespaceSpecifiers.push(concat$2(["* as ",print(specifierPath)]))}},"specifiers");const isNamespaceFollowed=namespaceSpecifiers.length!==0&&(specifiers.length!==0||defaultSpecifiers.length!==0);const isDefaultFollowed=defaultSpecifiers.length!==0&&specifiers.length!==0;parts.push(decl.exportKind==="type"?"type ":"",concat$2(namespaceSpecifiers),concat$2([isNamespaceFollowed?", ":""]),concat$2(defaultSpecifiers),concat$2([isDefaultFollowed?", ":""]),specifiers.length!==0?group$1(concat$2(["{",indent$2(concat$2([options.bracketSpacing?line$1:softline$1,join$2(concat$2([",",line$1]),specifiers)])),ifBreak$1(shouldPrintComma(options)?",":""),options.bracketSpacing?line$1:softline$1,"}"])):"")}else{parts.push("{}")}if(decl.source){parts.push(" from ",path.call(print,"source"))}parts.push(semi)}return concat$2(parts)}function printFlowDeclaration(path,parts){const parentExportDecl=util$5.getParentExportDeclaration(path);if(parentExportDecl){assert$1.strictEqual(parentExportDecl.type,"DeclareExportDeclaration")}else{parts.unshift("declare ")}return concat$2(parts)}function getFlowVariance(path){if(!path.variance){return null}const variance=path.variance.kind||path.variance;switch(variance){case"plus":return"+";case"minus":return"-";default:return variance}}function printTypeScriptModifiers(path,options,print){const n=path.getValue();if(!n.modifiers||!n.modifiers.length){return""}return concat$2([join$2(" ",path.map(print,"modifiers"))," "])}function printTypeParameters(path,options,print,paramsKey){const n=path.getValue();if(!n[paramsKey]){return""}if(!Array.isArray(n[paramsKey])){return path.call(print,paramsKey)}const shouldInline=n[paramsKey].length===1&&(shouldHugType(n[paramsKey][0])||n[paramsKey][0].type==="GenericTypeAnnotation"&&shouldHugType(n[paramsKey][0].id)||n[paramsKey][0].type==="TSTypeReference"&&shouldHugType(n[paramsKey][0].typeName)||n[paramsKey][0].type==="NullableTypeAnnotation");if(shouldInline){return concat$2(["<",join$2(", ",path.map(print,paramsKey)),">"])}return group$1(concat$2(["<",indent$2(concat$2([softline$1,join$2(concat$2([",",line$1]),path.map(print,paramsKey))])),ifBreak$1(options.parser!=="typescript"&&shouldPrintComma(options,"all")?",":""),softline$1,">"]))}function printClass(path,options,print){const n=path.getValue();const parts=[];if(n.type==="TSAbstractClassDeclaration"){parts.push("abstract ")}parts.push("class");if(n.id){parts.push(" ",path.call(print,"id"))}parts.push(path.call(print,"typeParameters"));const partsGroup=[];if(n.superClass){if(hasLeadingOwnLineComment(options.originalText,n.superClass)){parts.push(hardline$2)}else{parts.push(" ")}const printed=concat$2(["extends ",path.call(print,"superClass"),path.call(print,"superTypeParameters")]);parts.push(path.call(superClass=>comments$3.printComments(superClass,()=>printed,options),"superClass"))}else if(n.extends&&n.extends.length>0){parts.push(" extends ",join$2(", ",path.map(print,"extends")))}if(n["implements"]&&n["implements"].length>0){partsGroup.push(line$1,"implements ",group$1(indent$2(join$2(concat$2([",",line$1]),path.map(print,"implements")))))}if(partsGroup.length>0){parts.push(group$1(indent$2(concat$2(partsGroup))))}if(n.body&&n.body.comments&&hasLeadingOwnLineComment(options.originalText,n.body)){parts.push(hardline$2)}else{parts.push(" ")}parts.push(path.call(print,"body"));return parts}function printOptionalToken(path){const node=path.getValue();if(!node.optional){return""}if(node.type==="CallExpression"||node.type==="MemberExpression"&&node.computed){return"?."}return"?"}function printMemberLookup(path,options,print){const property=path.call(print,"property");const n=path.getValue();const optional=printOptionalToken(path);if(!n.computed){return concat$2([optional,".",property])}if(!n.property||isNumericLiteral(n.property)){return concat$2([optional,"[",property,"]"])}return group$1(concat$2([optional,"[",indent$2(concat$2([softline$1,property])),softline$1,"]"]))}function printBindExpressionCallee(path,options,print){return concat$2(["::",path.call(print,"callee")])}function printMemberChain(path,options,print){const printedNodes=[];function rec(path){const node=path.getValue();if(node.type==="CallExpression"&&isMemberish(node.callee)){printedNodes.unshift({node:node,printed:comments$3.printComments(path,()=>concat$2([printOptionalToken(path),printFunctionTypeParameters(path,options,print),printArgumentsList(path,options,print)]),options)});path.call(callee=>rec(callee),"callee")}else if(isMemberish(node)){printedNodes.unshift({node:node,printed:comments$3.printComments(path,()=>node.type==="MemberExpression"?printMemberLookup(path,options,print):printBindExpressionCallee(path,options,print),options)});path.call(object=>rec(object),"object")}else{printedNodes.unshift({node:node,printed:path.call(print)})}}const node=path.getValue();printedNodes.unshift({node:node,printed:concat$2([printOptionalToken(path),printFunctionTypeParameters(path,options,print),printArgumentsList(path,options,print)])});path.call(callee=>rec(callee),"callee");const groups=[];let currentGroup=[printedNodes[0]];let i=1;for(;i<printedNodes.length;++i){if(printedNodes[i].node.type==="CallExpression"){currentGroup.push(printedNodes[i])}else{break}}if(printedNodes[0].node.type!=="CallExpression"){for(;i+1<printedNodes.length;++i){if(isMemberish(printedNodes[i].node)&&isMemberish(printedNodes[i+1].node)){currentGroup.push(printedNodes[i])}else{break}}}groups.push(currentGroup);currentGroup=[];let hasSeenCallExpression=false;for(;i<printedNodes.length;++i){if(hasSeenCallExpression&&isMemberish(printedNodes[i].node)){if(printedNodes[i].node.computed&&isNumericLiteral(printedNodes[i].node.property)){currentGroup.push(printedNodes[i]);continue}groups.push(currentGroup);currentGroup=[];hasSeenCallExpression=false}if(printedNodes[i].node.type==="CallExpression"){hasSeenCallExpression=true}currentGroup.push(printedNodes[i]);if(printedNodes[i].node.comments&&printedNodes[i].node.comments.some(comment=>comment.trailing)){groups.push(currentGroup);currentGroup=[];hasSeenCallExpression=false}}if(currentGroup.length>0){groups.push(currentGroup)}const shouldMerge=groups.length>=2&&!groups[1][0].node.comments&&groups[0].length===1&&(groups[0][0].node.type==="ThisExpression"||groups[0][0].node.type==="Identifier"&&(groups[0][0].node.name.match(/(^[A-Z])|^[_$]+$/)||groups[1].length&&groups[1][0].node.computed));function printGroup(printedGroup){return concat$2(printedGroup.map(tuple=>tuple.printed))}function printIndentedGroup(groups){if(groups.length===0){return""}return indent$2(group$1(concat$2([hardline$2,join$2(hardline$2,groups.map(printGroup))])))}const printedGroups=groups.map(printGroup);const oneLine=concat$2(printedGroups);const cutoff=shouldMerge?3:2;const flatGroups=groups.slice(0,cutoff).reduce((res,group)=>res.concat(group),[]);const hasComment=flatGroups.slice(1,-1).some(node=>hasLeadingComment(node.node))||flatGroups.slice(0,-1).some(node=>hasTrailingComment(node.node))||groups[cutoff]&&hasLeadingComment(groups[cutoff][0].node);if(groups.length<=cutoff&&!hasComment&&groups[0][0].node.type!=="LogicalExpression"){return group$1(oneLine)}const expanded=concat$2([printGroup(groups[0]),shouldMerge?concat$2(groups.slice(1,2).map(printGroup)):"",printIndentedGroup(groups.slice(shouldMerge?2:1))]);const callExpressionCount=printedNodes.filter(tuple=>tuple.node.type==="CallExpression").length;if(hasComment||callExpressionCount>=3||printedGroups.slice(0,-1).some(willBreak)){return group$1(expanded)}return concat$2([willBreak(oneLine)?breakParent$2:"",conditionalGroup$1([oneLine,expanded])])}function isEmptyJSXElement(node){if(node.children.length===0){return true}if(node.children.length>1){return false}const child=node.children[0];return isLiteral(child)&&!isMeaningfulJSXText(child)}const jsxWhitespaceChars=" \n\r\t";const containsNonJsxWhitespaceRegex=new RegExp("[^"+jsxWhitespaceChars+"]");const matchJsxWhitespaceRegex=new RegExp("(["+jsxWhitespaceChars+"]+)");function isMeaningfulJSXText(node){return isLiteral(node)&&(containsNonJsxWhitespaceRegex.test(rawText(node))||!/\n/.test(rawText(node)))}function conditionalExpressionChainContainsJSX(node){return Boolean(getConditionalChainContents(node).find(child=>child.type==="JSXElement"))}function getConditionalChainContents(node){const nonConditionalExpressions=[];function recurse(node){if(node.type==="ConditionalExpression"){recurse(node.test);recurse(node.consequent);recurse(node.alternate)}else{nonConditionalExpressions.push(node)}}recurse(node);return nonConditionalExpressions}function isJSXWhitespaceExpression(node){return node.type==="JSXExpressionContainer"&&isLiteral(node.expression)&&node.expression.value===" "&&!node.expression.comments}function printJSXChildren(path,options,print,jsxWhitespace){const n=path.getValue();const children=[];path.map((childPath,i)=>{const child=childPath.getValue();if(isLiteral(child)){const text=rawText(child);if(isMeaningfulJSXText(child)){const words=text.split(matchJsxWhitespaceRegex);if(words[0]===""){children.push("");words.shift();if(/\n/.test(words[0])){children.push(hardline$2)}else{children.push(jsxWhitespace)}words.shift()}let endWhitespace;if(util$5.getLast(words)===""){words.pop();endWhitespace=words.pop()}if(words.length===0){return}words.forEach((word,i)=>{if(i%2===1){children.push(line$1)}else{children.push(word)}});if(endWhitespace!==undefined){if(/\n/.test(endWhitespace)){children.push(hardline$2)}else{children.push(jsxWhitespace)}}else{children.push("")}}else if(/\n/.test(text)){if(text.match(/\n/g).length>1){children.push("");children.push(hardline$2)}}else{children.push("");children.push(jsxWhitespace)}}else{const printedChild=print(childPath);children.push(printedChild);const next=n.children[i+1];const directlyFollowedByMeaningfulText=next&&isMeaningfulJSXText(next)&&!/^[ \n\r\t]/.test(rawText(next));if(directlyFollowedByMeaningfulText){children.push("")}else{children.push(hardline$2)}}},"children");return children}function printJSXElement(path,options,print){const n=path.getValue();if(isEmptyJSXElement(n)){n.openingElement.selfClosing=true;delete n.closingElement}const openingLines=path.call(print,"openingElement");const closingLines=path.call(print,"closingElement");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression")){return concat$2([openingLines,concat$2(path.map(print,"children")),closingLines])}if(n.openingElement.selfClosing){assert$1.ok(!n.closingElement);return openingLines}n.children=n.children.map(child=>{if(isJSXWhitespaceExpression(child)){return{type:"JSXText",value:" ",raw:" "}}return child});const containsTag=n.children.filter(child=>child.type==="JSXElement").length>0;const containsMultipleExpressions=n.children.filter(child=>child.type==="JSXExpressionContainer").length>1;const containsMultipleAttributes=n.openingElement.attributes.length>1;let forcedBreak=willBreak(openingLines)||containsTag||containsMultipleAttributes||containsMultipleExpressions;const rawJsxWhitespace=options.singleQuote?"{' '}":'{" "}';const jsxWhitespace=ifBreak$1(concat$2([rawJsxWhitespace,softline$1])," ");const children=printJSXChildren(path,options,print,jsxWhitespace);const containsText=n.children.filter(child=>isMeaningfulJSXText(child)).length>0;for(let i=children.length-2;i>=0;i--){const isPairOfEmptyStrings=children[i]===""&&children[i+1]==="";const isPairOfHardlines=children[i]===hardline$2&&children[i+1]===""&&children[i+2]===hardline$2;const isLineFollowedByJSXWhitespace=(children[i]===softline$1||children[i]===hardline$2)&&children[i+1]===""&&children[i+2]===jsxWhitespace;const isJSXWhitespaceFollowedByLine=children[i]===jsxWhitespace&&children[i+1]===""&&(children[i+2]===softline$1||children[i+2]===hardline$2);if(isPairOfHardlines&&containsText||isPairOfEmptyStrings||isLineFollowedByJSXWhitespace){children.splice(i,2)}else if(isJSXWhitespaceFollowedByLine){children.splice(i+1,2)}}while(children.length&&(isLineNext(util$5.getLast(children))||isEmpty(util$5.getLast(children)))){children.pop()}while(children.length&&(isLineNext(children[0])||isEmpty(children[0]))&&(isLineNext(children[1])||isEmpty(children[1]))){children.shift();children.shift()}const multilineChildren=[];children.forEach((child,i)=>{if(child===jsxWhitespace){if(i===1&&children[i-1]===""){if(children.length===2){multilineChildren.push(rawJsxWhitespace);return}multilineChildren.push(concat$2([rawJsxWhitespace,hardline$2]));return}else if(i===children.length-1){multilineChildren.push(rawJsxWhitespace);return}else if(children[i-1]===""&&children[i-2]===hardline$2){multilineChildren.push(rawJsxWhitespace);return}}multilineChildren.push(child);if(willBreak(child)){forcedBreak=true}});const content=containsText?fill$1(multilineChildren):group$1(concat$2(multilineChildren),{shouldBreak:true});const multiLineElem=group$1(concat$2([openingLines,indent$2(concat$2([hardline$2,content])),hardline$2,closingLines]));if(forcedBreak){return multiLineElem}return conditionalGroup$1([group$1(concat$2([openingLines,concat$2(children),closingLines])),multiLineElem])}function maybeWrapJSXElementInParens(path,elem){const parent=path.getParentNode();if(!parent){return elem}const NO_WRAP_PARENTS={ArrayExpression:true,JSXElement:true,JSXExpressionContainer:true,ExpressionStatement:true,CallExpression:true,ConditionalExpression:true};if(NO_WRAP_PARENTS[parent.type]){return elem}return group$1(concat$2([ifBreak$1("("),indent$2(concat$2([softline$1,elem])),softline$1,ifBreak$1(")")]))}function isBinaryish(node){return node.type==="BinaryExpression"||node.type==="LogicalExpression"}function isMemberish(node){return node.type==="MemberExpression"||node.type==="BindExpression"&&node.object}function shouldInlineLogicalExpression(node){if(node.type!=="LogicalExpression"){return false}if(node.right.type==="ObjectExpression"&&node.right.properties.length!==0){return true}if(node.right.type==="ArrayExpression"&&node.right.elements.length!==0){return true}if(node.right.type==="JSXElement"){return true}return false}function printBinaryishExpressions(path,print,options,isNested,isInsideParenthesis){let parts=[];const node=path.getValue();if(isBinaryish(node)){if(util$5.shouldFlatten(node.operator,node.left.operator)){parts=parts.concat(path.call(left=>printBinaryishExpressions(left,print,options,true,isInsideParenthesis),"left"))}else{parts.push(path.call(print,"left"))}const right=concat$2([node.operator,shouldInlineLogicalExpression(node)?" ":line$1,path.call(print,"right")]);const parent=path.getParentNode();const shouldGroup=!(isInsideParenthesis&&node.type==="LogicalExpression")&&parent.type!==node.type&&node.left.type!==node.type&&node.right.type!==node.type;parts.push(" ",shouldGroup?group$1(right):right);if(isNested&&node.comments){parts=comments$3.printComments(path,()=>concat$2(parts),options)}}else{parts.push(path.call(print))}return parts}function printAssignmentRight(rightNode,printedRight,canBreak,options){if(hasLeadingOwnLineComment(options.originalText,rightNode)){return indent$2(concat$2([hardline$2,printedRight]))}if(canBreak){return indent$2(concat$2([line$1,printedRight]))}return concat$2([" ",printedRight])}function printAssignment(leftNode,printedLeft,operator,rightNode,printedRight,options){if(!rightNode){return printedLeft}const canBreak=isBinaryish(rightNode)&&!shouldInlineLogicalExpression(rightNode)||rightNode.type==="ConditionalExpression"&&isBinaryish(rightNode.test)&&!shouldInlineLogicalExpression(rightNode.test)||(leftNode.type==="Identifier"||isStringLiteral(leftNode)||leftNode.type==="MemberExpression")&&(isStringLiteral(rightNode)||isMemberExpressionChain(rightNode));const printed=printAssignmentRight(rightNode,printedRight,canBreak,options);return group$1(concat$2([printedLeft,operator,printed]))}function adjustClause(node,clause,forceSpace){if(node.type==="EmptyStatement"){return";"}if(node.type==="BlockStatement"||forceSpace){return concat$2([" ",clause])}return indent$2(concat$2([line$1,clause]))}function nodeStr(node,options,isFlowOrTypeScriptDirectiveLiteral){const raw=rawText(node);const isDirectiveLiteral=isFlowOrTypeScriptDirectiveLiteral||node.type==="DirectiveLiteral";return util$5.printString(raw,options,isDirectiveLiteral)}function printRegex(node){const flags=node.flags.split("").sort().join("");return`/${node.pattern}/${flags}`}function isLastStatement(path){const parent=path.getParentNode();if(!parent){return true}const node=path.getValue();const body=(parent.body||parent.consequent).filter(stmt=>stmt.type!=="EmptyStatement");return body&&body[body.length-1]===node}function hasLeadingComment(node){return node.comments&&node.comments.some(comment=>comment.leading)}function hasTrailingComment(node){return node.comments&&node.comments.some(comment=>comment.trailing)}function hasLeadingOwnLineComment(text,node){if(node.type==="JSXElement"){return hasNodeIgnoreComment(node)}const res=node.comments&&node.comments.some(comment=>comment.leading&&util$5.hasNewline(text,util$5.locEnd(comment)));return res}function hasNakedLeftSide(node){return node.type==="AssignmentExpression"||node.type==="BinaryExpression"||node.type==="LogicalExpression"||node.type==="ConditionalExpression"||node.type==="CallExpression"||node.type==="MemberExpression"||node.type==="SequenceExpression"||node.type==="TaggedTemplateExpression"||node.type==="BindExpression"&&!node.object||node.type==="UpdateExpression"&&!node.prefix}function getLeftSide(node){if(node.expressions){return node.expressions[0]}return node.left||node.test||node.callee||node.object||node.tag||node.argument||node.expression}function exprNeedsASIProtection(node){const maybeASIProblem=node.needsParens||node.type==="ParenthesizedExpression"||node.type==="TypeCastExpression"||node.type==="ArrowFunctionExpression"&&!canPrintParamsWithoutParens(node)||node.type==="ArrayExpression"||node.type==="ArrayPattern"||node.type==="UnaryExpression"&&node.prefix&&(node.operator==="+"||node.operator==="-")||node.type==="TemplateLiteral"||node.type==="TemplateElement"||node.type==="JSXElement"||node.type==="BindExpression"||node.type==="RegExpLiteral"||node.type==="Literal"&&node.pattern||node.type==="Literal"&&node.regex;if(maybeASIProblem){return true}if(!hasNakedLeftSide(node)){return false}return exprNeedsASIProtection(getLeftSide(node))}function stmtNeedsASIProtection(path){const node=path.getNode();if(node.type!=="ExpressionStatement"){return false}return exprNeedsASIProtection(node.expression)}function classPropMayCauseASIProblems(path){const node=path.getNode();if(node.type!=="ClassProperty"){return false}const name=node.key&&node.key.name;if((name==="static"||name==="get"||name==="set")&&!node.typeAnnotation){return true}}function classChildNeedsASIProtection(node){if(!node){return}if(!node.computed){const name=node.key&&node.key.name;if(name==="in"||name==="instanceof"){return true}}switch(node.type){case"ClassProperty":case"TSAbstractClassProperty":return node.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":{const isAsync=node.value?node.value.async:node.async;const isGenerator=node.value?node.value.generator:node.generator;if(isAsync||node.static||node.kind==="get"||node.kind==="set"){return false}if(node.computed||isGenerator){return true}return false}default:return false}}function returnArgumentHasLeadingComment(options,argument){if(hasLeadingOwnLineComment(options.originalText,argument)){return true}if(hasNakedLeftSide(argument)){let leftMost=argument;let newLeftMost;while(newLeftMost=getLeftSide(leftMost)){leftMost=newLeftMost;if(hasLeadingOwnLineComment(options.originalText,leftMost)){return true}}}return false}function isMemberExpressionChain(node){if(node.type!=="MemberExpression"){return false}if(node.object.type==="Identifier"){return true}return isMemberExpressionChain(node.object)}function isObjectTypePropertyAFunction(node){return node.type==="ObjectTypeProperty"&&node.value.type==="FunctionTypeAnnotation"&&!node.static&&!isFunctionNotation(node)}function isFunctionNotation(node){return isGetterOrSetter(node)||sameLocStart(node,node.value)}function isGetterOrSetter(node){return node.kind==="get"||node.kind==="set"}function sameLocStart(nodeA,nodeB){return util$5.locStart(nodeA)===util$5.locStart(nodeB)}function isTypeAnnotationAFunction(node){return node.type==="TypeAnnotation"&&node.typeAnnotation.type==="FunctionTypeAnnotation"&&!node.static&&!sameLocStart(node,node.typeAnnotation)}function isNodeStartingWithDeclare(node,options){if(!(options.parser==="flow"||options.parser==="typescript")){return false}return options.originalText.slice(0,util$5.locStart(node)).match(/declare[ \t]*$/)||options.originalText.slice(node.range[0],node.range[1]).startsWith("declare ")}function shouldHugType(node){if(isObjectType(node)){return true}if(node.type==="UnionTypeAnnotation"||node.type==="TSUnionType"){const voidCount=node.types.filter(n=>n.type==="VoidTypeAnnotation"||n.type==="TSVoidKeyword"||n.type==="NullLiteralTypeAnnotation"||n.type==="TSNullKeyword").length;const objectCount=node.types.filter(n=>n.type==="ObjectTypeAnnotation"||n.type==="TSTypeLiteral"||n.type==="GenericTypeAnnotation"||n.type==="TSTypeReference").length;if(node.types.length-1===voidCount&&objectCount>0){return true}}return false}function shouldHugArguments(fun){return fun&&fun.params&&fun.params.length===1&&!fun.params[0].comments&&(fun.params[0].type==="ObjectPattern"||fun.params[0].type==="Identifier"&&fun.params[0].typeAnnotation&&fun.params[0].typeAnnotation.type==="TypeAnnotation"&&isObjectType(fun.params[0].typeAnnotation.typeAnnotation)||fun.params[0].type==="FunctionTypeParam"&&isObjectType(fun.params[0].typeAnnotation))&&!fun.rest}function templateLiteralHasNewLines(template){return template.quasis.some(quasi=>quasi.value.raw.includes("\n"))}function isTemplateOnItsOwnLine(n,text){return(n.type==="TemplateLiteral"&&templateLiteralHasNewLines(n)||n.type==="TaggedTemplateExpression"&&templateLiteralHasNewLines(n.quasi))&&!util$5.hasNewline(text,util$5.locStart(n),{backwards:true})}function printArrayItems(path,options,printPath,print){const printedElements=[];let separatorParts=[];path.each(childPath=>{printedElements.push(concat$2(separatorParts));printedElements.push(group$1(print(childPath)));separatorParts=[",",line$1];if(childPath.getValue()&&util$5.isNextLineEmpty(options.originalText,childPath.getValue())){separatorParts.push(softline$1)}},printPath);return concat$2(printedElements)}function hasDanglingComments(node){return node.comments&&node.comments.some(comment=>!comment.leading&&!comment.trailing)}function isLiteral(node){return node.type==="BooleanLiteral"||node.type==="DirectiveLiteral"||node.type==="Literal"||node.type==="NullLiteral"||node.type==="NumericLiteral"||node.type==="RegExpLiteral"||node.type==="StringLiteral"||node.type==="TemplateLiteral"||node.type==="TSTypeLiteral"||node.type==="JSXText"}function isNumericLiteral(node){return node.type==="NumericLiteral"||node.type==="Literal"&&typeof node.value==="number"}function isStringLiteral(node){return node.type==="StringLiteral"||node.type==="Literal"&&typeof node.value==="string"}function isObjectType(n){return n.type==="ObjectTypeAnnotation"||n.type==="TSTypeLiteral"}function printAstToDoc$1(ast,options,addAlignmentSize){addAlignmentSize=addAlignmentSize||0;const cache=new Map;function printGenerically(path,args){const node=path.getValue();const shouldCache=node&&typeof node==="object"&&args===undefined;if(shouldCache&&cache.has(node)){return cache.get(node)}const parent=path.getParentNode(0);let res;if((node&&node.type==="JSXElement"||parent&&(parent.type==="UnionTypeAnnotation"||parent.type==="TSUnionType"||(parent.type==="ClassDeclaration"||parent.type==="ClassExpression")&&parent.superClass===node))&&!hasIgnoreComment(path)){res=genericPrint(path,options,printGenerically,args)}else{res=comments$3.printComments(path,p=>genericPrint(p,options,printGenerically,args),options,args&&args.needsSemi)}if(shouldCache){cache.set(node,res)}return res}let doc=printGenerically(new FastPath(ast));if(addAlignmentSize>0){doc=addAlignmentToDoc$1(docUtils.removeLines(concat$2([hardline$2,doc])),addAlignmentSize,options.tabWidth)}docUtils.propagateBreaks(doc);if(options.parser==="json"){doc=concat$2([doc,hardline$2])}return doc}var printer={printAstToDoc:printAstToDoc$1};const docBuilders$8=docBuilders$1;const concat$7=docBuilders$8.concat;const fill$3=docBuilders$8.fill;const cursor$2=docBuilders$8.cursor;const MODE_BREAK=1;const MODE_FLAT=2;function rootIndent(){return{indent:0,align:{spaces:0,tabs:0}}}function makeIndent(ind){return{indent:ind.indent+1,align:ind.align}}function makeAlign(ind,n){if(n===-Infinity){return{indent:0,align:{spaces:0,tabs:0}}}return{indent:ind.indent,align:{spaces:ind.align.spaces+n,tabs:ind.align.tabs+(n?1:0)}}}function fits(next,restCommands,width,mustBeFlat){let restIdx=restCommands.length;const cmds=[next];while(width>=0){if(cmds.length===0){if(restIdx===0){return true}cmds.push(restCommands[restIdx-1]);restIdx--;continue}const x=cmds.pop();const ind=x[0];const mode=x[1];const doc=x[2];if(typeof doc==="string"){width-=doc.length}else{switch(doc.type){case"concat":for(let i=doc.parts.length-1;i>=0;i--){cmds.push([ind,mode,doc.parts[i]])}break;case"indent":cmds.push([makeIndent(ind),mode,doc.contents]);break;case"align":cmds.push([makeAlign(ind,doc.n),mode,doc.contents]);break;case"group":if(mustBeFlat&&doc.break){return false}cmds.push([ind,doc.break?MODE_BREAK:mode,doc.contents]);break;case"fill":for(let i=doc.parts.length-1;i>=0;i--){cmds.push([ind,mode,doc.parts[i]])}break;case"if-break":if(mode===MODE_BREAK){if(doc.breakContents){cmds.push([ind,mode,doc.breakContents])}}if(mode===MODE_FLAT){if(doc.flatContents){cmds.push([ind,mode,doc.flatContents])}}break;case"line":switch(mode){case MODE_FLAT:if(!doc.hard){if(!doc.soft){width-=1}break}return true;case MODE_BREAK:return true}break}}}return false}function printDocToString$1(doc,options){const width=options.printWidth;const newLine=options.newLine||"\n";let pos=0;const cmds=[[rootIndent(),MODE_BREAK,doc]];const out=[];let shouldRemeasure=false;let lineSuffix=[];while(cmds.length!==0){const x=cmds.pop();const ind=x[0];const mode=x[1];const doc=x[2];if(typeof doc==="string"){out.push(doc);pos+=doc.length}else{switch(doc.type){case"cursor":out.push(cursor$2.placeholder);break;case"concat":for(let i=doc.parts.length-1;i>=0;i--){cmds.push([ind,mode,doc.parts[i]])}break;case"indent":cmds.push([makeIndent(ind),mode,doc.contents]);break;case"align":cmds.push([makeAlign(ind,doc.n),mode,doc.contents]);break;case"group":switch(mode){case MODE_FLAT:if(!shouldRemeasure){cmds.push([ind,doc.break?MODE_BREAK:MODE_FLAT,doc.contents]);break}case MODE_BREAK:{shouldRemeasure=false;const next=[ind,MODE_FLAT,doc.contents];const rem=width-pos;if(!doc.break&&fits(next,cmds,rem)){cmds.push(next)}else{if(doc.expandedStates){const mostExpanded=doc.expandedStates[doc.expandedStates.length-1];if(doc.break){cmds.push([ind,MODE_BREAK,mostExpanded]);break}else{for(let i=1;i<doc.expandedStates.length+1;i++){if(i>=doc.expandedStates.length){cmds.push([ind,MODE_BREAK,mostExpanded]);break}else{const state=doc.expandedStates[i];const cmd=[ind,MODE_FLAT,state];if(fits(cmd,cmds,rem)){cmds.push(cmd);break}}}}}else{cmds.push([ind,MODE_BREAK,doc.contents])}}break}}break;case"fill":{const rem=width-pos;const parts=doc.parts;if(parts.length===0){break}const content=parts[0];const contentFlatCmd=[ind,MODE_FLAT,content];const contentBreakCmd=[ind,MODE_BREAK,content];const contentFits=fits(contentFlatCmd,[],width-rem,true);if(parts.length===1){if(contentFits){cmds.push(contentFlatCmd)}else{cmds.push(contentBreakCmd)}break}const whitespace=parts[1];const whitespaceFlatCmd=[ind,MODE_FLAT,whitespace];const whitespaceBreakCmd=[ind,MODE_BREAK,whitespace];if(parts.length===2){if(contentFits){cmds.push(whitespaceFlatCmd);cmds.push(contentFlatCmd)}else{cmds.push(whitespaceBreakCmd);cmds.push(contentBreakCmd)}break}const remaining=parts.slice(2);const remainingCmd=[ind,mode,fill$3(remaining)];const secondContent=parts[2];const firstAndSecondContentFlatCmd=[ind,MODE_FLAT,concat$7([content,whitespace,secondContent])];const firstAndSecondContentFits=fits(firstAndSecondContentFlatCmd,[],rem,true);if(firstAndSecondContentFits){cmds.push(remainingCmd);cmds.push(whitespaceFlatCmd);cmds.push(contentFlatCmd)}else if(contentFits){cmds.push(remainingCmd);cmds.push(whitespaceBreakCmd);cmds.push(contentFlatCmd)}else{cmds.push(remainingCmd);cmds.push(whitespaceBreakCmd);cmds.push(contentBreakCmd)}break}case"if-break":if(mode===MODE_BREAK){if(doc.breakContents){cmds.push([ind,mode,doc.breakContents])}}if(mode===MODE_FLAT){if(doc.flatContents){cmds.push([ind,mode,doc.flatContents])}}break;case"line-suffix":lineSuffix.push([ind,mode,doc.contents]);break;case"line-suffix-boundary":if(lineSuffix.length>0){cmds.push([ind,mode,{type:"line",hard:true}])}break;case"line":switch(mode){case MODE_FLAT:if(!doc.hard){if(!doc.soft){out.push(" ");pos+=1}break}else{shouldRemeasure=true}case MODE_BREAK:if(lineSuffix.length){cmds.push([ind,mode,doc]);[].push.apply(cmds,lineSuffix.reverse());lineSuffix=[];break}if(doc.literal){out.push(newLine);pos=0}else{if(out.length>0){while(out.length>0&&out[out.length-1].match(/^[^\S\n]*$/)){out.pop()}if(out.length){out[out.length-1]=out[out.length-1].replace(/[^\S\n]*$/,"")}}const length=ind.indent*options.tabWidth+ind.align.spaces;const indentString=options.useTabs?"\t".repeat(ind.indent+ind.align.tabs):" ".repeat(length);out.push(newLine+indentString);pos=length}break}break;default:}}}const cursorPlaceholderIndex=out.indexOf(cursor$2.placeholder);if(cursorPlaceholderIndex!==-1){const beforeCursor=out.slice(0,cursorPlaceholderIndex).join("");const afterCursor=out.slice(cursorPlaceholderIndex+1).join("");return{formatted:beforeCursor+afterCursor,cursor:beforeCursor.length}}return{formatted:out.join("")}}var docPrinter={printDocToString:printDocToString$1};var index$26=createCommonjsModule(function(module){"use strict";function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"["+style[0]+"m",close:"["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});var argv$1=process.argv;var terminator$1=argv$1.indexOf("--");var hasFlag$1=function(flag){flag="--"+flag;var pos=argv$1.indexOf(flag);return pos!==-1&&(terminator$1!==-1?pos<terminator$1:true)};var index$28=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag$1("no-color")||hasFlag$1("no-colors")||hasFlag$1("color=false")){return false}if(hasFlag$1("color")||hasFlag$1("colors")||hasFlag$1("color=true")||hasFlag$1("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}();var escapeStringRegexp$1=index$10;var ansiStyles$1=index$26;var stripAnsi$1=index$14;var hasAnsi$1=index$18;var supportsColor$1=index$28;var defineProps$1=Object.defineProperties;var isSimpleWindowsTerm$1=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk$1(options){this.enabled=!options||options.enabled===undefined?supportsColor$1:options.enabled}if(isSimpleWindowsTerm$1){ansiStyles$1.blue.open=""}var styles$1=function(){var ret={};Object.keys(ansiStyles$1).forEach(function(key){ansiStyles$1[key].closeRe=new RegExp(escapeStringRegexp$1(ansiStyles$1[key].close),"g");ret[key]={get:function(){return build$1.call(this,this._styles.concat(key))}}});return ret}();var proto$1=defineProps$1(function chalk(){},styles$1);function build$1(_styles){var builder=function(){return applyStyle$1.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto$1;return builder}function applyStyle$1(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||!str){return str}var nestedStyles=this._styles;var i=nestedStyles.length;var originalDim=ansiStyles$1.dim.open;if(isSimpleWindowsTerm$1&&(nestedStyles.indexOf("gray")!==-1||nestedStyles.indexOf("grey")!==-1)){ansiStyles$1.dim.open=""}while(i--){var code=ansiStyles$1[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}ansiStyles$1.dim.open=originalDim;return str}function init$1(){var ret={};Object.keys(styles$1).forEach(function(name){ret[name]={get:function(){return build$1.call(this,[name])}}});return ret}defineProps$1(Chalk$1.prototype,init$1());var index$24=new Chalk$1;var styles_1$1=ansiStyles$1;var hasColor$1=hasAnsi$1;var stripColor$1=stripAnsi$1;var supportsColor_1$1=supportsColor$1;index$24.styles=styles_1$1;index$24.hasColor=hasColor$1;index$24.stripColor=stripColor$1;index$24.supportsColor=supportsColor_1$1;var index$34=createCommonjsModule(function(module){"use strict";function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"["+style[0]+"m",close:"["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});var argv$2=process.argv;var terminator$2=argv$2.indexOf("--");var hasFlag$2=function(flag){flag="--"+flag;var pos=argv$2.indexOf(flag);return pos!==-1&&(terminator$2!==-1?pos<terminator$2:true)};var index$36=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag$2("no-color")||hasFlag$2("no-colors")||hasFlag$2("color=false")){return false}if(hasFlag$2("color")||hasFlag$2("colors")||hasFlag$2("color=true")||hasFlag$2("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}();var escapeStringRegexp$2=index$10;var ansiStyles$2=index$34;var stripAnsi$2=index$14;var hasAnsi$2=index$18;var supportsColor$2=index$36;var defineProps$2=Object.defineProperties;var isSimpleWindowsTerm$2=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk$2(options){this.enabled=!options||options.enabled===undefined?supportsColor$2:options.enabled}if(isSimpleWindowsTerm$2){ansiStyles$2.blue.open=""}var styles$2=function(){var ret={};Object.keys(ansiStyles$2).forEach(function(key){ansiStyles$2[key].closeRe=new RegExp(escapeStringRegexp$2(ansiStyles$2[key].close),"g");ret[key]={get:function(){return build$2.call(this,this._styles.concat(key))}}});return ret}();var proto$2=defineProps$2(function chalk(){},styles$2);function build$2(_styles){var builder=function(){return applyStyle$2.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto$2;return builder}function applyStyle$2(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||!str){return str}var nestedStyles=this._styles;var i=nestedStyles.length;var originalDim=ansiStyles$2.dim.open;if(isSimpleWindowsTerm$2&&(nestedStyles.indexOf("gray")!==-1||nestedStyles.indexOf("grey")!==-1)){ansiStyles$2.dim.open=""}while(i--){var code=ansiStyles$2[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}ansiStyles$2.dim.open=originalDim;return str}function init$2(){var ret={};Object.keys(styles$2).forEach(function(name){ret[name]={get:function(){return build$2.call(this,[name])}}});return ret}defineProps$2(Chalk$2.prototype,init$2());var index$32=new Chalk$2;var styles_1$2=ansiStyles$2;var hasColor$2=hasAnsi$2;var stripColor$2=stripAnsi$2;var supportsColor_1$2=supportsColor$2;index$32.styles=styles_1$2;index$32.hasColor=hasColor$2;index$32.stripColor=stripColor$2;index$32.supportsColor=supportsColor_1$2;var index$44={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var conversions$1=createCommonjsModule(function(module){var cssKeywords=index$44;var reverseKeywords={};for(var key in cssKeywords){if(cssKeywords.hasOwnProperty(key)){reverseKeywords[cssKeywords[key]]=key}}var convert=module.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var model in convert){if(convert.hasOwnProperty(model)){if(!("channels"in convert[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert[model])){throw new Error("missing channel labels property: "+model)}if(convert[model].labels.length!==convert[model].channels){throw new Error("channel and label counts mismatch: "+model)}var channels=convert[model].channels;var labels=convert[model].labels;delete convert[model].channels;delete convert[model].labels;Object.defineProperty(convert[model],"channels",{value:channels});Object.defineProperty(convert[model],"labels",{value:labels})}}convert.rgb.hsl=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var l;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}l=(min+max)/2;if(max===min){s=0}else if(l<=.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var v;if(max===0){s=0}else{s=delta/max*1e3/10}if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}v=max/255*1e3/10;return[h,s,v]};convert.rgb.hwb=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var h=convert.rgb.hsl(rgb)[0];var w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var c;var m;var y;var k;k=Math.min(1-r,1-g,1-b);c=(1-r-k)/(1-k)||0;m=(1-g-k)/(1-k)||0;y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return Math.pow(x[0]-y[0],2)+Math.pow(x[1]-y[1],2)+Math.pow(x[2]-y[2],2)}convert.rgb.keyword=function(rgb){var reversed=reverseKeywords[rgb];if(reversed){return reversed}var currentClosestDistance=Infinity;var currentClosestKeyword;for(var keyword in cssKeywords){if(cssKeywords.hasOwnProperty(keyword)){var value=cssKeywords[keyword];var distance=comparativeDistance(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}}return currentClosestKeyword};convert.keyword.rgb=function(keyword){return cssKeywords[keyword]};convert.rgb.xyz=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92;var x=r*.4124+g*.3576+b*.1805;var y=r*.2126+g*.7152+b*.0722;var z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){var xyz=convert.rgb.xyz(rgb);var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){var h=hsl[0]/360;var s=hsl[1]/100;var l=hsl[2]/100;var t1;var t2;var t3;var rgb;var val;if(s===0){val=l*255;return[val,val,val]}if(l<.5){t2=l*(1+s)}else{t2=l+s-l*s}t1=2*l-t2;rgb=[0,0,0];for(var i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){var h=hsl[0];var s=hsl[1]/100;var l=hsl[2]/100;var smin=s;var lmin=Math.max(l,.01);var sv;var v;l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;v=(l+s)/2;sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){var h=hsv[0]/60;var s=hsv[1]/100;var v=hsv[2]/100;var hi=Math.floor(h)%6;var f=h-Math.floor(h);var p=255*v*(1-s);var q=255*v*(1-s*f);var t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}};convert.hsv.hsl=function(hsv){var h=hsv[0];var s=hsv[1]/100;var v=hsv[2]/100;var vmin=Math.max(v,.01);var lmin;var sl;var l;l=(2-s)*v;lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){var h=hwb[0]/360;var wh=hwb[1]/100;var bl=hwb[2]/100;var ratio=wh+bl;var i;var v;var f;var n;if(ratio>1){wh/=ratio;bl/=ratio}i=Math.floor(6*h);v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}n=wh+f*(v-wh);var r;var g;var b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){var c=cmyk[0]/100;var m=cmyk[1]/100;var y=cmyk[2]/100;var k=cmyk[3]/100;var r;var g;var b;r=1-Math.min(1,c*(1-k)+k);g=1-Math.min(1,m*(1-k)+k);b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){var x=xyz[0]/100;var y=xyz[1]/100;var z=xyz[2]/100;var r;var g;var b;r=x*3.2406+y*-1.5372+z*-.4986;g=x*-.9689+y*1.8758+z*.0415;b=x*.0557+y*-.204+z*1.057;r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92;g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*12.92;b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var x;var y;var z;y=(l+16)/116;x=a/500+y;z=y-b/200;var y2=Math.pow(y,3);var x2=Math.pow(x,3);var z2=Math.pow(z,3);y=y2>.008856?y2:(y-16/116)/7.787;x=x2>.008856?x2:(x-16/116)/7.787;z=z2>.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert.lab.lch=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var hr;var h;var c;hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){var l=lch[0];var c=lch[1];var h=lch[2];var a;var b;var hr;hr=h/360*2*Math.PI;a=c*Math.cos(hr);b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args){var r=args[0];var g=args[1];var b=args[2];var value=1 in arguments?arguments[1]:convert.rgb.hsv(args)[2];value=Math.round(value/50);if(value===0){return 30}var ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){var r=args[0];var g=args[1];var b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){var color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}var mult=(~~(args>50)+1)*.5;var r=(color&1)*mult*255;var g=(color>>1&1)*mult*255;var b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){var c=(args-232)*10+8;return[c,c,c]}args-=16;var rem;var r=Math.floor(args/36)/5*255;var g=Math.floor((rem=args%36)/6)/5*255;var b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){var integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){var match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}var colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map(function(char){return char+char}).join("")}var integer=parseInt(colorString,16);var r=integer>>16&255;var g=integer>>8&255;var b=integer&255;return[r,g,b]};convert.rgb.hcg=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var max=Math.max(Math.max(r,g),b);var min=Math.min(Math.min(r,g),b);var chroma=max-min;var grayscale;var hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma+4}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert.hsl.hcg=function(hsl){var s=hsl[1]/100;var l=hsl[2]/100;var c=1;var f=0;if(l<.5){c=2*s*l}else{c=2*s*(1-l)}if(c<1){f=(l-.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert.hsv.hcg=function(hsv){var s=hsv[1]/100;var v=hsv[2]/100;var c=s*v;var f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert.hcg.rgb=function(hcg){var h=hcg[0]/360;var c=hcg[1]/100;var g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}var pure=[0,0,0];var hi=h%1*6;var v=hi%1;var w=1-v;var mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert.hcg.hsv=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);var f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert.hcg.hsl=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var l=g*(1-c)+.5*c;var s=0;if(l>0&&l<.5){s=c/(2*l)}else if(l>=.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert.hcg.hwb=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert.hwb.hcg=function(hwb){var w=hwb[1]/100;var b=hwb[2]/100;var v=1-b;var c=v-w;var g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert.gray.hsl=convert.gray.hsv=function(args){return[0,0,args[0]]};convert.gray.hwb=function(gray){return[0,100,gray[0]]};convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert.gray.lab=function(gray){return[gray[0],0,0]};convert.gray.hex=function(gray){var val=Math.round(gray[0]/100*255)&255;var integer=(val<<16)+(val<<8)+val;var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.rgb.gray=function(rgb){var val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]}});var conversions$3=conversions$1;var models$1=Object.keys(conversions$3);function buildGraph(){var graph={};for(var len=models$1.length,i=0;i<len;i++){graph[models$1[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){var graph=buildGraph();var queue=[fromModel];graph[fromModel].distance=0;while(queue.length){var current=queue.pop();var adjacents=Object.keys(conversions$3[current]);for(var len=adjacents.length,i=0;i<len;i++){var adjacent=adjacents[i];var node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){var path=[graph[toModel].parent,toModel];var fn=conversions$3[graph[toModel].parent][toModel];var cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions$3[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}var route$1=function(fromModel){var graph=deriveBFS(fromModel);var conversion={};var models=Object.keys(graph);for(var len=models.length,i=0;i<len;i++){var toModel=models[i];var node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion};var conversions=conversions$1;var route=route$1;var convert={};var models=Object.keys(conversions);function wrapRaw(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}var result=fn(args);if(typeof result==="object"){for(var len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach(function(fromModel){convert[fromModel]={};Object.defineProperty(convert[fromModel],"channels",{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],"labels",{value:conversions[fromModel].labels});var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach(function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn)})});var index$42=convert;var index$40=createCommonjsModule(function(module){"use strict";const colorConvert=index$42;const wrapAnsi16=(fn,offset)=>(function(){const code=fn.apply(colorConvert,arguments);return`[${code+offset}m`});const wrapAnsi256=(fn,offset)=>(function(){const code=fn.apply(colorConvert,arguments);return`[${38+offset};5;${code}m`});const wrapAnsi16m=(fn,offset)=>(function(){const rgb=fn.apply(colorConvert,arguments);return`[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`});function assembleStyles(){const styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.grey=styles.color.gray;Object.keys(styles).forEach(groupName=>{const group=styles[groupName];Object.keys(group).forEach(styleName=>{const style=group[styleName];styles[styleName]={open:`[${style[0]}m`,close:`[${style[1]}m`};group[styleName]=styles[styleName]});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});const rgb2rgb=(r,g,b)=>[r,g,b];styles.color.close="";styles.bgColor.close="";styles.color.ansi={};styles.color.ansi256={};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={};styles.bgColor.ansi256={};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};for(const key of Object.keys(colorConvert)){if(typeof colorConvert[key]!=="object"){continue}const suite=colorConvert[key];if("ansi16"in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10)}if("ansi256"in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10)}if("rgb"in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10)}}return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});const asymmetricMatcher=Symbol.for("jest.asymmetricMatcher");const SPACE=" ";class ArrayContaining extends Array{}class ObjectContaining extends Object{}const print$1=(val,print,indent,opts,colors)=>{const stringedValue=val.toString();if(stringedValue==="ArrayContaining"){const array=ArrayContaining.from(val.sample);return opts.spacing===SPACE?stringedValue+SPACE+print(array):print(array)}if(stringedValue==="ObjectContaining"){const object=Object.assign(new ObjectContaining,val.sample);return opts.spacing===SPACE?stringedValue+SPACE+print(object):print(object)}if(stringedValue==="StringMatching"){return stringedValue+SPACE+print(val.sample)}if(stringedValue==="StringContaining"){return stringedValue+SPACE+print(val.sample)}return val.toAsymmetricMatcher()};const test=object=>object&&object.$$typeof===asymmetricMatcher;var AsymmetricMatcher$1={print:print$1,test:test};const ansiRegex$2=index$16;const toHumanReadableAnsi=text=>{const style=index$40;return text.replace(ansiRegex$2(),(match,offset,string)=>{switch(match){case style.red.close:case style.green.close:case style.reset.open:case style.reset.close:return"</>";case style.red.open:return"<red>";case style.green.open:return"<green>";case style.dim.open:return"<dim>";case style.bold.open:return"<bold>";default:return""}})};const test$1=value=>typeof value==="string"&&value.match(ansiRegex$2());const print$2=(val,print,indent,opts,colors)=>print(toHumanReadableAnsi(val));var ConvertAnsi={print:print$2,test:test$1};function escapeHTML$1(str){return str.replace(/</g,"&lt;").replace(/>/g,"&gt;")}var escapeHTML_1=escapeHTML$1;const escapeHTML=escapeHTML_1;const HTML_ELEMENT_REGEXP=/(HTML\w*?Element)|Text|Comment/;const test$2=isHTMLElement;function isHTMLElement(value){return value!==undefined&&value!==null&&(value.nodeType===1||value.nodeType===3||value.nodeType===8)&&value.constructor!==undefined&&value.constructor.name!==undefined&&HTML_ELEMENT_REGEXP.test(value.constructor.name)}function printChildren$1(flatChildren,print,indent,colors,opts){return flatChildren.map(node=>{if(typeof node==="object"){return print(node,print,indent,colors,opts)}else if(typeof node==="string"){return colors.content.open+escapeHTML(node)+colors.content.close}else{return print(node)}}).filter(value=>value.trim().length).join(opts.edgeSpacing)}function printAttributes$1(attributes,indent,colors,opts){return attributes.sort().map(attribute=>{return opts.spacing+indent(colors.prop.open+attribute.name+colors.prop.close+"=")+colors.value.open+`"${attribute.value}"`+colors.value.close}).join("")}const print$3=(element,print,indent,opts,colors)=>{if(element.nodeType===3){return element.data.split("\n").map(text=>text.trimLeft()).filter(text=>text.length).join(" ")}else if(element.nodeType===8){return colors.comment.open+"\x3c!-- "+element.data.trim()+" --\x3e"+colors.comment.close}let result=colors.tag.open+"<";const elementName=element.tagName.toLowerCase();result+=elementName+colors.tag.close;const hasAttributes=element.attributes&&element.attributes.length;if(hasAttributes){const attributes=Array.prototype.slice.call(element.attributes);result+=printAttributes$1(attributes,indent,colors,opts)}const flatChildren=Array.prototype.slice.call(element.childNodes);if(!flatChildren.length&&element.textContent){flatChildren.push(element.textContent)}const closeInNewLine=hasAttributes&&!opts.min;if(flatChildren.length){const children=printChildren$1(flatChildren,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?"\n":"")+">"+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+"</"+elementName+">"+colors.tag.close}else{result+=colors.tag.open+(closeInNewLine?"\n":" ")+"/>"+colors.tag.close}return result};var HTMLElement$1={print:print$3,test:test$2};var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"])_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();const IMMUTABLE_NAMESPACE="Immutable.";const SPACE$1=" ";const addKey=(isMap,key)=>isMap?key+": ":"";const addFinalEdgeSpacing=(length,edgeSpacing)=>length>0?edgeSpacing:"";const printImmutable$1=(val,print,indent,opts,colors,immutableDataStructureName,isMap)=>{var _ref=isMap?["{","}"]:["[","]"],_ref2=_slicedToArray(_ref,2);const openTag=_ref2[0],closeTag=_ref2[1];let result=IMMUTABLE_NAMESPACE+immutableDataStructureName+SPACE$1+openTag+opts.edgeSpacing;const immutableArray=[];val.forEach((item,key)=>immutableArray.push(indent(addKey(isMap,key)+print(item,print,indent,opts,colors))));result+=immutableArray.join(","+opts.spacing);if(!opts.min&&immutableArray.length>0){result+=","}return result+addFinalEdgeSpacing(immutableArray.length,opts.edgeSpacing)+closeTag};var printImmutable_1=printImmutable$1;const printImmutable=printImmutable_1;const IS_LIST="@@__IMMUTABLE_LIST__@@";const test$3=maybeList=>!!(maybeList&&maybeList[IS_LIST]);const print$4=(val,print,indent,opts,colors)=>printImmutable(val,print,indent,opts,colors,"List",false);var ImmutableList={print:print$4,test:test$3};const printImmutable$2=printImmutable_1;const IS_SET="@@__IMMUTABLE_SET__@@";const IS_ORDERED="@@__IMMUTABLE_ORDERED__@@";const test$4=maybeSet=>!!(maybeSet&&maybeSet[IS_SET]&&!maybeSet[IS_ORDERED]);const print$5=(val,print,indent,opts,colors)=>printImmutable$2(val,print,indent,opts,colors,"Set",false);var ImmutableSet={print:print$5,test:test$4};const printImmutable$3=printImmutable_1;const IS_MAP="@@__IMMUTABLE_MAP__@@";const IS_ORDERED$1="@@__IMMUTABLE_ORDERED__@@";const test$5=maybeMap=>!!(maybeMap&&maybeMap[IS_MAP]&&!maybeMap[IS_ORDERED$1]);const print$6=(val,print,indent,opts,colors)=>printImmutable$3(val,print,indent,opts,colors,"Map",true);var ImmutableMap={print:print$6,test:test$5};const printImmutable$4=printImmutable_1;const IS_STACK="@@__IMMUTABLE_STACK__@@";const test$6=maybeStack=>!!(maybeStack&&maybeStack[IS_STACK]);const print$7=(val,print,indent,opts,colors)=>printImmutable$4(val,print,indent,opts,colors,"Stack",false);var ImmutableStack={print:print$7,test:test$6};const printImmutable$5=printImmutable_1;const IS_SET$1="@@__IMMUTABLE_SET__@@";const IS_ORDERED$2="@@__IMMUTABLE_ORDERED__@@";const test$7=maybeOrderedSet=>maybeOrderedSet&&maybeOrderedSet[IS_SET$1]&&maybeOrderedSet[IS_ORDERED$2];const print$8=(val,print,indent,opts,colors)=>printImmutable$5(val,print,indent,opts,colors,"OrderedSet",false);var ImmutableOrderedSet={print:print$8,test:test$7};const printImmutable$6=printImmutable_1;const IS_MAP$1="@@__IMMUTABLE_MAP__@@";const IS_ORDERED$3="@@__IMMUTABLE_ORDERED__@@";const test$8=maybeOrderedMap=>maybeOrderedMap&&maybeOrderedMap[IS_MAP$1]&&maybeOrderedMap[IS_ORDERED$3];const print$9=(val,print,indent,opts,colors)=>printImmutable$6(val,print,indent,opts,colors,"OrderedMap",true);var ImmutableOrderedMap={print:print$9,test:test$8};var ImmutablePlugins=[ImmutableList,ImmutableSet,ImmutableMap,ImmutableStack,ImmutableOrderedSet,ImmutableOrderedMap];const escapeHTML$2=escapeHTML_1;const reactElement=Symbol.for("react.element");function traverseChildren(opaqueChildren,cb){if(Array.isArray(opaqueChildren)){opaqueChildren.forEach(child=>traverseChildren(child,cb))}else if(opaqueChildren!=null&&opaqueChildren!==false){cb(opaqueChildren)}}function printChildren$2(flatChildren,print,indent,colors,opts){return flatChildren.map(node=>{if(typeof node==="object"){return print(node,print,indent,colors,opts)}else if(typeof node==="string"){return colors.content.open+escapeHTML$2(node)+colors.content.close}else{return print(node)}}).join(opts.edgeSpacing)}function printProps(props,print,indent,colors,opts){return Object.keys(props).sort().map(name=>{if(name==="children"){return""}const prop=props[name];let printed=print(prop);if(typeof prop!=="string"){if(printed.indexOf("\n")!==-1){printed="{"+opts.edgeSpacing+indent(indent(printed)+opts.edgeSpacing+"}")}else{printed="{"+printed+"}"}}return opts.spacing+indent(colors.prop.open+name+colors.prop.close+"=")+colors.value.open+printed+colors.value.close}).join("")}const print$10=(element,print,indent,opts,colors)=>{let result=colors.tag.open+"<";let elementName;if(typeof element.type==="string"){elementName=element.type}else if(typeof element.type==="function"){elementName=element.type.displayName||element.type.name||"Unknown"}else{elementName="Unknown"}result+=elementName+colors.tag.close;result+=printProps(element.props,print,indent,colors,opts);const opaqueChildren=element.props.children;const hasProps=!!Object.keys(element.props).filter(propName=>propName!=="children").length;const closeInNewLine=hasProps&&!opts.min;if(opaqueChildren){const flatChildren=[];traverseChildren(opaqueChildren,child=>{flatChildren.push(child)});const children=printChildren$2(flatChildren,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?"\n":"")+">"+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+"</"+elementName+">"+colors.tag.close}else{result+=colors.tag.open+(closeInNewLine?"\n":" ")+"/>"+colors.tag.close}return result};const test$9=object=>object&&object.$$typeof===reactElement;var ReactElement$1={print:print$10,test:test$9};const escapeHTML$3=escapeHTML_1;const reactTestInstance=Symbol.for("react.test.json");function printChildren$3(children,print,indent,colors,opts){return children.map(child=>printInstance(child,print,indent,colors,opts)).join(opts.edgeSpacing)}function printProps$1(props,print,indent,colors,opts){return Object.keys(props).sort().map(name=>{const prop=props[name];let printed=print(prop);if(typeof prop!=="string"){if(printed.indexOf("\n")!==-1){printed="{"+opts.edgeSpacing+indent(indent(printed)+opts.edgeSpacing+"}")}else{printed="{"+printed+"}"}}return opts.spacing+indent(colors.prop.open+name+colors.prop.close+"=")+colors.value.open+printed+colors.value.close}).join("")}function printInstance(instance,print,indent,colors,opts){if(typeof instance=="number"){return print(instance)}else if(typeof instance==="string"){return colors.content.open+escapeHTML$3(instance)+colors.content.close}let closeInNewLine=false;let result=colors.tag.open+"<"+instance.type+colors.tag.close;if(instance.props){closeInNewLine=!!Object.keys(instance.props).length&&!opts.min;result+=printProps$1(instance.props,print,indent,colors,opts)}if(instance.children){const children=printChildren$3(instance.children,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?"\n":"")+">"+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+"</"+instance.type+">"+colors.tag.close}else{result+=colors.tag.open+(closeInNewLine?"\n":" ")+"/>"+colors.tag.close}return result}const print$11=(val,print,indent,opts,colors)=>printInstance(val,print,indent,colors,opts);const test$10=object=>object&&object.$$typeof===reactTestInstance;var ReactTestComponent={print:print$11,test:test$10};const style=index$40;const toString=Object.prototype.toString;const toISOString=Date.prototype.toISOString;const errorToString=Error.prototype.toString;const regExpToString=RegExp.prototype.toString;const symbolToString=Symbol.prototype.toString;const SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;const NEWLINE_REGEXP=/\n/gi;const getSymbols=Object.getOwnPropertySymbols||(obj=>[]);function isToStringedArrayType(toStringed){return toStringed==="[object Array]"||toStringed==="[object ArrayBuffer]"||toStringed==="[object DataView]"||toStringed==="[object Float32Array]"||toStringed==="[object Float64Array]"||toStringed==="[object Int8Array]"||toStringed==="[object Int16Array]"||toStringed==="[object Int32Array]"||toStringed==="[object Uint8Array]"||toStringed==="[object Uint8ClampedArray]"||toStringed==="[object Uint16Array]"||toStringed==="[object Uint32Array]"}function printNumber$2(val){if(val!=+val){return"NaN"}const isNegativeZero=val===0&&1/val<0;return isNegativeZero?"-0":""+val}function printFunction(val,printFunctionName){if(!printFunctionName){return"[Function]"}else if(val.name===""){return"[Function anonymous]"}else{return"[Function "+val.name+"]"}}function printSymbol(val){return symbolToString.call(val).replace(SYMBOL_REGEXP,"Symbol($1)")}function printError(val){return"["+errorToString.call(val)+"]"}function printBasicValue(val,printFunctionName,escapeRegex){if(val===true||val===false){return""+val}if(val===undefined){return"undefined"}if(val===null){return"null"}const typeOf=typeof val;if(typeOf==="number"){return printNumber$2(val)}if(typeOf==="string"){return'"'+val.replace(/"|\\/g,"\\$&")+'"'}if(typeOf==="function"){return printFunction(val,printFunctionName)}if(typeOf==="symbol"){return printSymbol(val)}const toStringed=toString.call(val);if(toStringed==="[object WeakMap]"){return"WeakMap {}"}if(toStringed==="[object WeakSet]"){return"WeakSet {}"}if(toStringed==="[object Function]"||toStringed==="[object GeneratorFunction]"){return printFunction(val,printFunctionName)}if(toStringed==="[object Symbol]"){return printSymbol(val)}if(toStringed==="[object Date]"){return toISOString.call(val)}if(toStringed==="[object Error]"){return printError(val)}if(toStringed==="[object RegExp]"){if(escapeRegex){return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}return regExpToString.call(val)}if(toStringed==="[object Arguments]"&&val.length===0){return"Arguments []"}if(isToStringedArrayType(toStringed)&&val.length===0){return val.constructor.name+" []"}if(val instanceof Error){return printError(val)}return null}function printList(list,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){let body="";if(list.length){body+=edgeSpacing;const innerIndent=prevIndent+indent;for(let i=0;i<list.length;i++){body+=innerIndent+print(list[i],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);if(i<list.length-1){body+=","+spacing}}body+=(min?"":",")+edgeSpacing+prevIndent}return"["+body+"]"}function printArguments(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){return(min?"":"Arguments ")+printList(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}function printArray(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){return(min?"":val.constructor.name+" ")+printList(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}function printMap(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){let result="Map {";const iterator=val.entries();let current=iterator.next();if(!current.done){result+=edgeSpacing;const innerIndent=prevIndent+indent;while(!current.done){const key=print(current.value[0],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);const value=print(current.value[1],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);result+=innerIndent+key+" => "+value;current=iterator.next();if(!current.done){result+=","+spacing}}result+=(min?"":",")+edgeSpacing+prevIndent}return result+"}"}function printObject(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){const constructor=min?"":val.constructor?val.constructor.name+" ":"Object ";let result=constructor+"{";let keys=Object.keys(val).sort();const symbols=getSymbols(val);if(symbols.length){keys=keys.filter(key=>!(typeof key==="symbol"||toString.call(key)==="[object Symbol]")).concat(symbols)}if(keys.length){result+=edgeSpacing;const innerIndent=prevIndent+indent;for(let i=0;i<keys.length;i++){const key=keys[i];const name=print(key,indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);const value=print(val[key],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);result+=innerIndent+name+": "+value;if(i<keys.length-1){result+=","+spacing}}result+=(min?"":",")+edgeSpacing+prevIndent}return result+"}"}function printSet(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){let result="Set {";const iterator=val.entries();let current=iterator.next();if(!current.done){result+=edgeSpacing;const innerIndent=prevIndent+indent;while(!current.done){result+=innerIndent+print(current.value[1],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);current=iterator.next();if(!current.done){result+=","+spacing}}result+=(min?"":",")+edgeSpacing+prevIndent}return result+"}"}function printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){refs=refs.slice();if(refs.indexOf(val)>-1){return"[Circular]"}else{refs.push(val)}currentDepth++;const hitMaxDepth=currentDepth>maxDepth;if(callToJSON&&!hitMaxDepth&&val.toJSON&&typeof val.toJSON==="function"){return print(val.toJSON(),indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}const toStringed=toString.call(val);if(toStringed==="[object Arguments]"){return hitMaxDepth?"[Arguments]":printArguments(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}else if(isToStringedArrayType(toStringed)){return hitMaxDepth?"[Array]":printArray(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}else if(toStringed==="[object Map]"){return hitMaxDepth?"[Map]":printMap(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}else if(toStringed==="[object Set]"){return hitMaxDepth?"[Set]":printSet(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}return hitMaxDepth?"[Object]":printObject(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}function printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){let plugin;for(let p=0;p<plugins.length;p++){if(plugins[p].test(val)){plugin=plugins[p];break}}if(!plugin){return null}function boundPrint(val){return print(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}function boundIndent(str){const indentation=prevIndent+indent;return indentation+str.replace(NEWLINE_REGEXP,"\n"+indentation)}const opts={edgeSpacing:edgeSpacing,min:min,spacing:spacing};return plugin.print(val,boundPrint,boundIndent,opts,colors)}function print(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){const pluginsResult=printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);if(typeof pluginsResult==="string"){return pluginsResult}const basicResult=printBasicValue(val,printFunctionName,escapeRegex);if(basicResult!==null){return basicResult}return printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors)}const DEFAULTS={callToJSON:true,edgeSpacing:"\n",escapeRegex:false,highlight:false,indent:2,maxDepth:Infinity,min:false,plugins:[],printFunctionName:true,spacing:"\n",theme:{comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"}};function validateOptions(opts){Object.keys(opts).forEach(key=>{if(!DEFAULTS.hasOwnProperty(key)){throw new Error(`pretty-format: Unknown option "${key}".`)}});if(opts.min&&opts.indent!==undefined&&opts.indent!==0){throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}}function normalizeOptions$1(opts){const result={};Object.keys(DEFAULTS).forEach(key=>result[key]=opts.hasOwnProperty(key)?key==="theme"?normalizeTheme(opts.theme):opts[key]:DEFAULTS[key]);if(result.min){result.indent=0}return result}function normalizeTheme(themeOption){if(!themeOption){throw new Error(`pretty-format: Option "theme" must not be null.`)}if(typeof themeOption!=="object"){throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof themeOption}".`)}const themeRefined=themeOption;const themeDefaults=DEFAULTS.theme;return Object.keys(themeDefaults).reduce((theme,key)=>{theme[key]=Object.prototype.hasOwnProperty.call(themeOption,key)?themeRefined[key]:themeDefaults[key];return theme},{})}function createIndent(indent){return new Array(indent+1).join(" ")}function prettyFormat$1(val,initialOptions){let opts;if(!initialOptions){opts=DEFAULTS}else{validateOptions(initialOptions);opts=normalizeOptions$1(initialOptions)}const colors={comment:{close:"",open:""},content:{close:"",open:""},prop:{close:"",open:""},tag:{close:"",open:""},value:{close:"",open:""}};Object.keys(opts.theme).forEach(key=>{if(opts.highlight){const color=colors[key]=style[opts.theme[key]];if(!color||typeof color.close!=="string"||typeof color.open!=="string"){throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${opts.theme[key]}" is undefined in ansi-styles.`)}}});let indent;let refs;const prevIndent="";const currentDepth=0;const spacing=opts.min?" ":"\n";const edgeSpacing=opts.min?"":"\n";if(opts&&opts.plugins.length){indent=createIndent(opts.indent);refs=[];const pluginsResult=printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,opts.maxDepth,currentDepth,opts.plugins,opts.min,opts.callToJSON,opts.printFunctionName,opts.escapeRegex,colors);if(typeof pluginsResult==="string"){return pluginsResult}}const basicResult=printBasicValue(val,opts.printFunctionName,opts.escapeRegex);if(basicResult!==null){return basicResult}if(!indent){indent=createIndent(opts.indent)}if(!refs){refs=[]}return printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,opts.maxDepth,currentDepth,opts.plugins,opts.min,opts.callToJSON,opts.printFunctionName,opts.escapeRegex,colors)}prettyFormat$1.plugins={AsymmetricMatcher:AsymmetricMatcher$1,ConvertAnsi:ConvertAnsi,HTMLElement:HTMLElement$1,Immutable:ImmutablePlugins,ReactElement:ReactElement$1,ReactTestComponent:ReactTestComponent};var index$38=prettyFormat$1;const chalk$1=index$32;const prettyFormat=index$38;var _require$plugins=index$38.plugins;const AsymmetricMatcher=_require$plugins.AsymmetricMatcher;const ReactElement=_require$plugins.ReactElement;const HTMLElement=_require$plugins.HTMLElement;const Immutable=_require$plugins.Immutable;const PLUGINS=[AsymmetricMatcher,ReactElement,HTMLElement].concat(Immutable);const EXPECTED_COLOR=chalk$1.green;const EXPECTED_BG=chalk$1.bgGreen;const RECEIVED_COLOR=chalk$1.red;const RECEIVED_BG=chalk$1.bgRed;const NUMBERS=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen"];const getType$1=value=>{if(typeof value==="undefined"){return"undefined"}else if(value===null){return"null"}else if(Array.isArray(value)){return"array"}else if(typeof value==="boolean"){return"boolean"}else if(typeof value==="function"){return"function"}else if(typeof value==="number"){return"number"}else if(typeof value==="string"){return"string"}else if(typeof value==="object"){if(value.constructor===RegExp){return"regexp"}else if(value.constructor===Map){return"map"}else if(value.constructor===Set){return"set"}return"object"}else if(typeof value==="symbol"){return"symbol"}throw new Error(`value of unknown type: ${value}`)};const stringify=function(object){let maxDepth=arguments.length>1&&arguments[1]!==undefined?arguments[1]:10;const MAX_LENGTH=1e4;let result;try{result=prettyFormat(object,{maxDepth:maxDepth,min:true,plugins:PLUGINS})}catch(e){result=prettyFormat(object,{callToJSON:false,maxDepth:maxDepth,min:true,plugins:PLUGINS})}return result.length>=MAX_LENGTH&&maxDepth>1?stringify(object,Math.floor(maxDepth/2)):result};const highlightTrailingWhitespace=(text,bgColor)=>text.replace(/\s+$/gm,bgColor("$&"));const printReceived=object=>highlightTrailingWhitespace(RECEIVED_COLOR(stringify(object)),RECEIVED_BG);const printExpected=value=>highlightTrailingWhitespace(EXPECTED_COLOR(stringify(value)),EXPECTED_BG);const printWithType=(name,received,print)=>{const type=getType$1(received);return name+":"+(type!=="null"&&type!=="undefined"?"\n "+type+": ":" ")+print(received)};const ensureNoExpected=(expected,matcherName)=>{matcherName||(matcherName="This");if(typeof expected!=="undefined"){throw new Error(matcherHint("[.not]"+matcherName,undefined,"")+"\n\n"+"Matcher does not accept any arguments.\n"+printWithType("Got",expected,printExpected))}};const ensureActualIsNumber=(actual,matcherName)=>{matcherName||(matcherName="This matcher");if(typeof actual!=="number"){throw new Error(matcherHint("[.not]"+matcherName)+"\n\n"+`Received value must be a number.\n`+printWithType("Received",actual,printReceived))}};const ensureExpectedIsNumber=(expected,matcherName)=>{matcherName||(matcherName="This matcher");if(typeof expected!=="number"){throw new Error(matcherHint("[.not]"+matcherName)+"\n\n"+`Expected value must be a number.\n`+printWithType("Got",expected,printExpected))}};const ensureNumbers=(actual,expected,matcherName)=>{ensureActualIsNumber(actual,matcherName);ensureExpectedIsNumber(expected,matcherName)};const pluralize=(word,count)=>(NUMBERS[count]||count)+" "+word+(count===1?"":"s");const matcherHint=function(matcherName){let received=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"received";let expected=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"expected";let options=arguments[3];const secondArgument=options&&options.secondArgument;const isDirectExpectCall=options&&options.isDirectExpectCall;return chalk$1.dim("expect"+(isDirectExpectCall?"":"("))+RECEIVED_COLOR(received)+chalk$1.dim((isDirectExpectCall?"":")")+matcherName+"(")+EXPECTED_COLOR(expected)+(secondArgument?`, ${EXPECTED_COLOR(secondArgument)}`:"")+chalk$1.dim(")")};var index$30={EXPECTED_BG:EXPECTED_BG,EXPECTED_COLOR:EXPECTED_COLOR,RECEIVED_BG:RECEIVED_BG,RECEIVED_COLOR:RECEIVED_COLOR,ensureActualIsNumber:ensureActualIsNumber,ensureExpectedIsNumber:ensureExpectedIsNumber,ensureNoExpected:ensureNoExpected,ensureNumbers:ensureNumbers,getType:getType$1,highlightTrailingWhitespace:highlightTrailingWhitespace,matcherHint:matcherHint,pluralize:pluralize,printExpected:printExpected,printReceived:printReceived,printWithType:printWithType,stringify:stringify};var arr=[];var charCodeCache=[];var index$46=function(a,b){if(a===b){return 0}var swap=a;if(a.length>b.length){a=b;b=swap}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}while(aLen>0&&a.charCodeAt(~-aLen)===b.charCodeAt(~-bLen)){aLen--;bLen--}if(aLen===0){return bLen}var start=0;while(start<aLen&&a.charCodeAt(start)===b.charCodeAt(start)){start++}aLen-=start;bLen-=start;if(aLen===0){return bLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(i<aLen){charCodeCache[start+i]=a.charCodeAt(start+i);arr[i]=++i}while(j<bLen){bCharCode=b.charCodeAt(start+j);tmp=j++;ret=j;for(i=0;i<aLen;i++){tmp2=bCharCode===charCodeCache[start+i]?tmp:tmp+1;tmp=arr[i];ret=arr[i]=tmp>ret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret};const chalk$2=index$24;const BULLET=chalk$2.bold("●");const DEPRECATION=`${BULLET} Deprecation Warning`;const ERROR$1=`${BULLET} Validation Error`;const WARNING=`${BULLET} Validation Warning`;const format$2=value=>typeof value==="function"?value.toString():index$38(value,{min:true});class ValidationError$1 extends Error{constructor(name,message,comment){super();comment=comment?"\n\n"+comment:"\n";this.name="";this.stack="";this.message=chalk$2.red(chalk$2.bold(name)+":\n\n"+message+comment);Error.captureStackTrace(this,()=>{})}}const logValidationWarning=(name,message,comment)=>{comment=comment?"\n\n"+comment:"\n";console.warn(chalk$2.yellow(chalk$2.bold(name)+":\n\n"+message+comment))};const createDidYouMeanMessage=(unrecognized,allowedOptions)=>{const leven=index$46;const suggestion=allowedOptions.find(option=>{const steps=leven(option,unrecognized);return steps<3});return suggestion?`Did you mean ${chalk$2.bold(format$2(suggestion))}?`:""};var utils$2={DEPRECATION:DEPRECATION,ERROR:ERROR$1,ValidationError:ValidationError$1,WARNING:WARNING,createDidYouMeanMessage:createDidYouMeanMessage,format:format$2,logValidationWarning:logValidationWarning};const chalk=index$24;var _require=index$30;const getType=_require.getType;var _require2=utils$2;const format$1=_require2.format;const ValidationError=_require2.ValidationError;const ERROR=_require2.ERROR;const errorMessage=(option,received,defaultValue,options)=>{const message=` Option ${chalk.bold(`"${option}"`)} must be of type:\n ${chalk.bold.green(getType(defaultValue))}\n but instead received:\n ${chalk.bold.red(getType(received))}\n\n Example:\n {\n ${chalk.bold(`"${option}"`)}: ${chalk.bold(format$1(defaultValue))}\n }`;const comment=options.comment;const name=options.title&&options.title.error||ERROR;throw new ValidationError(name,message,comment)};var errors={ValidationError:ValidationError,errorMessage:errorMessage};var _require$2=utils$2;const logValidationWarning$1=_require$2.logValidationWarning;const DEPRECATION$2=_require$2.DEPRECATION;const deprecationMessage=(message,options)=>{const comment=options.comment;const name=options.title&&options.title.deprecation||DEPRECATION$2;logValidationWarning$1(name,message,comment)};const deprecationWarning$1=(config,option,deprecatedOptions,options)=>{if(option in deprecatedOptions){deprecationMessage(deprecatedOptions[option](config),options);return true}return false};var deprecated={deprecationWarning:deprecationWarning$1};const chalk$3=index$24;var _require$3=utils$2;const format$3=_require$3.format;const logValidationWarning$2=_require$3.logValidationWarning;const createDidYouMeanMessage$1=_require$3.createDidYouMeanMessage;const WARNING$2=_require$3.WARNING;const unknownOptionWarning$1=(config,exampleConfig,option,options)=>{const didYouMean=createDidYouMeanMessage$1(option,Object.keys(exampleConfig));const message=` Unknown option ${chalk$3.bold(`"${option}"`)} with value ${chalk$3.bold(format$3(config[option]))} was found.`+(didYouMean&&` ${didYouMean}`)+`\n This is probably a typing mistake. Fixing it will remove this message.`;const comment=options.comment;const name=options.title&&options.title.warning||WARNING$2;logValidationWarning$2(name,message,comment)};var warnings={unknownOptionWarning:unknownOptionWarning$1};const config$1={comment:" A comment",condition:(option,validOption)=>true,deprecate:(config,option,deprecatedOptions,options)=>false,deprecatedConfig:{key:config=>{}},error:(option,received,defaultValue,options)=>{},exampleConfig:{key:"value",test:"case"},title:{deprecation:"Deprecation Warning",error:"Validation Error",warning:"Validation Warning"},unknown:(config,option,options)=>{}};var exampleConfig$2=config$1;const toString$1=Object.prototype.toString;const validationCondition$1=(option,validOption)=>{return option===null||option===undefined||toString$1.call(option)===toString$1.call(validOption)};var condition=validationCondition$1;var _require$1=deprecated;const deprecationWarning=_require$1.deprecationWarning;var _require2$1=warnings;const unknownOptionWarning=_require2$1.unknownOptionWarning;var _require3=errors;const errorMessage$1=_require3.errorMessage;const exampleConfig$1=exampleConfig$2;const validationCondition=condition;var _require4=utils$2;const ERROR$2=_require4.ERROR;const DEPRECATION$1=_require4.DEPRECATION;const WARNING$1=_require4.WARNING;var defaultConfig$1={comment:"",condition:validationCondition,deprecate:deprecationWarning,deprecatedConfig:{},error:errorMessage$1,exampleConfig:exampleConfig$1,title:{deprecation:DEPRECATION$1,error:ERROR$2,warning:WARNING$1},unknown:unknownOptionWarning};const defaultConfig=defaultConfig$1;const _validate=(config,options)=>{let hasDeprecationWarnings=false;for(const key in config){if(options.deprecatedConfig&&key in options.deprecatedConfig&&typeof options.deprecate==="function"){const isDeprecatedKey=options.deprecate(config,key,options.deprecatedConfig,options);hasDeprecationWarnings=hasDeprecationWarnings||isDeprecatedKey}else if(hasOwnProperty.call(options.exampleConfig,key)){if(typeof options.condition==="function"&&typeof options.error==="function"&&!options.condition(config[key],options.exampleConfig[key])){options.error(key,config[key],options.exampleConfig[key],options)}}else{options.unknown&&options.unknown(config,options.exampleConfig,key,options)}}return{hasDeprecationWarnings:hasDeprecationWarnings}};const validate$1=(config,options)=>{_validate(options,defaultConfig);const defaultedOptions=Object.assign({},defaultConfig,options,{title:Object.assign({},defaultConfig.title,options.title)});var _validate2=_validate(config,defaultedOptions);const hasDeprecationWarnings=_validate2.hasDeprecationWarnings;return{hasDeprecationWarnings:hasDeprecationWarnings,isValid:true}};var validate_1=validate$1;var index$22={ValidationError:errors.ValidationError,createDidYouMeanMessage:utils$2.createDidYouMeanMessage,format:utils$2.format,logValidationWarning:utils$2.logValidationWarning,validate:validate_1};const deprecated$2={useFlowParser:config=>` The ${'"useFlowParser"'} option is deprecated. Use ${'"parser"'} instead.\n\n Prettier now treats your configuration as:\n {\n ${'"parser"'}: ${config.useFlowParser?'"flow"':'"babylon"'}\n }`};var deprecated_1=deprecated$2;const validate=index$22.validate;const deprecatedConfig=deprecated_1;const defaults={cursorOffset:-1,rangeStart:0,rangeEnd:Infinity,useTabs:false,tabWidth:2,printWidth:80,singleQuote:false,trailingComma:"none",bracketSpacing:true,jsxBracketSameLine:false,parser:"babylon",semi:true};const exampleConfig=Object.assign({},defaults,{filepath:"path/to/Filename",printWidth:80,originalText:"text"});function normalize(options){const normalized=Object.assign({},options||{});const filepath=normalized.filepath;if(/\.(css|less|scss)$/.test(filepath)){normalized.parser="postcss"}else if(/\.html$/.test(filepath)){normalized.parser="parse5"}else if(/\.(ts|tsx)$/.test(filepath)){normalized.parser="typescript"}else if(/\.(graphql|gql)$/.test(filepath)){normalized.parser="graphql"}else if(/\.json$/.test(filepath)){normalized.parser="json"}if(normalized.parser==="json"){normalized.trailingComma="none"}if(typeof normalized.trailingComma==="boolean"){normalized.trailingComma="es5";console.warn("Warning: `trailingComma` without any argument is deprecated. "+'Specify "none", "es5", or "all".')}const parserBackup=normalized.parser;if(typeof normalized.parser==="function"){delete normalized.parser}validate(normalized,{exampleConfig:exampleConfig,deprecatedConfig:deprecatedConfig});normalized.parser=parserBackup;if("useFlowParser"in normalized){normalized.parser=normalized.useFlowParser?"flow":"babylon";delete normalized.useFlowParser}Object.keys(defaults).forEach(k=>{if(normalized[k]==null){normalized[k]=defaults[k]}});return normalized}var options={normalize:normalize};function flattenDoc(doc){if(doc.type==="concat"){const res=[];for(let i=0;i<doc.parts.length;++i){const doc2=doc.parts[i];if(typeof doc2!=="string"&&doc2.type==="concat"){[].push.apply(res,flattenDoc(doc2).parts)}else{const flattened=flattenDoc(doc2);if(flattened!==""){res.push(flattened)}}}return Object.assign({},doc,{parts:res})}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents!=null?flattenDoc(doc.breakContents):null,flatContents:doc.flatContents!=null?flattenDoc(doc.flatContents):null})}else if(doc.type==="group"){return Object.assign({},doc,{contents:flattenDoc(doc.contents),expandedStates:doc.expandedStates?doc.expandedStates.map(flattenDoc):doc.expandedStates})}else if(doc.contents){return Object.assign({},doc,{contents:flattenDoc(doc.contents)})}return doc}function printDoc(doc){if(typeof doc==="string"){return JSON.stringify(doc)}if(doc.type==="line"){if(doc.literalline){return"literalline"}if(doc.hard){return"hardline"}if(doc.soft){return"softline"}return"line"}if(doc.type==="break-parent"){return"breakParent"}if(doc.type==="concat"){return"["+doc.parts.map(printDoc).join(", ")+"]"}if(doc.type==="indent"){return"indent("+printDoc(doc.contents)+")"}if(doc.type==="align"){return"align("+doc.n+", "+printDoc(doc.contents)+")"}if(doc.type==="if-break"){return"ifBreak("+printDoc(doc.breakContents)+(doc.flatContents?", "+printDoc(doc.flatContents):"")+")"}if(doc.type==="group"){if(doc.expandedStates){return"conditionalGroup("+"["+doc.expandedStates.map(printDoc).join(",")+"])"}return(doc.break?"wrappedGroup":"group")+"("+printDoc(doc.contents)+")"}if(doc.type==="fill"){return"fill"+"("+doc.parts.map(printDoc).join(", ")+")"}if(doc.type==="line-suffix"){return"lineSuffix("+printDoc(doc.contents)+")"}if(doc.type==="line-suffix-boundary"){return"lineSuffixBoundary"}throw new Error("Unknown doc type "+doc.type)}var docDebug={printDocToDebug:function(doc){return printDoc(flattenDoc(doc))}};var os$1=os;function homedir(){var env=process.env;var home=env.HOME;var user=env.LOGNAME||env.USER||env.LNAME||env.USERNAME;if(process.platform==="win32"){return env.USERPROFILE||env.HOMEDRIVE+env.HOMEPATH||home||null}if(process.platform==="darwin"){return home||(user?"/Users/"+user:null)}if(process.platform==="linux"){return home||(process.getuid()===0?"/root":user?"/home/"+user:null)}return home||null}var index$50=typeof os$1.homedir==="function"?os$1.homedir:homedir;var index$52=function(args,opts){if(!opts)opts={};var flags={bools:{},strings:{},unknownFn:null};if(typeof opts["unknown"]==="function"){flags.unknownFn=opts["unknown"]}if(typeof opts["boolean"]==="boolean"&&opts["boolean"]){flags.allBools=true}else{[].concat(opts["boolean"]).filter(Boolean).forEach(function(key){flags.bools[key]=true})}var aliases={};Object.keys(opts.alias||{}).forEach(function(key){aliases[key]=[].concat(opts.alias[key]);aliases[key].forEach(function(x){aliases[x]=[key].concat(aliases[key].filter(function(y){return x!==y}))})});[].concat(opts.string).filter(Boolean).forEach(function(key){flags.strings[key]=true;if(aliases[key]){flags.strings[aliases[key]]=true}});var defaults=opts["default"]||{};var argv={_:[]};Object.keys(flags.bools).forEach(function(key){setArg(key,defaults[key]===undefined?false:defaults[key])});var notFlags=[];if(args.indexOf("--")!==-1){notFlags=args.slice(args.indexOf("--")+1);args=args.slice(0,args.indexOf("--"))}function argDefined(key,arg){return flags.allBools&&/^--[^=]+$/.test(arg)||flags.strings[key]||flags.bools[key]||aliases[key]}function setArg(key,val,arg){if(arg&&flags.unknownFn&&!argDefined(key,arg)){if(flags.unknownFn(arg)===false)return}var value=!flags.strings[key]&&isNumber(val)?Number(val):val;setKey(argv,key.split("."),value);(aliases[key]||[]).forEach(function(x){setKey(argv,x.split("."),value)})}function setKey(obj,keys,value){var o=obj;keys.slice(0,-1).forEach(function(key){if(o[key]===undefined)o[key]={};o=o[key]});var key=keys[keys.length-1];if(o[key]===undefined||flags.bools[key]||typeof o[key]==="boolean"){o[key]=value}else if(Array.isArray(o[key])){o[key].push(value)}else{o[key]=[o[key],value]}}function aliasIsBoolean(key){return aliases[key].some(function(x){return flags.bools[x]})}for(var i=0;i<args.length;i++){var arg=args[i];if(/^--.+=/.test(arg)){var m=arg.match(/^--([^=]+)=([\s\S]*)$/);var key=m[1];var value=m[2];if(flags.bools[key]){value=value!=="false"}setArg(key,value,arg)}else if(/^--no-.+/.test(arg)){var key=arg.match(/^--no-(.+)/)[1];setArg(key,false,arg)}else if(/^--.+/.test(arg)){var key=arg.match(/^--(.+)/)[1];var next=args[i+1];if(next!==undefined&&!/^-/.test(next)&&!flags.bools[key]&&!flags.allBools&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,next,arg);i++}else if(/^(true|false)$/.test(next)){setArg(key,next==="true",arg);i++}else{setArg(key,flags.strings[key]?"":true,arg)}}else if(/^-[^-]+/.test(arg)){var letters=arg.slice(1,-1).split("");var broken=false;for(var j=0;j<letters.length;j++){var next=arg.slice(j+2);if(next==="-"){setArg(letters[j],next,arg);continue}if(/[A-Za-z]/.test(letters[j])&&/=/.test(next)){setArg(letters[j],next.split("=")[1],arg);broken=true;break}if(/[A-Za-z]/.test(letters[j])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(next)){setArg(letters[j],next,arg);broken=true;break}if(letters[j+1]&&letters[j+1].match(/\W/)){setArg(letters[j],arg.slice(j+2),arg);broken=true;break}else{setArg(letters[j],flags.strings[letters[j]]?"":true,arg)}}var key=arg.slice(-1)[0];if(!broken&&key!=="-"){if(args[i+1]&&!/^(-|--)[^-]/.test(args[i+1])&&!flags.bools[key]&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,args[i+1],arg);i++}else if(args[i+1]&&/true|false/.test(args[i+1])){setArg(key,args[i+1]==="true",arg);i++}else{setArg(key,flags.strings[key]?"":true,arg)}}}else{if(!flags.unknownFn||flags.unknownFn(arg)!==false){argv._.push(flags.strings["_"]||!isNumber(arg)?arg:Number(arg))}if(opts.stopEarly){argv._.push.apply(argv._,args.slice(i+1));break}}}Object.keys(defaults).forEach(function(key){if(!hasKey(argv,key.split("."))){setKey(argv,key.split("."),defaults[key]);(aliases[key]||[]).forEach(function(x){setKey(argv,x.split("."),defaults[key])})}});if(opts["--"]){argv["--"]=new Array;notFlags.forEach(function(key){argv["--"].push(key)})}else{notFlags.forEach(function(key){argv._.push(key)})}return argv};function hasKey(obj,keys){var o=obj;keys.slice(0,-1).forEach(function(key){o=o[key]||{}});var key=keys[keys.length-1];return key in o}function isNumber(x){if(typeof x==="number")return true;if(/^0x[0-9a-f]+$/i.test(x))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x)}var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty$1=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(val)}function shouldUseNative(){try{if(!Object.assign){return false}var test1=new String("abc");test1[5]="de";if(Object.getOwnPropertyNames(test1)[0]==="5"){return false}var test2={};for(var i=0;i<10;i++){test2["_"+String.fromCharCode(i)]=i}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if(order2.join("")!=="0123456789"){return false}var test3={};"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter});if(Object.keys(Object.assign({},test3)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(err){return false}}var index$54=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from){if(hasOwnProperty$1.call(from,key)){to[key]=from[key]}}if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++){if(propIsEnumerable.call(from,symbols[i])){to[symbols[i]]=from[symbols[i]]}}}}return to};var fs$1=fs;function isDirectory$1(filepath,cb){if(typeof cb!=="function"){throw new Error("expected a callback function")}if(typeof filepath!=="string"){cb(new Error("expected filepath to be a string"));return}fs$1.stat(filepath,function(err,stats){if(err){if(err.code==="ENOENT"){cb(null,false);return}cb(err);return}cb(null,stats.isDirectory())})}isDirectory$1.sync=function isDirectorySync(filepath){if(typeof filepath!=="string"){throw new Error("expected filepath to be a string")}try{var stat=fs$1.statSync(filepath);return stat.isDirectory()}catch(err){if(err.code==="ENOENT"){return false}else{throw err}}return false};var index$56=isDirectory$1;var fs$2=fs;var readFile$1=function(filepath,options){options=options||{};options.throwNotFound=options.throwNotFound||false;return new Promise(function(resolve,reject){fs$2.readFile(filepath,"utf8",function(err,content){if(err&&err.code==="ENOENT"&&!options.throwNotFound){return resolve(null)}if(err)return reject(err);resolve(content)})})};var index$62=function isArrayish(obj){if(!obj){return false}return obj instanceof Array||Array.isArray(obj)||obj.length>=0&&obj.splice instanceof Function};var util$10=util;var isArrayish=index$62;var errorEx$1=function errorEx(name,properties){if(!name||name.constructor!==String){properties=name||{};name=Error.name}var errorExError=function ErrorEXError(message){if(!this){return new ErrorEXError(message)}message=message instanceof Error?message.message:message||this.message;Error.call(this,message);Error.captureStackTrace(this,errorExError);this.name=name;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var newMessage=message.split(/\r?\n/g);for(var key in properties){if(!properties.hasOwnProperty(key)){continue}var modifier=properties[key];if("message"in modifier){newMessage=modifier.message(this[key],newMessage)||newMessage;if(!isArrayish(newMessage)){newMessage=[newMessage]}}}return newMessage.join("\n")},set:function(v){message=v}});var stackDescriptor=Object.getOwnPropertyDescriptor(this,"stack");var stackGetter=stackDescriptor.get;var stackValue=stackDescriptor.value;delete stackDescriptor.value;delete stackDescriptor.writable;stackDescriptor.get=function(){var stack=stackGetter?stackGetter.call(this).split(/\r?\n+/g):stackValue.split(/\r?\n+/g);stack[0]=this.name+": "+this.message;var lineCount=1;for(var key in properties){if(!properties.hasOwnProperty(key)){continue}var modifier=properties[key];if("line"in modifier){var line=modifier.line(this[key]);if(line){stack.splice(lineCount++,0," "+line)}}if("stack"in modifier){modifier.stack(this[key],stack)}}return stack.join("\n")};Object.defineProperty(this,"stack",stackDescriptor)};if(Object.setPrototypeOf){Object.setPrototypeOf(errorExError.prototype,Error.prototype);Object.setPrototypeOf(errorExError,Error)}else{util$10.inherits(errorExError,Error)}return errorExError};errorEx$1.append=function(str,def){return{message:function(v,message){v=v||def;if(v){message[0]+=" "+str.replace("%s",v.toString())}return message}}};errorEx$1.line=function(str,def){return{line:function(v){v=v||def;if(v){return str.replace("%s",v.toString())}return null}}};var index$60=errorEx$1;var unicode=createCommonjsModule(function(module){var Uni=module.exports;module.exports.isWhiteSpace=function isWhiteSpace(x){return x===" "||x===" "||x==="\ufeff"||x>="\t"&&x<="\r"||x===" "||x==="᠎"||x>=" "&&x<=" "||x==="\u2028"||x==="\u2029"||x===" "||x===" "||x===" "};module.exports.isWhiteSpaceJSON=function isWhiteSpaceJSON(x){return x===" "||x==="\t"||x==="\n"||x==="\r"};module.exports.isLineTerminator=function isLineTerminator(x){return x==="\n"||x==="\r"||x==="\u2028"||x==="\u2029"};module.exports.isLineTerminatorJSON=function isLineTerminatorJSON(x){return x==="\n"||x==="\r"};module.exports.isIdentifierStart=function isIdentifierStart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="€"&&Uni.NonAsciiIdentifierStart.test(x)};module.exports.isIdentifierPart=function isIdentifierPart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x>="€"&&Uni.NonAsciiIdentifierPart.test(x)};module.exports.NonAsciiIdentifierStart=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;module.exports.NonAsciiIdentifierPart=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/});var parse_1=createCommonjsModule(function(module){var Uni=unicode;function isHexDigit(x){return x>="0"&&x<="9"||x>="A"&&x<="F"||x>="a"&&x<="f"}function isOctDigit(x){return x>="0"&&x<="7"}function isDecDigit(x){return x>="0"&&x<="9"}var unescapeMap={"'":"'",'"':'"',"\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v","/":"/"};function formatError(input,msg,position,lineno,column,json5){var result=msg+" at "+(lineno+1)+":"+(column+1),tmppos=position-column-1,srcline="",underline="";var isLineTerminator=json5?Uni.isLineTerminator:Uni.isLineTerminatorJSON;if(tmppos<position-70){tmppos=position-70}while(1){var chr=input[++tmppos];if(isLineTerminator(chr)||tmppos===input.length){if(position>=tmppos){underline+="^"}break}srcline+=chr;if(position===tmppos){underline+="^"}else if(position>tmppos){underline+=input[tmppos]==="\t"?"\t":" "}if(srcline.length>78)break}return result+"\n"+srcline+"\n"+underline}function parse(input,options){var json5=!(options.mode==="json"||options.legacy);var isLineTerminator=json5?Uni.isLineTerminator:Uni.isLineTerminatorJSON;var isWhiteSpace=json5?Uni.isWhiteSpace:Uni.isWhiteSpaceJSON;var length=input.length,lineno=0,linestart=0,position=0,stack=[];var tokenStart=function(){};var tokenEnd=function(v){return v};if(options._tokenize){(function(){var start=null;tokenStart=function(){if(start!==null)throw Error("internal error, token overlap");start=position};tokenEnd=function(v,type){if(start!=position){var hash={raw:input.substr(start,position-start),type:type,stack:stack.slice(0)};if(v!==undefined)hash.value=v;options._tokenize.call(null,hash)}start=null;return v}})()}function fail(msg){var column=position-linestart;if(!msg){if(position<length){var token="'"+JSON.stringify(input[position]).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";if(!msg)msg="Unexpected token "+token}else{if(!msg)msg="Unexpected end of input"}}var error=SyntaxError(formatError(input,msg,position,lineno,column,json5));error.row=lineno+1;error.column=column+1;throw error}function newline(chr){if(chr==="\r"&&input[position]==="\n")position++;linestart=position;lineno++}function parseGeneric(){var result;while(position<length){tokenStart();var chr=input[position++];if(chr==='"'||chr==="'"&&json5){return tokenEnd(parseString(chr),"literal")}else if(chr==="{"){tokenEnd(undefined,"separator");return parseObject()}else if(chr==="["){tokenEnd(undefined,"separator");return parseArray()}else if(chr==="-"||chr==="."||isDecDigit(chr)||json5&&(chr==="+"||chr==="I"||chr==="N")){return tokenEnd(parseNumber(),"literal")}else if(chr==="n"){parseKeyword("null");return tokenEnd(null,"literal")}else if(chr==="t"){parseKeyword("true");return tokenEnd(true,"literal")}else if(chr==="f"){parseKeyword("false");return tokenEnd(false,"literal")}else{position--;return tokenEnd(undefined)}}}function parseKey(){var result;while(position<length){tokenStart();var chr=input[position++];if(chr==='"'||chr==="'"&&json5){return tokenEnd(parseString(chr),"key")}else if(chr==="{"){tokenEnd(undefined,"separator");return parseObject()}else if(chr==="["){tokenEnd(undefined,"separator");return parseArray()}else if(chr==="."||isDecDigit(chr)){return tokenEnd(parseNumber(true),"key")}else if(json5&&Uni.isIdentifierStart(chr)||chr==="\\"&&input[position]==="u"){var rollback=position-1;var result=parseIdentifier();if(result===undefined){position=rollback;return tokenEnd(undefined)}else{return tokenEnd(result,"key")}}else{position--;return tokenEnd(undefined)}}}function skipWhiteSpace(){tokenStart();while(position<length){var chr=input[position++];if(isLineTerminator(chr)){position--;tokenEnd(undefined,"whitespace");tokenStart();position++;newline(chr);tokenEnd(undefined,"newline");tokenStart()}else if(isWhiteSpace(chr)){}else if(chr==="/"&&json5&&(input[position]==="/"||input[position]==="*")){position--;tokenEnd(undefined,"whitespace");tokenStart();position++;skipComment(input[position++]==="*");tokenEnd(undefined,"comment");tokenStart()}else{position--;break}}return tokenEnd(undefined,"whitespace")}function skipComment(multi){while(position<length){var chr=input[position++];if(isLineTerminator(chr)){if(!multi){position--;return}newline(chr)}else if(chr==="*"&&multi){if(input[position]==="/"){position++;return}}else{}}if(multi){fail("Unclosed multiline comment")}}function parseKeyword(keyword){var _pos=position;var len=keyword.length;for(var i=1;i<len;i++){if(position>=length||keyword[i]!=input[position]){position=_pos-1;fail()}position++}}function parseObject(){var result=options.null_prototype?Object.create(null):{},empty_object={},is_non_empty=false;while(position<length){skipWhiteSpace();var item1=parseKey();skipWhiteSpace();tokenStart();var chr=input[position++];tokenEnd(undefined,"separator");if(chr==="}"&&item1===undefined){if(!json5&&is_non_empty){position--;fail("Trailing comma in object")}return result}else if(chr===":"&&item1!==undefined){skipWhiteSpace();stack.push(item1);var item2=parseGeneric();stack.pop();if(item2===undefined)fail("No value found for key "+item1);if(typeof item1!=="string"){if(!json5||typeof item1!=="number"){fail("Wrong key type: "+item1)}}if((item1 in empty_object||empty_object[item1]!=null)&&options.reserved_keys!=="replace"){if(options.reserved_keys==="throw"){fail("Reserved key: "+item1)}else{}}else{if(typeof options.reviver==="function"){item2=options.reviver.call(null,item1,item2)}if(item2!==undefined){is_non_empty=true;Object.defineProperty(result,item1,{value:item2,enumerable:true,configurable:true,writable:true})}}skipWhiteSpace();tokenStart();var chr=input[position++];tokenEnd(undefined,"separator");if(chr===","){continue}else if(chr==="}"){return result}else{fail()}}else{position--;fail()}}fail()}function parseArray(){var result=[];while(position<length){skipWhiteSpace();stack.push(result.length);var item=parseGeneric();stack.pop();skipWhiteSpace();tokenStart();var chr=input[position++];tokenEnd(undefined,"separator");if(item!==undefined){if(typeof options.reviver==="function"){item=options.reviver.call(null,String(result.length),item)}if(item===undefined){result.length++;item=true}else{result.push(item)}}if(chr===","){if(item===undefined){fail("Elisions are not supported")}}else if(chr==="]"){if(!json5&&item===undefined&&result.length){position--;fail("Trailing comma in array")}return result}else{position--;fail()}}}function parseNumber(){position--;var start=position,chr=input[position++],t;var to_num=function(is_octal){var str=input.substr(start,position-start);if(is_octal){var result=parseInt(str.replace(/^0o?/,""),8)}else{var result=Number(str)}if(Number.isNaN(result)){position--;fail('Bad numeric literal - "'+input.substr(start,position-start+1)+'"')}else if(!json5&&!str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)){position--;fail('Non-json numeric literal - "'+input.substr(start,position-start+1)+'"')}else{return result}};if(chr==="-"||chr==="+"&&json5)chr=input[position++];if(chr==="N"&&json5){parseKeyword("NaN");return NaN}if(chr==="I"&&json5){parseKeyword("Infinity");return to_num()}if(chr>="1"&&chr<="9"){while(position<length&&isDecDigit(input[position]))position++;chr=input[position++]}if(chr==="0"){chr=input[position++];var is_octal=chr==="o"||chr==="O"||isOctDigit(chr);var is_hex=chr==="x"||chr==="X";if(json5&&(is_octal||is_hex)){while(position<length&&(is_hex?isHexDigit:isOctDigit)(input[position]))position++;var sign=1;if(input[start]==="-"){sign=-1;start++}else if(input[start]==="+"){start++}return sign*to_num(is_octal)}}if(chr==="."){while(position<length&&isDecDigit(input[position]))position++;chr=input[position++]}if(chr==="e"||chr==="E"){chr=input[position++];if(chr==="-"||chr==="+")position++;while(position<length&&isDecDigit(input[position]))position++;chr=input[position++]}position--;return to_num()}function parseIdentifier(){position--;var result="";while(position<length){var chr=input[position++];if(chr==="\\"&&input[position]==="u"&&isHexDigit(input[position+1])&&isHexDigit(input[position+2])&&isHexDigit(input[position+3])&&isHexDigit(input[position+4])){chr=String.fromCharCode(parseInt(input.substr(position+1,4),16));position+=5}if(result.length){if(Uni.isIdentifierPart(chr)){result+=chr}else{position--;return result}}else{if(Uni.isIdentifierStart(chr)){result+=chr}else{return undefined}}}fail()}function parseString(endChar){var result="";while(position<length){var chr=input[position++];if(chr===endChar){return result}else if(chr==="\\"){if(position>=length)fail();chr=input[position++];if(unescapeMap[chr]&&(json5||chr!="v"&&chr!="'")){result+=unescapeMap[chr]}else if(json5&&isLineTerminator(chr)){newline(chr)}else if(chr==="u"||chr==="x"&&json5){var off=chr==="u"?4:2;for(var i=0;i<off;i++){if(position>=length)fail();if(!isHexDigit(input[position]))fail("Bad escape sequence");position++}result+=String.fromCharCode(parseInt(input.substr(position-off,off),16))}else if(json5&&isOctDigit(chr)){if(chr<"4"&&isOctDigit(input[position])&&isOctDigit(input[position+1])){var digits=3}else if(isOctDigit(input[position])){var digits=2}else{var digits=1}position+=digits-1;result+=String.fromCharCode(parseInt(input.substr(position-digits,digits),8))}else if(json5){result+=chr}else{position--;fail()}}else if(isLineTerminator(chr)){fail()}else{if(!json5&&chr.charCodeAt(0)<32){position--;fail("Unexpected control character")}result+=chr}}fail()}skipWhiteSpace();var return_value=parseGeneric();if(return_value!==undefined||position<length){skipWhiteSpace();if(position>=length){if(typeof options.reviver==="function"){return_value=options.reviver.call(null,"",return_value)}return return_value}else{fail()}}else{if(position){fail("No data, only a whitespace")}else{fail("No data, empty input")}}}module.exports.parse=function parseJSON(input,options){if(typeof options==="function"){options={reviver:options}}if(input===undefined){return undefined}if(typeof input!=="string")input=String(input);if(options==null)options={};if(options.reserved_keys==null)options.reserved_keys="ignore";if(options.reserved_keys==="throw"||options.reserved_keys==="ignore"){if(options.null_prototype==null){options.null_prototype=true}}try{return parse(input,options)}catch(err){if(err instanceof SyntaxError&&err.row!=null&&err.column!=null){var old_err=err;err=SyntaxError(old_err.message);err.column=old_err.column;err.row=old_err.row}throw err}};module.exports.tokenize=function tokenizeJSON(input,options){if(options==null)options={};options._tokenize=function(smth){if(options._addstack)smth.stack.unshift.apply(smth.stack,options._addstack);tokens.push(smth)};var tokens=[];tokens.data=module.exports.parse(input,options);return tokens}});var errorEx=index$60;var fallback=parse_1;var JSONError=errorEx("JSONError",{fileName:errorEx.append("in %s")});var index$58=function(x,reviver,filename){if(typeof reviver==="string"){filename=reviver;reviver=null}try{try{return JSON.parse(x,reviver)}catch(err){fallback.parse(x,{mode:"json",reviver:reviver});throw err}}catch(err){var jsonErr=new JSONError(err);if(filename){jsonErr.fileName=filename}throw jsonErr}};var parseJson$1=index$58;var parseJson_1=function(json,filepath){try{return parseJson$1(json)}catch(err){err.message="JSON Error in "+filepath+":\n"+err.message;throw err}};var path$3=require$$0$1;var readFile=readFile$1;var parseJson=parseJson_1;var loadPackageProp$1=function(packageDir,options){var packagePath=path$3.join(packageDir,"package.json");return readFile(packagePath).then(function(content){if(!content)return null;var parsedContent=parseJson(content,packagePath);var packagePropValue=parsedContent[options.packageProp];if(!packagePropValue)return null;return{config:packagePropValue,filepath:packagePath}})};function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1){result+=string}return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}var isNothing_1=isNothing;var isObject_1=isObject;var toArray_1=toArray;var repeat_1=repeat;var isNegativeZero_1=isNegativeZero;var extend_1=extend;var common$1={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function YAMLException$2(reason,mark){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}YAMLException$2.prototype=Object.create(Error.prototype);YAMLException$2.prototype.constructor=YAMLException$2;YAMLException$2.prototype.toString=function toString(compact){var result=this.name+": ";result+=this.reason||"(unknown reason)";if(!compact&&this.mark){result+=" "+this.mark.toString()}return result};var exception=YAMLException$2;var common$3=common$1;function Mark$1(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=position;this.line=line;this.column=column}Mark$1.prototype.getSnippet=function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;indent=indent||4;maxLength=maxLength||75;head="";start=this.position;while(start>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(end<this.buffer.length&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(end))===-1){end+=1;if(end-this.position>maxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common$3.repeat(" ",indent)+head+snippet+tail+"\n"+common$3.repeat(" ",indent+this.position-start+head.length)+"^"};Mark$1.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};var mark=Mark$1;var YAMLException$4=exception;var TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null){Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style})})}return result}function Type$2(tag,options){options=options||{};Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1){throw new YAMLException$4('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}});this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.represent=options["represent"]||null;this.defaultStyle=options["defaultStyle"]||null;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1){throw new YAMLException$4('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}}var type=Type$2;var common$4=common$1;var YAMLException$3=exception;var Type$1=type;function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type$$1,index){return exclude.indexOf(index)===-1})}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type$$1){result[type$$1.kind][type$$1.tag]=result["fallback"][type$$1.tag]=type$$1}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType)}return result}function Schema$2(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach(function(type$$1){if(type$$1.loadKind&&type$$1.loadKind!=="scalar"){throw new YAMLException$3("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema$2.DEFAULT=null;Schema$2.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema$2.DEFAULT;types=arguments[0];break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException$3("Wrong number of arguments for Schema.create function")}schemas=common$4.toArray(schemas);types=common$4.toArray(types);if(!schemas.every(function(schema){return schema instanceof Schema$2})){throw new YAMLException$3("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!types.every(function(type$$1){return type$$1 instanceof Type$1})){throw new YAMLException$3("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new Schema$2({include:schemas,explicit:types})};var schema=Schema$2;var Type$3=type;var str=new Type$3("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}});var Type$4=type;var seq=new Type$4("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}});var Type$5=type;var map=new Type$5("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}});var Schema$5=schema;var failsafe=new Schema$5({explicit:[str,seq,map]});var Type$6=type;function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}var _null=new Type$6("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"});var Type$7=type;function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}var bool=new Type$7("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"});var common$5=common$1;var Type$8=type;function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!=="0"&&ch!=="1")return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="_")return false;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch===":")break;if(!isDecCode(data.charCodeAt(index))){return false}hasDigits=true}if(!hasDigits||ch==="_")return false;if(ch!==":")return true;return/^(:[0-5]?[0-9])+$/.test(data.slice(index))}function constructYamlInteger(data){var value=data,sign=1,ch,base,digits=[];if(value.indexOf("_")!==-1){value=value.replace(/_/g,"")}ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value,16);return sign*parseInt(value,8)}if(value.indexOf(":")!==-1){value.split(":").forEach(function(v){digits.unshift(parseInt(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1===0&&!common$5.isNegativeZero(object))}var int_1=new Type$8("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(object){return"0b"+object.toString(2)},octal:function(object){return"0"+object.toString(8)},decimal:function(object){return object.toString(10)},hexadecimal:function(object){return"0x"+object.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});var common$6=common$1;var Type$9=type;var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common$6.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common$6.isNegativeZero(object))}var float_1=new Type$9("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});var Schema$4=schema;var json=new Schema$4({include:[failsafe],implicit:[_null,bool,int_1,float_1]});var Schema$3=schema;var core=new Schema$3({include:[json]});var Type$10=type;var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4]){return new Date(Date.UTC(year,month,day))}hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3){fraction+="0"}fraction=+fraction}if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6e4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}var timestamp=new Type$10("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});var Type$11=type;function resolveYamlMerge(data){return data==="<<"||data===null}var merge=new Type$11("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});var NodeBuffer;try{var _require$4=commonjsRequire;NodeBuffer=_require$4("buffer").Buffer}catch(__){}var Type$12=type;var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}var binary=new Type$12("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});var Type$13=type;var _hasOwnProperty$1=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair){if(_hasOwnProperty$1.call(pair,pairKey)){if(!pairHasKey)pairHasKey=true;else return false}}if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==null?data:[]}var omap=new Type$13("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});var Type$14=type;var _toString$1=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString$1.call(pair)!=="[object Object]")return false;keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}var pairs=new Type$14("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});var Type$15=type;var _hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object){if(_hasOwnProperty$2.call(object,key)){if(object[key]!==null)return false}}return true}function constructYamlSet(data){return data!==null?data:{}}var set=new Type$15("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});var Schema$1=schema;var default_safe=new Schema$1({include:[core],implicit:[timestamp,merge],explicit:[binary,omap,pairs,set]});var Type$16=type;function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object==="undefined"}var _undefined=new Type$16("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined});var Type$17=type;function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}var regexp=new Type$17("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp});var esprima;try{var _require$5=commonjsRequire;esprima=_require$5("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type$18=type;function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;return new Function(params,source.slice(body[0]+1,body[1]-1))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}var _function=new Type$18("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction});var Schema$6=schema;var default_full=Schema$6.DEFAULT=new Schema$6({include:[default_safe],explicit:[_undefined,regexp,_function]});var common=common$1;var YAMLException$1=exception;var Mark=mark;var DEFAULT_SAFE_SCHEMA$1=default_safe;var DEFAULT_FULL_SCHEMA$1=default_full;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57){return c-48}lc=c|32;if(97<=lc&&lc<=102){return lc-97+10}return-1}function escapedHexLen(c){if(c===120){return 2}if(c===117){return 4}if(c===85){return 8}return 0}function fromDecimalCode(c){if(48<=c&&c<=57){return c-48}return-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"":c===98?"\b":c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\v":c===102?"\f":c===114?"\r":c===101?"":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"…":c===95?" ":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535){return String.fromCharCode(c)}return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA$1;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException$1(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startPos){var index,quantity;keyNode=String(keyNode);if(_result===null){_result={}}if(keyTag==="tag:yaml.org,2002:merge"){if(Array.isArray(valueNode)){for(index=0,quantity=valueNode.length;index<quantity;index+=1){mergeMappings(state,_result,valueNode[index],overridableKeys)}}else{mergeMappings(state,_result,valueNode,overridableKeys)}}else{if(!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)){state.line=startLine||state.line;state.position=startPos||state.position;throwError(state,"duplicated mapping key")}_result[keyNode]=valueNode;delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10){state.position++}else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10){state.position++}}else{throwError(state,"a line break is expected")}state.line+=1;state.lineStart=state.position}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(allowComments&&ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent){throwWarning(state,"deficient indentation")}return lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch)){return true}}return false}function writeFoldedLines(state,count){if(count===1){state.result+=" "}else if(count>1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP){state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(chomping===CHOMPING_CLIP){if(didReadContent){state.result+="\n"}}break}if(folding){if(is_WHITE_SPACE(ch)){atMoreIndented=true;state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===0){if(didReadContent){state.result+=" "}}else{state.result+=common.repeat("\n",emptyLines)}}else{state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0){ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=false,ch;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(ch!==45){break}following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following)){break}detected=true;state.position++;if(skipSeparationSpace(state,true,-1)){if(state.lineIndent<=nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent<nodeIndent){break}}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_pos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys={},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){following=state.input.charCodeAt(state.position+1);_line=state.line;_pos=state.position;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else{throwError(state,"incomplete explicit mapping pair; a key node is missed")}state.position+=1;ch=following}else if(composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true)){if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch)){throwError(state,"a whitespace character is expected after the key-value separator within a block mapping")}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected){throwError(state,"can not read an implicit mapping pair; a colon is missed")}else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected){throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{state.tag=_tag;state.anchor=_anchor;return true}}else{break}if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndent<nodeIndent){break}}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null)}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null){throwError(state,"duplication of a tag property")}ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else{tagHandle="!"}_position=state.position;if(isVerbatim){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else{throwError(state,"unexpected end of the stream within a verbatim tag")}}else{while(ch!==0&&!is_WS_OR_EOL(ch)){if(ch===33){if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle)){throwError(state,"named tag handle cannot contain such characters")}isNamed=true;_position=state.position+1}else{throwError(state,"tag suffix cannot contain exclamation marks")}}ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName)){throwError(state,"tag suffix cannot contain flow indicator characters")}}if(tagName&&!PATTERN_TAG_URI.test(tagName)){throwError(state,"tag name cannot contain such characters: "+tagName)}if(isVerbatim){state.tag=tagName}else if(_hasOwnProperty.call(state.tagMap,tagHandle)){state.tag=state.tagMap[tagHandle]+tagName}else if(tagHandle==="!"){state.tag="!"+tagName}else if(tagHandle==="!!"){state.tag="tag:yaml.org,2002:"+tagName}else{throwError(state,'undeclared tag handle "'+tagHandle+'"')}return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);if(ch!==38)return false;if(state.anchor!==null){throwError(state,"duplication of an anchor property")}ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an anchor node must contain at least one character")}state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an alias node must contain at least one character")}alias=state.input.slice(_position,state.position);if(!state.anchorMap.hasOwnProperty(alias)){throwError(state,'unidentified alias "'+alias+'"')}state.result=state.anchorMap[alias];skipSeparationSpace(state,true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,type,flowIndent,blockIndent;if(state.listener!==null){state.listener("open",state)}state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek){if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}}if(indentStatus===1){while(readTagProperty(state)||readAnchorProperty(state)){if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}else{allowBlockCollections=false}}}if(allowBlockCollections){allowBlockCollections=atNewLine||allowCompact}if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext){flowIndent=parentIndent}else{flowIndent=parentIndent+1}blockIndent=state.position-state.lineStart;if(indentStatus===1){if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)){hasContent=true}else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)){hasContent=true}else if(readAlias(state)){hasContent=true;if(state.tag!==null||state.anchor!==null){throwError(state,"alias node should not have any properties")}}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null){state.tag="?"}}if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else if(indentStatus===0){hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}}if(state.tag!==null&&state.tag!=="!"){if(state.tag==="?"){for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}break}}}else if(_hasOwnProperty.call(state.typeMap[state.kind||"fallback"],state.tag)){type=state.typeMap[state.kind||"fallback"][state.tag];if(state.result!==null&&type.kind!==state.kind){throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else{throwError(state,"unknown tag !<"+state.tag+">")}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1){throwError(state,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13){input+="\n"}if(input.charCodeAt(0)===65279){input=input.slice(1)}}var state=new State(input,options);state.input+="\0";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1){readDocument(state)}return state.documents}function loadAll$1(input,iterator,options){var documents=loadDocuments(input,options),index,length;for(index=0,length=documents.length;index<length;index+=1){iterator(documents[index])}}function load$1(input,options){var documents=loadDocuments(input,options);if(documents.length===0){return undefined}else if(documents.length===1){return documents[0]}throw new YAMLException$1("expected a single document in the stream, but found more")}function safeLoadAll$1(input,output,options){loadAll$1(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options))}function safeLoad$1(input,options){return load$1(input,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options))}var loadAll_1=loadAll$1;var load_1=load$1;var safeLoadAll_1=safeLoadAll$1;var safeLoad_1=safeLoad$1;var loader$1={loadAll:loadAll_1,load:load_1,safeLoadAll:safeLoadAll_1,safeLoad:safeLoad_1};var common$7=common$1;var YAMLException$5=exception;var DEFAULT_FULL_SCHEMA$2=default_full;var DEFAULT_SAFE_SCHEMA$2=default_safe;var _toString$2=Object.prototype.toString;var _hasOwnProperty$3=Object.prototype.hasOwnProperty;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!"){tag="tag:yaml.org,2002:"+tag.slice(2)}type=schema.compiledTypeMap["fallback"][tag];if(type&&_hasOwnProperty$3.call(type.styleAliases,style)){style=type.styleAliases[style]}result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else{throw new YAMLException$5("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+handle+common$7.repeat("0",length-string.length)+string}function State$1(options){this.schema=options["schema"]||DEFAULT_FULL_SCHEMA$2;this.indent=Math.max(1,options["indent"]||2);this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common$7.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common$7.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}function generateNextLine(state,level){return"\n"+common$7.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str)){return true}}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==65279||65536<=c&&c<=1114111}function isPlainSafe(c){return isPrintable(c)&&c!==65279&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_COLON&&c!==CHAR_SHARP}function isPlainSafeFirst(c){return isPrintable(c)&&c!==65279&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}var STYLE_PLAIN=1;var STYLE_SINGLE=2;var STYLE_LITERAL=3;var STYLE_FOLDED=4;var STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType){var i;var char;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(string.charCodeAt(0))&&!isWhitespace(string.charCodeAt(string.length-1));if(singleLineOnly){for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char)}}else{for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}if(string[0]===" "&&indentPerLevel>9){return STYLE_DOUBLE}return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0){return"''"}if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1){return"'"+string+"'"}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException$5("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=string[0]===" "?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char;var escapeSeq;for(var i=0;i<string.length;i++){char=string.charCodeAt(i);escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=", ";_result+=state.dump}}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(writeNode(state,level+1,object[index],true,true)){if(!compact||index!==0){_result+=generateNextLine(state,level)}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){_result+="-"}else{_result+="- "}_result+=state.dump}}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(index!==0)pairBuffer+=", ";objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level,objectKey,false,false)){continue}if(state.dump.length>1024)pairBuffer+="? ";pairBuffer+=state.dump+": ";if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException$5("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||index!==0){pairBuffer+=generateNextLine(state,level)}objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level+1,objectKey,true,true,true)){continue}explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){state.tag=explicit?type.tag:"?";if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString$2.call(type.represent)==="[object Function]"){_result=type.represent(object,style)}else if(_hasOwnProperty$3.call(type.represent,style)){_result=type.represent[style](object,style)}else{throw new YAMLException$5("!<"+type.tag+'> tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString$2.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){if(block&&state.dump.length!==0){writeBlockSequence(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey)}}else{if(state.skipInvalid)return false;throw new YAMLException$5("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]])}state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index)}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes)}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}}function dump$1(input,options){options=options||{};var state=new State$1(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+"\n";return""}function safeDump$1(input,options){return dump$1(input,common$7.extend({schema:DEFAULT_SAFE_SCHEMA$2},options))}var dump_1=dump$1;var safeDump_1=safeDump$1;var dumper$1={dump:dump_1,safeDump:safeDump_1};var loader=loader$1;var dumper=dumper$1;function deprecated$3(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}var Type=type;var Schema=schema;var FAILSAFE_SCHEMA=failsafe;var JSON_SCHEMA=json;var CORE_SCHEMA=core;var DEFAULT_SAFE_SCHEMA=default_safe;var DEFAULT_FULL_SCHEMA=default_full;var load=loader.load;var loadAll=loader.loadAll;var safeLoad=loader.safeLoad;var safeLoadAll=loader.safeLoadAll;var dump=dumper.dump;var safeDump=dumper.safeDump;var YAMLException=exception;var MINIMAL_SCHEMA=failsafe;var SAFE_SCHEMA=default_safe;var DEFAULT_SCHEMA=default_full;var scan=deprecated$3("scan");var parse$1=deprecated$3("parse");var compose=deprecated$3("compose");var addConstructor=deprecated$3("addConstructor");var jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SAFE_SCHEMA:DEFAULT_SAFE_SCHEMA,DEFAULT_FULL_SCHEMA:DEFAULT_FULL_SCHEMA,load:load,loadAll:loadAll,safeLoad:safeLoad,safeLoadAll:safeLoadAll,dump:dump,safeDump:safeDump,YAMLException:YAMLException,MINIMAL_SCHEMA:MINIMAL_SCHEMA,SAFE_SCHEMA:SAFE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,scan:scan,parse:parse$1,compose:compose,addConstructor:addConstructor};var yaml$1=jsYaml;var index$64=yaml$1;var index$66=createCommonjsModule(function(module){"use strict";var Module=module$1;var path=require$$0$1;module.exports=function requireFromString(code,filename,opts){if(typeof filename==="object"){opts=filename;filename=undefined}opts=opts||{};filename=filename||"";opts.appendPaths=opts.appendPaths||[];opts.prependPaths=opts.prependPaths||[];if(typeof code!=="string"){throw new Error("code must be a string, not "+typeof code)}var paths=Module._nodeModulePaths(path.dirname(filename));var m=new Module(filename,module.parent);m.filename=filename;m.paths=[].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);m._compile(code,filename);return m.exports}});var yaml=index$64;var requireFromString=index$66;var readFile$3=readFile$1;var parseJson$2=parseJson_1;var loadRc$1=function(filepath,options){return loadExtensionlessRc().then(function(result){if(result)return result;if(options.rcExtensions)return loadRcWithExtensions();return null});function loadExtensionlessRc(){return readRcFile().then(function(content){if(!content)return null;var pasedConfig=options.rcStrictJson?parseJson$2(content,filepath):yaml.safeLoad(content,{filename:filepath});return{config:pasedConfig,filepath:filepath}})}function loadRcWithExtensions(){return readRcFile("json").then(function(content){if(content){var successFilepath=filepath+".json";return{config:parseJson$2(content,successFilepath),filepath:successFilepath}}return readRcFile("yaml")}).then(function(content){if(content){if(content.config)return content;var successFilepath=filepath+".yaml";return{config:yaml.safeLoad(content,{filename:successFilepath}),filepath:successFilepath}}return readRcFile("yml")}).then(function(content){if(content){if(content.config)return content;var successFilepath=filepath+".yml";return{config:yaml.safeLoad(content,{filename:successFilepath}),filepath:successFilepath}}return readRcFile("js")}).then(function(content){if(content){if(content.config)return content;var successFilepath=filepath+".js";return{config:requireFromString(content,successFilepath),filepath:successFilepath}}return null})}function readRcFile(extension){var filepathWithExtension=extension?filepath+"."+extension:filepath;return readFile$3(filepathWithExtension)}};var requireFromString$1=index$66;var readFile$4=readFile$1;var loadJs$1=function(filepath){return readFile$4(filepath).then(function(content){if(!content)return null;return{config:requireFromString$1(content,filepath),filepath:filepath}})};var yaml$2=index$64;var requireFromString$2=index$66;var readFile$5=readFile$1;var parseJson$3=parseJson_1;var loadDefinedFile$1=function(filepath,options){return readFile$5(filepath,{throwNotFound:true}).then(function(content){var parsedConfig=function(){switch(options.format){case"json":return parseJson$3(content,filepath);case"yaml":return yaml$2.safeLoad(content,{filename:filepath});case"js":return requireFromString$2(content,filepath);default:return tryAllParsing(content,filepath)}}();if(!parsedConfig){throw new Error('Failed to parse "'+filepath+'" as JSON, JS, or YAML.')}return{config:parsedConfig,filepath:filepath}})};function tryAllParsing(content,filepath){return tryYaml(content,filepath,function(){return tryRequire(content,filepath,function(){return null})})}function tryYaml(content,filepath,cb){try{var result=yaml$2.safeLoad(content,{filename:filepath});if(typeof result==="string"){return cb()}return result}catch(e){return cb()}}function tryRequire(content,filepath,cb){try{return requireFromString$2(content,filepath)}catch(e){return cb()}}var path$2=require$$0$1;var isDir=index$56;var loadPackageProp=loadPackageProp$1;var loadRc=loadRc$1;var loadJs=loadJs$1;var loadDefinedFile=loadDefinedFile$1;var createExplorer$1=function(options){var fileCache=options.cache?new Map:null;var directoryCache=options.cache?new Map:null;var transform=options.transform||identityPromise;function clearFileCache(){if(fileCache)fileCache.clear()}function clearDirectoryCache(){if(directoryCache)directoryCache.clear()}function clearCaches(){clearFileCache();clearDirectoryCache()}function load(searchPath,configPath){if(!configPath&&options.configPath){configPath=options.configPath}if(configPath){var absoluteConfigPath=path$2.resolve(process.cwd(),configPath);if(fileCache&&fileCache.has(absoluteConfigPath)){return fileCache.get(absoluteConfigPath)}var result=loadDefinedFile(absoluteConfigPath,options).then(transform);if(fileCache)fileCache.set(absoluteConfigPath,result);return result}if(!searchPath)return Promise.resolve(null);var absoluteSearchPath=path$2.resolve(process.cwd(),searchPath);return isDirectory(absoluteSearchPath).then(function(searchPathIsDirectory){var directory=searchPathIsDirectory?absoluteSearchPath:path$2.dirname(absoluteSearchPath);return searchDirectory(directory)})}function searchDirectory(directory){if(directoryCache&&directoryCache.has(directory)){return directoryCache.get(directory)}var result=Promise.resolve().then(function(){if(!options.packageProp)return;return loadPackageProp(directory,options)}).then(function(result){if(result||!options.rc)return result;return loadRc(path$2.join(directory,options.rc),options)}).then(function(result){if(result||!options.js)return result;return loadJs(path$2.join(directory,options.js))}).then(function(result){if(result)return result;var splitPath=directory.split(path$2.sep);var nextDirectory=splitPath.length>1?splitPath.slice(0,-1).join(path$2.sep):null;if(!nextDirectory||directory===options.stopDir)return null;return searchDirectory(nextDirectory)}).then(transform);if(directoryCache)directoryCache.set(directory,result);return result}return{load:load,clearFileCache:clearFileCache,clearDirectoryCache:clearDirectoryCache,clearCaches:clearCaches}};function isDirectory(filepath){return new Promise(function(resolve,reject){return isDir(filepath,function(err,dir){if(err)return reject(err);return resolve(dir)})})}function identityPromise(x){return Promise.resolve(x)}var path$1=require$$0$1;var oshomedir=index$50;var minimist=index$52;var assign=index$54;var createExplorer=createExplorer$1;var parsedCliArgs=minimist(process.argv);var index$48=function(moduleName,options){options=assign({packageProp:moduleName,rc:"."+moduleName+"rc",js:moduleName+".config.js",argv:"config",rcStrictJson:false,stopDir:oshomedir(),cache:true},options);if(options.argv&&parsedCliArgs[options.argv]){options.configPath=path$1.resolve(parsedCliArgs[options.argv])}return createExplorer(options)};var index$70=function(xs,fn){var res=[];for(var i=0;i<xs.length;i++){var x=fn(xs[i],i);if(isArray(x))res.push.apply(res,x);else res.push(x)}return res};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};var index$72=balanced$1;function balanced$1(a,b,str){if(a instanceof RegExp)a=maybeMatch(a,str);if(b instanceof RegExp)b=maybeMatch(b,str);var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null}balanced$1.range=range;function range(a,b,str){var begs,beg,left,right,result;var ai=str.indexOf(a);var bi=str.indexOf(b,ai+1);var i=ai;if(ai>=0&&bi>0){begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1)}else if(begs.length==1){result=[begs.pop(),bi]}else{beg=begs.pop();if(beg<left){left=beg;right=bi}bi=str.indexOf(b,i+1)}i=ai<bi&&ai>=0?ai:bi}if(begs.length){result=[left,right]}}return result}var concatMap=index$70;var balanced=index$72;var index$68=expandTop;var escSlash="\0SLASH"+Math.random()+"\0";var escOpen="\0OPEN"+Math.random()+"\0";var escClose="\0CLOSE"+Math.random()+"\0";var escComma="\0COMMA"+Math.random()+"\0";var escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];if(str.substr(0,2)==="{}"){str="\\{\\}"+str.substr(2)}return expand$1(escapeBraces(str),true).map(unescapeBraces)}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand$1(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions){if(m.post.match(/,.*\}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand$1(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand$1(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand$1(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand$1(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y<x;if(reverse){incr*=-1;test=gte}var pad=n.some(isPadded);N=[];for(var i=x;test(i,y);i+=incr){var c;if(isAlphaSequence){c=String.fromCharCode(i);if(c==="\\")c=""}else{c=String(i);if(pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand$1(el,false)})}for(var j=0;j<N.length;j++){for(var k=0;k<post.length;k++){var expansion=pre+N[j]+post[k];if(!isTop||isSequence||expansion)expansions.push(expansion)}}return expansions}var minimatch_1=minimatch$1;minimatch$1.Minimatch=Minimatch;var path$4={sep:"/"};try{path$4=require$$0$1}catch(er){}var GLOBSTAR=minimatch$1.GLOBSTAR=Minimatch.GLOBSTAR={};var expand=index$68;var plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var qmark="[^/]";var star=qmark+"*?";var twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?";var reSpecials=charSet("().*{}+?[]^$\\!");function charSet(s){return s.split("").reduce(function(set,c){set[c]=true;return set},{})}var slashSplit=/\/+/;minimatch$1.filter=filter;function filter(pattern,options){options=options||{};return function(p,i,list){return minimatch$1(p,pattern,options)}}function ext(a,b){a=a||{};b=b||{};var t={};Object.keys(b).forEach(function(k){t[k]=b[k]});Object.keys(a).forEach(function(k){t[k]=a[k]});return t}minimatch$1.defaults=function(def){if(!def||!Object.keys(def).length)return minimatch$1;var orig=minimatch$1;var m=function minimatch(p,pattern,options){return orig.minimatch(p,pattern,ext(def,options))};m.Minimatch=function Minimatch(pattern,options){return new orig.Minimatch(pattern,ext(def,options))};return m};Minimatch.defaults=function(def){if(!def||!Object.keys(def).length)return Minimatch;return minimatch$1.defaults(def).Minimatch};function minimatch$1(p,pattern,options){if(typeof pattern!=="string"){throw new TypeError("glob pattern string required")}if(!options)options={};if(!options.nocomment&&pattern.charAt(0)==="#"){return false}if(pattern.trim()==="")return p==="";return new Minimatch(pattern,options).match(p)}function Minimatch(pattern,options){if(!(this instanceof Minimatch)){return new Minimatch(pattern,options)}if(typeof pattern!=="string"){throw new TypeError("glob pattern string required")}if(!options)options={};pattern=pattern.trim();if(path$4.sep!=="/"){pattern=pattern.split(path$4.sep).join("/")}this.options=options;this.set=[];this.pattern=pattern;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var pattern=this.pattern;var options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=true;return}if(!pattern){this.empty=true;return}this.parseNegate();var set=this.globSet=this.braceExpand();if(options.debug)this.debug=console.error;this.debug(this.pattern,set);set=this.globParts=set.map(function(s){return s.split(slashSplit)});this.debug(this.pattern,set);set=set.map(function(s,si,set){return s.map(this.parse,this)},this);this.debug(this.pattern,set);set=set.filter(function(s){return s.indexOf(false)===-1});this.debug(this.pattern,set);this.set=set}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var pattern=this.pattern;var negate=false;var options=this.options;var negateOffset=0;if(options.nonegate)return;for(var i=0,l=pattern.length;i<l&&pattern.charAt(i)==="!";i++){negate=!negate;negateOffset++}if(negateOffset)this.pattern=pattern.substr(negateOffset);this.negate=negate}minimatch$1.braceExpand=function(pattern,options){return braceExpand(pattern,options)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(pattern,options){if(!options){if(this instanceof Minimatch){options=this.options}else{options={}}}pattern=typeof pattern==="undefined"?this.pattern:pattern;if(typeof pattern==="undefined"){throw new TypeError("undefined pattern")}if(options.nobrace||!pattern.match(/\{.*\}/)){return[pattern]}return expand(pattern)}Minimatch.prototype.parse=parse$2;var SUBPARSE={};function parse$2(pattern,isSub){if(pattern.length>1024*64){throw new TypeError("pattern is too long")}var options=this.options;if(!options.noglobstar&&pattern==="**")return GLOBSTAR;if(pattern==="")return"";var re="";var hasMagic=!!options.nocase;var escaping=false;var patternListStack=[];var negativeLists=[];var stateChar;var inClass=false;var reClassStart=-1;var classStart=-1;var patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var self=this;function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star;hasMagic=true;break;case"?":re+=qmark;hasMagic=true;break;default:re+="\\"+stateChar;break}self.debug("clearStateChar %j %j",stateChar,re);stateChar=false}}for(var i=0,len=pattern.length,c;i<len&&(c=pattern.charAt(i));i++){this.debug("%s\t%s %s %j",pattern,i,re,c);if(escaping&&reSpecials[c]){re+="\\"+c;escaping=false;continue}switch(c){case"/":return false;case"\\":clearStateChar();escaping=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",pattern,i,re,c);if(inClass){this.debug(" in class");if(c==="!"&&i===classStart+1)c="^";re+=c;continue}self.debug("call clearStateChar %j",stateChar);clearStateChar();stateChar=c;if(options.noext)clearStateChar();continue;case"(":if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}patternListStack.push({type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close});re+=stateChar==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",stateChar,re);stateChar=false;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar();hasMagic=true;var pl=patternListStack.pop();re+=pl.close;if(pl.type==="!"){negativeLists.push(pl)}pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length||escaping){re+="\\|";escaping=false;continue}clearStateChar();re+="|";continue;case"[":clearStateChar();if(inClass){re+="\\"+c;continue}inClass=true;classStart=i;reClassStart=re.length;re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c;escaping=false;continue}if(inClass){var cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch(er){var sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]";hasMagic=hasMagic||sp[1];inClass=false;continue}}hasMagic=true;inClass=false;re+=c;continue;default:clearStateChar();if(escaping){escaping=false}else if(reSpecials[c]&&!(c==="^"&&inClass)){re+="\\"}re+=c}}if(inClass){cs=pattern.substr(classStart+1);sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0];hasMagic=hasMagic||sp[1]}for(pl=patternListStack.pop();pl;pl=patternListStack.pop()){var tail=re.slice(pl.reStart+pl.open.length);this.debug("setting tail",re,pl);tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(_,$1,$2){if(!$2){$2="\\"}return $1+$1+$2+"|"});this.debug("tail=%j\n %s",tail,tail,pl,re);var t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=true;re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar();if(escaping){re+="\\\\"}var addPatternStart=false;switch(re.charAt(0)){case".":case"[":case"(":addPatternStart=true}for(var n=negativeLists.length-1;n>-1;n--){var nl=negativeLists[n];var nlBefore=re.slice(0,nl.reStart);var nlFirst=re.slice(nl.reStart,nl.reEnd-8);var nlLast=re.slice(nl.reEnd-8,nl.reEnd);var nlAfter=re.slice(nl.reEnd);nlLast+=nlAfter;var openParensBefore=nlBefore.split("(").length-1;var cleanAfter=nlAfter;for(i=0;i<openParensBefore;i++){cleanAfter=cleanAfter.replace(/\)[+*?]?/,"")}nlAfter=cleanAfter;var dollar="";if(nlAfter===""&&isSub!==SUBPARSE){dollar="$"}var newRe=nlBefore+nlFirst+nlAfter+dollar+nlLast;re=newRe}if(re!==""&&hasMagic){re="(?=.)"+re}if(addPatternStart){re=patternStart+re}if(isSub===SUBPARSE){return[re,hasMagic]}if(!hasMagic){return globUnescape(pattern)}var flags=options.nocase?"i":"";try{var regExp=new RegExp("^"+re+"$",flags)}catch(er){return new RegExp("$.")}regExp._glob=pattern;regExp._src=re;return regExp}minimatch$1.makeRe=function(pattern,options){return new Minimatch(pattern,options||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var set=this.set;if(!set.length){this.regexp=false;return this.regexp}var options=this.options;var twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot;var flags=options.nocase?"i":"";var re=set.map(function(pattern){return pattern.map(function(p){return p===GLOBSTAR?twoStar:typeof p==="string"?regExpEscape(p):p._src}).join("\\/")}).join("|");re="^(?:"+re+")$";if(this.negate)re="^(?!"+re+").*$";try{this.regexp=new RegExp(re,flags)}catch(ex){this.regexp=false}return this.regexp}minimatch$1.match=function(list,pattern,options){options=options||{};var mm=new Minimatch(pattern,options);list=list.filter(function(f){return mm.match(f)});if(mm.options.nonull&&!list.length){list.push(pattern)}return list};Minimatch.prototype.match=match;function match(f,partial){this.debug("match",f,this.pattern);if(this.comment)return false;if(this.empty)return f==="";if(f==="/"&&partial)return true;var options=this.options;if(path$4.sep!=="/"){f=f.split(path$4.sep).join("/")}f=f.split(slashSplit);this.debug(this.pattern,"split",f);var set=this.set;this.debug(this.pattern,"set",set);var filename;var i;for(i=f.length-1;i>=0;i--){filename=f[i];if(filename)break}for(i=0;i<set.length;i++){var pattern=set[i];var file=f;if(options.matchBase&&pattern.length===1){file=[filename]}var hit=this.matchOne(file,pattern,partial);if(hit){if(options.flipNegate)return true;return!this.negate}}if(options.flipNegate)return false;return this.negate}Minimatch.prototype.matchOne=function(file,pattern,partial){var options=this.options;this.debug("matchOne",{this:this,file:file,pattern:pattern});this.debug("matchOne",file.length,pattern.length);for(var fi=0,pi=0,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi];var f=file[fi];this.debug(pattern,p,f);if(p===false)return false;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi;var pr=pi+1;if(pr===pl){this.debug("** at the end");for(;fi<fl;fi++){if(file[fi]==="."||file[fi]===".."||!options.dot&&file[fi].charAt(0)===".")return false}return true}while(fr<fl){var swallowee=file[fr];this.debug("\nglobstar while",file,fr,pattern,pr,swallowee);if(this.matchOne(file.slice(fr),pattern.slice(pr),partial)){this.debug("globstar found match!",fr,fl,swallowee);return true}else{if(swallowee==="."||swallowee===".."||!options.dot&&swallowee.charAt(0)==="."){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue");fr++}}if(partial){this.debug("\n>>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const cosmiconfig=index$48;const minimatch=minimatch_1;const withCache=cosmiconfig("prettier");const noCache=cosmiconfig("prettier",{cache:false});function resolveConfig(filePath,opts){const useCache=!(opts&&opts.useCache===false);return(useCache?withCache:noCache).load(filePath).then(result=>{if(!result){return null}return mergeOverrides(result.config,filePath)})}function clearCache(){withCache.clearCaches()}function resolveConfigFile(filePath){return noCache.load(filePath).then(result=>{if(result){return result.filepath}return null})}function mergeOverrides(config,filePath){const options=Object.assign({},config);if(filePath&&options.overrides){for(const override of options.overrides){if(pathMatchesGlobs(filePath,override.files,override.excludeFiles)){Object.assign(options,override.options)}}}delete options.overrides;return options}function pathMatchesGlobs(filePath,patterns,excludedPatterns){const patternList=[].concat(patterns);const excludedPatternList=[].concat(excludedPatterns||[]);const opts={matchBase:true};return patternList.some(pattern=>minimatch(filePath,pattern,opts))&&!excludedPatternList.some(excludedPattern=>minimatch(filePath,excludedPattern,opts))}var resolveConfig_1={resolveConfig:resolveConfig,resolveConfigFile:resolveConfigFile,clearCache:clearCache};var require$$2$19=_package$1&&_package$1["default"]||_package$1;const stripBom=index$2;const comments=comments$1;const version=require$$2$19.version;const printAstToDoc=printer.printAstToDoc;const util$1=util$3;const printDocToString=docPrinter.printDocToString;const normalizeOptions=options.normalize;const parser=parser$1;const printDocToDebug=docDebug.printDocToDebug;const config=resolveConfig_1;function guessLineEnding(text){const index=text.indexOf("\n");if(index>=0&&text.charAt(index-1)==="\r"){return"\r\n"}return"\n"}function attachComments(text,ast,opts){const astComments=ast.comments;if(astComments){delete ast.comments;comments.attach(astComments,ast,text,opts)}ast.tokens=[];opts.originalText=text.trimRight();return astComments}function ensureAllCommentsPrinted(astComments){if(!astComments){return}for(let i=0;i<astComments.length;++i){if(astComments[i].value.trim()==="prettier-ignore"){return}}astComments.forEach(comment=>{if(!comment.printed){throw new Error('Comment "'+comment.value.trim()+'" was not printed. Please report this error!')}delete comment.printed})}function formatWithCursor(text,opts,addAlignmentSize){text=stripBom(text);addAlignmentSize=addAlignmentSize||0;const ast=parser.parse(text,opts);const formattedRangeOnly=formatRange(text,opts,ast);if(formattedRangeOnly){return{formatted:formattedRangeOnly}}let cursorOffset;if(opts.cursorOffset>=0){const cursorNodeAndParents=findNodeAtOffset(ast,opts.cursorOffset);const cursorNode=cursorNodeAndParents.node;if(cursorNode){cursorOffset=opts.cursorOffset-util$1.locStart(cursorNode);opts.cursorNode=cursorNode}}const astComments=attachComments(text,ast,opts);const doc=printAstToDoc(ast,opts,addAlignmentSize);opts.newLine=guessLineEnding(text);const toStringResult=printDocToString(doc,opts);const str=toStringResult.formatted;const cursorOffsetResult=toStringResult.cursor;ensureAllCommentsPrinted(astComments);if(addAlignmentSize>0){return{formatted:str.trim()+opts.newLine}}if(cursorOffset!==undefined){return{formatted:str,cursorOffset:cursorOffsetResult+cursorOffset}}return{formatted:str}}function format(text,opts,addAlignmentSize){return formatWithCursor(text,opts,addAlignmentSize).formatted}function findSiblingAncestors(startNodeAndParents,endNodeAndParents){let resultStartNode=startNodeAndParents.node;let resultEndNode=endNodeAndParents.node;if(resultStartNode===resultEndNode){return{startNode:resultStartNode,endNode:resultEndNode}}for(const endParent of endNodeAndParents.parentNodes){if(endParent.type!=="Program"&&endParent.type!=="File"&&util$1.locStart(endParent)>=util$1.locStart(startNodeAndParents.node)){resultEndNode=endParent}else{break}}for(const startParent of startNodeAndParents.parentNodes){if(startParent.type!=="Program"&&startParent.type!=="File"&&util$1.locEnd(startParent)<=util$1.locEnd(endNodeAndParents.node)){resultStartNode=startParent}else{break}}return{startNode:resultStartNode,endNode:resultEndNode}}function findNodeAtOffset(node,offset,predicate,parentNodes){predicate=predicate||(()=>true);parentNodes=parentNodes||[];const start=util$1.locStart(node);const end=util$1.locEnd(node);if(start<=offset&&offset<=end){for(const childNode of comments.getSortedChildNodes(node)){const childResult=findNodeAtOffset(childNode,offset,predicate,[node].concat(parentNodes));if(childResult){return childResult}}if(predicate(node)){return{node:node,parentNodes:parentNodes}}}}function isSourceElement(opts,node){if(node==null){return false}switch(node.type||node.kind){case"ObjectExpression":case"ArrayExpression":case"StringLiteral":case"NumericLiteral":case"BooleanLiteral":case"NullLiteral":case"FunctionDeclaration":case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ImportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":case"TypeAlias":case"InterfaceDeclaration":case"TypeAliasDeclaration":case"ExportAssignment":case"ExportDeclaration":case"OperationDefinition":case"FragmentDefinition":case"VariableDefinition":case"TypeExtensionDefinition":case"ObjectTypeDefinition":case"FieldDefinition":case"DirectiveDefinition":case"EnumTypeDefinition":case"EnumValueDefinition":case"InputValueDefinition":case"InputObjectTypeDefinition":case"SchemaDefinition":case"OperationTypeDefinition":case"InterfaceTypeDefinition":case"UnionTypeDefinition":case"ScalarTypeDefinition":return true}return false}function calculateRange(text,opts,ast){const rangeStringOrig=text.slice(opts.rangeStart,opts.rangeEnd);const startNonWhitespace=Math.max(opts.rangeStart+rangeStringOrig.search(/\S/),opts.rangeStart);let endNonWhitespace;for(endNonWhitespace=opts.rangeEnd;endNonWhitespace>opts.rangeStart;--endNonWhitespace){if(text[endNonWhitespace-1].match(/\S/)){break}}const startNodeAndParents=findNodeAtOffset(ast,startNonWhitespace,node=>isSourceElement(opts,node));const endNodeAndParents=findNodeAtOffset(ast,endNonWhitespace,node=>isSourceElement(opts,node));if(!startNodeAndParents||!endNodeAndParents){return{rangeStart:0,rangeEnd:0}}const siblingAncestors=findSiblingAncestors(startNodeAndParents,endNodeAndParents);const startNode=siblingAncestors.startNode;const endNode=siblingAncestors.endNode;const rangeStart=Math.min(util$1.locStart(startNode),util$1.locStart(endNode));const rangeEnd=Math.max(util$1.locEnd(startNode),util$1.locEnd(endNode));return{rangeStart:rangeStart,rangeEnd:rangeEnd}}function formatRange(text,opts,ast){if(opts.rangeStart<=0&&text.length<=opts.rangeEnd){return}const range=calculateRange(text,opts,ast);const rangeStart=range.rangeStart;const rangeEnd=range.rangeEnd;const rangeString=text.slice(rangeStart,rangeEnd);const rangeStart2=Math.min(rangeStart,text.lastIndexOf("\n",rangeStart)+1);const indentString=text.slice(rangeStart2,rangeStart);const alignmentSize=util$1.getAlignmentSize(indentString,opts.tabWidth);const rangeFormatted=format(rangeString,Object.assign({},opts,{rangeStart:0,rangeEnd:Infinity,printWidth:opts.printWidth-alignmentSize}),alignmentSize);const rangeTrimmed=rangeFormatted.trimRight();return text.slice(0,rangeStart)+rangeTrimmed+text.slice(rangeEnd)}var index={formatWithCursor:function(text,opts){return formatWithCursor(text,normalizeOptions(opts))},format:function(text,opts){return format(text,normalizeOptions(opts))},check:function(text,opts){try{const formatted=format(text,normalizeOptions(opts));return formatted===text}catch(e){return false}},resolveConfig:config.resolveConfig,clearConfigCache:config.clearCache,version:version,__debug:{parse:function(text,opts){return parser.parse(text,opts)},formatAST:function(ast,opts){opts=normalizeOptions(opts);const doc=printAstToDoc(ast,opts);const str=printDocToString(doc,opts);return str},formatDoc:function(doc,opts){opts=normalizeOptions(opts);const debug=printDocToDebug(doc);const str=format(debug,opts);return str},printToDoc:function(text,opts){opts=normalizeOptions(opts);const ast=parser.parse(text,opts);attachComments(text,ast,opts);const doc=printAstToDoc(ast,opts);return doc},printDocToString:function(doc,opts){opts=normalizeOptions(opts);const str=printDocToString(doc,opts);return str}}};module.exports=index}).call(this,require("_process"))},{"./parser-babylon":122,"./parser-flow":123,"./parser-graphql":124,"./parser-parse5":125,"./parser-postcss":126,"./parser-typescript":127,_process:129,assert:15,fs:45,module:45,os:109,path:115,util:165}],122:[function(require,module,exports){"use strict";function createError$1(t,e){const s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function parse(t,e,s){const i=index,r={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,plugins:["jsx","flow","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","numericSeparator","importMeta","optionalCatchBinding","optionalChaining"]},a=s&&"json"===s.parser?"parseExpression":"parse";let n;try{n=i[a](t,r)}catch(e){try{n=i[a](t,Object.assign({},r,{strictMode:!1}))}catch(t){throw createError(e.message.replace(/ \(.*\)/,""),{start:{line:e.loc.line,column:e.loc.column+1}})}}return delete n.tokens,n}var parserCreateError=createError$1,index=createCommonjsModule(function(t,e){function s(t){var e={};for(var s in T)e[s]=t&&s in t?t[s]:T[s];return e}function i(t){var e=t.split(" ");return function(t){return e.indexOf(t)>=0}}function r(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function a(t){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&R.test(String.fromCharCode(t)):r(t,O)))}function n(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&_.test(String.fromCharCode(t)):r(t,O)||r(t,j))))}function o(t){return 10===t||13===t||8232===t||8233===t}function h(t,e){for(var s=1,i=0;;){B.lastIndex=i;var r=B.exec(t);if(!(r&&r.index<e))return new W(s,e-i);++s,i=r.index+r[0].length}throw new Error("Unreachable")}function p(t){return t[t.length-1]}function c(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function l(t){for(var e={},s=t,i=Array.isArray(s),r=0,s=i?s:s[Symbol.iterator]();;){var a;if(i){if(r>=s.length)break;a=s[r++]}else{if((r=s.next()).done)break;a=r.value}e[a]=!0}return e}function u(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}function d(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}function f(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return f(t.object)+"."+f(t.property);throw new Error("Node had unexpected type: "+t.type)}function y(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}function m(t){if(!t)throw new Error("Assert fail")}function x(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";default:return}}function v(t,e){return b(e,t).parse()}function P(t,e){var s=b(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function b(t,e){return new(t&&t.plugins?g(t.plugins):st)(t,e)}function g(t){if(t.indexOf("decorators")>=0&&t.indexOf("decorators2")>=0)throw new Error("Cannot use decorators and decorators2 plugin together");var e=t.filter(function(t){return"estree"===t||"flow"===t||"jsx"===t||"typescript"===t});if(e.indexOf("flow")>=0&&(e=e.filter(function(t){return"flow"!==t})).push("flow"),e.indexOf("flow")>=0&&e.indexOf("typescript")>=0)throw new Error("Cannot combine flow and typescript plugins.");e.indexOf("typescript")>=0&&(e=e.filter(function(t){return"typescript"!==t})).push("typescript"),e.indexOf("estree")>=0&&(e=e.filter(function(t){return"estree"!==t})).unshift("estree");var s=e.join("/"),i=ut[s];if(!i){i=st;for(var r=e,a=Array.isArray(r),n=0,r=a?r:r[Symbol.iterator]();;){var o;if(a){if(n>=r.length)break;o=r[n++]}else{if((n=r.next()).done)break;o=n.value}i=et[o](i)}ut[s]=i}return i}Object.defineProperty(e,"__esModule",{value:!0});var T={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1},A=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},w=!0,k=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null},N=function(t){function e(e,s){return void 0===s&&(s={}),s.keyword=e,t.call(this,e,s)||this}return A(e,t),e}(k),E=function(t){function e(e,s){return t.call(this,e,{beforeExpr:w,binop:s})||this}return A(e,t),e}(k),C={num:new k("num",{startsExpr:!0}),bigint:new k("bigint",{startsExpr:!0}),regexp:new k("regexp",{startsExpr:!0}),string:new k("string",{startsExpr:!0}),name:new k("name",{startsExpr:!0}),eof:new k("eof"),bracketL:new k("[",{beforeExpr:w,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:w,startsExpr:!0}),braceBarL:new k("{|",{beforeExpr:w,startsExpr:!0}),braceR:new k("}"),braceBarR:new k("|}"),parenL:new k("(",{beforeExpr:w,startsExpr:!0}),parenR:new k(")"),comma:new k(",",{beforeExpr:w}),semi:new k(";",{beforeExpr:w}),colon:new k(":",{beforeExpr:w}),doubleColon:new k("::",{beforeExpr:w}),dot:new k("."),question:new k("?",{beforeExpr:w}),questionDot:new k("?."),arrow:new k("=>",{beforeExpr:w}),template:new k("template"),ellipsis:new k("...",{beforeExpr:w}),backQuote:new k("`",{startsExpr:!0}),dollarBraceL:new k("${",{beforeExpr:w,startsExpr:!0}),at:new k("@"),hash:new k("#"),eq:new k("=",{beforeExpr:w,isAssign:!0}),assign:new k("_=",{beforeExpr:w,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new k("!",{beforeExpr:w,prefix:!0,startsExpr:!0}),tilde:new k("~",{beforeExpr:w,prefix:!0,startsExpr:!0}),logicalOR:new E("||",1),logicalAND:new E("&&",2),bitwiseOR:new E("|",3),bitwiseXOR:new E("^",4),bitwiseAND:new E("&",5),equality:new E("==/!=",6),relational:new E("</>",7),bitShift:new E("<</>>",8),plusMin:new k("+/-",{beforeExpr:w,binop:9,prefix:!0,startsExpr:!0}),modulo:new E("%",10),star:new E("*",10),slash:new E("/",10),exponent:new k("**",{beforeExpr:w,binop:11,rightAssociative:!0})},S={break:new N("break"),case:new N("case",{beforeExpr:w}),catch:new N("catch"),continue:new N("continue"),debugger:new N("debugger"),default:new N("default",{beforeExpr:w}),do:new N("do",{isLoop:!0,beforeExpr:w}),else:new N("else",{beforeExpr:w}),finally:new N("finally"),for:new N("for",{isLoop:!0}),function:new N("function",{startsExpr:!0}),if:new N("if"),return:new N("return",{beforeExpr:w}),switch:new N("switch"),throw:new N("throw",{beforeExpr:w}),try:new N("try"),var:new N("var"),let:new N("let"),const:new N("const"),while:new N("while",{isLoop:!0}),with:new N("with"),new:new N("new",{beforeExpr:w,startsExpr:!0}),this:new N("this",{startsExpr:!0}),super:new N("super",{startsExpr:!0}),class:new N("class"),extends:new N("extends",{beforeExpr:w}),export:new N("export"),import:new N("import",{startsExpr:!0}),yield:new N("yield",{beforeExpr:w,startsExpr:!0}),null:new N("null",{startsExpr:!0}),true:new N("true",{startsExpr:!0}),false:new N("false",{startsExpr:!0}),in:new N("in",{beforeExpr:w,binop:7}),instanceof:new N("instanceof",{beforeExpr:w,binop:7}),typeof:new N("typeof",{beforeExpr:w,prefix:!0,startsExpr:!0}),void:new N("void",{beforeExpr:w,prefix:!0,startsExpr:!0}),delete:new N("delete",{beforeExpr:w,prefix:!0,startsExpr:!0})};Object.keys(S).forEach(function(t){C["_"+t]=S[t]});var L={6:i("enum await"),strict:i("implements interface let package private protected public static yield"),strictBind:i("eval arguments")},I=i("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),M="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",D="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",R=new RegExp("["+M+"]"),_=new RegExp("["+M+D+"]");M=D=null;var O=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],j=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],F=/\r\n?|\n|\u2028|\u2029/,B=new RegExp(F.source,"g"),q=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,V=function(t,e,s,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i},U={braceStatement:new V("{",!1),braceExpression:new V("{",!0),templateQuasi:new V("${",!0),parenStatement:new V("(",!1),parenExpression:new V("(",!0),template:new V("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new V("function",!0)};C.parenR.updateContext=C.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):t===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},C.name.updateContext=function(t){"of"!==this.state.value||this.curContext()!==U.parenStatement?(this.state.exprAllowed=!1,t!==C._let&&t!==C._const&&t!==C._var||F.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)):this.state.exprAllowed=!t.beforeExpr},C.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},C.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},C.parenL.updateContext=function(t){var e=t===C._if||t===C._for||t===C._with||t===C._while;this.state.context.push(e?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},C.incDec.updateContext=function(){},C._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},C.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var W=function(t,e){this.line=t,this.column=e},K=function(t,e){this.start=t,this.end=e},X=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.raise=function(t,e,s){var i=h(this.input,t);e+=` (${i.line}:${i.column})`;var r=new SyntaxError(e);throw r.pos=t,r.loc=i,s&&(r.missingPlugin=s),r},e}(function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.addComment=function(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)},e.prototype.processComment=function(t){if(!("Program"===t.type&&t.body.length>0)){var e=this.state.commentStack,s=void 0,i=void 0,r=void 0,a=void 0,n=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=p(e);e.length>0&&o.trailingComments&&o.trailingComments[0].start>=t.end&&(r=o.trailingComments,o.trailingComments=null)}for(e.length>0&&p(e).start>=t.start&&(s=e.pop());e.length>0&&p(e).start>=t.start;)i=e.pop();if(!i&&s&&(i=s),s&&this.state.leadingComments.length>0){var h=p(this.state.leadingComments);if("ObjectProperty"===s.type){if(h.start>=t.start&&this.state.commentPreviousNode){for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(s.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===t.type&&t.arguments&&t.arguments.length){var c=p(t.arguments);c&&h.start>=c.start&&h.end<=t.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(c.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(i){if(i.leadingComments)if(i!==t&&p(i.leadingComments).end<=t.start)t.leadingComments=i.leadingComments,i.leadingComments=null;else for(a=i.leadingComments.length-2;a>=0;--a)if(i.leadingComments[a].end<=t.start){t.leadingComments=i.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(p(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;a<this.state.leadingComments.length&&!(this.state.leadingComments[a].end>t.start);a++);var l=this.state.leadingComments.slice(0,a);t.leadingComments=0===l.length?null:l,0===(r=this.state.leadingComments.slice(a)).length&&(r=null)}this.state.commentPreviousNode=t,r&&(r.length&&r[0].start>=t.start&&p(r).end<=t.end?t.innerComments=r:t.trailingComments=r),e.push(t)}},e}(function(){function t(){}return t.prototype.isReservedWord=function(t){return"await"===t?this.inModule:L[6](t)},t.prototype.hasPlugin=function(t){return!!this.plugins[t]},t}())),G=function(){function t(){}return t.prototype.init=function(t,e){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=this.lineStart=0,this.curLine=t.startLine,this.type=C.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},t.prototype.curPosition=function(){return new W(this.curLine,this.pos-this.lineStart)},t.prototype.clone=function(e){var s=new t;for(var i in this){var r=this[i];e&&"context"!==i||!Array.isArray(r)||(r=r.slice()),s[i]=r}return s},t}(),H={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},J=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new K(t.startLoc,t.endLoc)},z=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.addExtra=function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)},e.prototype.isRelational=function(t){return this.match(C.relational)&&this.state.value===t},e.prototype.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,C.relational)},e.prototype.eatRelational=function(t){return!!this.isRelational(t)&&(this.next(),!0)},e.prototype.isContextual=function(t){return this.match(C.name)&&this.state.value===t},e.prototype.eatContextual=function(t){return this.state.value===t&&this.eat(C.name)},e.prototype.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},e.prototype.canInsertSemicolon=function(){return this.match(C.eof)||this.match(C.braceR)||this.hasPrecedingLineBreak()},e.prototype.hasPrecedingLineBreak=function(){return F.test(this.input.slice(this.state.lastTokEnd,this.state.start))},e.prototype.isLineTerminator=function(){return this.eat(C.semi)||this.canInsertSemicolon()},e.prototype.semicolon=function(){this.isLineTerminator()||this.unexpected(null,C.semi)},e.prototype.expect=function(t,e){this.eat(t)||this.unexpected(e,t)},e.prototype.unexpected=function(t,e){throw void 0===e&&(e="Unexpected token"),"string"!=typeof e&&(e=`Unexpected token, expected ${e.label}`),this.raise(null!=t?t:this.state.start,e)},e.prototype.expectPlugin=function(t){if(!this.hasPlugin(t))throw this.raise(this.state.start,`This experimental syntax requires enabling the parser plugin: '${t}'`,[t])},e.prototype.expectOnePlugin=function(t){var e=this;if(!t.some(function(t){return e.hasPlugin(t)}))throw this.raise(this.state.start,`This experimental syntax requires enabling one of the following parser plugin(s): '${t.join(", ")}'`,t)},e}(function(t){function e(e,s){var i;return i=t.call(this)||this,i.state=new G,i.state.init(e,s),i.isLookahead=!1,i}return A(e,t),e.prototype.next=function(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new J(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(t){return!!this.match(t)&&(this.next(),!0)},e.prototype.match=function(t){return this.state.type===t},e.prototype.isKeyword=function(t){return I(t)},e.prototype.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state;return this.state=t,e},e.prototype.setStrict=function(t){if(this.state.strict=t,this.match(C.num)||this.match(C.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(C.eof):t.override?t.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(t){return a(t)||92===t?this.readWord():this.getTokenFromCode(t)},e.prototype.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.state.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new K(r,a)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},e.prototype.skipBlockComment=function(){var t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+=2);-1===s&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=s+2,B.lastIndex=e;for(var i=void 0;(i=B.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())},e.prototype.skipLineComment=function(t){var e=this.state.pos,s=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.input.length)for(;10!==i&&13!==i&&8232!==i&&8233!==i&&++this.state.pos<this.input.length;)i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())},e.prototype.skipSpace=function(){t:for(;this.state.pos<this.input.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&q.test(String.fromCharCode(t))))break t;++this.state.pos}}},e.prototype.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(s)},e.prototype.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.state.pos+2);return 46===t&&46===e?(this.state.pos+=3,this.finishToken(C.ellipsis)):(++this.state.pos,this.finishToken(C.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.slash,1)},e.prototype.readToken_mult_modulo=function(t){var e=42===t?C.star:C.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1);return 42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=C.exponent),61===i&&(s++,e=C.assign),this.finishOp(e,s)},e.prototype.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?this.finishOp(124===t?C.logicalOR:C.logicalAND,2):61===e?this.finishOp(C.assign,2):124===t&&125===e&&this.hasPlugin("flow")?this.finishOp(C.braceBarR,2):this.finishOp(124===t?C.bitwiseOR:C.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?45===e&&!this.inModule&&62===this.input.charCodeAt(this.state.pos+2)&&F.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(C.incDec,2):61===e?this.finishOp(C.assign,2):this.finishOp(C.plusMin,1)},e.prototype.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?this.finishOp(C.assign,s+1):this.finishOp(C.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),this.finishOp(C.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},e.prototype.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(C.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===t&&62===e?(this.state.pos+=2,this.finishToken(C.arrow)):this.finishOp(61===t?C.eq:C.bang,1)},e.prototype.readToken_question=function(){var t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);return 46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(C.question)):(this.state.pos+=2,this.finishToken(C.questionDot))},e.prototype.getTokenFromCode=function(t){switch(t){case 35:if(this.hasPlugin("classPrivateProperties")&&this.state.classLevel>0)return++this.state.pos,this.finishToken(C.hash);this.raise(this.state.pos,`Unexpected character '${c(t)}'`);case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(C.parenL);case 41:return++this.state.pos,this.finishToken(C.parenR);case 59:return++this.state.pos,this.finishToken(C.semi);case 44:return++this.state.pos,this.finishToken(C.comma);case 91:return++this.state.pos,this.finishToken(C.bracketL);case 93:return++this.state.pos,this.finishToken(C.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.braceBarL,2):(++this.state.pos,this.finishToken(C.braceL));case 125:return++this.state.pos,this.finishToken(C.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.doubleColon,2):(++this.state.pos,this.finishToken(C.colon));case 63:return this.readToken_question();case 64:return++this.state.pos,this.finishToken(C.at);case 96:return++this.state.pos,this.finishToken(C.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:return this.finishOp(C.tilde,1)}this.raise(this.state.pos,`Unexpected character '${c(t)}'`)},e.prototype.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);return this.state.pos+=e,this.finishToken(t,s)},e.prototype.readRegexp=function(){for(var t=this.state.pos,e=void 0,s=void 0;;){this.state.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(F.test(i)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if("["===i)s=!0;else if("]"===i&&s)s=!1;else if("/"===i&&!s)break;e="\\"===i}++this.state.pos}var r=this.input.slice(t,this.state.pos);++this.state.pos;var a=this.readWord1();return a&&(/^[gmsiyu]*$/.test(a)||this.raise(t,"Invalid regular expression flag")),this.finishToken(C.regexp,{pattern:r,flags:a})},e.prototype.readInt=function(t,e){for(var s=this.state.pos,i=16===t?H.hex:H.decBinOct,r=0,a=0,n=null==e?1/0:e;a<n;++a){var o=this.input.charCodeAt(this.state.pos),h=void 0;if(this.hasPlugin("numericSeparator")){var p=this.input.charCodeAt(this.state.pos-1),c=this.input.charCodeAt(this.state.pos+1);if(95===o){(i.indexOf(p)>-1||i.indexOf(c)>-1||Number.isNaN(c))&&this.raise(this.state.pos,"Invalid NumericLiteralSeparator"),++this.state.pos;continue}}if((h=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=t)break;++this.state.pos,r=r*t+h}return this.state.pos===s||null!=e&&this.state.pos-s!==e?null:r},e.prototype.readRadixNumber=function(t){var e=this.state.pos,s=!1;this.state.pos+=2;var i=this.readInt(t);if(null==i&&this.raise(this.state.start+2,"Expected number in radix "+t),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,s=!0),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),s){var r=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");return this.finishToken(C.bigint,r)}return this.finishToken(C.num,i)},e.prototype.readNumber=function(t){var e=this.state.pos,s=48===this.input.charCodeAt(e),i=!1,r=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number"),s&&this.state.pos==e+1&&(s=!1);var n=this.input.charCodeAt(this.state.pos);46!==n||s||(++this.state.pos,this.readInt(10),i=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||s||(43!==(n=this.input.charCodeAt(++this.state.pos))&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0,n=this.input.charCodeAt(this.state.pos)),this.hasPlugin("bigInt")&&110===n&&((i||s)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,r=!0),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");if(r)return this.finishToken(C.bigint,o);var h=void 0;return i?h=parseFloat(o):s&&1!==o.length?this.state.strict?this.raise(e,"Invalid number"):h=/[89]/.test(o)?parseInt(o,10):parseInt(o,8):h=parseInt(o,10),this.finishToken(C.num,h)},e.prototype.readCodePoint=function(t){var e=void 0;if(123===this.input.charCodeAt(this.state.pos)){var s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,t);return e},e.prototype.readString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):(o(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return e+=this.input.slice(s,this.state.pos++),this.finishToken(C.string,e)},e.prototype.readTmplToken=function(){for(var t="",e=this.state.pos,s=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(C.template)?36===i?(this.state.pos+=2,this.finishToken(C.dollarBraceL)):(++this.state.pos,this.finishToken(C.backQuote)):(t+=this.input.slice(e,this.state.pos),this.finishToken(C.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(o(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,e);return null===i?null:String.fromCharCode(i);case 117:var r=this.readCodePoint(e);return null===r?null:c(r);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(s>=48&&s<=55){var a=this.state.pos-1,n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);if(o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),o>0){if(t)return this.state.invalidTemplateEscapePosition=a,null;this.state.strict?this.raise(a,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=a)}return this.state.pos+=n.length-1,String.fromCharCode(o)}return String.fromCharCode(s)}},e.prototype.readHexChar=function(t,e){var s=this.state.pos,i=this.readInt(16,t);return null===i&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),i},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,s=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(n(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);var r=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(e?a:n)(o,!0)||this.raise(r,"Invalid Unicode escape"),t+=c(o),s=this.state.pos}e=!1}return t+this.input.slice(s,this.state.pos)},e.prototype.readWord=function(){var t=this.readWord1(),e=C.name;return this.isKeyword(t)&&(this.state.containsEsc&&this.raise(this.state.pos,`Escape sequence in keyword ${t}`),e=S[t]),this.finishToken(e,t)},e.prototype.braceIsBlock=function(t){if(t===C.colon){var e=this.curContext();if(e===U.braceStatement||e===U.braceExpression)return!e.isExpr}return t===C._return?F.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===C._else||t===C.semi||t===C.eof||t===C.parenR||(t===C.braceL?this.curContext()===U.braceStatement:t===C.relational||!this.state.exprAllowed)},e.prototype.updateContext=function(t){var e=this.state.type,s=void 0;!e.keyword||t!==C.dot&&t!==C.questionDot?(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr:this.state.exprAllowed=!1},e}(X)),Q=["leadingComments","trailingComments","innerComments"],Y=function(){function t(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new K(s),t&&t.options.ranges&&(this.range=[e,0]),t&&t.filename&&(this.loc.filename=t.filename)}return t.prototype.__clone=function(){var e=new t;for(var s in this)Q.indexOf(s)<0&&(e[s]=this[s]);return e},t}(),$=[],Z={kind:"loop"},tt={kind:"switch"},et={},st=function(t){function e(e,i){var r;return e=s(e),r=t.call(this,e,i)||this,r.options=e,r.inModule="module"===r.options.sourceType,r.input=i,r.plugins=l(r.options.plugins),r.filename=e.sourceFilename,0===r.state.pos&&"#"===r.input[0]&&"!"===r.input[1]&&r.skipLineComment(2),r}return A(e,t),e.prototype.parse=function(){var t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)},e}(function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.parseTopLevel=function(t,e){return e.sourceType=this.options.sourceType,this.parseBlockBody(e,!0,!0,C.eof),t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.state.tokens),this.finishNode(t,"File")},e.prototype.stmtToDirective=function(t){var e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),r=this.input.slice(e.start,e.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)},e.prototype.parseStatement=function(t,e){return this.match(C.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)},e.prototype.parseStatementContent=function(t,e){var s=this.state.type,i=this.startNode();switch(s){case C._break:case C._continue:return this.parseBreakContinueStatement(i,s.keyword);case C._debugger:return this.parseDebuggerStatement(i);case C._do:return this.parseDoStatement(i);case C._for:return this.parseForStatement(i);case C._function:if(this.lookahead().type===C.dot)break;return t||this.unexpected(),this.parseFunctionStatement(i);case C._class:return t||this.unexpected(),this.parseClass(i,!0);case C._if:return this.parseIfStatement(i);case C._return:return this.parseReturnStatement(i);case C._switch:return this.parseSwitchStatement(i);case C._throw:return this.parseThrowStatement(i);case C._try:return this.parseTryStatement(i);case C._let:case C._const:t||this.unexpected();case C._var:return this.parseVarStatement(i,s);case C._while:return this.parseWhileStatement(i);case C._with:return this.parseWithStatement(i);case C.braceL:return this.parseBlock();case C.semi:return this.parseEmptyStatement(i);case C._export:case C._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===C.parenL||this.hasPlugin("importMeta")&&this.lookahead().type===C.dot)break;return this.options.allowImportExportEverywhere||(e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,`'import' and 'export' may appear only with 'sourceType: "module"'`)),this.next(),s==C._import?this.parseImport(i):this.parseExport(i);case C.name:if("async"===this.state.value){var r=this.state.clone();if(this.next(),this.match(C._function)&&!this.canInsertSemicolon())return this.expect(C._function),this.parseFunction(i,!0,!1,!0);this.state=r}}var a=this.state.value,n=this.parseExpression();return s===C.name&&"Identifier"===n.type&&this.eat(C.colon)?this.parseLabeledStatement(i,a,n):this.parseExpressionStatement(i,n)},e.prototype.takeDecorators=function(t){var e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])},e.prototype.parseDecorators=function(t){this.hasPlugin("decorators2")&&(t=!1);for(var e=this.state.decoratorStack[this.state.decoratorStack.length-1];this.match(C.at);){var s=this.parseDecorator();e.push(s)}if(this.match(C._export)){if(t)return;this.raise(this.state.start,"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead")}this.match(C._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},e.prototype.parseDecorator=function(){this.expectOnePlugin(["decorators","decorators2"]);var t=this.startNode();if(this.next(),this.hasPlugin("decorators2")){for(var e=this.state.start,s=this.state.startLoc,i=this.parseIdentifier(!1);this.eat(C.dot);){var r=this.startNodeAt(e,s);r.object=i,r.property=this.parseIdentifier(!0),r.computed=!1,i=this.finishNode(r,"MemberExpression")}if(this.eat(C.parenL)){var a=this.startNodeAt(e,s);a.callee=i,this.state.decoratorStack.push([]),a.arguments=this.parseCallExpressionArguments(C.parenR,!1),this.state.decoratorStack.pop(),i=this.finishNode(a,"CallExpression"),this.toReferencedList(i.arguments)}t.expression=i}else t.expression=this.parseMaybeAssign();return this.finishNode(t,"Decorator")},e.prototype.parseBreakContinueStatement=function(t,e){var s="break"===e;this.next(),this.isLineTerminator()?t.label=null:this.match(C.name)?(t.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var r=this.state.labels[i];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(s||"loop"===r.kind))break;if(t.label&&s)break}}return i===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")},e.prototype.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},e.prototype.parseDoStatement=function(t){return this.next(),this.state.labels.push(Z),t.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(C._while),t.test=this.parseParenExpression(),this.eat(C.semi),this.finishNode(t,"DoWhileStatement")},e.prototype.parseForStatement=function(t){this.next(),this.state.labels.push(Z);var e=!1;if(this.state.inAsync&&this.isContextual("await")&&(this.expectPlugin("asyncGenerators"),e=!0,this.next()),this.expect(C.parenL),this.match(C.semi))return e&&this.unexpected(),this.parseFor(t,null);if(this.match(C._var)||this.match(C._let)||this.match(C._const)){var s=this.startNode(),i=this.state.type;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),!this.match(C._in)&&!this.isContextual("of")||1!==s.declarations.length||s.declarations[0].init?(e&&this.unexpected(),this.parseFor(t,s)):this.parseForIn(t,s,e)}var r={start:0},a=this.parseExpression(!0,r);if(this.match(C._in)||this.isContextual("of")){var n=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(a,void 0,n),this.checkLVal(a,void 0,void 0,n),this.parseForIn(t,a,e)}return r.start&&this.unexpected(r.start),e&&this.unexpected(),this.parseFor(t,a)},e.prototype.parseFunctionStatement=function(t){return this.next(),this.parseFunction(t,!0)},e.prototype.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!1),t.alternate=this.eat(C._else)?this.parseStatement(!1):null,this.finishNode(t,"IfStatement")},e.prototype.parseReturnStatement=function(t){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},e.prototype.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression();var e=t.cases=[];this.expect(C.braceL),this.state.labels.push(tt);for(var s,i=void 0;!this.match(C.braceR);)if(this.match(C._case)||this.match(C._default)){var r=this.match(C._case);i&&this.finishNode(i,"SwitchCase"),e.push(i=this.startNode()),i.consequent=[],this.next(),r?i.test=this.parseExpression():(s&&this.raise(this.state.lastTokStart,"Multiple default clauses"),s=!0,i.test=null),this.expect(C.colon)}else i?i.consequent.push(this.parseStatement(!0)):this.unexpected();return i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")},e.prototype.parseThrowStatement=function(t){return this.next(),F.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")},e.prototype.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(C._catch)){var e=this.startNode();this.next(),this.match(C.parenL)?(this.expect(C.parenL),e.param=this.parseBindingAtom(),this.checkLVal(e.param,!0,Object.create(null),"catch clause"),this.expect(C.parenR)):(this.expectPlugin("optionalCatchBinding"),e.param=null),e.body=this.parseBlock(),t.handler=this.finishNode(e,"CatchClause")}return t.guardedHandlers=$,t.finalizer=this.eat(C._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},e.prototype.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},e.prototype.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.state.labels.push(Z),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"WhileStatement")},e.prototype.parseWithStatement=function(t){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement(!1),this.finishNode(t,"WithStatement")},e.prototype.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},e.prototype.parseLabeledStatement=function(t,e,s){for(var i=this.state.labels,r=Array.isArray(i),a=0,i=r?i:i[Symbol.iterator]();;){var n;if(r){if(a>=i.length)break;n=i[a++]}else{if((a=i.next()).done)break;n=a.value}n.name===e&&this.raise(s.start,`Label '${e}' is already declared`)}for(var o=this.state.type.isLoop?"loop":this.match(C._switch)?"switch":null,h=this.state.labels.length-1;h>=0;h--){var p=this.state.labels[h];if(p.statementStart!==t.start)break;p.statementStart=this.state.start,p.kind=o}return this.state.labels.push({name:e,kind:o,statementStart:this.state.start}),t.body=this.parseStatement(!0),("ClassDeclaration"==t.body.type||"VariableDeclaration"==t.body.type&&"var"!==t.body.kind||"FunctionDeclaration"==t.body.type&&(this.state.strict||t.body.generator||t.body.async))&&this.raise(t.body.start,"Invalid labeled declaration"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},e.prototype.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},e.prototype.parseBlock=function(t){var e=this.startNode();return this.expect(C.braceL),this.parseBlockBody(e,t,!1,C.braceR),this.finishNode(e,"BlockStatement")},e.prototype.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},e.prototype.parseBlockBody=function(t,e,s,i){var r=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(r,e?a:void 0,s,i)},e.prototype.parseBlockOrModuleBlockBody=function(t,e,s,i){for(var r=!1,a=void 0,n=void 0;!this.eat(i);){r||!this.state.containsOctal||n||(n=this.state.octalPosition);var o=this.parseStatement(!0,s);if(e&&!r&&this.isValidDirective(o)){var h=this.stmtToDirective(o);e.push(h),void 0===a&&"use strict"===h.value.value&&(a=this.state.strict,this.setStrict(!0),n&&this.raise(n,"Octal literal in strict mode"))}else r=!0,t.push(o)}!1===a&&this.setStrict(!1)},e.prototype.parseFor=function(t,e){return t.init=e,this.expect(C.semi),t.test=this.match(C.semi)?null:this.parseExpression(),this.expect(C.semi),t.update=this.match(C.parenR)?null:this.parseExpression(),this.expect(C.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"ForStatement")},e.prototype.parseForIn=function(t,e,s){var i=this.match(C._in)?"ForInStatement":"ForOfStatement";return s?this.eatContextual("of"):this.next(),"ForOfStatement"===i&&(t.await=!!s),t.left=e,t.right=this.parseExpression(),this.expect(C.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,i)},e.prototype.parseVar=function(t,e,s){var i=t.declarations=[];for(t.kind=s.keyword;;){var r=this.startNode();if(this.parseVarHead(r),this.eat(C.eq)?r.init=this.parseMaybeAssign(e):(s!==C._const||this.match(C._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(C._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.hasPlugin("typescript")||this.unexpected(),r.init=null),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(C.comma))break}return t},e.prototype.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},e.prototype.parseFunction=function(t,e,s,i,r){var a=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(t,i),this.match(C.star)&&(t.async&&this.expectPlugin("asyncGenerators"),t.generator=!0,this.next()),!e||r||this.match(C.name)||this.match(C._yield)||this.unexpected(),(this.match(C.name)||this.match(C._yield))&&(t.id=this.parseBindingIdentifier()),this.parseFunctionParams(t),this.parseFunctionBodyAndFinish(t,e?"FunctionDeclaration":"FunctionExpression",s),this.state.inMethod=a,t},e.prototype.parseFunctionParams=function(t){this.expect(C.parenL),t.params=this.parseBindingList(C.parenR)},e.prototype.parseClass=function(t,e,s){return this.next(),this.takeDecorators(t),this.parseClassId(t,e,s),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},e.prototype.isClassProperty=function(){return this.match(C.eq)||this.match(C.semi)||this.match(C.braceR)},e.prototype.isClassMethod=function(){return this.match(C.parenL)},e.prototype.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},e.prototype.parseClassBody=function(t){var e=this.state.strict;this.state.strict=!0,this.state.classLevel++;var s={hadConstructor:!1},i=[],r=this.startNode();for(r.body=[],this.expect(C.braceL);!this.eat(C.braceR);)if(this.eat(C.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(C.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,this.resetStartLocationFromNode(a,i[0]),i=[]),this.parseClassMember(r,a,s),this.hasPlugin("decorators2")&&"method"!=a.kind&&a.decorators&&a.decorators.length>0&&this.raise(a.start,"Stage 2 decorators may only be used with a class or a class method")}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(r,"ClassBody"),this.state.classLevel--,this.state.strict=e},e.prototype.parseClassMember=function(t,e,s){var i=e,r=i,a=i,n=!1;if(this.match(C.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod())return r.kind="method",r.computed=!1,r.key=o,r.static=!1,void this.parseClassMethod(t,r,!1,!1,!1);if(this.isClassProperty())return a.computed=!1,a.key=o,a.static=!1,void t.body.push(this.parseClassProperty(a));n=!0}if(this.match(C.hash)){this.expectPlugin("classPrivateProperties"),this.next();var h=i;return h.key=this.parseIdentifier(!0),h.static=n,void t.body.push(this.parsePrivateClassProperty(h))}this.parseClassMemberWithIsStatic(t,e,s,n)},e.prototype.parseClassMemberWithIsStatic=function(t,e,s,i){var r=e,a=r,n=r,o=r;if(a.static=i,this.eat(C.star))return n.kind="method",this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't be a generator"),n.computed||!n.static||"prototype"!==n.key.name&&"prototype"!==n.key.value||this.raise(n.key.start,"Classes may not have static property named prototype"),void this.parseClassMethod(t,n,!0,!1,!1);var h=this.match(C.name),p=this.parseClassPropertyName(a);if(this.parsePostMemberNameModifiers(a),this.isClassMethod()){var c=this.isNonstaticConstructor(n);n.kind=c?"constructor":"method",c&&(n.decorators&&this.raise(n.start,"You can't attach decorators to a class constructor"),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.start,"Duplicate constructor in the same class"),s.hadConstructor=!0),this.parseClassMethod(t,n,!1,!1,c)}else if(this.isClassProperty())this.pushClassProperty(t,o);else if(h&&"async"===p.name&&!this.isLineTerminator()){var l=!1;this.match(C.star)&&(this.expectPlugin("asyncGenerators"),this.next(),l=!0),n.kind="method",this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't be an async function"),this.parseClassMethod(t,n,l,!0,!1)}else!h||"get"!==p.name&&"set"!==p.name||this.isLineTerminator()&&this.match(C.star)?this.isLineTerminator()?(this.isNonstaticConstructor(o)&&this.raise(o.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(o))):this.unexpected():(n.kind=p.name,this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(t,n,!1,!1,!1),this.checkGetterSetterParamCount(n))},e.prototype.parseClassPropertyName=function(t){var e=this.parsePropertyName(t);return t.computed||!t.static||"prototype"!==t.key.name&&"prototype"!==t.key.value||this.raise(t.key.start,"Classes may not have static property named prototype"),e},e.prototype.pushClassProperty=function(t,e){this.isNonstaticConstructor(e)&&this.raise(e.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(e))},e.prototype.parsePostMemberNameModifiers=function(t){},e.prototype.parseAccessModifier=function(){},e.prototype.parsePrivateClassProperty=function(t){return this.state.inClassProperty=!0,this.match(C.eq)?(this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassPrivateProperty")},e.prototype.parseClassProperty=function(t){return t.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.match(C.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassProperty")},e.prototype.parseClassMethod=function(t,e,s,i,r){t.body.push(this.parseMethod(e,s,i,r,"ClassMethod"))},e.prototype.parseClassId=function(t,e,s){this.match(C.name)?t.id=this.parseIdentifier():s||!e?t.id=null:this.unexpected(null,"A class name is required")},e.prototype.parseClassSuper=function(t){t.superClass=this.eat(C._extends)?this.parseExprSubscripts():null},e.prototype.parseExport=function(t){if(this.shouldParseExportStar()){if(this.parseExportStar(t,this.hasPlugin("exportExtensions")),"ExportAllDeclaration"===t.type)return t}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var e=this.startNode();e.exported=this.parseIdentifier(!0);var s=[this.finishNode(e,"ExportDefaultSpecifier")];if(t.specifiers=s,this.match(C.comma)&&this.lookahead().type===C.star){this.expect(C.comma);var i=this.startNode();this.expect(C.star),this.expectContextual("as"),i.exported=this.parseIdentifier(),s.push(this.finishNode(i,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(t);this.parseExportFrom(t,!0)}else{if(this.eat(C._default)){var r=this.startNode(),a=!1;return this.eat(C._function)?r=this.parseFunction(r,!0,!1,!1,!0):this.isContextual("async")&&this.lookahead().type===C._function?(this.eatContextual("async"),this.eat(C._function),r=this.parseFunction(r,!0,!1,!0,!0)):this.match(C._class)?r=this.parseClass(r,!0,!0):(a=!0,r=this.parseMaybeAssign()),t.declaration=r,a&&this.semicolon(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var n=this.lookahead();n.type!==C._function&&this.unexpected(n.start,"Unexpected token, expected function")}t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t)}else t.declaration=null,t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t)}return this.checkExport(t,!0),this.finishNode(t,"ExportNamedDeclaration")},e.prototype.parseExportDeclaration=function(t){return this.parseStatement(!0)},e.prototype.isExportDefaultSpecifier=function(){if(this.match(C.name))return"async"!==this.state.value;if(!this.match(C._default))return!1;var t=this.lookahead();return t.type===C.comma||t.type===C.name&&"from"===t.value},e.prototype.parseExportSpecifiersMaybe=function(t){this.eat(C.comma)&&(t.specifiers=t.specifiers.concat(this.parseExportSpecifiers()))},e.prototype.parseExportFrom=function(t,e){this.eatContextual("from")?(t.source=this.match(C.string)?this.parseExprAtom():this.unexpected(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()},e.prototype.shouldParseExportStar=function(){return this.match(C.star)},e.prototype.parseExportStar=function(t,e){if(this.expect(C.star),e&&this.isContextual("as")){var s=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next(),s.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(s,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(t),this.parseExportFrom(t,!0)}else this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")},e.prototype.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},e.prototype.checkExport=function(t,e,s){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(var i=t.specifiers,r=Array.isArray(i),a=0,i=r?i:i[Symbol.iterator]();;){var n;if(r){if(a>=i.length)break;n=i[a++]}else{if((a=i.next()).done)break;n=a.value}var o=n;this.checkDuplicateExports(o,o.exported.name)}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type)this.checkDuplicateExports(t,t.declaration.id.name);else if("VariableDeclaration"===t.declaration.type)for(var h=t.declaration.declarations,p=Array.isArray(h),c=0,h=p?h:h[Symbol.iterator]();;){var l;if(p){if(c>=h.length)break;l=h[c++]}else{if((c=h.next()).done)break;l=c.value}var u=l;this.checkDeclaration(u.id)}if(this.state.decoratorStack[this.state.decoratorStack.length-1].length){var d=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);if(!t.declaration||!d)throw this.raise(t.start,"You can only use decorators on an export when exporting a class");this.takeDecorators(t.declaration)}},e.prototype.checkDeclaration=function(t){if("ObjectPattern"===t.type)for(var e=t.properties,s=Array.isArray(e),i=0,e=s?e:e[Symbol.iterator]();;){var r;if(s){if(i>=e.length)break;r=e[i++]}else{if((i=e.next()).done)break;r=i.value}var a=r;this.checkDeclaration(a)}else if("ArrayPattern"===t.type)for(var n=t.elements,o=Array.isArray(n),h=0,n=o?n:n[Symbol.iterator]();;){var p;if(o){if(h>=n.length)break;p=n[h++]}else{if((h=n.next()).done)break;p=h.value}var c=p;c&&this.checkDeclaration(c)}else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"Identifier"===t.type&&this.checkDuplicateExports(t,t.name)},e.prototype.checkDuplicateExports=function(t,e){this.state.exportedIdentifiers.indexOf(e)>-1&&this.raiseDuplicateExportError(t,e),this.state.exportedIdentifiers.push(e)},e.prototype.raiseDuplicateExportError=function(t,e){throw this.raise(t.start,"default"===e?"Only one default export allowed per module.":`\`${e}\` has already been exported. Exported identifiers must be unique.`)},e.prototype.parseExportSpecifiers=function(){var t=[],e=!0,s=void 0;for(this.expect(C.braceL);!this.eat(C.braceR);){if(e)e=!1;else if(this.expect(C.comma),this.eat(C.braceR))break;var i=this.match(C._default);i&&!s&&(s=!0);var r=this.startNode();r.local=this.parseIdentifier(i),r.exported=this.eatContextual("as")?this.parseIdentifier(!0):r.local.__clone(),t.push(this.finishNode(r,"ExportSpecifier"))}return s&&!this.isContextual("from")&&this.unexpected(),t},e.prototype.parseImport=function(t){return this.match(C.string)?(t.specifiers=[],t.source=this.parseExprAtom()):(t.specifiers=[],this.parseImportSpecifiers(t),this.expectContextual("from"),t.source=this.match(C.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},e.prototype.parseImportSpecifiers=function(t){var e=!0;if(this.match(C.name)){var s=this.state.start,i=this.state.startLoc;if(t.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),s,i)),!this.eat(C.comma))return}if(this.match(C.star)){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdentifier(),this.checkLVal(r.local,!0,void 0,"import namespace specifier"),void t.specifiers.push(this.finishNode(r,"ImportNamespaceSpecifier"))}for(this.expect(C.braceL);!this.eat(C.braceR);){if(e)e=!1;else if(this.eat(C.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(C.comma),this.eat(C.braceR))break;this.parseImportSpecifier(t)}},e.prototype.parseImportSpecifier=function(t){var e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},e.prototype.parseImportSpecifierDefault=function(t,e,s){var i=this.startNodeAt(e,s);return i.local=t,this.checkLVal(i.local,!0,void 0,"default import specifier"),this.finishNode(i,"ImportDefaultSpecifier")},e}(function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.checkPropClash=function(t,e){if(!t.computed&&!t.kind){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}},e.prototype.getExpression=function(){this.nextToken();var t=this.parseExpression();return this.match(C.eof)||this.unexpected(),t.comments=this.state.comments,t},e.prototype.parseExpression=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.parseMaybeAssign(t,e);if(this.match(C.comma)){var a=this.startNodeAt(s,i);for(a.expressions=[r];this.eat(C.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return r},e.prototype.parseMaybeAssign=function(t,e,s,i){var r=this.state.start,a=this.state.startLoc;if(this.match(C._yield)&&this.state.inGenerator){var n=this.parseYield();return s&&(n=s.call(this,n,r,a)),n}var o=void 0;e?o=!1:(e={start:0},o=!0),(this.match(C.parenL)||this.match(C.name))&&(this.state.potentialArrowAt=this.state.start);var h=this.parseMaybeConditional(t,e,i);if(s&&(h=s.call(this,h,r,a)),this.state.type.isAssign){var p=this.startNodeAt(r,a);if(p.operator=this.state.value,p.left=this.match(C.eq)?this.toAssignable(h,void 0,"assignment expression"):h,e.start=0,this.checkLVal(h,void 0,void 0,"assignment expression"),h.extra&&h.extra.parenthesized){var c=void 0;"ObjectPattern"===h.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===h.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(h.start,`You're trying to assign to a parenthesized expression, eg. instead of ${c}`)}return this.next(),p.right=this.parseMaybeAssign(t),this.finishNode(p,"AssignmentExpression")}return o&&e.start&&this.unexpected(e.start),h},e.prototype.parseMaybeConditional=function(t,e,s){var i=this.state.start,r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return"ArrowFunctionExpression"===n.type&&n.start===a?n:e&&e.start?n:this.parseConditional(n,t,i,r,s)},e.prototype.parseConditional=function(t,e,s,i,r){if(this.eat(C.question)){var a=this.startNodeAt(s,i);return a.test=t,a.consequent=this.parseMaybeAssign(),this.expect(C.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return t},e.prototype.parseExprOps=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.state.potentialArrowAt,a=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===a.type&&a.start===r?a:e&&e.start?a:this.parseExprOp(a,s,i,-1,t)},e.prototype.parseExprOp=function(t,e,s,i,r){var a=this.state.type.binop;if(!(null==a||r&&this.match(C._in))&&a>i){var n=this.startNodeAt(e,s);n.left=t,n.operator=this.state.value,"**"!==n.operator||"UnaryExpression"!==t.type||!t.extra||t.extra.parenthesizedArgument||t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var h=this.state.start,p=this.state.startLoc;return n.right=this.parseExprOp(this.parseMaybeUnary(),h,p,o.rightAssociative?a-1:a,r),this.finishNode(n,o===C.logicalOR||o===C.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(n,e,s,i,r)}return t},e.prototype.parseMaybeUnary=function(t){if(this.state.type.prefix){var e=this.startNode(),s=this.match(C.incDec);e.operator=this.state.value,e.prefix=!0,this.next();var i=this.state.type;if(e.argument=this.parseMaybeUnary(),this.addExtra(e,"parenthesizedArgument",!(i!==C.parenL||e.argument.extra&&e.argument.extra.parenthesized)),t&&t.start&&this.unexpected(t.start),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){var r=e.argument;"Identifier"===r.type?this.raise(e.start,"Deleting local variable in strict mode"):this.hasPlugin("classPrivateProperties")&&"MemberExpression"===r.type&&"PrivateName"===r.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var a=this.state.start,n=this.state.startLoc,o=this.parseExprSubscripts(t);if(t&&t.start)return o;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(a,n);h.operator=this.state.value,h.prefix=!1,h.argument=o,this.checkLVal(o,void 0,void 0,"postfix operation"),this.next(),o=this.finishNode(h,"UpdateExpression")}return o},e.prototype.parseExprSubscripts=function(t){var e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return"ArrowFunctionExpression"===r.type&&r.start===i?r:t&&t.start?r:this.parseSubscripts(r,e,s)},e.prototype.parseSubscripts=function(t,e,s,i){var r={stop:!1};do{t=this.parseSubscript(t,e,s,i,r)}while(!r.stop);return t},e.prototype.parseSubscript=function(t,e,s,i,r){if(!i&&this.eat(C.doubleColon)){var a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}if(this.match(C.questionDot)){if(this.expectPlugin("optionalChaining"),i&&this.lookahead().type==C.parenL)return r.stop=!0,t;this.next();var n=this.startNodeAt(e,s);if(this.eat(C.bracketL))return n.object=t,n.property=this.parseExpression(),n.computed=!0,n.optional=!0,this.expect(C.bracketR),this.finishNode(n,"MemberExpression");if(this.eat(C.parenL)){var o=this.atPossibleAsync(t);return n.callee=t,n.arguments=this.parseCallExpressionArguments(C.parenR,o),n.optional=!0,this.finishNode(n,"CallExpression")}return n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"MemberExpression")}if(this.eat(C.dot)){var h=this.startNodeAt(e,s);return h.object=t,h.property=this.hasPlugin("classPrivateProperties")?this.parseMaybePrivateName():this.parseIdentifier(!0),h.computed=!1,this.finishNode(h,"MemberExpression")}if(this.eat(C.bracketL)){var p=this.startNodeAt(e,s);return p.object=t,p.property=this.parseExpression(),p.computed=!0,this.expect(C.bracketR),this.finishNode(p,"MemberExpression")}if(!i&&this.match(C.parenL)){var c=this.atPossibleAsync(t);this.next();var l=this.startNodeAt(e,s);l.callee=t;var u={start:-1};return l.arguments=this.parseCallExpressionArguments(C.parenR,c,u),this.finishCallExpression(l),c&&this.shouldParseAsyncArrow()?(r.stop=!0,u.start>-1&&this.raise(u.start,"A trailing comma is not permitted after the rest element"),this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),l)):(this.toReferencedList(l.arguments),l)}if(this.match(C.backQuote)){var d=this.startNodeAt(e,s);return d.tag=t,d.quasi=this.parseTemplate(!0),this.finishNode(d,"TaggedTemplateExpression")}return r.stop=!0,t},e.prototype.atPossibleAsync=function(t){return this.state.potentialArrowAt===t.start&&"Identifier"===t.type&&"async"===t.name&&!this.canInsertSemicolon()},e.prototype.finishCallExpression=function(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");var e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"CallExpression")},e.prototype.parseCallExpressionArguments=function(t,e,s){for(var i=[],r=void 0,a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(C.comma),this.eat(t))break;this.match(C.parenL)&&!r&&(r=this.state.start),i.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,e?s:void 0))}return e&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),i},e.prototype.shouldParseAsyncArrow=function(){return this.match(C.arrow)},e.prototype.parseAsyncArrowFromCallExpression=function(t,e){return this.expect(C.arrow),this.parseArrowExpression(t,e.arguments,!0)},e.prototype.parseNoCallExpr=function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)},e.prototype.parseExprAtom=function(t){var e=this.state.potentialArrowAt===this.state.start,s=void 0;switch(this.state.type){case C._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),s=this.startNode(),this.next(),this.match(C.parenL)||this.match(C.bracketL)||this.match(C.dot)||this.unexpected(),this.match(C.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(s.start,"super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'."),this.finishNode(s,"Super");case C._import:return this.lookahead().type===C.dot?this.parseImportMetaProperty():(this.expectPlugin("dynamicImport"),s=this.startNode(),this.next(),this.match(C.parenL)||this.unexpected(null,C.parenL),this.finishNode(s,"Import"));case C._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case C._yield:this.state.inGenerator&&this.unexpected();case C.name:s=this.startNode();var i="await"===this.state.value&&this.state.inAsync,r=this.shouldAllowYieldIdentifier(),a=this.parseIdentifier(i||r);if("await"===a.name){if(this.state.inAsync||this.inModule)return this.parseAwait(s)}else{if("async"===a.name&&this.match(C._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(s,!1,!1,!0);if(e&&"async"===a.name&&this.match(C.name)){var n=[this.parseIdentifier()];return this.expect(C.arrow),this.parseArrowExpression(s,n,!0)}}return e&&!this.canInsertSemicolon()&&this.eat(C.arrow)?this.parseArrowExpression(s,[a]):a;case C._do:this.expectPlugin("doExpressions");var o=this.startNode();this.next();var h=this.state.inFunction,p=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1),this.state.inFunction=h,this.state.labels=p,this.finishNode(o,"DoExpression");case C.regexp:var c=this.state.value;return s=this.parseLiteral(c.value,"RegExpLiteral"),s.pattern=c.pattern,s.flags=c.flags,s;case C.num:return this.parseLiteral(this.state.value,"NumericLiteral");case C.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case C.string:return this.parseLiteral(this.state.value,"StringLiteral");case C._null:return s=this.startNode(),this.next(),this.finishNode(s,"NullLiteral");case C._true:case C._false:return this.parseBooleanLiteral();case C.parenL:return this.parseParenAndDistinguishExpression(e);case C.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(C.bracketR,!0,t),this.toReferencedList(s.elements),this.finishNode(s,"ArrayExpression");case C.braceL:return this.parseObj(!1,t);case C._function:return this.parseFunctionExpression();case C.at:this.parseDecorators();case C._class:return s=this.startNode(),this.takeDecorators(s),this.parseClass(s,!1);case C._new:return this.parseNew();case C.backQuote:return this.parseTemplate(!1);case C.doubleColon:s=this.startNode(),this.next(),s.object=null;var l=s.callee=this.parseNoCallExpr();if("MemberExpression"===l.type)return this.finishNode(s,"BindExpression");throw this.raise(l.start,"Binding should be performed on object property.");default:throw this.unexpected()}},e.prototype.parseBooleanLiteral=function(){var t=this.startNode();return t.value=this.match(C._true),this.next(),this.finishNode(t,"BooleanLiteral")},e.prototype.parseMaybePrivateName=function(){if(this.eat(C.hash)){var t=this.startNode();return t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)},e.prototype.parseFunctionExpression=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(C.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t,!1)},e.prototype.parseMetaProperty=function(t,e,s){return t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected()),t.property=this.parseIdentifier(!0),t.property.name!==s&&this.raise(t.property.start,`The only valid meta property for ${e.name} is ${e.name}.${s}`),this.finishNode(t,"MetaProperty")},e.prototype.parseImportMetaProperty=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.expect(C.dot),"import"===e.name&&(this.isContextual("meta")?this.expectPlugin("importMeta"):this.hasPlugin("importMeta")||this.raise(e.start,`Dynamic imports require a parameter: import('a.js').then`)),this.inModule||this.raise(e.start,`import.meta may appear only with 'sourceType: "module"'`),this.parseMetaProperty(t,e,"meta")},e.prototype.parseLiteral=function(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;var r=this.startNodeAt(s,i);return this.addExtra(r,"rawValue",t),this.addExtra(r,"raw",this.input.slice(s,this.state.end)),r.value=t,this.next(),this.finishNode(r,e)},e.prototype.parseParenExpression=function(){this.expect(C.parenL);var t=this.parseExpression();return this.expect(C.parenR),t},e.prototype.parseParenAndDistinguishExpression=function(t){var e=this.state.start,s=this.state.startLoc,i=void 0;this.expect(C.parenL);for(var r=this.state.start,a=this.state.startLoc,n=[],o={start:0},h={start:0},p=!0,c=void 0,l=void 0;!this.match(C.parenR);){if(p)p=!1;else if(this.expect(C.comma,h.start||null),this.match(C.parenR)){l=this.state.start;break}if(this.match(C.ellipsis)){var u=this.state.start,d=this.state.startLoc;c=this.state.start,n.push(this.parseParenItem(this.parseRest(),u,d)),this.match(C.comma)&&this.lookahead().type===C.parenR&&this.raise(this.state.start,"A trailing comma is not permitted after the rest element");break}n.push(this.parseMaybeAssign(!1,o,this.parseParenItem,h))}var f=this.state.start,y=this.state.startLoc;this.expect(C.parenR);var m=this.startNodeAt(e,s);if(t&&this.shouldParseArrow()&&(m=this.parseArrow(m))){for(var x=0;x<n.length;x++){var v=n[x];v.extra&&v.extra.parenthesized&&this.unexpected(v.extra.parenStart)}return this.parseArrowExpression(m,n)}return n.length||this.unexpected(this.state.lastTokStart),l&&this.unexpected(l),c&&this.unexpected(c),o.start&&this.unexpected(o.start),h.start&&this.unexpected(h.start),n.length>1?((i=this.startNodeAt(r,a)).expressions=n,this.toReferencedList(i.expressions),this.finishNodeAt(i,"SequenceExpression",f,y)):i=n[0],this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",e),i},e.prototype.shouldParseArrow=function(){return!this.canInsertSemicolon()},e.prototype.parseArrow=function(t){if(this.eat(C.arrow))return t},e.prototype.parseParenItem=function(t,e,s){return t},e.prototype.parseNew=function(){var t=this.startNode(),e=this.parseIdentifier(!0);if(this.eat(C.dot)){var s=this.parseMetaProperty(t,e,"target");return this.state.inFunction||this.raise(s.property.start,"new.target can only be used in functions"),s}return t.callee=this.parseNoCallExpr(),this.eat(C.questionDot)&&(t.optional=!0),this.parseNewArguments(t),this.finishNode(t,"NewExpression")},e.prototype.parseNewArguments=function(t){if(this.eat(C.parenL)){var e=this.parseExprList(C.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]},e.prototype.parseTemplateElement=function(t){var e=this.startNode();return null===this.state.value&&(t?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(C.backQuote),this.finishNode(e,"TemplateElement")},e.prototype.parseTemplate=function(t){var e=this.startNode();this.next(),e.expressions=[];var s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(C.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(C.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")},e.prototype.parseObj=function(t,e){var s=[],i=Object.create(null),r=!0,a=this.startNode();a.properties=[],this.next();for(var n=null;!this.eat(C.braceR);){if(r)r=!1;else if(this.expect(C.comma),this.eat(C.braceR))break;if(this.match(C.at))if(this.hasPlugin("decorators2"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(C.at);)s.push(this.parseDecorator());var o=this.startNode(),h=!1,p=!1,c=void 0,l=void 0;if(s.length&&(o.decorators=s,s=[]),this.match(C.ellipsis)){if(this.expectPlugin("objectRestSpread"),o=this.parseSpread(t?{start:0}:void 0),t&&this.toAssignable(o,!0,"object pattern"),a.properties.push(o),!t)continue;var u=this.state.start;if(null!==n)this.unexpected(n,"Cannot have multiple rest elements when destructuring");else{if(this.eat(C.braceR))break;if(!this.match(C.comma)||this.lookahead().type!==C.braceR){n=u;continue}this.unexpected(u,"A trailing comma is not permitted after the rest element")}}if(o.method=!1,(t||e)&&(c=this.state.start,l=this.state.startLoc),t||(h=this.eat(C.star)),!t&&this.isContextual("async")){h&&this.unexpected();var d=this.parseIdentifier();this.match(C.colon)||this.match(C.parenL)||this.match(C.braceR)||this.match(C.eq)||this.match(C.comma)?(o.key=d,o.computed=!1):(p=!0,this.match(C.star)&&(this.expectPlugin("asyncGenerators"),this.next(),h=!0),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,l,h,p,t,e),this.checkPropClash(o,i),o.shorthand&&this.addExtra(o,"shorthand",!0),a.properties.push(o)}return null!==n&&this.unexpected(n,"The rest element has to be the last element when destructuring"),s.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(a,t?"ObjectPattern":"ObjectExpression")},e.prototype.isGetterOrSetterMethod=function(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(C.string)||this.match(C.num)||this.match(C.bracketL)||this.match(C.name)||!!this.state.type.keyword)},e.prototype.checkGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},e.prototype.parseObjectMethod=function(t,e,s,i){return s||e||this.match(C.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,"ObjectMethod")):this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParamCount(t),t):void 0},e.prototype.parseObjectProperty=function(t,e,s,i,r){return t.shorthand=!1,this.eat(C.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,r),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(C.eq)&&r?(r.start||(r.start=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))},e.prototype.parseObjPropValue=function(t,e,s,i,r,a,n){var o=this.parseObjectMethod(t,i,r,a)||this.parseObjectProperty(t,e,s,a,n);return o||this.unexpected(),o},e.prototype.parsePropertyName=function(t){if(this.eat(C.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(C.bracketR);else{t.computed=!1;var e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(C.num)||this.match(C.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=e}return t.key},e.prototype.initFunction=function(t,e){t.id=null,t.generator=!1,t.expression=!1,t.async=!!e},e.prototype.parseMethod=function(t,e,s,i,r){var a=this.state.inMethod;this.state.inMethod=t.kind||!0,this.initFunction(t,s),this.expect(C.parenL);var n=i;return t.params=this.parseBindingList(C.parenR,!1,n),t.generator=!!e,this.parseFunctionBodyAndFinish(t,r),this.state.inMethod=a,t},e.prototype.parseArrowExpression=function(t,e,s){return this.initFunction(t,s),t.params=this.toAssignableList(e,!0,"arrow function parameters"),this.parseFunctionBody(t,!0),this.finishNode(t,"ArrowFunctionExpression")},e.prototype.isStrictBody=function(t,e){if(!e&&t.body.directives.length)for(var s=t.body.directives,i=Array.isArray(s),r=0,s=i?s:s[Symbol.iterator]();;){var a;if(i){if(r>=s.length)break;a=s[r++]}else{if((r=s.next()).done)break;a=r.value}if("use strict"===a.value.value)return!0}return!1},e.prototype.parseFunctionBodyAndFinish=function(t,e,s){this.parseFunctionBody(t,s),this.finishNode(t,e)},e.prototype.parseFunctionBody=function(t,e){var s=e&&!this.match(C.braceL),i=this.state.inAsync;if(this.state.inAsync=t.async,s)t.body=this.parseMaybeAssign(),t.expression=!0;else{var r=this.state.inFunction,a=this.state.inGenerator,n=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=t.generator,this.state.labels=[],t.body=this.parseBlock(!0),t.expression=!1,this.state.inFunction=r,this.state.inGenerator=a,this.state.labels=n}this.state.inAsync=i;var o=this.isStrictBody(t,s),h=this.state.strict||e||o;if(o&&t.id&&"Identifier"===t.id.type&&"yield"===t.id.name&&this.raise(t.id.start,"Binding yield in strict mode"),h){var p=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),t.id&&this.checkLVal(t.id,!0,void 0,"function name");for(var l=t.params,u=Array.isArray(l),d=0,l=u?l:l[Symbol.iterator]();;){var f;if(u){if(d>=l.length)break;f=l[d++]}else{if((d=l.next()).done)break;f=d.value}var y=f;o&&"Identifier"!==y.type&&this.raise(y.start,"Non-simple parameter in strict mode"),this.checkLVal(y,!0,p,"function parameter list")}this.state.strict=c}},e.prototype.parseExprList=function(t,e,s){for(var i=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(C.comma),this.eat(t))break;i.push(this.parseExprListItem(e,s))}return i},e.prototype.parseExprListItem=function(t,e,s,i){var r=void 0;return t&&this.match(C.comma)?r=null:this.match(C.ellipsis)?(r=this.parseSpread(e),i&&this.match(C.comma)&&(i.start=this.state.start)):r=this.parseMaybeAssign(!1,e,this.parseParenItem,s),r},e.prototype.parseIdentifier=function(t){var e=this.startNode(),s=this.parseIdentifierName(e.start,t);return e.name=s,e.loc.identifierName=s,this.finishNode(e,"Identifier")},e.prototype.parseIdentifierName=function(t,e){e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1);var s=void 0;if(this.match(C.name))s=this.state.value;else{if(!this.state.type.keyword)throw this.unexpected();s=this.state.type.keyword}return!e&&"await"===s&&this.state.inAsync&&this.raise(t,"invalid use of await inside of an async function"),this.next(),s},e.prototype.checkReservedWord=function(t,e,s,i){(this.isReservedWord(t)||s&&this.isKeyword(t))&&this.raise(e,t+" is a reserved word"),this.state.strict&&(L.strict(t)||i&&L.strictBind(t))&&this.raise(e,t+" is a reserved word in strict mode")},e.prototype.parseAwait=function(t){return this.state.inAsync||this.unexpected(),this.match(C.star)&&this.raise(t.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")},e.prototype.parseYield=function(){var t=this.startNode();return this.next(),this.match(C.semi)||this.canInsertSemicolon()||!this.match(C.star)&&!this.state.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(C.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")},e}(function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.toAssignable=function(t,e,s){if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var i=t.properties.entries(),r=Array.isArray(i),a=0,i=r?i:i[Symbol.iterator]();;){var n;if(r){if(a>=i.length)break;n=i[a++]}else{if((a=i.next()).done)break;n=a.value}var o=n,h=o[0],p=o[1];this.toAssignableObjectExpressionProp(p,e,h===t.properties.length-1)}break;case"ObjectProperty":this.toAssignable(t.value,e,s);break;case"SpreadElement":this.checkToRestConversion(t),t.type="RestElement";var c=t.argument;this.toAssignable(c,e,s);break;case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e,s);break;case"AssignmentExpression":"="===t.operator?(t.type="AssignmentPattern",delete t.operator):this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!e)break;default:var l="Invalid left-hand side"+(s?" in "+s:"expression");this.raise(t.start,l)}return t},e.prototype.toAssignableObjectExpressionProp=function(t,e,s){if("ObjectMethod"===t.type){var i="get"===t.kind||"set"===t.kind?"Object pattern can't contain getter or setter":"Object pattern can't contain methods";this.raise(t.key.start,i)}else"SpreadElement"!==t.type||s?this.toAssignable(t,e,"object destructuring pattern"):this.raise(t.start,"The rest element has to be the last element when destructuring")},e.prototype.toAssignableList=function(t,e,s){var i=t.length;if(i){var r=t[i-1];if(r&&"RestElement"===r.type)--i;else if(r&&"SpreadElement"===r.type){r.type="RestElement";var a=r.argument;this.toAssignable(a,e,s),"Identifier"!==a.type&&"MemberExpression"!==a.type&&"ArrayPattern"!==a.type&&this.unexpected(a.start),--i}}for(var n=0;n<i;n++){var o=t[n];o&&"SpreadElement"===o.type&&this.raise(o.start,"The rest element has to be the last element when destructuring"),o&&this.toAssignable(o,e,s)}return t},e.prototype.toReferencedList=function(t){return t},e.prototype.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},e.prototype.parseRest=function(){var t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},e.prototype.shouldAllowYieldIdentifier=function(){return this.match(C._yield)&&!this.state.strict&&!this.state.inGenerator},e.prototype.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},e.prototype.parseBindingAtom=function(){switch(this.state.type){case C._yield:case C.name:return this.parseBindingIdentifier();case C.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(C.bracketR,!0),this.finishNode(t,"ArrayPattern");case C.braceL:return this.parseObj(!0);default:throw this.unexpected()}},e.prototype.parseBindingList=function(t,e,s){for(var i=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(C.comma),e&&this.match(C.comma))i.push(null);else{if(this.eat(t))break;if(this.match(C.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(t);break}var a=[];for(this.match(C.at)&&this.hasPlugin("decorators2")&&this.raise(this.state.start,"Stage 2 decorators cannot be used to decorate parameters");this.match(C.at);)a.push(this.parseDecorator());i.push(this.parseAssignableListItem(s,a))}return i},e.prototype.parseAssignableListItem=function(t,e){var s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);var i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i},e.prototype.parseAssignableListItemTypes=function(t){return t},e.prototype.parseMaybeDefault=function(t,e,s){if(e=e||this.state.startLoc,t=t||this.state.start,s=s||this.parseBindingAtom(),!this.eat(C.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},e.prototype.checkLVal=function(t,e,s,i){switch(t.type){case"Identifier":if(this.checkReservedWord(t.name,t.start,!1,!0),s){var r=`_${t.name}`;s[r]?this.raise(t.start,"Argument name clash in strict mode"):s[r]=!0}break;case"MemberExpression":e&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(var a=t.properties,n=Array.isArray(a),o=0,a=n?a:a[Symbol.iterator]();;){var h;if(n){if(o>=a.length)break;h=a[o++]}else{if((o=a.next()).done)break;h=o.value}var p=h;"ObjectProperty"===p.type&&(p=p.value),this.checkLVal(p,e,s,"object destructuring pattern")}break;case"ArrayPattern":for(var c=t.elements,l=Array.isArray(c),u=0,c=l?c:c[Symbol.iterator]();;){var d;if(l){if(u>=c.length)break;d=c[u++]}else{if((u=c.next()).done)break;d=u.value}var f=d;f&&this.checkLVal(f,e,s,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;default:var y=(e?"Binding invalid":"Invalid")+" left-hand side"+(i?" in "+i:"expression");this.raise(t.start,y)}},e.prototype.checkToRestConversion=function(t){-1===["Identifier","MemberExpression"].indexOf(t.argument.type)&&this.raise(t.argument.start,"Invalid rest operator's argument")},e}(function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.startNode=function(){return new Y(this,this.state.start,this.state.startLoc)},e.prototype.startNodeAt=function(t,e){return new Y(this,t,e)},e.prototype.startNodeAtNode=function(t){return this.startNodeAt(t.start,t.loc.start)},e.prototype.finishNode=function(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)},e.prototype.finishNodeAt=function(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.processComment(t),t},e.prototype.resetStartLocationFromNode=function(t,e){t.start=e.start,t.loc.start=e.loc.start,this.options.ranges&&(t.range[0]=e.range[0])},e}(z))))),it=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.estreeParseRegExpLiteral=function(t){var e=t.pattern,s=t.flags,i=null;try{i=new RegExp(e,s)}catch(t){}var r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r},e.prototype.estreeParseLiteral=function(t){return this.parseLiteral(t,"Literal")},e.prototype.directiveToStmt=function(t){var e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)},e.prototype.checkDeclaration=function(e){u(e)?this.checkDeclaration(e.value):t.prototype.checkDeclaration.call(this,e)},e.prototype.checkGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.value.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},e.prototype.checkLVal=function(e,s,i,r){var a=this;switch(e.type){case"ObjectPattern":e.properties.forEach(function(t){a.checkLVal("Property"===t.type?t.value:t,s,i,"object destructuring pattern")});break;default:t.prototype.checkLVal.call(this,e,s,i,r)}},e.prototype.checkPropClash=function(t,e){if(!t.computed&&u(t)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}},e.prototype.isStrictBody=function(t,e){if(!e&&t.body.body.length>0)for(var s=t.body.body,i=Array.isArray(s),r=0,s=i?s:s[Symbol.iterator]();;){var a;if(i){if(r>=s.length)break;a=s[r++]}else{if((r=s.next()).done)break;a=r.value}var n=a;if("ExpressionStatement"!==n.type||"Literal"!==n.expression.type)break;if("use strict"===n.expression.value)return!0}return!1},e.prototype.isValidDirective=function(t){return!("ExpressionStatement"!==t.type||"Literal"!==t.expression.type||"string"!=typeof t.expression.value||t.expression.extra&&t.expression.extra.parenthesized)},e.prototype.stmtToDirective=function(e){var s=t.prototype.stmtToDirective.call(this,e),i=e.expression.value;return s.value.value=i,s},e.prototype.parseBlockBody=function(e,s,i,r){var a=this;t.prototype.parseBlockBody.call(this,e,s,i,r);var n=e.directives.map(function(t){return a.directiveToStmt(t)});e.body=n.concat(e.body),delete e.directives},e.prototype.parseClassMethod=function(t,e,s,i,r){this.parseMethod(e,s,i,r,"MethodDefinition"),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)},e.prototype.parseExprAtom=function(e){switch(this.state.type){case C.regexp:return this.estreeParseRegExpLiteral(this.state.value);case C.num:case C.string:return this.estreeParseLiteral(this.state.value);case C._null:return this.estreeParseLiteral(null);case C._true:return this.estreeParseLiteral(!0);case C._false:return this.estreeParseLiteral(!1);default:return t.prototype.parseExprAtom.call(this,e)}},e.prototype.parseLiteral=function(e,s,i,r){var a=t.prototype.parseLiteral.call(this,e,s,i,r);return a.raw=a.extra.raw,delete a.extra,a},e.prototype.parseMethod=function(e,s,i,r,a){var n=this.startNode();return n.kind=e.kind,n=t.prototype.parseMethod.call(this,n,s,i,r,"FunctionExpression"),delete n.kind,e.value=n,this.finishNode(e,a)},e.prototype.parseObjectMethod=function(e,s,i,r){var a=t.prototype.parseObjectMethod.call(this,e,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a},e.prototype.parseObjectProperty=function(e,s,i,r,a){var n=t.prototype.parseObjectProperty.call(this,e,s,i,r,a);return n&&(n.kind="init",n.type="Property"),n},e.prototype.toAssignable=function(e,s,i){return u(e)?(this.toAssignable(e.value,s,i),e):t.prototype.toAssignable.call(this,e,s,i)},e.prototype.toAssignableObjectExpressionProp=function(e,s,i){"get"===e.kind||"set"===e.kind?this.raise(e.key.start,"Object pattern can't contain getter or setter"):e.method?this.raise(e.key.start,"Object pattern can't contain methods"):t.prototype.toAssignableObjectExpressionProp.call(this,e,s,i)},e}(t)},rt=["any","mixed","empty","bool","boolean","number","string","void","null"],at={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},nt=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.flowParseTypeInitialiser=function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||C.colon);var s=this.flowParseType();return this.state.inType=e,s},e.prototype.flowParsePredicate=function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(C.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(C.parenL)?(t.value=this.parseExpression(),this.expect(C.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")},e.prototype.flowParseTypeAndPredicateInitialiser=function(){var t=this.state.inType;this.state.inType=!0,this.expect(C.colon);var e=null,s=null;return this.match(C.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(C.modulo)&&(s=this.flowParsePredicate())),[e,s]},e.prototype.flowParseDeclareClass=function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareClass")},e.prototype.flowParseDeclareFunction=function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(C.parenL);var r=this.flowParseFunctionTypeParams();s.params=r.params,s.rest=r.rest,this.expect(C.parenR);var a=this.flowParseTypeAndPredicateInitialiser();return s.returnType=a[0],t.predicate=a[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.finishNode(e,e.type),this.semicolon(),this.finishNode(t,"DeclareFunction")},e.prototype.flowParseDeclare=function(t,e){if(this.match(C._class))return this.flowParseDeclareClass(t);if(this.match(C._function))return this.flowParseDeclareFunction(t);if(this.match(C._var))return this.flowParseDeclareVariable(t);if(this.isContextual("module"))return this.lookahead().type===C.dot?this.flowParseDeclareModuleExports(t):(e&&this.unexpected(null,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(C._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()},e.prototype.flowParseDeclareVariable=function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(t,"DeclareVariable")},e.prototype.flowParseDeclareModule=function(t){var e=this;this.next(),this.match(C.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(C.braceL);!this.match(C.braceR);){var r=this.startNode();if(this.match(C._import)){var a=this.lookahead();"type"!==a.value&&"typeof"!==a.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.next(),this.parseImport(r)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),r=this.flowParseDeclare(r,!0);i.push(r)}this.expect(C.braceR),this.finishNode(s,"BlockStatement");var n=null,o=!1,h="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return i.forEach(function(t){d(t)?("CommonJS"===n&&e.unexpected(t.start,h),n="ES"):"DeclareModuleExports"===t.type&&(o&&e.unexpected(t.start,"Duplicate `declare module.exports` statement"),"ES"===n&&e.unexpected(t.start,h),n="CommonJS",o=!0)}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")},e.prototype.flowParseDeclareExportDeclaration=function(t,e){if(this.expect(C._export),this.eat(C._default))return this.match(C._function)||this.match(C._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(C._const)||this.match(C._let)||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=at[s];this.unexpected(this.state.start,`\`declare export ${s}\` is not supported. Use \`${i}\` instead`)}if(this.match(C._var)||this.match(C._function)||this.match(C._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(C.star)||this.match(C.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()},e.prototype.flowParseDeclareModuleExports=function(t){return this.expectContextual("module"),this.expect(C.dot),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")},e.prototype.flowParseDeclareTypeAlias=function(t){return this.next(),this.flowParseTypeAlias(t),this.finishNode(t,"DeclareTypeAlias")},e.prototype.flowParseDeclareOpaqueType=function(t){return this.next(),this.flowParseOpaqueType(t,!0),this.finishNode(t,"DeclareOpaqueType")},e.prototype.flowParseDeclareInterface=function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")},e.prototype.flowParseInterfaceish=function(t){if(t.id=this.parseIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.mixins=[],this.eat(C._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(C.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(C.comma))}t.body=this.flowParseObjectType(!0,!1,!1)},e.prototype.flowParseInterfaceExtends=function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")},e.prototype.flowParseInterface=function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")},e.prototype.flowParseRestrictedIdentifier=function(t){return rt.indexOf(this.state.value)>-1&&this.raise(this.state.start,`Cannot overwrite primitive type ${this.state.value}`),this.parseIdentifier(t)},e.prototype.flowParseTypeAlias=function(t){return t.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(C.eq),this.semicolon(),this.finishNode(t,"TypeAlias")},e.prototype.flowParseOpaqueType=function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(C.colon)&&(t.supertype=this.flowParseTypeInitialiser(C.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(C.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")},e.prototype.flowParseTypeParameter=function(){var t=this.startNode(),e=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return t.name=s.name,t.variance=e,t.bound=s.typeAnnotation,this.match(C.eq)&&(this.eat(C.eq),t.default=this.flowParseType()),this.finishNode(t,"TypeParameter")},e.prototype.flowParseTypeParameterDeclaration=function(){var t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(C.jsxTagStart)?this.next():this.unexpected();do{e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(C.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")},e.prototype.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(C.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},e.prototype.flowParseObjectPropertyKey=function(){return this.match(C.num)||this.match(C.string)?this.parseExprAtom():this.parseIdentifier(!0)},e.prototype.flowParseObjectTypeIndexer=function(t,e,s){return t.static=e,this.expect(C.bracketL),this.lookahead().type===C.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(C.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")},e.prototype.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(C.parenL);!this.match(C.parenR)&&!this.match(C.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(C.parenR)||this.expect(C.comma);return this.eat(C.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(C.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")},e.prototype.flowParseObjectTypeCallProperty=function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")},e.prototype.flowParseObjectType=function(t,e,s){var i=this.state.inType;this.state.inType=!0;var r=this.startNode();r.callProperties=[],r.properties=[],r.indexers=[];var a=void 0,n=void 0;for(e&&this.match(C.braceBarL)?(this.expect(C.braceBarL),a=C.braceBarR,n=!0):(this.expect(C.braceL),a=C.braceR,n=!1),r.exact=n;!this.match(a);){var o=!1,h=this.startNode();t&&this.isContextual("static")&&this.lookahead().type!==C.colon&&(this.next(),o=!0);var p=this.flowParseVariance();if(this.match(C.bracketL))r.indexers.push(this.flowParseObjectTypeIndexer(h,o,p));else if(this.match(C.parenL)||this.isRelational("<"))p&&this.unexpected(p.start),r.callProperties.push(this.flowParseObjectTypeCallProperty(h,o));else{var c="init";if(this.isContextual("get")||this.isContextual("set")){var l=this.lookahead();l.type!==C.name&&l.type!==C.string&&l.type!==C.num||(c=this.state.value,this.next())}r.properties.push(this.flowParseObjectTypeProperty(h,o,p,c,s))}this.flowObjectTypeSemicolon()}this.expect(a);var u=this.finishNode(r,"ObjectTypeAnnotation");return this.state.inType=i,u},e.prototype.flowParseObjectTypeProperty=function(t,e,s,i,r){if(this.match(C.ellipsis))return r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),s&&this.unexpected(s.start,"Spread properties cannot have variance"),this.expect(C.ellipsis),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty");t.key=this.flowParseObjectPropertyKey(),t.static=e,t.kind=i;var a=!1;return this.isRelational("<")||this.match(C.parenL)?(s&&this.unexpected(s.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParamCount(t)):("init"!==i&&this.unexpected(),this.eat(C.question)&&(a=!0),t.value=this.flowParseTypeInitialiser(),t.variance=s),t.optional=a,this.finishNode(t,"ObjectTypeProperty")},e.prototype.flowCheckGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.value.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},e.prototype.flowObjectTypeSemicolon=function(){this.eat(C.semi)||this.eat(C.comma)||this.match(C.braceR)||this.match(C.braceBarR)||this.unexpected()},e.prototype.flowParseQualifiedTypeIdentifier=function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(C.dot);){var r=this.startNodeAt(t,e);r.qualification=i,r.id=this.parseIdentifier(),i=this.finishNode(r,"QualifiedTypeIdentifier")}return i},e.prototype.flowParseGenericType=function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},e.prototype.flowParseTypeofType=function(){var t=this.startNode();return this.expect(C._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},e.prototype.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(C.bracketL);this.state.pos<this.input.length&&!this.match(C.bracketR)&&(t.types.push(this.flowParseType()),!this.match(C.bracketR));)this.expect(C.comma);return this.expect(C.bracketR),this.finishNode(t,"TupleTypeAnnotation")},e.prototype.flowParseFunctionTypeParam=function(){var t=null,e=!1,s=null,i=this.startNode(),r=this.lookahead();return r.type===C.colon||r.type===C.question?(t=this.parseIdentifier(),this.eat(C.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=t,i.optional=e,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")},e.prototype.reinterpretTypeAsFunctionTypeParam=function(t){var e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")},e.prototype.flowParseFunctionTypeParams=function(t){void 0===t&&(t=[]);for(var e=null;!this.match(C.parenR)&&!this.match(C.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(C.parenR)||this.expect(C.comma);return this.eat(C.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}},e.prototype.flowIdentToTypeAnnotation=function(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"void":return this.finishNode(s,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.flowParseGenericType(t,e,i)}},e.prototype.flowParsePrimaryType=function(){var t=this.state.start,e=this.state.startLoc,s=this.startNode(),i=void 0,r=void 0,a=!1,n=this.state.noAnonFunctionType;switch(this.state.type){case C.name:return this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier());case C.braceL:return this.flowParseObjectType(!1,!1,!0);case C.braceBarL:return this.flowParseObjectType(!1,!0,!0);case C.bracketL:return this.flowParseTupleType();case C.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(C.parenL),i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,this.expect(C.parenR),this.expect(C.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case C.parenL:if(this.next(),!this.match(C.parenR)&&!this.match(C.ellipsis))if(this.match(C.name)){var o=this.lookahead().type;a=o!==C.question&&o!==C.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(C.comma)||this.match(C.parenR)&&this.lookahead().type===C.arrow))return this.expect(C.parenR),r;this.eat(C.comma)}return i=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,this.expect(C.parenR),this.expect(C.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case C.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case C._true:case C._false:return s.value=this.match(C._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case C.plusMin:if("-"===this.state.value)return this.next(),this.match(C.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",s.start,s.loc.start);this.unexpected();case C.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case C._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case C._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case C.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}throw this.unexpected()},e.prototype.flowParsePostfixType=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(C.bracketL);){var i=this.startNodeAt(t,e);i.elementType=s,this.expect(C.bracketL),this.expect(C.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s},e.prototype.flowParsePrefixType=function(){var t=this.startNode();return this.eat(C.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()},e.prototype.flowParseAnonFunctionWithoutParens=function(){var t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(C.arrow)){var e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t},e.prototype.flowParseIntersectionType=function(){var t=this.startNode();this.eat(C.bitwiseAND);var e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(C.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")},e.prototype.flowParseUnionType=function(){var t=this.startNode();this.eat(C.bitwiseOR);var e=this.flowParseIntersectionType();for(t.types=[e];this.eat(C.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")},e.prototype.flowParseType=function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e},e.prototype.flowParseTypeAnnotation=function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")},e.prototype.flowParseTypeAnnotatableIdentifier=function(){var t=this.flowParseRestrictedIdentifier();return this.match(C.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,t.type)),t},e.prototype.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},e.prototype.flowParseVariance=function(){var t=null;return this.match(C.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t},e.prototype.parseFunctionBodyAndFinish=function(e,s,i){if(!i&&this.match(C.colon)){var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},e.prototype.parseStatement=function(e,s){if(this.state.strict&&this.match(C.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}return t.prototype.parseStatement.call(this,e,s)},e.prototype.parseExpressionStatement=function(e,s){if("Identifier"===s.type)if("declare"===s.name){if(this.match(C._class)||this.match(C.name)||this.match(C._function)||this.match(C._var)||this.match(C._export))return this.flowParseDeclare(e)}else if(this.match(C.name)){if("interface"===s.name)return this.flowParseInterface(e);if("type"===s.name)return this.flowParseTypeAlias(e);if("opaque"===s.name)return this.flowParseOpaqueType(e,!1)}return t.prototype.parseExpressionStatement.call(this,e,s)},e.prototype.shouldParseExportDeclaration=function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||t.prototype.shouldParseExportDeclaration.call(this)},e.prototype.isExportDefaultSpecifier=function(){return(!this.match(C.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!=this.state.value)&&t.prototype.isExportDefaultSpecifier.call(this)},e.prototype.parseConditional=function(e,s,i,r,a){if(a&&this.match(C.question)){var n=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(t instanceof SyntaxError)return this.state=n,a.start=t.pos||this.state.start,e;throw t}}return t.prototype.parseConditional.call(this,e,s,i,r)},e.prototype.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(C.question)&&(e.optional=!0),this.match(C.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e},e.prototype.parseExport=function(e){return"ExportNamedDeclaration"!==(e=t.prototype.parseExport.call(this,e)).type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e},e.prototype.parseExportDeclaration=function(e){if(this.isContextual("type")){e.exportKind="type";var s=this.startNode();return this.next(),this.match(C.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(s)}if(this.isContextual("opaque")){e.exportKind="type";var i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}if(this.isContextual("interface")){e.exportKind="type";var r=this.startNode();return this.next(),this.flowParseInterface(r)}return t.prototype.parseExportDeclaration.call(this,e)},e.prototype.shouldParseExportStar=function(){return t.prototype.shouldParseExportStar.call(this)||this.isContextual("type")&&this.lookahead().type===C.star},e.prototype.parseExportStar=function(e,s){return this.eatContextual("type")&&(e.exportKind="type",s=!1),t.prototype.parseExportStar.call(this,e,s)},e.prototype.parseClassId=function(e,s,i){t.prototype.parseClassId.call(this,e,s,i),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())},e.prototype.isKeyword=function(e){return(!this.state.inType||"void"!==e)&&t.prototype.isKeyword.call(this,e)},e.prototype.readToken=function(e){return!this.state.inType||62!==e&&60!==e?t.prototype.readToken.call(this,e):this.finishOp(C.relational,1)},e.prototype.toAssignable=function(e,s,i){return"TypeCastExpression"===e.type?t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i):t.prototype.toAssignable.call(this,e,s,i)},e.prototype.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},e.prototype.toReferencedList=function(t){for(var e=0;e<t.length;e++){var s=t[e];s&&s._exprListItem&&"TypeCastExpression"===s.type&&this.raise(s.start,"Unexpected type cast")}return t},e.prototype.parseExprListItem=function(e,s,i){var r=this.startNode(),a=t.prototype.parseExprListItem.call(this,e,s,i);return this.match(C.colon)?(r._exprListItem=!0,r.expression=a,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")):a},e.prototype.checkLVal=function(e,s,i,r){if("TypeCastExpression"!==e.type)return t.prototype.checkLVal.call(this,e,s,i,r)},e.prototype.parseClassProperty=function(e){return this.match(C.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassProperty.call(this,e)},e.prototype.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},e.prototype.isClassProperty=function(){return this.match(C.colon)||t.prototype.isClassProperty.call(this)},e.prototype.isNonstaticConstructor=function(e){return!this.match(C.colon)&&t.prototype.isNonstaticConstructor.call(this,e)},e.prototype.parseClassMethod=function(e,s,i,r,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.parseClassMethod.call(this,e,s,i,r,a)},e.prototype.parseClassSuper=function(e){if(t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=e.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(C.comma))}},e.prototype.parsePropertyName=function(e){var s=this.flowParseVariance(),i=t.prototype.parsePropertyName.call(this,e);return e.variance=s,i},e.prototype.parseObjPropValue=function(e,s,i,r,a,n,o){e.variance&&this.unexpected(e.variance.start),delete e.variance;var h=void 0;this.isRelational("<")&&(h=this.flowParseTypeParameterDeclaration(),this.match(C.parenL)||this.unexpected()),t.prototype.parseObjPropValue.call(this,e,s,i,r,a,n,o),h&&((e.value||e).typeParameters=h)},e.prototype.parseAssignableListItemTypes=function(t){if(this.eat(C.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}return this.match(C.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(t,t.type),t},e.prototype.parseMaybeDefault=function(e,s,i){var r=t.prototype.parseMaybeDefault.call(this,e,s,i);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),r},e.prototype.parseImportSpecifiers=function(e){e.importKind="value";var s=null;if(this.match(C._typeof)?s="typeof":this.isContextual("type")&&(s="type"),s){var i=this.lookahead();(i.type===C.name&&"from"!==i.value||i.type===C.braceL||i.type===C.star)&&(this.next(),e.importKind=s)}t.prototype.parseImportSpecifiers.call(this,e)},e.prototype.parseImportSpecifier=function(t){var e=this.startNode(),s=this.state.start,i=this.parseIdentifier(!0),r=null;"type"===i.name?r="type":"typeof"===i.name&&(r="typeof");var a=!1;if(this.isContextual("as")){var n=this.parseIdentifier(!0);null===r||this.match(C.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=n,e.importKind=r,e.local=n.__clone())}else null!==r&&(this.match(C.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=r,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=e.imported.__clone())):(a=!0,e.imported=i,e.importKind=null,e.local=e.imported.__clone());"type"!==t.importKind&&"typeof"!==t.importKind||"type"!==e.importKind&&"typeof"!==e.importKind||this.raise(s,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),a&&this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},e.prototype.parseFunctionParams=function(e){this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.parseFunctionParams.call(this,e)},e.prototype.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e),this.match(C.colon)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e.id,e.id.type))},e.prototype.parseAsyncArrowFromCallExpression=function(e,s){if(this.match(C.colon)){var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},e.prototype.shouldParseAsyncArrow=function(){return this.match(C.colon)||t.prototype.shouldParseAsyncArrow.call(this)},e.prototype.parseMaybeAssign=function(e,s,i,r){var a=null;if(C.jsxTagStart&&this.match(C.jsxTagStart)){var n=this.state.clone();try{return t.prototype.parseMaybeAssign.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=n,this.state.context.length-=2,a=t}}if(null!=a||this.isRelational("<")){var o=void 0,h=void 0;try{h=this.flowParseTypeParameterDeclaration(),(o=t.prototype.parseMaybeAssign.call(this,e,s,i,r)).typeParameters=h,this.resetStartLocationFromNode(o,h)}catch(t){throw a||t}if("ArrowFunctionExpression"===o.type)return o;if(null!=a)throw a;this.raise(h.start,"Expected an arrow function after this type parameter declaration")}return t.prototype.parseMaybeAssign.call(this,e,s,i,r)},e.prototype.parseArrow=function(e){if(this.match(C.colon)){var s=this.state.clone();try{var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(C.arrow)||this.unexpected(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},e.prototype.shouldParseArrow=function(){return this.match(C.colon)||t.prototype.shouldParseArrow.call(this)},e}(t)},ot={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ht=/^[\da-fA-F]+$/,pt=/^\d+$/;U.j_oTag=new V("<tag",!1),U.j_cTag=new V("</tag",!1),U.j_expr=new V("<tag>...</tag>",!0,!0),C.jsxName=new k("jsxName"),C.jsxText=new k("jsxText",{beforeExpr:!0}),C.jsxTagStart=new k("jsxTagStart",{startsExpr:!0}),C.jsxTagEnd=new k("jsxTagEnd"),C.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},C.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===U.j_oTag&&t===C.slash||e===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var ct=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.jsxReadToken=function(){for(var t="",e=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(C.jsxTagStart)):this.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(C.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:o(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},e.prototype.jsxReadNewLine=function(t){var e=this.input.charCodeAt(this.state.pos),s=void 0;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s},e.prototype.jsxReadString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):o(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(C.string,e)},e.prototype.jsxReadEntity=function(){for(var t="",e=0,s=void 0,i=this.input[this.state.pos],r=++this.state.pos;this.state.pos<this.input.length&&e++<10;){if(";"===(i=this.input[this.state.pos++])){"#"===t[0]?"x"===t[1]?(t=t.substr(2),ht.test(t)&&(s=String.fromCodePoint(parseInt(t,16)))):(t=t.substr(1),pt.test(t)&&(s=String.fromCodePoint(parseInt(t,10)))):s=ot[t];break}t+=i}return s||(this.state.pos=r,"&")},e.prototype.jsxReadWord=function(){var t=void 0,e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(n(t)||45===t);return this.finishToken(C.jsxName,this.input.slice(e,this.state.pos))},e.prototype.jsxParseIdentifier=function(){var t=this.startNode();return this.match(C.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")},e.prototype.jsxParseNamespacedName=function(){var t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(C.colon))return s;var i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")},e.prototype.jsxParseElementName=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.jsxParseNamespacedName();this.eat(C.dot);){var i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s},e.prototype.jsxParseAttributeValue=function(){var t=void 0;switch(this.state.type){case C.braceL:if("JSXEmptyExpression"===(t=this.jsxParseExpressionContainer()).expression.type)throw this.raise(t.start,"JSX attributes must only be assigned a non-empty expression");return t;case C.jsxTagStart:case C.string:return this.parseExprAtom();default:throw this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},e.prototype.jsxParseEmptyExpression=function(){var t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)},e.prototype.jsxParseSpreadChild=function(){var t=this.startNode();return this.expect(C.braceL),this.expect(C.ellipsis),t.expression=this.parseExpression(),this.expect(C.braceR),this.finishNode(t,"JSXSpreadChild")},e.prototype.jsxParseExpressionContainer=function(){var t=this.startNode();return this.next(),this.match(C.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(C.braceR),this.finishNode(t,"JSXExpressionContainer")},e.prototype.jsxParseAttribute=function(){var t=this.startNode();return this.eat(C.braceL)?(this.expect(C.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(C.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(C.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))},e.prototype.jsxParseOpeningElementAt=function(t,e){var s=this.startNodeAt(t,e);for(s.attributes=[],s.name=this.jsxParseElementName();!this.match(C.slash)&&!this.match(C.jsxTagEnd);)s.attributes.push(this.jsxParseAttribute());return s.selfClosing=this.eat(C.slash),this.expect(C.jsxTagEnd),this.finishNode(s,"JSXOpeningElement")},e.prototype.jsxParseClosingElementAt=function(t,e){var s=this.startNodeAt(t,e);return s.name=this.jsxParseElementName(),this.expect(C.jsxTagEnd),this.finishNode(s,"JSXClosingElement")},e.prototype.jsxParseElementAt=function(t,e){var s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e),a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case C.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(C.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case C.jsxText:i.push(this.parseExprAtom());break;case C.braceL:this.lookahead().type===C.ellipsis?i.push(this.jsxParseSpreadChild()):i.push(this.jsxParseExpressionContainer());break;default:throw this.unexpected()}f(a.name)!==f(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+f(r.name)+">")}return s.openingElement=r,s.closingElement=a,s.children=i,this.match(C.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(s,"JSXElement")},e.prototype.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},e.prototype.parseExprAtom=function(e){return this.match(C.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(C.jsxTagStart)?this.jsxParseElement():t.prototype.parseExprAtom.call(this,e)},e.prototype.readToken=function(e){if(this.state.inPropertyName)return t.prototype.readToken.call(this,e);var s=this.curContext();if(s===U.j_expr)return this.jsxReadToken();if(s===U.j_oTag||s===U.j_cTag){if(a(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(C.jsxTagEnd);if((34===e||39===e)&&s===U.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed?(++this.state.pos,this.finishToken(C.jsxTagStart)):t.prototype.readToken.call(this,e)},e.prototype.updateContext=function(e){if(this.match(C.braceL)){var s=this.curContext();s===U.j_oTag?this.state.context.push(U.braceExpression):s===U.j_expr?this.state.context.push(U.templateQuasi):t.prototype.updateContext.call(this,e),this.state.exprAllowed=!0}else{if(!this.match(C.slash)||e!==C.jsxTagStart)return t.prototype.updateContext.call(this,e);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}},e}(t)},lt=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.tsIsIdentifier=function(){return this.match(C.name)},e.prototype.tsNextTokenCanFollowModifier=function(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(C.parenL)||this.match(C.colon)||this.match(C.eq)||this.match(C.question))},e.prototype.tsParseModifier=function(t){if(this.match(C.name)){var e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}},e.prototype.tsIsListTerminator=function(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(C.braceR);case"HeritageClauseElement":return this.match(C.braceL);case"TupleElementTypes":return this.match(C.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")},e.prototype.tsParseList=function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s},e.prototype.tsParseDelimitedList=function(t,e){return y(this.tsParseDelimitedListWorker(t,e,!0))},e.prototype.tsTryParseDelimitedList=function(t,e){return this.tsParseDelimitedListWorker(t,e,!1)},e.prototype.tsParseDelimitedListWorker=function(t,e,s){for(var i=[];;){if(this.tsIsListTerminator(t))break;var r=e();if(null==r)return;if(i.push(r),!this.eat(C.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(C.comma))}}return i},e.prototype.tsParseBracketedList=function(t,e,s,i){i||(s?this.expect(C.bracketL):this.expectRelational("<"));var r=this.tsParseDelimitedList(t,e);return s?this.expect(C.bracketR):this.expectRelational(">"),r},e.prototype.tsParseEntityName=function(t){for(var e=this.parseIdentifier();this.eat(C.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e},e.prototype.tsParseTypeReference=function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")},e.prototype.tsParseThisTypePredicate=function(t){this.next();var e=this.startNode();return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")},e.prototype.tsParseThisTypeNode=function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")},e.prototype.tsParseTypeQuery=function(){var t=this.startNode();return this.expect(C._typeof),t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")},e.prototype.tsParseTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.eat(C._extends)&&(t.constraint=this.tsParseType()),this.eat(C.eq)&&(t.default=this.tsParseType()),this.finishNode(t,"TypeParameter")},e.prototype.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},e.prototype.tsParseTypeParameters=function(){var t=this.startNode();return this.isRelational("<")||this.match(C.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TypeParameterDeclaration")},e.prototype.tsFillSignature=function(t,e){var s=t===C.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(C.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))},e.prototype.tsParseBindingListForSignature=function(){var t=this;return this.parseBindingList(C.parenR).map(function(e){if("Identifier"!==e.type&&"RestElement"!==e.type)throw t.unexpected(e.start,"Name in a signature must be an Identifier.");return e})},e.prototype.tsParseTypeMemberSemicolon=function(){this.eat(C.comma)||this.semicolon()},e.prototype.tsParseSignatureMember=function(t){var e=this.startNode();return"TSConstructSignatureDeclaration"===t&&this.expect(C._new),this.tsFillSignature(C.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)},e.prototype.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(C.name)&&this.match(C.colon)},e.prototype.tsTryParseIndexSignature=function(t){if(this.match(C.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(C.bracketL);var e=this.parseIdentifier();this.expect(C.colon),e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(C.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}},e.prototype.tsParsePropertyOrMethodSignature=function(t,e){this.parsePropertyName(t),this.eat(C.question)&&(t.optional=!0);var s=t;if(e||!this.match(C.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var r=this.tsTryParseTypeAnnotation();return r&&(i.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var a=s;return this.tsFillSignature(C.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")},e.prototype.tsParseTypeMember=function(){if(this.match(C.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(C._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var t=this.startNode(),e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):this.tsParsePropertyOrMethodSignature(t,e)},e.prototype.tsIsStartOfConstructSignature=function(){return this.next(),this.match(C.parenL)||this.isRelational("<")},e.prototype.tsParseTypeLiteral=function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")},e.prototype.tsParseObjectTypeMembers=function(){this.expect(C.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(C.braceR),t},e.prototype.tsIsStartOfMappedType=function(){return this.next(),this.isContextual("readonly")&&this.next(),!!this.match(C.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(C._in)))},e.prototype.tsParseMappedTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.expect(C._in),t.constraint=this.tsParseType(),this.finishNode(t,"TypeParameter")},e.prototype.tsParseMappedType=function(){var t=this.startNode();return this.expect(C.braceL),this.eatContextual("readonly")&&(t.readonly=!0),this.expect(C.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(C.bracketR),this.eat(C.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(C.braceR),this.finishNode(t,"TSMappedType")},e.prototype.tsParseTupleType=function(){var t=this.startNode();return t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseType.bind(this),!0,!1),this.finishNode(t,"TSTupleType")},e.prototype.tsParseParenthesizedType=function(){var t=this.startNode();return this.expect(C.parenL),t.typeAnnotation=this.tsParseType(),this.expect(C.parenR),this.finishNode(t,"TSParenthesizedType")},e.prototype.tsParseFunctionOrConstructorType=function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(C._new),this.tsFillSignature(C.arrow,e),this.finishNode(e,t)},e.prototype.tsParseLiteralTypeNode=function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case C.num:return t.parseLiteral(t.state.value,"NumericLiteral");case C.string:return t.parseLiteral(t.state.value,"StringLiteral");case C._true:case C._false:return t.parseBooleanLiteral();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")},e.prototype.tsParseNonArrayType=function(){switch(this.state.type){case C.name:case C._void:case C._null:var t=this.match(C._void)?"TSVoidKeyword":this.match(C._null)?"TSNullKeyword":x(this.state.value);if(void 0!==t&&this.lookahead().type!==C.dot){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case C.string:case C.num:case C._true:case C._false:return this.tsParseLiteralTypeNode();case C.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.next(),!this.match(C.num))throw this.unexpected();return s.literal=this.parseLiteral(-this.state.value,"NumericLiteral",s.start,s.loc.start),this.finishNode(s,"TSLiteralType")}break;case C._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case C._typeof:return this.tsParseTypeQuery();case C.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case C.bracketL:return this.tsParseTupleType();case C.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},e.prototype.tsParseArrayTypeOrHigher=function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(C.bracketL);)if(this.match(C.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(C.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(C.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t},e.prototype.tsParseTypeOperator=function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(e,"TSTypeOperator")},e.prototype.tsParseTypeOperatorOrHigher=function(){return this.isContextual("keyof")?this.tsParseTypeOperator("keyof"):this.tsParseArrayTypeOrHigher()},e.prototype.tsParseUnionOrIntersectionType=function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var r=[i];this.eat(s);)r.push(e());var a=this.startNodeAtNode(i);a.types=r,i=this.finishNode(a,t)}return i},e.prototype.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),C.bitwiseAND)},e.prototype.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),C.bitwiseOR)},e.prototype.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(C.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},e.prototype.tsSkipParameterStart=function(){return!(!this.match(C.name)&&!this.match(C._this))&&(this.next(),!0)},e.prototype.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(C.parenR)||this.match(C.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(C.colon)||this.match(C.comma)||this.match(C.question)||this.match(C.eq))return!0;if(this.match(C.parenR)&&(this.next(),this.match(C.arrow)))return!0}return!1},e.prototype.tsParseTypeOrTypePredicateAnnotation=function(t){var e=this.startNode();this.expect(t);var s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return this.tsParseTypeAnnotation(!1,e);var i=this.tsParseTypeAnnotation(!1),r=this.startNodeAtNode(s);return r.parameterName=s,r.typeAnnotation=i,e.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(e,"TypeAnnotation")},e.prototype.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(C.colon)?this.tsParseTypeOrTypePredicateAnnotation(C.colon):void 0},e.prototype.tsTryParseTypeAnnotation=function(){return this.match(C.colon)?this.tsParseTypeAnnotation():void 0},e.prototype.tsTryParseType=function(){return this.eat(C.colon)?this.tsParseType():void 0},e.prototype.tsParseTypePredicatePrefix=function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t},e.prototype.tsParseTypeAnnotation=function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),t&&this.expect(C.colon),e.typeAnnotation=this.tsParseType(),this.finishNode(e,"TypeAnnotation")},e.prototype.tsParseType=function(){var t=this.state.inType;this.state.inType=!0;try{return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(C._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}finally{this.state.inType=t}},e.prototype.tsParseTypeAssertion=function(){var t=this.startNode();return t.typeAnnotation=this.tsParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")},e.prototype.tsTryParseTypeArgumentsInExpression=function(){var t=this;return this.tsTryParseAndCatch(function(){var e=t.startNode();t.expectRelational("<");var s=t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t));return t.expectRelational(">"),e.params=s,t.finishNode(e,"TypeParameterInstantiation"),t.expect(C.parenL),e})},e.prototype.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},e.prototype.tsParseExpressionWithTypeArguments=function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")},e.prototype.tsParseInterfaceDeclaration=function(t){t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(C._extends)&&(t.extends=this.tsParseHeritageClause());var e=this.startNode();return e.body=this.tsParseObjectTypeMembers(),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")},e.prototype.tsParseTypeAliasDeclaration=function(t){return t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.expect(C.eq),t.typeAnnotation=this.tsParseType(),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")},e.prototype.tsParseEnumMember=function(){var t=this.startNode();return t.id=this.match(C.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(C.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")},e.prototype.tsParseEnumDeclaration=function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.expect(C.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(C.braceR),this.finishNode(t,"TSEnumDeclaration")},e.prototype.tsParseModuleBlock=function(){var t=this.startNode();return this.expect(C.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,C.braceR),this.finishNode(t,"TSModuleBlock")},e.prototype.tsParseModuleOrNamespaceDeclaration=function(t){if(t.id=this.parseIdentifier(),this.eat(C.dot)){var e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e),t.body=e}else t.body=this.tsParseModuleBlock();return this.finishNode(t,"TSModuleDeclaration")},e.prototype.tsParseAmbientExternalModuleDeclaration=function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(C.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(C.braceL)?t.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(t,"TSModuleDeclaration")},e.prototype.tsParseImportEqualsDeclaration=function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(C.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")},e.prototype.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===C.parenL},e.prototype.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},e.prototype.tsParseExternalModuleReference=function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(C.parenL),!this.match(C.string))throw this.unexpected();return t.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(C.parenR),this.finishNode(t,"TSExternalModuleReference")},e.prototype.tsLookAhead=function(t){var e=this.state.clone(),s=t();return this.state=e,s},e.prototype.tsTryParseAndCatch=function(t){var e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}},e.prototype.tsTryParse=function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)},e.prototype.nodeWithSamePosition=function(t,e){var s=this.startNodeAtNode(t);return s.type=e,s.end=t.end,s.loc.end=t.loc.end,t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),t.innerComments&&(s.innerComments=t.innerComments),s},e.prototype.tsTryParseDeclare=function(t){switch(this.state.type){case C._function:return this.next(),this.parseFunction(t,!0);case C._class:return this.parseClass(t,!0,!1);case C._const:if(this.match(C._const)&&this.lookaheadIsContextual("enum"))return this.expect(C._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case C._var:case C._let:return this.parseVarStatement(t,this.state.type);case C.name:var e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}},e.prototype.lookaheadIsContextual=function(t){var e=this.lookahead();return e.type===C.name&&e.value===t},e.prototype.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},e.prototype.tsParseExpressionStatement=function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(C.braceL)){var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}},e.prototype.tsParseDeclaration=function(t,e,s){switch(e){case"abstract":if(s||this.match(C._class)){var i=t;return i.abstract=!0,s&&this.next(),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(C.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(s||this.match(C.name))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(C.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(s||this.match(C.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(s||this.match(C.name))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(s||this.match(C.name))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}},e.prototype.tsTryParseGenericAsyncArrowFunction=function(e,s){var i=this,r=this.tsTryParseAndCatch(function(){var r=i.startNodeAt(e,s);return r.typeParameters=i.tsParseTypeParameters(),t.prototype.parseFunctionParams.call(i,r),r.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(C.arrow),r});if(r)return r.id=null,r.generator=!1,r.expression=!0,r.async=!0,this.parseFunctionBody(r,!0),this.finishNode(r,"ArrowFunctionExpression")},e.prototype.tsParseTypeArguments=function(){var t=this.startNode();return this.expectRelational("<"),t.params=this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this)),this.expectRelational(">"),this.finishNode(t,"TypeParameterInstantiation")},e.prototype.isExportDefaultSpecifier=function(){return(!this.match(C.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"enum"!==this.state.value)&&t.prototype.isExportDefaultSpecifier.call(this)},e.prototype.parseAssignableListItem=function(t,e){var s=void 0,i=!1;t&&(s=this.parseAccessModifier(),i=!!this.tsParseModifier(["readonly"]));var r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);var a=this.parseMaybeDefault(r.start,r.loc.start,r);if(s||i){var n=this.startNodeAtNode(a);if(e.length&&(n.decorators=e),s&&(n.accessibility=s),i&&(n.readonly=i),"Identifier"!==a.type&&"AssignmentPattern"!==a.type)throw this.raise(n.start,"A parameter property may not be declared using a binding pattern.");return n.parameter=a,this.finishNode(n,"TSParameterProperty")}return e.length&&(r.decorators=e),a},e.prototype.parseFunctionBodyAndFinish=function(e,s,i){!i&&this.match(C.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(C.colon));var r="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;r&&!this.match(C.braceL)&&this.isLineTerminator()?this.finishNode(e,r):t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},e.prototype.parseSubscript=function(e,s,i,r,a){if(this.eat(C.bang)){var n=this.startNodeAt(s,i);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}if(!r&&this.isRelational("<")){if(this.atPossibleAsync(e)){var o=this.tsTryParseGenericAsyncArrowFunction(s,i);if(o)return o}var h=this.startNodeAt(s,i);h.callee=e;var p=this.tsTryParseTypeArgumentsInExpression();if(p)return h.arguments=this.parseCallExpressionArguments(C.parenR,!1),h.typeParameters=p,this.finishCallExpression(h)}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},e.prototype.parseNewArguments=function(e){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch(function(){var t=s.tsParseTypeArguments();return s.match(C.parenL)||s.unexpected(),t});i&&(e.typeParameters=i)}t.prototype.parseNewArguments.call(this,e)},e.prototype.parseExprOp=function(e,s,i,r,a){if(y(C._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.eatContextual("as")){var n=this.startNodeAt(s,i);return n.expression=e,n.typeAnnotation=this.tsParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,r,a)}return t.prototype.parseExprOp.call(this,e,s,i,r,a)},e.prototype.checkReservedWord=function(t,e,s,i){},e.prototype.checkDuplicateExports=function(){},e.prototype.parseImport=function(e){return this.match(C.name)&&this.lookahead().type===C.eq?this.tsParseImportEqualsDeclaration(e):t.prototype.parseImport.call(this,e)},e.prototype.parseExport=function(e){if(this.match(C._import))return this.expect(C._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(C.eq)){var s=e;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=e;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return t.prototype.parseExport.call(this,e)},e.prototype.parseStatementContent=function(e,s){if(this.state.type===C._const){var i=this.lookahead();if(i.type===C.name&&"enum"===i.value){var r=this.startNode();return this.expect(C._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(r,!0)}}return t.prototype.parseStatementContent.call(this,e,s)},e.prototype.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},e.prototype.parseClassMember=function(e,s,i){var r=this.parseAccessModifier();r&&(s.accessibility=r),t.prototype.parseClassMember.call(this,e,s,i)},e.prototype.parseClassMemberWithIsStatic=function(e,s,i,r){var a=s,n=s,o=s,h=!1,p=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":p=!0,h=!!this.tsParseModifier(["abstract"]);break;case"abstract":h=!0,p=!!this.tsParseModifier(["readonly"])}if(h&&(a.abstract=!0),p&&(o.readonly=!0),!h&&!r&&!a.accessibility){var c=this.tsTryParseIndexSignature(s);if(c)return void e.body.push(c)}if(p)return a.static=r,this.parseClassPropertyName(n),this.parsePostMemberNameModifiers(a),void this.pushClassProperty(e,n);t.prototype.parseClassMemberWithIsStatic.call(this,e,s,i,r)},e.prototype.parsePostMemberNameModifiers=function(t){this.eat(C.question)&&(t.optional=!0)},e.prototype.parseExpressionStatement=function(e,s){return("Identifier"===s.type?this.tsParseExpressionStatement(e,s):void 0)||t.prototype.parseExpressionStatement.call(this,e,s)},e.prototype.shouldParseExportDeclaration=function(){if(this.match(C.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return t.prototype.shouldParseExportDeclaration.call(this)},e.prototype.parseConditional=function(e,s,i,r,a){if(!a||!this.match(C.question))return t.prototype.parseConditional.call(this,e,s,i,r,a);var n=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;return this.state=n,a.start=t.pos||this.state.start,e}},e.prototype.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(C.question)&&(e.optional=!0),this.match(C.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e},e.prototype.parseExportDeclaration=function(e){var s=this.eatContextual("declare"),i=void 0;return this.match(C.name)&&(i=this.tsTryParseExportDeclaration()),i||(i=t.prototype.parseExportDeclaration.call(this,e)),i&&s&&(i.declare=!0),i},e.prototype.parseClassId=function(e,s,i){var r;if(s&&!i||!this.isContextual("implements")){(r=t.prototype.parseClassId).call.apply(r,[this].concat(Array.prototype.slice.call(arguments)));var a=this.tsTryParseTypeParameters();a&&(e.typeParameters=a)}},e.prototype.parseClassProperty=function(e){var s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),t.prototype.parseClassProperty.call(this,e)},e.prototype.parseClassMethod=function(e,s,i,r,a){var n=this.tsTryParseTypeParameters();n&&(s.typeParameters=n),t.prototype.parseClassMethod.call(this,e,s,i,r,a)},e.prototype.parseClassSuper=function(e){t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause())},e.prototype.parseObjPropValue=function(e){var s;if(this.isRelational("<"))throw new Error("TODO");for(var i=arguments.length,r=Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];(s=t.prototype.parseObjPropValue).call.apply(s,[this,e].concat(r))},e.prototype.parseFunctionParams=function(e){var s=this.tsTryParseTypeParameters();s&&(e.typeParameters=s),t.prototype.parseFunctionParams.call(this,e)},e.prototype.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e);var s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.finishNode(e.id,e.id.type))},e.prototype.parseAsyncArrowFromCallExpression=function(e,s){return this.match(C.colon)&&(e.returnType=this.tsParseTypeAnnotation()),t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},e.prototype.parseMaybeAssign=function(){for(var e=void 0,s=arguments.length,i=Array(s),r=0;r<s;r++)i[r]=arguments[r];if(this.match(C.jsxTagStart)){m(this.curContext()===U.j_oTag),m(this.state.context[this.state.context.length-2]===U.j_expr);var a=this.state.clone();try{var n;return(n=t.prototype.parseMaybeAssign).call.apply(n,[this].concat(i))}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=a,m(this.curContext()===U.j_oTag),this.state.context.pop(),m(this.curContext()===U.j_expr),this.state.context.pop(),e=t}}if(void 0===e&&!this.isRelational("<")){var o;return(o=t.prototype.parseMaybeAssign).call.apply(o,[this].concat(i))}var h=void 0,p=void 0,c=this.state.clone();try{var l;p=this.tsParseTypeParameters(),"ArrowFunctionExpression"!==(h=(l=t.prototype.parseMaybeAssign).call.apply(l,[this].concat(i))).type&&this.unexpected()}catch(s){var u;if(!(s instanceof SyntaxError))throw s;if(e)throw e;return m(!this.hasPlugin("jsx")),this.state=c,(u=t.prototype.parseMaybeAssign).call.apply(u,[this].concat(i))}return p&&0!==p.params.length&&this.resetStartLocationFromNode(h,p.params[0]),h.typeParameters=p,h},e.prototype.parseMaybeUnary=function(e){return!this.hasPlugin("jsx")&&this.eatRelational("<")?this.tsParseTypeAssertion():t.prototype.parseMaybeUnary.call(this,e)},e.prototype.parseArrow=function(e){if(this.match(C.colon)){var s=this.state.clone();try{var i=this.tsParseTypeOrTypePredicateAnnotation(C.colon);this.canInsertSemicolon()&&this.unexpected(),this.match(C.arrow)||this.unexpected(),e.returnType=i}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},e.prototype.parseAssignableListItemTypes=function(t){if(this.eat(C.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}var e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.finishNode(t,t.type)},e.prototype.toAssignable=function(e,s,i){switch(e.type){case"TypeCastExpression":return t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i);case"TSParameterProperty":default:return t.prototype.toAssignable.call(this,e,s,i)}},e.prototype.checkLVal=function(e,s,i,r){switch(e.type){case"TypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,s,i,"parameter property");default:return void t.prototype.checkLVal.call(this,e,s,i,r)}},e.prototype.parseBindingAtom=function(){switch(this.state.type){case C._this:return this.parseIdentifier(!0);default:return t.prototype.parseBindingAtom.call(this)}},e.prototype.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},e.prototype.isClassProperty=function(){return this.match(C.colon)||t.prototype.isClassProperty.call(this)},e.prototype.parseMaybeDefault=function(){for(var e,s=arguments.length,i=Array(s),r=0;r<s;r++)i[r]=arguments[r];var a=(e=t.prototype.parseMaybeDefault).call.apply(e,[this].concat(i));return"AssignmentPattern"===a.type&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(a.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),a},e.prototype.readToken=function(e){return!this.state.inType||62!==e&&60!==e?t.prototype.readToken.call(this,e):this.finishOp(C.relational,1)},e.prototype.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},e.prototype.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},e.prototype.toReferencedList=function(t){for(var e=0;e<t.length;e++){var s=t[e];s&&s._exprListItem&&"TypeCastExpression"===s.type&&this.raise(s.start,"Did not expect a type annotation here.")}return t},e.prototype.shouldParseArrow=function(){return this.match(C.colon)||t.prototype.shouldParseArrow.call(this)},e.prototype.shouldParseAsyncArrow=function(){return this.match(C.colon)||t.prototype.shouldParseAsyncArrow.call(this)},e}(t)};et.estree=it,et.flow=nt,et.jsx=ct,et.typescript=lt;var ut={};e.parse=v,e.parseExpression=P,e.tokTypes=C});const createError=parserCreateError;var parserBabylon=parse;module.exports=parserBabylon},{}],123:[function(require,module,exports){function createError$1(t,r){const e=new SyntaxError(t+" ("+r.start.line+":"+r.start.column+")");return e.loc=r,e}function includeShebang$1(t,r){if(!t.startsWith("#!"))return;const e=t.indexOf("\n"),n={type:"Line",value:t.slice(2,e),range:[0,e],loc:{source:null,start:{line:1,column:0},end:{line:1,column:e}}};r.comments=[n].concat(r.comments)}function createCommonjsModule(t,r){return r={exports:{}},t(r,r.exports),r.exports}function parse(t){"use strict";const r=flow_parser.parse(t,{esproposal_class_instance_fields:!0,esproposal_class_static_fields:!0,esproposal_export_star_as:!0});if(r.errors.length>0){const t=r.errors[0].loc;throw createError(r.errors[0].message,{start:{line:t.start.line,column:t.start.column+1},end:{line:t.end.line,column:t.end.column+1}})}return includeShebang(t,r),r}var parserCreateError=createError$1,parserIncludeShebang=includeShebang$1,flow_parser=createCommonjsModule(function(t,r){!function(t){"use strict";function e(t,r){throw[0,t,r]}function n(t,r){function n(r){e(Dd.Undefined_recursive_module,t)}function a(t,r,e){if("number"==typeof t)switch(t){case 0:r[e]={fun:n};break;case 1:r[e]=[fs,n];break;default:r[e]=[]}else switch(t[0]){case 0:r[e]=[0];for(var u=1;u<t[1].length;u++)a(t[1][u],r[e],u);break;default:r[e]=t[1]}}var u=[];return a(r,u,0),u[0]}function a(t,r){if(typeof r===Ak)return t.fun=r,0;if(r.fun)return t.fun=r.fun,0;for(var e=r.length;e--;)t[e]=r[e];return 0}function u(t,r,e){if("number"==typeof t)switch(t){case 0:r.fun=e;break;case 1:default:a(r,e)}else switch(t[0]){case 0:for(var n=1;n<t[1].length;n++)u(t[1][n],r[n],e[n])}return 0}function i(t,r){var e=t.length,n=e+r.length-1,a=new Array(n);a[0]=0;for(var u=1,i=1;u<e;u++)a[u]=t[u];for(;u<n;u++,i++)a[u]=r[i];return a}function f(t,r,e,n,a){if(n<=r)for(u=1;u<=a;u++)e[n+u]=t[r+u];else for(var u=a;u>=1;u--)e[n+u]=t[r+u];return 0}function c(t,r,e){var n=new Array(e+1);n[0]=0;for(var a=1,u=r+1;a<=e;a++,u++)n[a]=t[u];return n}function s(t,r,e){for(var n=new Array(e),a=0;a<e;a++)n[a]=t[r+a];return n}function o(t,r,e){var n=String.fromCharCode;if(0==r&&e<=4096&&e==t.length)return n.apply(null,t);for(var a=sb;0<e;r+=Su,e-=Su)a+=n.apply(null,s(t,r,Math.min(e,Su)));return a}function v(r){if(t.Uint8Array)e=new t.Uint8Array(r.l);else var e=new Array(r.l);for(var n=r.c,a=n.length,u=0;u<a;u++)e[u]=n.charCodeAt(u);for(a=r.l;u<a;u++)e[u]=0;return r.c=e,r.t=4,e}function l(t,r,e,n,a){if(0==a)return 0;if(0==n&&(a>=e.l||2==e.t&&a>=e.c.length))e.c=4==t.t?o(t.c,r,a):0==r&&t.c.length==a?t.c:t.c.substr(r,a),e.t=e.c.length==e.l?0:2;else if(2==e.t&&n==e.c.length)e.c+=4==t.t?o(t.c,r,a):0==r&&t.c.length==a?t.c:t.c.substr(r,a),e.t=e.c.length==e.l?0:2;else{4!=e.t&&v(e);var u=t.c,i=e.c;if(4==t.t)for(c=0;c<a;c++)i[n+c]=u[r+c];else{for(var f=Math.min(a,u.length-r),c=0;c<f;c++)i[n+c]=u.charCodeAt(r+c);for(;c<a;c++)i[n+c]=0}}return 0}function b(t,r){for(var e=t.length,n=new Array(e+1),a=0;a<e;a++)n[a]=t[a];return n[a]=r,n}function k(t,r){if(t.fun)return k(t.fun,r);var e=t.length,n=r.length,a=e-n;return 0==a?t.apply(null,r):a<0?k(t.apply(null,s(r,0,e)),s(r,e,n-e)):function(e){return k(t,b(r,e))}}function p(t,r){if(r.repeat)return r.repeat(t);var e=sb,n=0;if(0==t)return e;for(;;){if(1&t&&(e+=r),0==(t>>=1))return e;r+=r,9==++n&&r.slice(0,1)}}function h(t){2==t.t?t.c+=p(t.l-t.c.length,"\0"):t.c=o(t.c,0,t.c.length),t.t=0}function d(t){if(t.length<24){for(var r=0;r<t.length;r++)if(t.charCodeAt(r)>Gb)return!1;return!0}return!/[^\x00-\x7f]/.test(t)}function m(t){for(var r,e,n,a,u=sb,i=sb,f=0,c=t.length;f<c;f++){if((e=t.charCodeAt(f))<Hn){for(var s=f+1;s<c&&(e=t.charCodeAt(s))<Hn;s++);if(s-f>Xn?(i.substr(0,1),u+=i,i=sb,u+=t.slice(f,s)):i+=t.slice(f,s),s==c)break;f=s}a=1,++f<c&&(-64&(n=t.charCodeAt(f)))==Hn&&(r=n+(e<<6),e<Ul?(a=r-12416)<Hn&&(a=1):(a=2,++f<c&&(-64&(n=t.charCodeAt(f)))==Hn&&(r=n+(r<<6),e<Yp?((a=r-925824)<Rc||a>=55295&&a<cl)&&(a=2):(a=3,++f<c&&(-64&(n=t.charCodeAt(f)))==Hn&&e<Ro&&((a=n-63447168+(r<<6))<$c||a>Vv)&&(a=3))))),a<4?(f-=a,i+="�"):i+=a>ci?String.fromCharCode(55232+(a>>10),Bi+(a&ua)):String.fromCharCode(a),i.length>Su&&(i.substr(0,1),u+=i,i=sb)}return u+i}function y(t){switch(t.t){case 9:return t.c;default:h(t);case 0:if(d(t.c))return t.t=9,t.c;t.t=8;case 8:return m(t.c)}}function w(t,r,e){this.t=t,this.c=r,this.l=e}function g(t){return new w(0,t,t.length)}function T(t,r){e(t,g(r))}function _(t){T(Dd.Invalid_argument,t)}function S(){_(su)}function A(t,r){return r>>>0>=t.length-1&&S(),t}function E(t){return isFinite(t)?Math.abs(t)>=2.2250738585072014e-308?0:0!=t?1:2:isNaN(t)?4:3}function x(t,r){var e=t[3]<<16,n=r[3]<<16;return e>n?1:e<n?-1:t[2]>r[2]?1:t[2]<r[2]?-1:t[1]>r[1]?1:t[1]<r[1]?-1:0}function I(t,r){return t<r?-1:t==r?0:1}function C(t,r){return 6&t.t&&h(t),6&r.t&&h(r),t.c<r.c?-1:t.c>r.c?1:0}function N(t,r,e){for(var n=[];;){if(!e||t!==r)if(t instanceof w){if(!(r instanceof w))return 1;if(t!==r&&0!=(i=C(t,r)))return i}else if(t instanceof Array&&t[0]===(0|t[0])){var a=t[0];if(a===Tn&&(a=0),a===jl){t=t[1];continue}if(!(r instanceof Array&&r[0]===(0|r[0])))return 1;var u=r[0];if(u===Tn&&(u=0),u===jl){r=r[1];continue}if(a!=u)return a<u?-1:1;switch(a){case 248:if(0!=(i=I(t[2],r[2])))return i;break;case 251:_("equal: abstract value");case 255:var i=x(t,r);if(0!=i)return i;break;default:if(t.length!=r.length)return t.length<r.length?-1:1;t.length>1&&n.push(t,r,1)}}else{if(r instanceof w||r instanceof Array&&r[0]===(0|r[0]))return-1;if("number"!=typeof t&&t&&t.compare)return t.compare(r,e);if(typeof t==Ak)_("equal: functional value");else{if(t<r)return-1;if(t>r)return 1;if(t!=r){if(!e)return NaN;if(t==t)return 1;if(r==r)return-1}}}if(0==n.length)return 0;var f=n.pop();r=n.pop(),f+1<(t=n.pop()).length&&n.push(t,r,f+1),t=t[f],r=r[f]}}function L(t,r){return N(t,r,!0)}function R(t){return t<0&&_("String.create"),new w(t?2:9,sb,t)}function O(t,r){return+(0==N(t,r,!1))}function P(t,r,e,n){if(e>0)if(0==r&&(e>=t.l||2==t.t&&e>=t.c.length))0==n?(t.c=sb,t.t=2):(t.c=p(e,String.fromCharCode(n)),t.t=e==t.l?0:2);else for(4!=t.t&&v(t),e+=r;r<e;r++)t.c[r]=n;return 0}function D(t){T(Dd.Failure,t)}function U(t){return 0!=(6&t.t)&&h(t),t.c}function M(t){var r;if(t=U(t),r=+t,t.length>0&&r===r)return r;if(t=t.replace(/_/g,sb),r=+t,t.length>0&&r===r||/^[+-]?nan$/i.test(t))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(t);if(e){var n=e[3].replace(/0+$/,sb),a=parseInt(e[1]+e[2]+n,16),u=(0|e[4])-4*n.length;return r=a*Math.pow(2,u)}return/^\+?inf(inity)?$/i.test(t)?1/0:/^-inf(inity)?$/i.test(t)?-1/0:void D("float_of_string")}function F(t){var r=(t=U(t)).length;r>31&&_("format_int: format too long");for(var e={justify:Ib,signstyle:ml,filler:sd,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:"f"},n=0;n<r;n++){var a=t.charAt(n);switch(a){case"-":e.justify=ml;break;case"+":case" ":e.signstyle=a;break;case"0":e.filler=_v;break;case"#":e.alternate=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(e.width=0;(a=t.charCodeAt(n)-48)>=0&&a<=9;)e.width=10*e.width+a,n++;n--;break;case".":for(e.prec=0,n++;(a=t.charCodeAt(n)-48)>=0&&a<=9;)e.prec=10*e.prec+a,n++;n--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment