(function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var parentJsonpFunction=window.webpackJsonp;window.webpackJsonp=function(chunkIds,moreModules,executeModules){for(var i=0,resolves=[],moduleId,chunkId,result;istrm.avail_out&&(len=strm.avail_out),0===len||(utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out),strm.next_out+=len,s.pending_out+=len,strm.total_out+=len,strm.avail_out-=len,s.pending-=len,0===s.pending&&(s.pending_out=0))}function flush_block_only(s,last){trees._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,last),s.block_start=s.strstart,flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=255&b>>>8,s.pending_buf[s.pending++]=255&b}function read_buf(strm,buf,start,size){var len=strm.avail_in;return(len>size&&(len=size),0===len)?0:(strm.avail_in-=len,utils.arraySet(buf,strm.input,strm.next_in,len,start),1===strm.state.wrap?strm.adler=adler32(strm.adler,buf,len,start):2===strm.state.wrap&&(strm.adler=crc32(strm.adler,buf,len,start)),strm.next_in+=len,strm.total_in+=len,len)}function longest_match(s,cur_match){var chain_length=s.max_chain_length,scan=s.strstart,best_len=s.prev_length,nice_match=s.nice_match,limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0,_win=s.window,wmask=s.w_mask,prev=s.prev,strend=s.strstart+MAX_MATCH,scan_end1=_win[scan+best_len-1],scan_end=_win[scan+best_len],match,len;s.prev_length>=s.good_match&&(chain_length>>=2),nice_match>s.lookahead&&(nice_match=s.lookahead);do{if(match=cur_match,_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1])continue;scan+=2,match++;do;while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scanbest_len){if(s.match_start=cur_match,best_len=len,len>=nice_match)break;scan_end1=_win[scan+best_len-1],scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&0!=--chain_length);return best_len<=s.lookahead?best_len:s.lookahead}function fill_window(s){var _w_size=s.w_size,p,n,m,more,str;do{if(more=s.window_size-s.lookahead-s.strstart,s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0),s.match_start-=_w_size,s.strstart-=_w_size,s.block_start-=_w_size,n=s.hash_size,p=n;do m=s.head[--p],s.head[p]=m>=_w_size?m-_w_size:0;while(--n);n=_w_size,p=n;do m=s.prev[--p],s.prev[p]=m>=_w_size?m-_w_size:0;while(--n);more+=_w_size}if(0===s.strm.avail_in)break;if(n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more),s.lookahead+=n,s.lookahead+s.insert>=MIN_MATCH)for(str=s.strstart-s.insert,s.ins_h=s.window[str],s.ins_h=(s.ins_h<=MIN_MATCH&&(s.ins_h=(s.ins_h<=MIN_MATCH))bflush=trees._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++;else if(bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do s.strstart++,s.ins_h=(s.ins_h<=MIN_MATCH&&(s.ins_h=(s.ins_h<=s.match_length&&(s.strategy===Z_FILTERED||s.match_length===MIN_MATCH&&4096=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH,bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH),s.lookahead-=s.prev_length-1,s.prev_length-=2;do++s.strstart<=max_insert&&(s.ins_h=(s.ins_h<=MIN_MATCH&&0s.lookahead&&(s.match_length=s.lookahead)}if(s.match_length>=MIN_MATCH?(bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH),s.lookahead-=s.match_length,s.strstart+=s.match_length,s.match_length=0):(bflush=trees._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++),bflush&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.last_lit&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(s,flush){for(var bflush;;){if(0===s.lookahead&&(fill_window(s),0===s.lookahead)){if(flush===Z_NO_FLUSH)return BS_NEED_MORE;break}if(s.match_length=0,bflush=trees._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++,bflush&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.last_lit&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function Config(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length,this.max_lazy=max_lazy,this.nice_length=nice_length,this.max_chain=max_chain,this.func=func}function lm_init(s){s.window_size=2*s.w_size,zero(s.head),s.max_lazy_match=configuration_table[s.level].max_lazy,s.good_match=configuration_table[s.level].good_length,s.nice_match=configuration_table[s.level].nice_length,s.max_chain_length=configuration_table[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=MIN_MATCH-1,s.match_available=0,s.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new utils.Buf16(2*HEAP_SIZE),this.dyn_dtree=new utils.Buf16(2*(2*D_CODES+1)),this.bl_tree=new utils.Buf16(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new utils.Buf16(MAX_BITS+1),this.heap=new utils.Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new utils.Buf16(2*L_CODES+1),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(strm){var s;return strm&&strm.state?(strm.total_in=strm.total_out=0,strm.data_type=Z_UNKNOWN,s=strm.state,s.pending=0,s.pending_out=0,0>s.wrap&&(s.wrap=-s.wrap),s.status=s.wrap?INIT_STATE:BUSY_STATE,strm.adler=2===s.wrap?0:1,s.last_flush=Z_NO_FLUSH,trees._tr_init(s),Z_OK):err(strm,Z_STREAM_ERROR)}function deflateReset(strm){var ret=deflateResetKeep(strm);return ret===Z_OK&&lm_init(strm.state),ret}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm)return Z_STREAM_ERROR;var wrap=1;if(level===Z_DEFAULT_COMPRESSION&&(level=6),0>windowBits?(wrap=0,windowBits=-windowBits):15memLevel||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||8>windowBits||15level||9strategy||strategy>Z_FIXED)return err(strm,Z_STREAM_ERROR);8===windowBits&&(windowBits=9);var s=new DeflateState;return strm.state=s,s.strm=strm,s.wrap=wrap,s.gzhead=null,s.w_bits=windowBits,s.w_size=1<s.pending_buf_size-5&&(max_block_size=s.pending_buf_size-5);;){if(1>=s.lookahead){if(fill_window(s),0===s.lookahead&&flush===Z_NO_FLUSH)return BS_NEED_MORE;if(0===s.lookahead)break}s.strstart+=s.lookahead,s.lookahead=0;var max_start=s.block_start+max_block_size;if((0===s.strstart||s.strstart>=max_start)&&(s.lookahead=s.strstart-max_start,s.strstart=max_start,flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE;if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.strstart>s.block_start&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_NEED_MORE}),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],exports.deflateInit=function(strm,level){return deflateInit2(strm,level,Z_DEFLATED,15,8,0)},exports.deflateInit2=deflateInit2,exports.deflateReset=deflateReset,exports.deflateResetKeep=deflateResetKeep,exports.deflateSetHeader=function(strm,head){return strm&&strm.state?2===strm.state.wrap?(strm.state.gzhead=head,Z_OK):Z_STREAM_ERROR:Z_STREAM_ERROR},exports.deflate=function(strm,flush){var old_flush,s,beg,val;if(!strm||!strm.state||flush>Z_BLOCK||0>flush)return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR;if(s=strm.state,!strm.output||!strm.input&&0!==strm.avail_in||s.status===FINISH_STATE&&flush!==Z_FINISH)return err(strm,0===strm.avail_out?Z_BUF_ERROR:Z_STREAM_ERROR);if(s.strm=strm,old_flush=s.last_flush,s.last_flush=flush,s.status===INIT_STATE)if(2===s.wrap)strm.adler=0,put_byte(s,31),put_byte(s,139),put_byte(s,8),s.gzhead?(put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),put_byte(s,255&s.gzhead.time),put_byte(s,255&s.gzhead.time>>8),put_byte(s,255&s.gzhead.time>>16),put_byte(s,255&s.gzhead.time>>24),put_byte(s,9===s.level?2:s.strategy>=Z_HUFFMAN_ONLY||2>s.level?4:0),put_byte(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(put_byte(s,255&s.gzhead.extra.length),put_byte(s,255&s.gzhead.extra.length>>8)),s.gzhead.hcrc&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=EXTRA_STATE):(put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,9===s.level?2:s.strategy>=Z_HUFFMAN_ONLY||2>s.level?4:0),put_byte(s,3),s.status=BUSY_STATE);else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8,level_flags=-1;level_flags=s.strategy>=Z_HUFFMAN_ONLY||2>s.level?0:6>s.level?1:6===s.level?2:3,header|=level_flags<<6,0!==s.strstart&&(header|=32),header+=31-header%31,s.status=BUSY_STATE,putShortMSB(s,header),0!==s.strstart&&(putShortMSB(s,strm.adler>>>16),putShortMSB(s,65535&strm.adler)),strm.adler=1}if(s.status===EXTRA_STATE)if(s.gzhead.extra){for(beg=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&!(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending===s.pending_buf_size));)put_byte(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=NAME_STATE)}else s.status=NAME_STATE;if(s.status===NAME_STATE)if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending===s.pending_buf_size)){val=1;break}val=s.gzindexbeg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),0===val&&(s.gzindex=0,s.status=COMMENT_STATE)}else s.status=COMMENT_STATE;if(s.status===COMMENT_STATE)if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending===s.pending_buf_size)){val=1;break}val=s.gzindexbeg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),0===val&&(s.status=HCRC_STATE)}else s.status=HCRC_STATE;if(s.status===HCRC_STATE&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&flush_pending(strm),s.pending+2<=s.pending_buf_size&&(put_byte(s,255&strm.adler),put_byte(s,255&strm.adler>>8),strm.adler=0,s.status=BUSY_STATE)):s.status=BUSY_STATE),0!==s.pending){if(flush_pending(strm),0===strm.avail_out)return s.last_flush=-1,Z_OK;}else if(0===strm.avail_in&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH)return err(strm,Z_BUF_ERROR);if(s.status===FINISH_STATE&&0!==strm.avail_in)return err(strm,Z_BUF_ERROR);if(0!==strm.avail_in||0!==s.lookahead||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===3?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if((bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE)&&(s.status=FINISH_STATE),bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED)return 0===strm.avail_out&&(s.last_flush=-1),Z_OK;if(bstate===BS_BLOCK_DONE&&(flush===1?trees._tr_align(s):flush!==Z_BLOCK&&(trees._tr_stored_block(s,0,0,!1),flush===3&&(zero(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),flush_pending(strm),0===strm.avail_out))return s.last_flush=-1,Z_OK}return flush===Z_FINISH?0>=s.wrap?Z_STREAM_END:(2===s.wrap?(put_byte(s,255&strm.adler),put_byte(s,255&strm.adler>>8),put_byte(s,255&strm.adler>>16),put_byte(s,255&strm.adler>>24),put_byte(s,255&strm.total_in),put_byte(s,255&strm.total_in>>8),put_byte(s,255&strm.total_in>>16),put_byte(s,255&strm.total_in>>24)):(putShortMSB(s,strm.adler>>>16),putShortMSB(s,65535&strm.adler)),flush_pending(strm),0=s.w_size&&(0===wrap&&(zero(s.head),s.strstart=0,s.block_start=0,s.insert=0),tmpDict=new utils.Buf8(s.w_size),utils.arraySet(tmpDict,dictionary,dictLength-s.w_size,s.w_size,0),dictionary=tmpDict,dictLength=s.w_size),avail=strm.avail_in,next=strm.next_in,input=strm.input,strm.avail_in=dictLength,strm.next_in=0,strm.input=dictionary,fill_window(s);s.lookahead>=MIN_MATCH;){str=s.strstart,n=s.lookahead-(MIN_MATCH-1);do s.ins_h=(s.ins_h<dist?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=255&w,s.pending_buf[s.pending++]=255&w>>>8}function send_bits(s,value,length){s.bi_valid>Buf_size-length?(s.bi_buf|=65535&value<>Buf_size-s.bi_valid,s.bi_valid+=length-Buf_size):(s.bi_buf|=65535&value<>>=1,res<<=1;while(0<--len);return res>>>1}function bi_flush(s){16===s.bi_valid?(put_short(s,s.bi_buf),s.bi_buf=0,s.bi_valid=0):8<=s.bi_valid&&(s.pending_buf[s.pending++]=255&s.bi_buf,s.bi_buf>>=8,s.bi_valid-=8)}function gen_bitlen(s,desc){var tree=desc.dyn_tree,max_code=desc.max_code,stree=desc.stat_desc.static_tree,has_stree=desc.stat_desc.has_stree,extra=desc.stat_desc.extra_bits,base=desc.stat_desc.extra_base,max_length=desc.stat_desc.max_length,overflow=0,h,n,m,bits,xbits,f;for(bits=0;bits<=MAX_BITS;bits++)s.bl_count[bits]=0;for(tree[2*s.heap[s.heap_max]+1]=0,h=s.heap_max+1;hmax_length&&(bits=max_length,overflow++),tree[2*n+1]=bits,!(n>max_code))&&(s.bl_count[bits]++,xbits=0,n>=base&&(xbits=extra[n-base]),f=tree[2*n],s.opt_len+=f*(bits+xbits),has_stree&&(s.static_len+=f*(stree[2*n+1]+xbits)));if(0!=overflow){do{for(bits=max_length-1;0===s.bl_count[bits];)bits--;s.bl_count[bits]--,s.bl_count[bits+1]+=2,s.bl_count[max_length]--,overflow-=2}while(0max_code))&&(tree[2*m+1]!==bits&&(s.opt_len+=(bits-tree[2*m+1])*tree[2*m],tree[2*m+1]=bits),n--)}}function gen_codes(tree,max_code,bl_count){var next_code=Array(MAX_BITS+1),code=0,bits,n;for(bits=1;bits<=MAX_BITS;bits++)next_code[bits]=code=code+bl_count[bits-1]<<1;for(n=0;n<=max_code;n++){var len=tree[2*n+1];0!==len&&(tree[2*n]=bi_reverse(next_code[len]++,len))}}function tr_static_init(){var bl_count=Array(MAX_BITS+1),n,bits,length,code,dist;for(length=0,code=0;codecode;code++)for(base_dist[code]=dist,n=0;n<1<>=7;code=n;)static_ltree[2*n+1]=8,n++,bl_count[8]++;for(;255>=n;)static_ltree[2*n+1]=9,n++,bl_count[9]++;for(;279>=n;)static_ltree[2*n+1]=7,n++,bl_count[7]++;for(;287>=n;)static_ltree[2*n+1]=8,n++,bl_count[8]++;for(gen_codes(static_ltree,L_CODES+1,bl_count),n=0;ns.heap_len;)node=s.heap[++s.heap_len]=2>max_code?++max_code:0,tree[2*node]=1,s.depth[node]=0,s.opt_len--,has_stree&&(s.static_len-=stree[2*node+1]);for(desc.max_code=max_code,n=s.heap_len>>1;1<=n;n--)pqdownheap(s,tree,n);node=elems;do n=s.heap[1],s.heap[1]=s.heap[s.heap_len--],pqdownheap(s,tree,1),m=s.heap[1],s.heap[--s.heap_max]=n,s.heap[--s.heap_max]=m,tree[2*node]=tree[2*n]+tree[2*m],s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1,tree[2*n+1]=tree[2*m+1]=node,s.heap[1]=node++,pqdownheap(s,tree,1);while(2<=s.heap_len);s.heap[--s.heap_max]=s.heap[1],gen_bitlen(s,desc),gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var prevlen=-1,nextlen=tree[1],count=0,max_count=7,min_count=4,n,curlen;for(0===nextlen&&(max_count=138,min_count=3),tree[2*(max_code+1)+1]=65535,n=0;n<=max_code;n++){if(curlen=nextlen,nextlen=tree[2*(n+1)+1],++count=count?s.bl_tree[2*REPZ_3_10]++:s.bl_tree[2*REPZ_11_138]++:(curlen!==prevlen&&s.bl_tree[2*curlen]++,s.bl_tree[2*REP_3_6]++);count=0,prevlen=curlen,0===nextlen?(max_count=138,min_count=3):curlen===nextlen?(max_count=6,min_count=3):(max_count=7,min_count=4)}}function send_tree(s,tree,max_code){var prevlen=-1,nextlen=tree[1],count=0,max_count=7,min_count=4,n,curlen;for(0===nextlen&&(max_count=138,min_count=3),n=0;n<=max_code;n++){if(curlen=nextlen,nextlen=tree[2*(n+1)+1],++count=count?(send_code(s,REPZ_3_10,s.bl_tree),send_bits(s,count-3,3)):(send_code(s,REPZ_11_138,s.bl_tree),send_bits(s,count-11,7)):(curlen!==prevlen&&(send_code(s,curlen,s.bl_tree),count--),send_code(s,REP_3_6,s.bl_tree),send_bits(s,count-3,2));count=0,prevlen=curlen,0===nextlen?(max_count=138,min_count=3):curlen===nextlen?(max_count=6,min_count=3):(max_count=7,min_count=4)}}function build_bl_tree(s){var max_blindex;for(scan_tree(s,s.dyn_ltree,s.l_desc.max_code),scan_tree(s,s.dyn_dtree,s.d_desc.max_code),build_tree(s,s.bl_desc),max_blindex=BL_CODES-1;3<=max_blindex&&0===s.bl_tree[2*bl_order[max_blindex]+1];max_blindex--);return s.opt_len+=3*(max_blindex+1)+5+5+4,max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;for(send_bits(s,lcodes-257,5),send_bits(s,dcodes-1,5),send_bits(s,blcodes-4,4),rank=0;rank=n;n++,black_mask>>>=1)if(1&black_mask&&0!==s.dyn_ltree[2*n])return Z_BINARY;if(0!==s.dyn_ltree[18]||0!==s.dyn_ltree[20]||0!==s.dyn_ltree[26])return Z_TEXT;for(n=32;n>>3,static_lenb=s.static_len+3+7>>>3,static_lenb<=opt_lenb&&(opt_lenb=static_lenb)):opt_lenb=static_lenb=stored_len+5,stored_len+4<=opt_lenb&&-1!==buf?_tr_stored_block(s,buf,stored_len,last):s.strategy===4||static_lenb===opt_lenb?(send_bits(s,(STATIC_TREES<<1)+(last?1:0),3),compress_block(s,static_ltree,static_dtree)):(send_bits(s,(2<<1)+(last?1:0),3),send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1),compress_block(s,s.dyn_ltree,s.dyn_dtree)),init_block(s),last&&bi_windup(s)},exports._tr_tally=function(s,dist,lc){return s.pending_buf[s.d_buf+2*s.last_lit]=255&dist>>>8,s.pending_buf[s.d_buf+2*s.last_lit+1]=255&dist,s.pending_buf[s.l_buf+s.last_lit]=255&lc,s.last_lit++,0===dist?s.dyn_ltree[2*lc]++:(s.matches++,dist--,s.dyn_ltree[2*(_length_code[lc]+LITERALS+1)]++,s.dyn_dtree[2*d_code(dist)]++),s.last_lit===s.lit_bufsize-1},exports._tr_align=function(s){send_bits(s,STATIC_TREES<<1,3),send_code(s,END_BLOCK,static_ltree),bi_flush(s)}},"/+WI":function(module){"use strict";module.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"/QFk":function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return call&&("object"==typeof call||"function"==typeof call)?call:self}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function createConfig(editor,pos,options){pos=pos||editor.getCursor();var syntax=getSyntax(editor,pos),config=(0,_config2.default)(_extends({field:editorField},editor.getOption("emmet"),options),{syntax:syntax}),mode=editor.getModeAt(pos);return"jsx"===syntax?(config.profile=_extends({selfClosingStyle:"xml"},config.profile),config.options=_extends({jsx:!0},config.options)):"xml"===mode.name&&(config.profile=_extends({selfClosingStyle:mode.configuration},config.profile)),config}function getSyntax(editor,pos){var rootMode=editor.getMode();if("jsx"===rootMode.name||"javascript"===rootMode.name)return rootMode.name;var mode=editor.getModeAt(pos);return"xml"===mode.name?"html":mode.name}function comparePos(a,b){return a.line-b.line||a.ch-b.ch}function getIndentation(editor){return editor.getOption("indentWithTabs")?"\t":repeatString(" ",editor.getOption("indentUnit"))}function normalizeText(editor,text,indentation){var lines=splitByLines(text),indent=getIndentation(editor);return"\t"!==indent&&(lines=lines.map(function(line){return line.replace(/^\t+/,function(tabs){return repeatString(indent,tabs.length)})})),indentation&&(lines=lines.map(function(line,i){return i?indentation+line:line})),lines.join("\n")}function splitByLines(text){return Array.isArray(text)?text:text.split(/\r\n|\r|\n/g)}function repeatString(str,count){for(var result="";0comparePos$1(pos,range.to):0<=comparePos$1(pos,range.from)&&0>=comparePos$1(pos,range.to)}function comparePos$1(a,b){return a.line-b.line||a.ch-b.ch}function rangeFromNode(node){return{from:node.start,to:node.end}}function narrowToNonSpace(editor,from,to){var stream=new CodeMirrorStreamReader(editor,from);if(stream.eatWhile(_streamReaderUtils.isSpace),from=stream.pos,to){for(stream.pos=to,stream.backUp();!stream.sof()&&(0,_streamReaderUtils.isSpace)(stream.peek());)stream.backUp();stream.next(),to=stream.pos}else to=from;return{from:from,to:to}}function getCSSPropertyName(editor,pos){for(var line=pos.line,ch=pos.ch,token=void 0;0<=ch;){if(token=editor.getTokenAt({line:line,ch:ch}),"property"===token.type)return token.string;if(token.start!==ch)ch=token.start;else break}}function isCSSPropertyValue(editor,pos){var mode=editor.getModeAt(pos);if(mode&&"css"===mode.name){var token=editor.getTokenAt(pos),state=token.state&&token.state.localState||token.state;return state&&state.context&&"prop"===state.context.type}return!1}function extractAbbreviation(editor,pos,contextAware){var config=createConfig(editor,pos);if(contextAware&&!canExtract(editor,pos,config))return null;var extracted=(0,_extractAbbreviation2.default)(editor.getLine(pos.line),pos.ch,{lookAhead:!0,syntax:config.type,prefix:"jsx"===config.syntax&&editor.getOption("jsxBracket")?"<":""});if(extracted){var from={line:pos.line,ch:extracted.start},to={line:pos.line,ch:extracted.end};return"stylesheet"===config.type&&contextAware&&isCSSPropertyValue(editor,pos)&&(config.options=_extends({property:getCSSPropertyName(editor,pos)},config.options)),{abbreviation:extracted.abbreviation,range:{from:from,to:to},config:config}}}function canExtract(editor,pos,config){var tokenType=editor.getTokenTypeAt(pos);return"stylesheet"===config.type?"comment"!==tokenType&&"string"!==tokenType:"html"===config.syntax?null===tokenType:"slim"===config.syntax||"pug"===config.syntax?null===tokenType||"tag"===tokenType||tokenType&&/attribute/.test(tokenType):"haml"===config.syntax?null===tokenType||"attribute"===tokenType:"jsx"===config.syntax}function insertSnippet(editor,range,text){var line=editor.getLine(range.from.line),matchIndent=line.match(/^\s+/),snippet=normalizeText(editor,text,matchIndent&&matchIndent[0]),fieldModel=(0,_fieldParser2.default)(snippet);return editor.operation(function(){editor.replaceRange(fieldModel.string,range.from,range.to);var startIx=editor.indexFromPos(range.from);if(fieldModel.fields.length){var field=fieldModel.fields[0],from=editor.posFromIndex(field.location+startIx),to=editor.posFromIndex(field.location+field.length+startIx);editor.setSelection(from,to)}else editor.setCursor(editor.posFromIndex(startIx+fieldModel.string.length));return!0})}function abbreviationFromPosition(editor,pos,contextAware){var marker=findMarker(editor,pos);if(marker&&marker.model)return marker.model;var extracted=extractAbbreviation(editor,pos,contextAware);if(extracted)try{var abbr=new Abbreviation(extracted.abbreviation,extracted.range,extracted.config);return abbr.valid(editor,contextAware)?abbr:null}catch(err){}}function findMarker(editor,pos){for(var markers=editor.findMarksAt(pos),i=0,marker;i"===left.string&&"tag bracket"===right.type&&"comparePos$1(sel.anchor,sel.head)?{from:sel.anchor,to:sel.head}:{from:sel.head,to:sel.anchor}}return getTagRangeForPos(editor,editor.getCursor())}function getTagRangeForPos(editor,pos){var model=editor.getEmmetDocumentModel(),tag=model&&model.nodeForPoint(pos);if(!tag)return null;if(inRange(tag.open,pos)||inRange(tag.close,pos))return rangeFromNode(tag);var from=tag.open.end,to=tag.close?tag.close.start:tag.open.end;return narrowToNonSpace(editor,from,to)}function inRange(tag,pos){return tag&&containsPos(rangeFromNode(tag),pos)}function defaultPrompt(editor,message,callback){callback(window.prompt(message))}function markAbbreviation(editor,pos){var marker=findMarker(editor,pos);if(marker)return marker;clearMarkers(editor);var model=abbreviationFromPosition(editor,pos,!0);if(model)return createMarker(editor,model)}function autocompleteProvider(editor,pos){pos=pos||editor.getCursor();var completions=[],abbreviation=abbreviationFromPosition(editor,pos,!0);abbreviation&&abbreviation.abbreviation!==abbreviation.snippet&&completions.push(expandedAbbreviationCompletion(editor,pos,abbreviation));var config=abbreviation?abbreviation.config:createConfig(editor,pos);return completions="stylesheet"===config.type?completions.concat(getStylesheetCompletions(editor,pos,config)):completions.concat(getMarkupCompletions(editor,pos,config)),{type:config.type,syntax:config.syntax,abbreviation:abbreviation,completions:completions.filter(Boolean)}}function getMarkupCompletions(editor,pos,config){var line=editor.getLine(pos.line).slice(0,pos.ch),prefix=extractPrefix(line,/[\w:\-$@]/);if(prefix){var prefixRange={from:{line:pos.line,ch:pos.ch-prefix.length},to:pos};return getSnippetCompletions(editor,pos,config).filter(function(completion){return completion.key!==prefix&&0===completion.key.indexOf(prefix)}).map(function(completion){return new EmmetCompletion("snippet",editor,prefixRange,completion.key,completion.preview,completion.snippet)})}return[]}function getStylesheetCompletions(editor,pos,config){var line=editor.getLine(pos.line).slice(0,pos.ch),prefix=extractPrefix(line,/[\w-@$]/);if(prefix){var prefixRange={from:{line:pos.line,ch:pos.ch-prefix.length},to:pos};if(config.options&&config.options.property){var lowerProp=config.options.property.toLowerCase(),completion=getSnippetCompletions(editor,pos,config).find(function(item){return item.property&&item.property===lowerProp});if(completion&&completion.keywords.length)return completion.keywords.map(function(kw){return 0===kw.key.indexOf(prefix)&&new EmmetCompletion("value",editor,prefixRange,kw.key,kw.preview,kw.snippet)}).filter(Boolean)}else return getSnippetCompletions(editor,pos,config).filter(function(completion){return completion.key!==prefix&&0===completion.key.indexOf(prefix)}).map(function(completion){return new EmmetCompletion("snippet",editor,prefixRange,completion.key,completion.preview,completion.snippet)})}return[]}function getSnippetCompletions(editor,pos,config){var type=config.type,syntax=config.syntax;editor.state.emmetCompletions||(editor.state.emmetCompletions={});var cache=editor.state.emmetCompletions;if(!(syntax in cache)){var registry=(0,_expandAbbreviation.createSnippetsRegistry)(type,syntax,config.snippets);cache[syntax]="stylesheet"===type?getStylesheetSnippets(registry,config):getMarkupSnippets(registry,config)}return cache[syntax]}function getStylesheetSnippets(registry){return(0,_cssSnippetsResolver.convertToCSSSnippets)(registry).map(function(snippet){var preview=snippet.property,keywords=snippet.keywords();return keywords.length?preview+=": "+removeFields(keywords.join(" | ")):snippet.value&&(preview+=": "+removeFields(snippet.value)),{key:snippet.key,value:snippet.value,snippet:snippet.key,property:snippet.property,keywords:keywords.map(function(kw){var m=kw.match(/^[\w-]+/);return m&&{key:m[0],preview:removeFields(kw),snippet:kw}}).filter(Boolean),preview:preview}})}function getMarkupSnippets(registry,config){return registry.all({type:"string"}).map(function(snippet){return{key:snippet.key,value:snippet.value,preview:removeFields((0,_expandAbbreviation.expand)(snippet.value,config)),snippet:snippet.key}})}function expandedAbbreviationCompletion(editor,pos,abbrModel){var preview=abbrModel.preview;return 500=comparePos(this.pos,this._sof)},CodeMirrorStreamReader.prototype.eof=function(){return 0<=comparePos(this.pos,this._eof)},CodeMirrorStreamReader.prototype.limit=function(from,to){return new this.constructor(this.editor,from,{from:from,to:to})},CodeMirrorStreamReader.prototype.peek=function(){var _pos=this.pos,line=_pos.line,ch=_pos.ch,lineStr=this.editor.getLine(line);return ch=this._lineLength(this.pos.line)&&(this.pos.line++,this.pos.ch=0),this.eof()&&(this.pos=_extends({},this._eof)),code}return NaN},CodeMirrorStreamReader.prototype.backUp=function(n){var CodeMirror=this.editor.constructor,_pos2=this.pos,line=_pos2.line,ch=_pos2.ch;for(ch-=n||1;0<=line&&0>ch;)line--,ch+=this._lineLength(line);return this.pos=0>line||0>ch?CodeMirror.Pos(0,0):CodeMirror.Pos(line,ch),this.peek()},CodeMirrorStreamReader.prototype.current=function(){return this.substring(this.start,this.pos)},CodeMirrorStreamReader.prototype.substring=function(from,to){return this.editor.getRange(from,to)},CodeMirrorStreamReader.prototype.error=function(message){var err=new Error(message+" at line "+this.pos.line+", column "+this.pos.ch);return err.originalMessage=message,err.pos=this.pos,err.string=this.string,err},CodeMirrorStreamReader.prototype._lineLength=function(line){var isLast=line===this.editor.lastLine();return this.editor.getLine(line).length+(isLast?0:1)},CodeMirrorStreamReader}(_streamReader2.default),emmetMarkerClass="emmet-abbreviation",Abbreviation=function(){function Abbreviation(abbreviation,range,config){_classCallCheck(this,Abbreviation),this.abbreviation=abbreviation,this.range=range,this.config=config,this.ast=(0,_expandAbbreviation.parse)(abbreviation,config),this.snippet=(0,_expandAbbreviation.expand)(this.ast,config),this.preview=removeFields(this.snippet)}return Abbreviation.prototype.insert=function(editor,range){return insertSnippet(editor,range||this.range,this.snippet)},Abbreviation.prototype.valid=function(editor,contextAware){return this.preview&&this.abbreviation!==this.preview&&(contextAware&&"stylesheet"===this.config.type?this._isValidForStylesheet(editor):!0)},Abbreviation.prototype._isValidForStylesheet=function(editor){var pos=this.range.from,token=editor.getTokenAt(pos);if(/^[#!]/.test(this.abbreviation))return isCSSPropertyValue(editor,pos);var isProperty=this.ast.children.every(function(node){return node.name}),state=token.state&&token.state.localState||token.state;return!isProperty||"sass"===this.config.syntax||state&&state.context&&"block"===state.context.type},Abbreviation}(),EmmetCompletion=function(){function EmmetCompletion(type,editor,range,name,preview,snippet){_classCallCheck(this,EmmetCompletion),this.type=type,this.editor=editor,this.range=range,this.name=name,this.preview=preview,this.snippet=snippet,this._inserted=!1}return EmmetCompletion.prototype.insert=function(){this._inserted||(this._inserted=!0,"function"==typeof this.snippet?this.snippet(this.editor,this.range):insertSnippet(this.editor,this.range,this.snippet),clearMarkers(this.editor))},EmmetCompletion}(),SyntaxModel=function(){function SyntaxModel(dom,type,syntax){_classCallCheck(this,SyntaxModel),this.dom=dom,this.type=type,this.syntax=syntax}return SyntaxModel.prototype.nodeForPoint=function(pos,exclude){for(var ctx=this.dom.firstChild,found=null;ctx;)containsPos(rangeFromNode(ctx),pos,exclude)?(found=ctx,ctx=ctx.firstChild):ctx=ctx.nextSibling;return found},SyntaxModel}(),openTagMark="emmet-open-tag",closeTagMark="emmet-close-tag";exports.default=function(CodeMirror){_extends(CodeMirror.commands,{emmetExpandAbbreviation:function(editor){return expandAbbreviation(editor,!0)},emmetExpandAbbreviationAll:function(editor){return expandAbbreviation(editor,!1)},emmetInsertLineBreak:emmetInsertLineBreak,emmetWrapWithAbbreviation:wrapWithAbbreviation});var markOnEditorChange=function(editor){return markAbbreviation(editor,editor.getCursor())};CodeMirror.defineOption("markEmmetAbbreviation",!0,function(editor,value){value?editor.on("change",markOnEditorChange):(editor.off("change",markOnEditorChange),clearMarkers(editor))}),CodeMirror.defineOption("autoRenameTags",!0,function(editor,value){value?editor.on("change",renameTag):editor.off("change",renameTag)}),CodeMirror.defineOption("jsxBracket",!0),CodeMirror.defineOption("markTagPairs",!1,function(editor,value){value?(editor.on("cursorActivity",matchTag),editor.on("change",resetCachedModel)):(editor.off("cursorActivity",matchTag),editor.off("change",resetCachedModel),resetCachedModel(editor),clearTagMatch(editor))}),CodeMirror.defineOption("emmet",{}),CodeMirror.defineExtension("getEmmetCompletions",function(pos,force){var editor=this;"boolean"==typeof pos&&(force=pos,pos=null),pos=pos||editor.getCursor();var autocomplete=autocompleteProvider(editor,pos);if(autocomplete&&autocomplete.completions.length)return editor.getOption("markEmmetAbbreviation")&&!findMarker(editor,pos)&&force&&(clearMarkers(editor),createMarker(autocomplete.model)),{from:autocomplete.abbreviation.range.from,to:autocomplete.abbreviation.range.to,list:autocomplete.completions}}),CodeMirror.defineExtension("getEmmetAbbreviation",function(pos,contextAware){return abbreviationFromPosition(this,pos||this.getCursor(),contextAware)}),CodeMirror.defineExtension("findEmmetMarker",function(pos){return findMarker(this,pos||this.getCursor())}),CodeMirror.defineExtension("getEmmetDocumentModel",function(){var editor=this;return editor.getOption("markTagPairs")?getCachedModel(editor):getModel(editor)})}},"/rE2":function(module,exports,__webpack_require__){"use strict";function resolveNode(node,registry){var stack=new Set;(function resolve(node){var snippet=registry.resolve(node.name);if(snippet&&!stack.has(snippet)){if("function"==typeof snippet.value)return snippet.value(node,registry,resolve);var tree=(0,_abbreviation2.default)(snippet.value);stack.add(snippet),tree.walk(resolve),stack.delete(snippet);var childTarget=findDeepestNode(tree);for(merge(childTarget,node);tree.firstChild;)node.parent.insertBefore(tree.firstChild,node);childTarget.parent.insertBefore(node,childTarget),childTarget.remove()}})(node)}function merge(from,to){return to.name=from.name,from.selfClosing&&(to.selfClosing=!0),null!=from.value&&(to.value=from.value),from.repeat&&(to.repeat=_extends({},from.repeat)),mergeAttributes(from,to)}function mergeAttributes(from,to){mergeClassNames(from,to);for(var attrMap=new Map,attrs=from.attributes,i=0;i=iter.max))return iter.ch=0,iter.text=iter.cm.getLine(++iter.line),!0}function prevLine(iter){if(!(iter.line<=iter.min))return iter.text=iter.cm.getLine(--iter.line),iter.ch=iter.text.length,!0}function toTagEnd(iter){for(;;){var gt=iter.text.indexOf(">",iter.ch);if(-1==gt)if(nextLine(iter))continue;else return;if(!tagAt(iter,gt+1)){iter.ch=gt+1;continue}var lastSlash=iter.text.lastIndexOf("/",gt),selfClose=-1",iter.ch-1):-1;if(-1==gt)if(prevLine(iter))continue;else return;if(!tagAt(iter,gt+1)){iter.ch=gt;continue}var lastSlash=iter.text.lastIndexOf("/",gt),selfClose=-1i&&(!tag||tag==next[2]))return{tag:next[2],from:Pos(startLine,startCh),to:Pos(iter.line,iter.ch)}}else stack.push(next[2])}}function findMatchingOpen(iter,tag){for(var stack=[],prev;;){if(prev=toPrevTag(iter),!prev)return;if("selfClose"==prev){toTagStart(iter);continue}var endLine=iter.line,endCh=iter.ch,start=toTagStart(iter);if(!start)return;if(start[1])stack.push(start[2]);else{for(var i=stack.length-1;0<=i;--i)if(stack[i]==start[2]){stack.length=i;break}if(0>i&&(!tag||tag==start[2]))return{tag:start[2],from:Pos(iter.line,iter.ch),to:Pos(endLine,endCh)}}}}var Pos=CodeMirror.Pos,xmlTagStart=/<(\/?)([A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-:.0-9\u00B7\u0300-\u036F\u203F-\u2040]*)/g;CodeMirror.registerHelper("fold","xml",function(cm,start){for(var iter=new Iter(cm,start.line,0),openTag;;){if(openTag=toNextTag(iter),!openTag||iter.line!=start.line)return;var end=toTagEnd(iter);if(!end)return;if(!openTag[1]&&"selfClose"!=end){var startPos=Pos(iter.line,iter.ch),endPos=findMatchingClose(iter,openTag[2]);return endPos&&0")||-1!=iter.text.indexOf("<")){var end=toTagEnd(iter),to=end&&Pos(iter.line,iter.ch),start=end&&toTagStart(iter);if(end&&start&&!(0last);i++)curLine=doc.getLine(line++),string=null==string?curLine:string+"\n"+curLine;chunk*=2,regexp.lastIndex=start.ch;var match=regexp.exec(string);if(match){var before=string.slice(0,match.index).split("\n"),inside=match[0].split("\n"),startLine=start.line+before.length-1,startCh=before[before.length-1].length;return{from:Pos(startLine,startCh),to:Pos(startLine+inside.length-1,1==inside.length?startCh+inside[0].length:inside[inside.length-1].length),match:match}}}}function lastMatchIn(string,regexp){for(var cutOff=0,match;;){regexp.lastIndex=cutOff;var newMatch=regexp.exec(string);if(!newMatch)return match;if(match=newMatch,cutOff=match.index+(match[0].length||1),cutOff==string.length)return match}}function searchRegexpBackward(doc,regexp,start){regexp=ensureFlags(regexp,"g");for(var line=start.line,ch=start.ch,first=doc.firstLine(),string;line>=first;line--,ch=-1){string=doc.getLine(line),-1=first;){for(var i=0,curLine;i>1,len=foldFunc(orig.slice(0,mid)).length;if(len==pos)return mid;len>pos?max=mid:min=mid+1}}function searchStringForward(doc,query,start,caseFold){if(!query.length)return null;var fold=caseFold?doFold:noFold,lines=fold(query).split(/\r|\n\r?/);search:for(var line=start.line,ch=start.ch,last=doc.lastLine()+1-lines.length;line<=last;line++,ch=0){var orig=doc.getLine(line).slice(ch),string=fold(orig);if(1==lines.length){var found=string.indexOf(lines[0]);if(-1==found)continue search;var start=adjustPos(orig,string,found,fold)+ch;return{from:Pos(line,adjustPos(orig,string,found,fold)+ch),to:Pos(line,adjustPos(orig,string,found+lines[0].length,fold)+ch)}}var cutFrom=string.length-lines[0].length;if(string.slice(cutFrom)!=lines[0])continue search;for(var i=1;i=first;line--,ch=-1){orig=doc.getLine(line),-1max&&(root=max),0==max)return table[table_index++]=20971520,table[table_index++]=20971520,opts.bits=1,0;for(min=1;minleft)return-1;if(0ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS)return 1;for(;;){here_bits=len-drop,work[sym]end?(here_op=extra[extra_index+work[sym]],here_val=base[base_index+work[sym]]):(here_op=96,here_val=0),incr=1<>drop)+fill]=0|(here_bits<<24|here_op<<16|here_val);while(0!==fill);for(incr=1<>=1;if(0===incr?huff=0:(huff&=incr-1,huff+=incr),sym++,0==--count[len]){if(len==max)break;len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){for(0==drop&&(drop=root),next+=min,curr=len-drop,left=1<=left));)curr++,left<<=1;if(used+=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS)return 1;low=huff&mask,table[low]=0|(root<<24|curr<<16|next-table_index)}}return 0!==huff&&(table[next+huff]=0|(4194304|len-drop<<24)),opts.bits=root,0}},"34Q3":function(module,exports,__webpack_require__){"use strict";function buf2binstring(buf,len){if(65537>len&&(buf.subarray&&STR_APPLY_UIA_OK||!buf.subarray&&STR_APPLY_OK))return _StringfromCharCode.apply(null,utils.shrinkBuf(buf,len));for(var result="",i=0;iq;q++)_utf8len[q]=252<=q?6:248<=q?5:240<=q?4:224<=q?3:192<=q?2:1;_utf8len[254]=_utf8len[254]=1,exports.string2buf=function(str){var str_len=str.length,buf_len=0,buf,c,c2,m_pos,i;for(m_pos=0;m_posc?1:2048>c?2:65536>c?3:4;for(buf=new utils.Buf8(buf_len),i=0,m_pos=0;ic?buf[i++]=c:2048>c?(buf[i++]=192|c>>>6,buf[i++]=128|63&c):65536>c?(buf[i++]=224|c>>>12,buf[i++]=128|63&c>>>6,buf[i++]=128|63&c):(buf[i++]=240|c>>>18,buf[i++]=128|63&c>>>12,buf[i++]=128|63&c>>>6,buf[i++]=128|63&c);return buf},exports.buf2binstring=function(buf){return buf2binstring(buf,buf.length)},exports.binstring2buf=function(str){for(var buf=new utils.Buf8(str.length),i=0,len=buf.length;ic){utf16buf[out++]=c;continue}if(c_len=_utf8len[c],4c?utf16buf[out++]=c:(c-=65536,utf16buf[out++]=55296|1023&c>>10,utf16buf[out++]=56320|1023&c)}return buf2binstring(utf16buf,out)},exports.utf8border=function(buf,max){var pos;for(max=max||buf.length,max>buf.length&&(max=buf.length),pos=max-1;0<=pos&&128==(192&buf[pos]);)pos--;return 0>pos?max:0===pos?max:pos+_utf8len[buf[pos]]>max?pos:max}},"38Wu":function(module,exports,__webpack_require__){"use strict";function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}var buffer=__webpack_require__("dskh"),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0===fill?buf.fill(0):"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},"3Rhr":function(module){"use strict";module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);}return fn.apply(that,args)}},"3Vd+":function(module){"use strict";var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},"3bh8":function(module,exports,__webpack_require__){"use strict";var dP=__webpack_require__("z3uY"),createDesc=__webpack_require__("HyWd");module.exports=__webpack_require__("s0rf")?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},"4Bm0":function(module){"use strict";module.exports="function"==typeof Object.create?function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},"4E2n":function(module,exports){"use strict";var _StringfromCharCode2=String.fromCharCode;(function(root,factory){module.exports=factory()})(void 0,function(){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){function parse(code,options,delegate){var commentHandler=null,proxyDelegate=function(node,metadata){delegate&&delegate(node,metadata),commentHandler&&commentHandler.visit(node,metadata)},parserDelegate="function"==typeof delegate?proxyDelegate:null,collectComment=!1;if(options){collectComment="boolean"==typeof options.comment&&options.comment;var attachComment="boolean"==typeof options.attachComment&&options.attachComment;(collectComment||attachComment)&&(commentHandler=new comment_handler_1.CommentHandler,commentHandler.attach=attachComment,options.comment=!0,parserDelegate=proxyDelegate)}var isModule=!1;options&&"string"==typeof options.sourceType&&(isModule="module"===options.sourceType);var parser=options&&"boolean"==typeof options.jsx&&options.jsx?new jsx_parser_1.JSXParser(code,options,parserDelegate):new parser_1.Parser(code,options,parserDelegate);var program=isModule?parser.parseModule():parser.parseScript(),ast=program;return collectComment&&commentHandler&&(ast.comments=commentHandler.comments),parser.config.tokens&&(ast.tokens=parser.tokens),parser.config.tolerant&&(ast.errors=parser.errorHandler.errors),ast}Object.defineProperty(exports,"__esModule",{value:!0});var comment_handler_1=__webpack_require__(1),jsx_parser_1=__webpack_require__(3),parser_1=__webpack_require__(8),tokenizer_1=__webpack_require__(15);exports.parse=parse,exports.parseModule=function(code,options,delegate){var parsingOptions=options||{};return parsingOptions.sourceType="module",parse(code,parsingOptions,delegate)},exports.parseScript=function(code,options,delegate){var parsingOptions=options||{};return parsingOptions.sourceType="script",parse(code,parsingOptions,delegate)},exports.tokenize=function(code,options,delegate){var tokenizer=new tokenizer_1.Tokenizer(code,options),tokens;tokens=[];try{for(;;){var token=tokenizer.getNextToken();if(!token)break;delegate&&(token=delegate(token)),tokens.push(token)}}catch(e){tokenizer.errorHandler.tolerate(e)}return tokenizer.errorHandler.tolerant&&(tokens.errors=tokenizer.errors()),tokens};var syntax_1=__webpack_require__(2);exports.Syntax=syntax_1.Syntax,exports.version="4.0.0"},function(module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0});var syntax_1=__webpack_require__(2),CommentHandler=function(){function CommentHandler(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return CommentHandler.prototype.insertInnerComments=function(node,metadata){if(node.type===syntax_1.Syntax.BlockStatement&&0===node.body.length){for(var innerComments=[],i=this.leading.length-1,entry;0<=i;--i)entry=this.leading[i],metadata.end.offset>=entry.start&&(innerComments.unshift(entry.comment),this.leading.splice(i,1),this.trailing.splice(i,1));innerComments.length&&(node.innerComments=innerComments)}},CommentHandler.prototype.findTrailingComments=function(metadata){var trailingComments=[];if(0=metadata.end.offset&&trailingComments.unshift(entry_1.comment);return this.trailing.length=0,trailingComments}var entry=this.stack[this.stack.length-1];if(entry&&entry.node.trailingComments){var firstComment=entry.node.trailingComments[0];firstComment&&firstComment.range[0]>=metadata.end.offset&&(trailingComments=entry.node.trailingComments,delete entry.node.trailingComments)}return trailingComments},CommentHandler.prototype.findLeadingComments=function(metadata){for(var leadingComments=[],target,entry;0=metadata.start.offset);)target=entry.node,this.stack.pop();if(target){for(var count=target.leadingComments?target.leadingComments.length:0,i=count-1,comment;0<=i;--i)comment=target.leadingComments[i],comment.range[1]<=metadata.start.offset&&(leadingComments.unshift(comment),target.leadingComments.splice(i,1));return target.leadingComments&&0===target.leadingComments.length&&delete target.leadingComments,leadingComments}for(var i=this.leading.length-1,entry;0<=i;--i)entry=this.leading[i],entry.start<=metadata.start.offset&&(leadingComments.unshift(entry.comment),this.leading.splice(i,1));return leadingComments},CommentHandler.prototype.visitNode=function(node,metadata){if(!(node.type===syntax_1.Syntax.Program&&0");)attribute=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute(),attributes.push(attribute);return attributes},JSXParser.prototype.parseJSXOpeningElement=function(){var node=this.createJSXNode();this.expectJSX("<");var name=this.parseJSXElementName(),attributes=this.parseJSXAttributes(),selfClosing=this.matchJSX("/");return selfClosing&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(node,new JSXNode.JSXOpeningElement(name,selfClosing,attributes))},JSXParser.prototype.parseJSXBoundaryElement=function(){var node=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var name_3=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(node,new JSXNode.JSXClosingElement(name_3))}var name=this.parseJSXElementName(),attributes=this.parseJSXAttributes(),selfClosing=this.matchJSX("/");return selfClosing&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(node,new JSXNode.JSXOpeningElement(name,selfClosing,attributes))},JSXParser.prototype.parseJSXEmptyExpression=function(){var node=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(node,new JSXNode.JSXEmptyExpression)},JSXParser.prototype.parseJSXExpressionContainer=function(){var node=this.createJSXNode();this.expectJSX("{");var expression;return this.matchJSX("}")?(expression=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),expression=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(node,new JSXNode.JSXExpressionContainer(expression))},JSXParser.prototype.parseJSXChildren=function(){for(var children=[];!this.scanner.eof();){var node=this.createJSXChildNode(),token=this.nextJSXText();if(token.startcp?_StringfromCharCode2(cp):_StringfromCharCode2(55296+(cp-65536>>10))+_StringfromCharCode2(56320+(1023&cp-65536))},isWhiteSpace:function(cp){return 32===cp||9===cp||11===cp||12===cp||160===cp||5760<=cp&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(cp)},isLineTerminator:function(cp){return 10===cp||13===cp||8232===cp||8233===cp},isIdentifierStart:function(cp){return 36===cp||95===cp||65<=cp&&90>=cp||97<=cp&&122>=cp||92===cp||128<=cp&&Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp))},isIdentifierPart:function(cp){return 36===cp||95===cp||65<=cp&&90>=cp||97<=cp&&122>=cp||48<=cp&&57>=cp||92===cp||128<=cp&&Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp))},isDecimalDigit:function(cp){return 48<=cp&&57>=cp},isHexDigit:function(cp){return 48<=cp&&57>=cp||65<=cp&&70>=cp||97<=cp&&102>=cp},isOctalDigit:function(cp){return 48<=cp&&55>=cp}}},function(module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0});var jsx_syntax_1=__webpack_require__(6),JSXClosingElement=function(){return function(name){this.type=jsx_syntax_1.JSXSyntax.JSXClosingElement,this.name=name}}();exports.JSXClosingElement=JSXClosingElement;var JSXElement=function(){return function(openingElement,children,closingElement){this.type=jsx_syntax_1.JSXSyntax.JSXElement,this.openingElement=openingElement,this.children=children,this.closingElement=closingElement}}();exports.JSXElement=JSXElement;var JSXEmptyExpression=function(){return function(){this.type=jsx_syntax_1.JSXSyntax.JSXEmptyExpression}}();exports.JSXEmptyExpression=JSXEmptyExpression;var JSXExpressionContainer=function(){return function(expression){this.type=jsx_syntax_1.JSXSyntax.JSXExpressionContainer,this.expression=expression}}();exports.JSXExpressionContainer=JSXExpressionContainer;var JSXIdentifier=function(){return function(name){this.type=jsx_syntax_1.JSXSyntax.JSXIdentifier,this.name=name}}();exports.JSXIdentifier=JSXIdentifier;var JSXMemberExpression=function(){return function(object,property){this.type=jsx_syntax_1.JSXSyntax.JSXMemberExpression,this.object=object,this.property=property}}();exports.JSXMemberExpression=JSXMemberExpression;var JSXAttribute=function(){return function(name,value){this.type=jsx_syntax_1.JSXSyntax.JSXAttribute,this.name=name,this.value=value}}();exports.JSXAttribute=JSXAttribute;var JSXNamespacedName=function(){return function(namespace,name){this.type=jsx_syntax_1.JSXSyntax.JSXNamespacedName,this.namespace=namespace,this.name=name}}();exports.JSXNamespacedName=JSXNamespacedName;var JSXOpeningElement=function(){return function(name,selfClosing,attributes){this.type=jsx_syntax_1.JSXSyntax.JSXOpeningElement,this.name=name,this.selfClosing=selfClosing,this.attributes=attributes}}();exports.JSXOpeningElement=JSXOpeningElement;var JSXSpreadAttribute=function(){return function(argument){this.type=jsx_syntax_1.JSXSyntax.JSXSpreadAttribute,this.argument=argument}}();exports.JSXSpreadAttribute=JSXSpreadAttribute;var JSXText=function(){return function(value,raw){this.type=jsx_syntax_1.JSXSyntax.JSXText,this.value=value,this.raw=raw}}();exports.JSXText=JSXText},function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0});var syntax_1=__webpack_require__(2),ArrayExpression=function(){return function(elements){this.type=syntax_1.Syntax.ArrayExpression,this.elements=elements}}();exports.ArrayExpression=ArrayExpression;var ArrayPattern=function(){return function(elements){this.type=syntax_1.Syntax.ArrayPattern,this.elements=elements}}();exports.ArrayPattern=ArrayPattern;var ArrowFunctionExpression=function(){return function(params,body,expression){this.type=syntax_1.Syntax.ArrowFunctionExpression,this.id=null,this.params=params,this.body=body,this.generator=!1,this.expression=expression,this.async=!1}}();exports.ArrowFunctionExpression=ArrowFunctionExpression;var AssignmentExpression=function(){return function(operator,left,right){this.type=syntax_1.Syntax.AssignmentExpression,this.operator=operator,this.left=left,this.right=right}}();exports.AssignmentExpression=AssignmentExpression;var AssignmentPattern=function(){return function(left,right){this.type=syntax_1.Syntax.AssignmentPattern,this.left=left,this.right=right}}();exports.AssignmentPattern=AssignmentPattern;var AsyncArrowFunctionExpression=function(){return function(params,body,expression){this.type=syntax_1.Syntax.ArrowFunctionExpression,this.id=null,this.params=params,this.body=body,this.generator=!1,this.expression=expression,this.async=!0}}();exports.AsyncArrowFunctionExpression=AsyncArrowFunctionExpression;var AsyncFunctionDeclaration=function(){return function(id,params,body){this.type=syntax_1.Syntax.FunctionDeclaration,this.id=id,this.params=params,this.body=body,this.generator=!1,this.expression=!1,this.async=!0}}();exports.AsyncFunctionDeclaration=AsyncFunctionDeclaration;var AsyncFunctionExpression=function(){return function(id,params,body){this.type=syntax_1.Syntax.FunctionExpression,this.id=id,this.params=params,this.body=body,this.generator=!1,this.expression=!1,this.async=!0}}();exports.AsyncFunctionExpression=AsyncFunctionExpression;var AwaitExpression=function(){return function(argument){this.type=syntax_1.Syntax.AwaitExpression,this.argument=argument}}();exports.AwaitExpression=AwaitExpression;var BinaryExpression=function(){return function(operator,left,right){this.type="||"===operator||"&&"===operator?syntax_1.Syntax.LogicalExpression:syntax_1.Syntax.BinaryExpression,this.operator=operator,this.left=left,this.right=right}}();exports.BinaryExpression=BinaryExpression;var BlockStatement=function(){return function(body){this.type=syntax_1.Syntax.BlockStatement,this.body=body}}();exports.BlockStatement=BlockStatement;var BreakStatement=function(){return function(label){this.type=syntax_1.Syntax.BreakStatement,this.label=label}}();exports.BreakStatement=BreakStatement;var CallExpression=function(){return function(callee,args){this.type=syntax_1.Syntax.CallExpression,this.callee=callee,this.arguments=args}}();exports.CallExpression=CallExpression;var CatchClause=function(){return function(param,body){this.type=syntax_1.Syntax.CatchClause,this.param=param,this.body=body}}();exports.CatchClause=CatchClause;var ClassBody=function(){return function(body){this.type=syntax_1.Syntax.ClassBody,this.body=body}}();exports.ClassBody=ClassBody;var ClassDeclaration=function(){return function(id,superClass,body){this.type=syntax_1.Syntax.ClassDeclaration,this.id=id,this.superClass=superClass,this.body=body}}();exports.ClassDeclaration=ClassDeclaration;var ClassExpression=function(){return function(id,superClass,body){this.type=syntax_1.Syntax.ClassExpression,this.id=id,this.superClass=superClass,this.body=body}}();exports.ClassExpression=ClassExpression;var ComputedMemberExpression=function(){return function(object,property){this.type=syntax_1.Syntax.MemberExpression,this.computed=!0,this.object=object,this.property=property}}();exports.ComputedMemberExpression=ComputedMemberExpression;var ConditionalExpression=function(){return function(test,consequent,alternate){this.type=syntax_1.Syntax.ConditionalExpression,this.test=test,this.consequent=consequent,this.alternate=alternate}}();exports.ConditionalExpression=ConditionalExpression;var ContinueStatement=function(){return function(label){this.type=syntax_1.Syntax.ContinueStatement,this.label=label}}();exports.ContinueStatement=ContinueStatement;var DebuggerStatement=function(){return function(){this.type=syntax_1.Syntax.DebuggerStatement}}();exports.DebuggerStatement=DebuggerStatement;var Directive=function(){return function(expression,directive){this.type=syntax_1.Syntax.ExpressionStatement,this.expression=expression,this.directive=directive}}();exports.Directive=Directive;var DoWhileStatement=function(){return function(body,test){this.type=syntax_1.Syntax.DoWhileStatement,this.body=body,this.test=test}}();exports.DoWhileStatement=DoWhileStatement;var EmptyStatement=function(){return function(){this.type=syntax_1.Syntax.EmptyStatement}}();exports.EmptyStatement=EmptyStatement;var ExportAllDeclaration=function(){return function(source){this.type=syntax_1.Syntax.ExportAllDeclaration,this.source=source}}();exports.ExportAllDeclaration=ExportAllDeclaration;var ExportDefaultDeclaration=function(){return function(declaration){this.type=syntax_1.Syntax.ExportDefaultDeclaration,this.declaration=declaration}}();exports.ExportDefaultDeclaration=ExportDefaultDeclaration;var ExportNamedDeclaration=function(){return function(declaration,specifiers,source){this.type=syntax_1.Syntax.ExportNamedDeclaration,this.declaration=declaration,this.specifiers=specifiers,this.source=source}}();exports.ExportNamedDeclaration=ExportNamedDeclaration;var ExportSpecifier=function(){return function(local,exported){this.type=syntax_1.Syntax.ExportSpecifier,this.exported=exported,this.local=local}}();exports.ExportSpecifier=ExportSpecifier;var ExpressionStatement=function(){return function(expression){this.type=syntax_1.Syntax.ExpressionStatement,this.expression=expression}}();exports.ExpressionStatement=ExpressionStatement;var ForInStatement=function(){return function(left,right,body){this.type=syntax_1.Syntax.ForInStatement,this.left=left,this.right=right,this.body=body,this.each=!1}}();exports.ForInStatement=ForInStatement;var ForOfStatement=function(){return function(left,right,body){this.type=syntax_1.Syntax.ForOfStatement,this.left=left,this.right=right,this.body=body}}();exports.ForOfStatement=ForOfStatement;var ForStatement=function(){return function(init,test,update,body){this.type=syntax_1.Syntax.ForStatement,this.init=init,this.test=test,this.update=update,this.body=body}}();exports.ForStatement=ForStatement;var FunctionDeclaration=function(){return function(id,params,body,generator){this.type=syntax_1.Syntax.FunctionDeclaration,this.id=id,this.params=params,this.body=body,this.generator=generator,this.expression=!1,this.async=!1}}();exports.FunctionDeclaration=FunctionDeclaration;var FunctionExpression=function(){return function(id,params,body,generator){this.type=syntax_1.Syntax.FunctionExpression,this.id=id,this.params=params,this.body=body,this.generator=generator,this.expression=!1,this.async=!1}}();exports.FunctionExpression=FunctionExpression;var Identifier=function(){return function(name){this.type=syntax_1.Syntax.Identifier,this.name=name}}();exports.Identifier=Identifier;var IfStatement=function(){return function(test,consequent,alternate){this.type=syntax_1.Syntax.IfStatement,this.test=test,this.consequent=consequent,this.alternate=alternate}}();exports.IfStatement=IfStatement;var ImportDeclaration=function(){return function(specifiers,source){this.type=syntax_1.Syntax.ImportDeclaration,this.specifiers=specifiers,this.source=source}}();exports.ImportDeclaration=ImportDeclaration;var ImportDefaultSpecifier=function(){return function(local){this.type=syntax_1.Syntax.ImportDefaultSpecifier,this.local=local}}();exports.ImportDefaultSpecifier=ImportDefaultSpecifier;var ImportNamespaceSpecifier=function(){return function(local){this.type=syntax_1.Syntax.ImportNamespaceSpecifier,this.local=local}}();exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;var ImportSpecifier=function(){return function(local,imported){this.type=syntax_1.Syntax.ImportSpecifier,this.local=local,this.imported=imported}}();exports.ImportSpecifier=ImportSpecifier;var LabeledStatement=function(){return function(label,body){this.type=syntax_1.Syntax.LabeledStatement,this.label=label,this.body=body}}();exports.LabeledStatement=LabeledStatement;var Literal=function(){return function(value,raw){this.type=syntax_1.Syntax.Literal,this.value=value,this.raw=raw}}();exports.Literal=Literal;var MetaProperty=function(){return function(meta,property){this.type=syntax_1.Syntax.MetaProperty,this.meta=meta,this.property=property}}();exports.MetaProperty=MetaProperty;var MethodDefinition=function(){return function(key,computed,value,kind,isStatic){this.type=syntax_1.Syntax.MethodDefinition,this.key=key,this.computed=computed,this.value=value,this.kind=kind,this.static=isStatic}}();exports.MethodDefinition=MethodDefinition;var Module=function(){return function(body){this.type=syntax_1.Syntax.Program,this.body=body,this.sourceType="module"}}();exports.Module=Module;var NewExpression=function(){return function(callee,args){this.type=syntax_1.Syntax.NewExpression,this.callee=callee,this.arguments=args}}();exports.NewExpression=NewExpression;var ObjectExpression=function(){return function(properties){this.type=syntax_1.Syntax.ObjectExpression,this.properties=properties}}();exports.ObjectExpression=ObjectExpression;var ObjectPattern=function(){return function(properties){this.type=syntax_1.Syntax.ObjectPattern,this.properties=properties}}();exports.ObjectPattern=ObjectPattern;var Property=function(){return function(kind,key,computed,value,method,shorthand){this.type=syntax_1.Syntax.Property,this.key=key,this.computed=computed,this.value=value,this.kind=kind,this.method=method,this.shorthand=shorthand}}();exports.Property=Property;var RegexLiteral=function(){return function(value,raw,pattern,flags){this.type=syntax_1.Syntax.Literal,this.value=value,this.raw=raw,this.regex={pattern:pattern,flags:flags}}}();exports.RegexLiteral=RegexLiteral;var RestElement=function(){return function(argument){this.type=syntax_1.Syntax.RestElement,this.argument=argument}}();exports.RestElement=RestElement;var ReturnStatement=function(){return function(argument){this.type=syntax_1.Syntax.ReturnStatement,this.argument=argument}}();exports.ReturnStatement=ReturnStatement;var Script=function(){return function(body){this.type=syntax_1.Syntax.Program,this.body=body,this.sourceType="script"}}();exports.Script=Script;var SequenceExpression=function(){return function(expressions){this.type=syntax_1.Syntax.SequenceExpression,this.expressions=expressions}}();exports.SequenceExpression=SequenceExpression;var SpreadElement=function(){return function(argument){this.type=syntax_1.Syntax.SpreadElement,this.argument=argument}}();exports.SpreadElement=SpreadElement;var StaticMemberExpression=function(){return function(object,property){this.type=syntax_1.Syntax.MemberExpression,this.computed=!1,this.object=object,this.property=property}}();exports.StaticMemberExpression=StaticMemberExpression;var Super=function(){return function(){this.type=syntax_1.Syntax.Super}}();exports.Super=Super;var SwitchCase=function(){return function(test,consequent){this.type=syntax_1.Syntax.SwitchCase,this.test=test,this.consequent=consequent}}();exports.SwitchCase=SwitchCase;var SwitchStatement=function(){return function(discriminant,cases){this.type=syntax_1.Syntax.SwitchStatement,this.discriminant=discriminant,this.cases=cases}}();exports.SwitchStatement=SwitchStatement;var TaggedTemplateExpression=function(){return function(tag,quasi){this.type=syntax_1.Syntax.TaggedTemplateExpression,this.tag=tag,this.quasi=quasi}}();exports.TaggedTemplateExpression=TaggedTemplateExpression;var TemplateElement=function(){return function(value,tail){this.type=syntax_1.Syntax.TemplateElement,this.value=value,this.tail=tail}}();exports.TemplateElement=TemplateElement;var TemplateLiteral=function(){return function(quasis,expressions){this.type=syntax_1.Syntax.TemplateLiteral,this.quasis=quasis,this.expressions=expressions}}();exports.TemplateLiteral=TemplateLiteral;var ThisExpression=function(){return function(){this.type=syntax_1.Syntax.ThisExpression}}();exports.ThisExpression=ThisExpression;var ThrowStatement=function(){return function(argument){this.type=syntax_1.Syntax.ThrowStatement,this.argument=argument}}();exports.ThrowStatement=ThrowStatement;var TryStatement=function(){return function(block,handler,finalizer){this.type=syntax_1.Syntax.TryStatement,this.block=block,this.handler=handler,this.finalizer=finalizer}}();exports.TryStatement=TryStatement;var UnaryExpression=function(){return function(operator,argument){this.type=syntax_1.Syntax.UnaryExpression,this.operator=operator,this.argument=argument,this.prefix=!0}}();exports.UnaryExpression=UnaryExpression;var UpdateExpression=function(){return function(operator,argument,prefix){this.type=syntax_1.Syntax.UpdateExpression,this.operator=operator,this.argument=argument,this.prefix=prefix}}();exports.UpdateExpression=UpdateExpression;var VariableDeclaration=function(){return function(declarations,kind){this.type=syntax_1.Syntax.VariableDeclaration,this.declarations=declarations,this.kind=kind}}();exports.VariableDeclaration=VariableDeclaration;var VariableDeclarator=function(){return function(id,init){this.type=syntax_1.Syntax.VariableDeclarator,this.id=id,this.init=init}}();exports.VariableDeclarator=VariableDeclarator;var WhileStatement=function(){return function(test,body){this.type=syntax_1.Syntax.WhileStatement,this.test=test,this.body=body}}();exports.WhileStatement=WhileStatement;var WithStatement=function(){return function(object,body){this.type=syntax_1.Syntax.WithStatement,this.object=object,this.body=body}}();exports.WithStatement=WithStatement;var YieldExpression=function(){return function(argument,delegate){this.type=syntax_1.Syntax.YieldExpression,this.argument=argument,this.delegate=delegate}}();exports.YieldExpression=YieldExpression},function(module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0});var assert_1=__webpack_require__(9),error_handler_1=__webpack_require__(10),messages_1=__webpack_require__(11),Node=__webpack_require__(7),scanner_1=__webpack_require__(12),syntax_1=__webpack_require__(2),token_1=__webpack_require__(13),ArrowParameterPlaceHolder="ArrowParameterPlaceHolder",Parser=function(){function Parser(code,options,delegate){void 0===options&&(options={}),this.config={range:"boolean"==typeof options.range&&options.range,loc:"boolean"==typeof options.loc&&options.loc,source:null,tokens:"boolean"==typeof options.tokens&&options.tokens,comment:"boolean"==typeof options.comment&&options.comment,tolerant:"boolean"==typeof options.tolerant&&options.tolerant},this.config.loc&&options.source&&null!==options.source&&(this.config.source=options.source+""),this.delegate=delegate,this.errorHandler=new error_handler_1.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new scanner_1.Scanner(code,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return Parser.prototype.throwError=function(messageFormat){for(var values=[],_i=1;_i>="===op||">>>="===op||"&="===op||"^="===op||"|="===op},Parser.prototype.isolateCoverGrammar=function(parseFunction){var previousIsBindingElement=this.context.isBindingElement,previousIsAssignmentTarget=this.context.isAssignmentTarget,previousFirstCoverInitializedNameError=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var result=parseFunction.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=previousIsBindingElement,this.context.isAssignmentTarget=previousIsAssignmentTarget,this.context.firstCoverInitializedNameError=previousFirstCoverInitializedNameError,result},Parser.prototype.inheritCoverGrammar=function(parseFunction){var previousIsBindingElement=this.context.isBindingElement,previousIsAssignmentTarget=this.context.isAssignmentTarget,previousFirstCoverInitializedNameError=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var result=parseFunction.call(this);return this.context.isBindingElement=this.context.isBindingElement&&previousIsBindingElement,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&previousIsAssignmentTarget,this.context.firstCoverInitializedNameError=previousFirstCoverInitializedNameError||this.context.firstCoverInitializedNameError,result},Parser.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():!this.hasLineTerminator&&(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},Parser.prototype.parsePrimaryExpression=function(){var node=this.createNode(),expr,token,raw;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),expr=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(node,new Node.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal(token.value,raw));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal("true"===token.value,raw));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal(null,raw));break;case 10:expr=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,expr=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":expr=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":expr=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,token=this.nextRegexToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.RegexLiteral(token.regex,raw,token.pattern,token.flags));break;default:expr=this.throwUnexpectedToken(this.nextToken());}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?expr=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?expr=this.finalize(node,new Node.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?expr=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),expr=this.finalize(node,new Node.ThisExpression)):this.matchKeyword("class")?expr=this.parseClassExpression():expr=this.throwUnexpectedToken(this.nextToken()));break;default:expr=this.throwUnexpectedToken(this.nextToken());}return expr},Parser.prototype.parseSpreadElement=function(){var node=this.createNode();this.expect("...");var arg=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(node,new Node.SpreadElement(arg))},Parser.prototype.parseArrayInitializer=function(){var node=this.createNode(),elements=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),elements.push(null);else if(this.match("...")){var element=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),elements.push(element)}else elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(node,new Node.ArrayExpression(elements))},Parser.prototype.parsePropertyMethod=function(params){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var previousStrict=this.context.strict,previousAllowStrictDirective=this.context.allowStrictDirective;this.context.allowStrictDirective=params.simple;var body=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&¶ms.firstRestricted&&this.tolerateUnexpectedToken(params.firstRestricted,params.message),this.context.strict&¶ms.stricted&&this.tolerateUnexpectedToken(params.stricted,params.message),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,body},Parser.prototype.parsePropertyMethodFunction=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield;this.context.allowYield=!1;var params=this.parseFormalParameters(),method=this.parsePropertyMethod(params);return this.context.allowYield=previousAllowYield,this.finalize(node,new Node.FunctionExpression(null,params.params,method,!1))},Parser.prototype.parsePropertyMethodAsyncFunction=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,previousAwait=this.context.await;this.context.allowYield=!1,this.context.await=!0;var params=this.parseFormalParameters(),method=this.parsePropertyMethod(params);return this.context.allowYield=previousAllowYield,this.context.await=previousAwait,this.finalize(node,new Node.AsyncFunctionExpression(null,params.params,method))},Parser.prototype.parseObjectPropertyKey=function(){var node=this.createNode(),token=this.nextToken(),key;switch(token.type){case 8:case 6:this.context.strict&&token.octal&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictOctalLiteral);var raw=this.getTokenRaw(token);key=this.finalize(node,new Node.Literal(token.value,raw));break;case 3:case 1:case 5:case 4:key=this.finalize(node,new Node.Identifier(token.value));break;case 7:"["===token.value?(key=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):key=this.throwUnexpectedToken(token);break;default:key=this.throwUnexpectedToken(token);}return key},Parser.prototype.isPropertyKey=function(key,value){return key.type===syntax_1.Syntax.Identifier&&key.name===value||key.type===syntax_1.Syntax.Literal&&key.value===value},Parser.prototype.parseObjectProperty=function(hasProto){var node=this.createNode(),token=this.lookahead,key=null,value=null,computed=!1,method=!1,shorthand=!1,isAsync=!1,kind;if(3===token.type){var id=token.value;this.nextToken(),computed=this.match("["),isAsync=!this.hasLineTerminator&&"async"===id&&!this.match(":")&&!this.match("(")&&!this.match("*"),key=isAsync?this.parseObjectPropertyKey():this.finalize(node,new Node.Identifier(id))}else this.match("*")?this.nextToken():(computed=this.match("["),key=this.parseObjectPropertyKey());var lookaheadPropertyKey=this.qualifiedPropertyName(this.lookahead);if(3===token.type&&!isAsync&&"get"===token.value&&lookaheadPropertyKey)kind="get",computed=this.match("["),key=this.parseObjectPropertyKey(),this.context.allowYield=!1,value=this.parseGetterMethod();else if(3===token.type&&!isAsync&&"set"===token.value&&lookaheadPropertyKey)kind="set",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseSetterMethod();else if(7===token.type&&"*"===token.value&&lookaheadPropertyKey)kind="init",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseGeneratorMethod(),method=!0;else if(key||this.throwUnexpectedToken(this.lookahead),kind="init",this.match(":")&&!isAsync)!computed&&this.isPropertyKey(key,"__proto__")&&(hasProto.value&&this.tolerateError(messages_1.Messages.DuplicateProtoProperty),hasProto.value=!0),this.nextToken(),value=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))value=isAsync?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),method=!0;else if(3===token.type){var id=this.finalize(node,new Node.Identifier(token.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),shorthand=!0;var init=this.isolateCoverGrammar(this.parseAssignmentExpression);value=this.finalize(node,new Node.AssignmentPattern(id,init))}else shorthand=!0,value=id}else this.throwUnexpectedToken(this.nextToken());return this.finalize(node,new Node.Property(kind,key,computed,value,method,shorthand))},Parser.prototype.parseObjectInitializer=function(){var node=this.createNode();this.expect("{");for(var properties=[],hasProto={value:!1};!this.match("}");)properties.push(this.parseObjectProperty(hasProto)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(node,new Node.ObjectExpression(properties))},Parser.prototype.parseTemplateHead=function(){assert_1.assert(this.lookahead.head,"Template literal must start with a template head");var node=this.createNode(),token=this.nextToken(),raw=token.value,cooked=token.cooked;return this.finalize(node,new Node.TemplateElement({raw:raw,cooked:cooked},token.tail))},Parser.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var node=this.createNode(),token=this.nextToken(),raw=token.value,cooked=token.cooked;return this.finalize(node,new Node.TemplateElement({raw:raw,cooked:cooked},token.tail))},Parser.prototype.parseTemplateLiteral=function(){var node=this.createNode(),expressions=[],quasis=[],quasi=this.parseTemplateHead();for(quasis.push(quasi);!quasi.tail;)expressions.push(this.parseExpression()),quasi=this.parseTemplateElement(),quasis.push(quasi);return this.finalize(node,new Node.TemplateLiteral(quasis,expressions))},Parser.prototype.reinterpretExpressionAsPattern=function(expr){switch(expr.type){case syntax_1.Syntax.Identifier:case syntax_1.Syntax.MemberExpression:case syntax_1.Syntax.RestElement:case syntax_1.Syntax.AssignmentPattern:break;case syntax_1.Syntax.SpreadElement:expr.type=syntax_1.Syntax.RestElement,this.reinterpretExpressionAsPattern(expr.argument);break;case syntax_1.Syntax.ArrayExpression:expr.type=syntax_1.Syntax.ArrayPattern;for(var i=0;i")||this.expect("=>"),expr={type:ArrowParameterPlaceHolder,params:[],async:!1};else{var startToken=this.lookahead,params=[];if(this.match("..."))expr=this.parseRestElement(params),this.expect(")"),this.match("=>")||this.expect("=>"),expr={type:ArrowParameterPlaceHolder,params:[expr],async:!1};else{var arrow=!1;if(this.context.isBindingElement=!0,expr=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var expressions=[];for(this.context.isAssignmentTarget=!1,expressions.push(expr);2!==this.lookahead.type&&!!this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var i=0;i")||this.expect("=>"),this.context.isBindingElement=!1;for(var i=0;i")&&(expr.type===syntax_1.Syntax.Identifier&&"yield"===expr.name&&(arrow=!0,expr={type:ArrowParameterPlaceHolder,params:[expr],async:!1}),!arrow)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),expr.type===syntax_1.Syntax.SequenceExpression)for(var i=0;i")){for(var i=0;i=prec);){for(;2")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var isAsync=expr.async,list=this.reinterpretAsCoverFormalsList(expr);if(list){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var previousStrict=this.context.strict,previousAllowStrictDirective=this.context.allowStrictDirective;this.context.allowStrictDirective=list.simple;var previousAllowYield=this.context.allowYield,previousAwait=this.context.await;this.context.allowYield=!0,this.context.await=isAsync;var node=this.startNode(startToken);this.expect("=>");var body;if(this.match("{")){var previousAllowIn=this.context.allowIn;this.context.allowIn=!0,body=this.parseFunctionSourceElements(),this.context.allowIn=previousAllowIn}else body=this.isolateCoverGrammar(this.parseAssignmentExpression);var expression=body.type!==syntax_1.Syntax.BlockStatement;this.context.strict&&list.firstRestricted&&this.throwUnexpectedToken(list.firstRestricted,list.message),this.context.strict&&list.stricted&&this.tolerateUnexpectedToken(list.stricted,list.message),expr=isAsync?this.finalize(node,new Node.AsyncArrowFunctionExpression(list.params,body,expression)):this.finalize(node,new Node.ArrowFunctionExpression(list.params,body,expression)),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,this.context.allowYield=previousAllowYield,this.context.await=previousAwait}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(messages_1.Messages.InvalidLHSInAssignment),this.context.strict&&expr.type===syntax_1.Syntax.Identifier){var id=expr;this.scanner.isRestrictedWord(id.name)&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(id.name)&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(expr):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),token=this.nextToken();var operator=token.value,right=this.isolateCoverGrammar(this.parseAssignmentExpression);expr=this.finalize(this.startNode(startToken),new Node.AssignmentExpression(operator,expr,right)),this.context.firstCoverInitializedNameError=null}}return expr},Parser.prototype.parseExpression=function(){var startToken=this.lookahead,expr=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){for(var expressions=[expr];2!==this.lookahead.type&&!!this.match(",");)this.nextToken(),expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));expr=this.finalize(this.startNode(startToken),new Node.SequenceExpression(expressions))}return expr},Parser.prototype.parseStatementListItem=function(){var statement;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.IllegalExportDeclaration),statement=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.IllegalImportDeclaration),statement=this.parseImportDeclaration();break;case"const":statement=this.parseLexicalDeclaration({inFor:!1});break;case"function":statement=this.parseFunctionDeclaration();break;case"class":statement=this.parseClassDeclaration();break;case"let":statement=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:statement=this.parseStatement();}else statement=this.parseStatement();return statement},Parser.prototype.parseBlock=function(){var node=this.createNode();this.expect("{");for(var block=[];!this.match("}");)block.push(this.parseStatementListItem());return this.expect("}"),this.finalize(node,new Node.BlockStatement(block))},Parser.prototype.parseLexicalBinding=function(kind,options){var node=this.createNode(),id=this.parsePattern([],kind);this.context.strict&&id.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(id.name)&&this.tolerateError(messages_1.Messages.StrictVarName);var init=null;return"const"===kind?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),init=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(messages_1.Messages.DeclarationMissingInitializer,"const")):(!options.inFor&&id.type!==syntax_1.Syntax.Identifier||this.match("="))&&(this.expect("="),init=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(node,new Node.VariableDeclarator(id,init))},Parser.prototype.parseBindingList=function(kind,options){for(var list=[this.parseLexicalBinding(kind,options)];this.match(",");)this.nextToken(),list.push(this.parseLexicalBinding(kind,options));return list},Parser.prototype.isLexicalDeclaration=function(){var state=this.scanner.saveState();this.scanner.scanComments();var next=this.scanner.lex();return this.scanner.restoreState(state),3===next.type||7===next.type&&"["===next.value||7===next.type&&"{"===next.value||4===next.type&&"let"===next.value||4===next.type&&"yield"===next.value},Parser.prototype.parseLexicalDeclaration=function(options){var node=this.createNode(),kind=this.nextToken().value;assert_1.assert("let"===kind||"const"===kind,"Lexical declaration must be either let or const");var declarations=this.parseBindingList(kind,options);return this.consumeSemicolon(),this.finalize(node,new Node.VariableDeclaration(declarations,kind))},Parser.prototype.parseBindingRestElement=function(params,kind){var node=this.createNode();this.expect("...");var arg=this.parsePattern(params,kind);return this.finalize(node,new Node.RestElement(arg))},Parser.prototype.parseArrayPattern=function(params,kind){var node=this.createNode();this.expect("[");for(var elements=[];!this.match("]");)if(this.match(","))this.nextToken(),elements.push(null);else{if(this.match("...")){elements.push(this.parseBindingRestElement(params,kind));break}else elements.push(this.parsePatternWithDefault(params,kind));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(node,new Node.ArrayPattern(elements))},Parser.prototype.parsePropertyPattern=function(params,kind){var node=this.createNode(),computed=!1,shorthand=!1,key,value;if(3===this.lookahead.type){var keyToken=this.lookahead;key=this.parseVariableIdentifier();var init=this.finalize(node,new Node.Identifier(keyToken.value));if(this.match("=")){params.push(keyToken),shorthand=!0,this.nextToken();var expr=this.parseAssignmentExpression();value=this.finalize(this.startNode(keyToken),new Node.AssignmentPattern(init,expr))}else this.match(":")?(this.expect(":"),value=this.parsePatternWithDefault(params,kind)):(params.push(keyToken),shorthand=!0,value=init)}else computed=this.match("["),key=this.parseObjectPropertyKey(),this.expect(":"),value=this.parsePatternWithDefault(params,kind);return this.finalize(node,new Node.Property("init",key,computed,value,!1,shorthand))},Parser.prototype.parseObjectPattern=function(params,kind){var node=this.createNode(),properties=[];for(this.expect("{");!this.match("}");)properties.push(this.parsePropertyPattern(params,kind)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(node,new Node.ObjectPattern(properties))},Parser.prototype.parsePattern=function(params,kind){var pattern;return this.match("[")?pattern=this.parseArrayPattern(params,kind):this.match("{")?pattern=this.parseObjectPattern(params,kind):(this.matchKeyword("let")&&("const"===kind||"let"===kind)&&this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.LetInLexicalBinding),params.push(this.lookahead),pattern=this.parseVariableIdentifier(kind)),pattern},Parser.prototype.parsePatternWithDefault=function(params,kind){var startToken=this.lookahead,pattern=this.parsePattern(params,kind);if(this.match("=")){this.nextToken();var previousAllowYield=this.context.allowYield;this.context.allowYield=!0;var right=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=previousAllowYield,pattern=this.finalize(this.startNode(startToken),new Node.AssignmentPattern(pattern,right))}return pattern},Parser.prototype.parseVariableIdentifier=function(kind){var node=this.createNode(),token=this.nextToken();return 4===token.type&&"yield"===token.value?this.context.strict?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord):!this.context.allowYield&&this.throwUnexpectedToken(token):3===token.type?(this.context.isModule||this.context.await)&&3===token.type&&"await"===token.value&&this.tolerateUnexpectedToken(token):this.context.strict&&4===token.type&&this.scanner.isStrictModeReservedWord(token.value)?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord):(this.context.strict||"let"!==token.value||"var"!==kind)&&this.throwUnexpectedToken(token),this.finalize(node,new Node.Identifier(token.value))},Parser.prototype.parseVariableDeclaration=function(options){var node=this.createNode(),id=this.parsePattern([],"var");this.context.strict&&id.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(id.name)&&this.tolerateError(messages_1.Messages.StrictVarName);var init=null;return this.match("=")?(this.nextToken(),init=this.isolateCoverGrammar(this.parseAssignmentExpression)):id.type!==syntax_1.Syntax.Identifier&&!options.inFor&&this.expect("="),this.finalize(node,new Node.VariableDeclarator(id,init))},Parser.prototype.parseVariableDeclarationList=function(options){var opt={inFor:options.inFor},list=[];for(list.push(this.parseVariableDeclaration(opt));this.match(",");)this.nextToken(),list.push(this.parseVariableDeclaration(opt));return list},Parser.prototype.parseVariableStatement=function(){var node=this.createNode();this.expectKeyword("var");var declarations=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(node,new Node.VariableDeclaration(declarations,"var"))},Parser.prototype.parseEmptyStatement=function(){var node=this.createNode();return this.expect(";"),this.finalize(node,new Node.EmptyStatement)},Parser.prototype.parseExpressionStatement=function(){var node=this.createNode(),expr=this.parseExpression();return this.consumeSemicolon(),this.finalize(node,new Node.ExpressionStatement(expr))},Parser.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(messages_1.Messages.StrictFunction),this.parseStatement()},Parser.prototype.parseIfStatement=function(){var node=this.createNode(),alternate=null,consequent;this.expectKeyword("if"),this.expect("(");var test=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),consequent=this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),consequent=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),alternate=this.parseIfClause())),this.finalize(node,new Node.IfStatement(test,consequent,alternate))},Parser.prototype.parseDoWhileStatement=function(){var node=this.createNode();this.expectKeyword("do");var previousInIteration=this.context.inIteration;this.context.inIteration=!0;var body=this.parseStatement();this.context.inIteration=previousInIteration,this.expectKeyword("while"),this.expect("(");var test=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(node,new Node.DoWhileStatement(body,test))},Parser.prototype.parseWhileStatement=function(){var node=this.createNode(),body;this.expectKeyword("while"),this.expect("(");var test=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),body=this.finalize(this.createNode(),new Node.EmptyStatement);else{this.expect(")");var previousInIteration=this.context.inIteration;this.context.inIteration=!0,body=this.parseStatement(),this.context.inIteration=previousInIteration}return this.finalize(node,new Node.WhileStatement(test,body))},Parser.prototype.parseForStatement=function(){var init=null,test=null,update=null,forIn=!0,node=this.createNode(),left,right;if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){init=this.createNode(),this.nextToken();var previousAllowIn=this.context.allowIn;this.context.allowIn=!1;var declarations=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=previousAllowIn,1===declarations.length&&this.matchKeyword("in")){var decl=declarations[0];decl.init&&(decl.id.type===syntax_1.Syntax.ArrayPattern||decl.id.type===syntax_1.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(messages_1.Messages.ForInOfLoopInitializer,"for-in"),init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.nextToken(),left=init,right=this.parseExpression(),init=null}else 1===declarations.length&&null===declarations[0].init&&this.matchContextualKeyword("of")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.nextToken(),left=init,right=this.parseAssignmentExpression(),init=null,forIn=!1):(init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){init=this.createNode();var kind=this.nextToken().value;if(!this.context.strict&&"in"===this.lookahead.value)init=this.finalize(init,new Node.Identifier(kind)),this.nextToken(),left=init,right=this.parseExpression(),init=null;else{var previousAllowIn=this.context.allowIn;this.context.allowIn=!1;var declarations=this.parseBindingList(kind,{inFor:!0});this.context.allowIn=previousAllowIn,1===declarations.length&&null===declarations[0].init&&this.matchKeyword("in")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)),this.nextToken(),left=init,right=this.parseExpression(),init=null):1===declarations.length&&null===declarations[0].init&&this.matchContextualKeyword("of")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)),this.nextToken(),left=init,right=this.parseAssignmentExpression(),init=null,forIn=!1):(this.consumeSemicolon(),init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)))}}else{var initStartToken=this.lookahead,previousAllowIn=this.context.allowIn;if(this.context.allowIn=!1,init=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=previousAllowIn,this.matchKeyword("in"))this.context.isAssignmentTarget&&init.type!==syntax_1.Syntax.AssignmentExpression||this.tolerateError(messages_1.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(init),left=init,right=this.parseExpression(),init=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&init.type!==syntax_1.Syntax.AssignmentExpression||this.tolerateError(messages_1.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(init),left=init,right=this.parseAssignmentExpression(),init=null,forIn=!1;else{if(this.match(",")){for(var initSeq=[init];this.match(",");)this.nextToken(),initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));init=this.finalize(this.startNode(initStartToken),new Node.SequenceExpression(initSeq))}this.expect(";")}}"undefined"==typeof left&&(!this.match(";")&&(test=this.parseExpression()),this.expect(";"),!this.match(")")&&(update=this.parseExpression()));var body;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),body=this.finalize(this.createNode(),new Node.EmptyStatement);else{this.expect(")");var previousInIteration=this.context.inIteration;this.context.inIteration=!0,body=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=previousInIteration}return"undefined"==typeof left?this.finalize(node,new Node.ForStatement(init,test,update,body)):forIn?this.finalize(node,new Node.ForInStatement(left,right,body)):this.finalize(node,new Node.ForOfStatement(left,right,body))},Parser.prototype.parseContinueStatement=function(){var node=this.createNode();this.expectKeyword("continue");var label=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var id=this.parseVariableIdentifier();label=id;var key="$"+id.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,key)||this.throwError(messages_1.Messages.UnknownLabel,id.name)}return this.consumeSemicolon(),null!==label||this.context.inIteration||this.throwError(messages_1.Messages.IllegalContinue),this.finalize(node,new Node.ContinueStatement(label))},Parser.prototype.parseBreakStatement=function(){var node=this.createNode();this.expectKeyword("break");var label=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var id=this.parseVariableIdentifier(),key="$"+id.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,key)||this.throwError(messages_1.Messages.UnknownLabel,id.name),label=id}return this.consumeSemicolon(),null!==label||this.context.inIteration||this.context.inSwitch||this.throwError(messages_1.Messages.IllegalBreak),this.finalize(node,new Node.BreakStatement(label))},Parser.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(messages_1.Messages.IllegalReturn);var node=this.createNode();this.expectKeyword("return");var hasArgument=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,argument=hasArgument?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(node,new Node.ReturnStatement(argument))},Parser.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(messages_1.Messages.StrictModeWith);var node=this.createNode(),body;this.expectKeyword("with"),this.expect("(");var object=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),body=this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),body=this.parseStatement()),this.finalize(node,new Node.WithStatement(object,body))},Parser.prototype.parseSwitchCase=function(){var node=this.createNode(),test;this.matchKeyword("default")?(this.nextToken(),test=null):(this.expectKeyword("case"),test=this.parseExpression()),this.expect(":");for(var consequent=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)consequent.push(this.parseStatementListItem());return this.finalize(node,new Node.SwitchCase(test,consequent))},Parser.prototype.parseSwitchStatement=function(){var node=this.createNode();this.expectKeyword("switch"),this.expect("(");var discriminant=this.parseExpression();this.expect(")");var previousInSwitch=this.context.inSwitch;this.context.inSwitch=!0;var cases=[],defaultFound=!1;for(this.expect("{");!this.match("}");){var clause=this.parseSwitchCase();null===clause.test&&(defaultFound&&this.throwError(messages_1.Messages.MultipleDefaultsInSwitch),defaultFound=!0),cases.push(clause)}return this.expect("}"),this.context.inSwitch=previousInSwitch,this.finalize(node,new Node.SwitchStatement(discriminant,cases))},Parser.prototype.parseLabelledStatement=function(){var node=this.createNode(),expr=this.parseExpression(),statement;if(expr.type===syntax_1.Syntax.Identifier&&this.match(":")){this.nextToken();var id=expr,key="$"+id.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,key)&&this.throwError(messages_1.Messages.Redeclaration,"Label",id.name),this.context.labelSet[key]=!0;var body;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),body=this.parseClassDeclaration();else if(this.matchKeyword("function")){var token=this.lookahead,declaration=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictFunction):declaration.generator&&this.tolerateUnexpectedToken(token,messages_1.Messages.GeneratorInLegacyContext),body=declaration}else body=this.parseStatement();delete this.context.labelSet[key],statement=new Node.LabeledStatement(id,body)}else this.consumeSemicolon(),statement=new Node.ExpressionStatement(expr);return this.finalize(node,statement)},Parser.prototype.parseThrowStatement=function(){var node=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(messages_1.Messages.NewlineAfterThrow);var argument=this.parseExpression();return this.consumeSemicolon(),this.finalize(node,new Node.ThrowStatement(argument))},Parser.prototype.parseCatchClause=function(){var node=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var params=[],param=this.parsePattern(params),paramMap={},i=0,key;i=this.length},Scanner.prototype.throwUnexpectedToken=function(message){return void 0===message&&(message=messages_1.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,message)},Scanner.prototype.tolerateUnexpectedToken=function(message){void 0===message&&(message=messages_1.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,message)},Scanner.prototype.skipSingleLineComment=function(offset){var comments=[],start,loc;for(this.trackComment&&(comments=[],start=this.index-offset,loc={start:{line:this.lineNumber,column:this.index-this.lineStart-offset},end:{}});!this.eof();){var ch=this.source.charCodeAt(this.index);if(++this.index,character_1.Character.isLineTerminator(ch)){if(this.trackComment){loc.end={line:this.lineNumber,column:this.index-this.lineStart-1};var entry={multiLine:!1,slice:[start+offset,this.index-1],range:[start,this.index-1],loc:loc};comments.push(entry)}return 13===ch&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,comments}}if(this.trackComment){loc.end={line:this.lineNumber,column:this.index-this.lineStart};var entry={multiLine:!1,slice:[start+offset,this.index],range:[start,this.index],loc:loc};comments.push(entry)}return comments},Scanner.prototype.skipMultiLineComment=function(){var comments=[],start,loc;for(this.trackComment&&(comments=[],start=this.index-2,loc={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var ch=this.source.charCodeAt(this.index);if(character_1.Character.isLineTerminator(ch))13===ch&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===ch){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){loc.end={line:this.lineNumber,column:this.index-this.lineStart};var entry={multiLine:!0,slice:[start+2,this.index-2],range:[start,this.index],loc:loc};comments.push(entry)}return comments}++this.index}else++this.index}if(this.trackComment){loc.end={line:this.lineNumber,column:this.index-this.lineStart};var entry={multiLine:!0,slice:[start+2,this.index],range:[start,this.index],loc:loc};comments.push(entry)}return this.tolerateUnexpectedToken(),comments},Scanner.prototype.scanComments=function(){var comments;this.trackComment&&(comments=[]);for(var start=0===this.index,ch;!this.eof();)if(ch=this.source.charCodeAt(this.index),character_1.Character.isWhiteSpace(ch))++this.index;else if(character_1.Character.isLineTerminator(ch))++this.index,13===ch&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,start=!0;else if(47===ch){if(ch=this.source.charCodeAt(this.index+1),47===ch){this.index+=2;var comment=this.skipSingleLineComment(2);this.trackComment&&(comments=comments.concat(comment)),start=!0}else if(42===ch){this.index+=2;var comment=this.skipMultiLineComment();this.trackComment&&(comments=comments.concat(comment))}else break;}else if(start&&45===ch){if(45===this.source.charCodeAt(this.index+1)&&62===this.source.charCodeAt(this.index+2)){this.index+=3;var comment=this.skipSingleLineComment(3);this.trackComment&&(comments=comments.concat(comment))}else break;}else if(60!==ch)break;else if("!--"===this.source.slice(this.index+1,this.index+4)){this.index+=4;var comment=this.skipSingleLineComment(4);this.trackComment&&(comments=comments.concat(comment))}else break;return comments},Scanner.prototype.isFutureReservedWord=function(id){return"enum"===id||"export"===id||"import"===id||"super"===id},Scanner.prototype.isStrictModeReservedWord=function(id){return"implements"===id||"interface"===id||"package"===id||"private"===id||"protected"===id||"public"===id||"static"===id||"yield"===id||"let"===id},Scanner.prototype.isRestrictedWord=function(id){return"eval"===id||"arguments"===id},Scanner.prototype.isKeyword=function(id){switch(id.length){case 2:return"if"===id||"in"===id||"do"===id;case 3:return"var"===id||"for"===id||"new"===id||"try"===id||"let"===id;case 4:return"this"===id||"else"===id||"case"===id||"void"===id||"with"===id||"enum"===id;case 5:return"while"===id||"break"===id||"catch"===id||"throw"===id||"const"===id||"yield"===id||"class"===id||"super"===id;case 6:return"return"===id||"typeof"===id||"delete"===id||"switch"===id||"export"===id||"import"===id;case 7:return"default"===id||"finally"===id||"extends"===id;case 8:return"function"===id||"continue"===id||"debugger"===id;case 10:return"instanceof"===id;default:return!1;}},Scanner.prototype.codePointAt=function(i){var cp=this.source.charCodeAt(i);if(55296<=cp&&56319>=cp){var second=this.source.charCodeAt(i+1);if(56320<=second&&57343>=second){var first=cp;cp=1024*(first-55296)+second-56320+65536}}return cp},Scanner.prototype.scanHexEscape=function(prefix){for(var len="u"===prefix?4:2,code=0,i=0;ich)return this.index=start,this.getComplexIdentifier();if(character_1.Character.isIdentifierPart(ch))++this.index;else break}return this.source.slice(start,this.index)},Scanner.prototype.getComplexIdentifier=function(){var cp=this.codePointAt(this.index),id=character_1.Character.fromCodePoint(cp);this.index+=id.length;var ch;for(92===cp&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ch=this.scanUnicodeCodePointEscape()):(ch=this.scanHexEscape("u"),(null===ch||"\\"===ch||!character_1.Character.isIdentifierStart(ch.charCodeAt(0)))&&this.throwUnexpectedToken()),id=ch);!this.eof()&&(cp=this.codePointAt(this.index),!!character_1.Character.isIdentifierPart(cp));)ch=character_1.Character.fromCodePoint(cp),id+=ch,this.index+=ch.length,92===cp&&(id=id.substr(0,id.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ch=this.scanUnicodeCodePointEscape()):(ch=this.scanHexEscape("u"),(null===ch||"\\"===ch||!character_1.Character.isIdentifierPart(ch.charCodeAt(0)))&&this.throwUnexpectedToken()),id+=ch);return id},Scanner.prototype.octalToDecimal=function(ch){var octal="0"!==ch,code=octalValue(ch);return!this.eof()&&character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(octal=!0,code=8*code+octalValue(this.source[this.index++]),0<="0123".indexOf(ch)&&!this.eof()&&character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(code=8*code+octalValue(this.source[this.index++]))),{code:code,octal:octal}},Scanner.prototype.scanIdentifier=function(){var start=this.index,id=92===this.source.charCodeAt(start)?this.getComplexIdentifier():this.getIdentifier(),type;if(type=1===id.length?3:this.isKeyword(id)?4:"null"===id?5:"true"===id||"false"===id?1:3,3!==type&&start+id.length!==this.index){var restore=this.index;this.index=start,this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord),this.index=restore}return{type:type,value:id,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanPunctuator=function(){var start=this.index,str=this.source[this.index];return"("===str||"{"===str?("{"===str&&this.curlyStack.push("{"),++this.index):"."===str?(++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,str="...")):"}"===str?(++this.index,this.curlyStack.pop()):")"===str||";"===str||","===str||"["===str||"]"===str||":"===str||"?"===str||"~"===str?++this.index:(str=this.source.substr(this.index,4),">>>="===str?this.index+=4:(str=str.substr(0,3),"==="===str||"!=="===str||">>>"===str||"<<="===str||">>="===str||"**="===str?this.index+=3:(str=str.substr(0,2),"&&"===str||"||"===str||"=="===str||"!="===str||"+="===str||"-="===str||"*="===str||"/="===str||"++"===str||"--"===str||"<<"===str||">>"===str||"&="===str||"|="===str||"^="===str||"%="===str||"<="===str||">="===str||"=>"===str||"**"===str?this.index+=2:(str=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(str)&&++this.index)))),this.index===start&&this.throwUnexpectedToken(),{type:7,value:str,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanHexLiteral=function(start){for(var num="";!this.eof()&&!!character_1.Character.isHexDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];return 0===num.length&&this.throwUnexpectedToken(),character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+num,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanBinaryLiteral=function(start){for(var num="",ch;!this.eof()&&(ch=this.source[this.index],"0"===ch||"1"===ch);)num+=this.source[this.index++];return 0===num.length&&this.throwUnexpectedToken(),this.eof()||(ch=this.source.charCodeAt(this.index),(character_1.Character.isIdentifierStart(ch)||character_1.Character.isDecimalDigit(ch))&&this.throwUnexpectedToken()),{type:6,value:parseInt(num,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanOctalLiteral=function(prefix,start){var num="",octal=!1;for(character_1.Character.isOctalDigit(prefix.charCodeAt(0))?(octal=!0,num="0"+this.source[this.index++]):++this.index;!this.eof()&&!!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];return octal||0!==num.length||this.throwUnexpectedToken(),(character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))||character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(num,8),octal:octal,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.isImplicitOctalLiteral=function(){for(var i=this.index+1,ch;i=codePoint?_StringfromCharCode2(codePoint):astralSubstitute}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,astralSubstitute));try{RegExp(tmp)}catch(e){this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}},Scanner.prototype.scanRegExpBody=function(){var ch=this.source[this.index];assert_1.assert("/"===ch,"Regular expression literal must start with a slash");for(var str=this.source[this.index++],classMarker=!1,terminated=!1;!this.eof();)if(ch=this.source[this.index++],str+=ch,"\\"===ch)ch=this.source[this.index++],character_1.Character.isLineTerminator(ch.charCodeAt(0))&&this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp),str+=ch;else if(character_1.Character.isLineTerminator(ch.charCodeAt(0)))this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);else if(classMarker)"]"===ch&&(classMarker=!1);else if("/"===ch){terminated=!0;break}else"["===ch&&(classMarker=!0);return terminated||this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp),str.substr(1,str.length-2)},Scanner.prototype.scanRegExpFlags=function(){for(var str="",flags="",ch;!this.eof()&&(ch=this.source[this.index],!!character_1.Character.isIdentifierPart(ch.charCodeAt(0)));)if(++this.index,"\\"!==ch||this.eof())flags+=ch,str+=ch;else if(ch=this.source[this.index],"u"===ch){++this.index;var restore=this.index,char=this.scanHexEscape("u");if(null!==char)for(flags+=char,str+="\\u";restorecp&&character_1.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},Scanner}();exports.Scanner=Scanner},function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenName={},exports.TokenName[1]="Boolean",exports.TokenName[2]="",exports.TokenName[3]="Identifier",exports.TokenName[4]="Keyword",exports.TokenName[5]="Null",exports.TokenName[6]="Numeric",exports.TokenName[7]="Punctuator",exports.TokenName[8]="String",exports.TokenName[9]="RegularExpression",exports.TokenName[10]="Template"},function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.XHTMLEntities={quot:"\"",amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0});var error_handler_1=__webpack_require__(10),scanner_1=__webpack_require__(12),token_1=__webpack_require__(13),Reader=function(){function Reader(){this.values=[],this.curly=this.paren=-1}return Reader.prototype.beforeFunctionExpression=function(t){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)},Reader.prototype.isRegexStart=function(){var previous=this.values[this.values.length-1],regex=null!==previous;switch(previous){case"this":case"]":regex=!1;break;case")":var keyword=this.values[this.paren-1];regex="if"===keyword||"while"===keyword||"for"===keyword||"with"===keyword;break;case"}":if(regex=!1,"function"===this.values[this.curly-3]){var check=this.values[this.curly-4];regex=!!check&&!this.beforeFunctionExpression(check)}else if("function"===this.values[this.curly-4]){var check=this.values[this.curly-5];regex=!check||!this.beforeFunctionExpression(check)}break;default:}return regex},Reader.prototype.push=function(token){7===token.type||4===token.type?("{"===token.value?this.curly=this.values.length:"("===token.value&&(this.paren=this.values.length),this.values.push(token.value)):this.values.push(null)},Reader}(),Tokenizer=function(){function Tokenizer(code,config){this.errorHandler=new error_handler_1.ErrorHandler,this.errorHandler.tolerant=!!config&&"boolean"==typeof config.tolerant&&config.tolerant,this.scanner=new scanner_1.Scanner(code,this.errorHandler),this.scanner.trackComment=!!config&&"boolean"==typeof config.comment&&config.comment,this.trackRange=!!config&&"boolean"==typeof config.range&&config.range,this.trackLoc=!!config&&"boolean"==typeof config.loc&&config.loc,this.buffer=[],this.reader=new Reader}return Tokenizer.prototype.errors=function(){return this.errorHandler.errors},Tokenizer.prototype.getNextToken=function(){if(0===this.buffer.length){var comments=this.scanner.scanComments();if(this.scanner.trackComment)for(var i=0;i=blurring&&close()},200)}),CodeMirror.on(b,"focus",function(){++blurring})}),CodeMirror.defineExtension("openNotification",function(template,options){function close(){closed||(closed=!0,clearTimeout(doneTimer),CodeMirror.rmClass(dialog.parentNode,"dialog-opened"),dialog.parentNode.removeChild(dialog))}closeNotification(this,close);var dialog=dialogDiv(this,template,options&&options.bottom),closed=!1,duration=options&&"undefined"!=typeof options.duration?options.duration:5e3,doneTimer;return CodeMirror.on(dialog,"click",function(e){CodeMirror.e_preventDefault(e),close()}),duration&&(doneTimer=setTimeout(close,duration)),close})})},"58xA":function(module,exports,__webpack_require__){"use strict";function deepExtend(target,source){if(!(source instanceof Object))return source;switch(source.constructor){case Date:return new Date(source.getTime());case Object:void 0===target&&(target={});break;case Array:target=[];break;default:return source;}for(var prop in source)source.hasOwnProperty(prop)&&(target[prop]=deepExtend(target[prop],source[prop]));return target}function jsonEval(str){return JSON.parse(str)}function implementsAnyMethods(obj,methods){if("object"!=typeof obj||null===obj)return!1;for(var _i=0,methods_1=methods,method;_i 4. Need to update it?");}var error=fnName+" failed: ";return error+=argName+" argument ",error}var _StringfromCharCode3=String.fromCharCode;Object.defineProperty(exports,"__esModule",{value:!0});var tslib_1=__webpack_require__("vCxL"),CONSTANTS={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},assert=function(assertion,message){if(!assertion)throw assertionError(message)},assertionError=function(message){return new Error("Firebase Database ("+CONSTANTS.SDK_VERSION+") INTERNAL ASSERT FAILED: "+message)},stringToByteArray=function(str){for(var out=[],p=0,i=0,c;ic?out[p++]=c:2048>c?(out[p++]=192|c>>6,out[p++]=128|63&c):55296==(64512&c)&&i+1>18,out[p++]=128|63&c>>12,out[p++]=128|63&c>>6,out[p++]=128|63&c):(out[p++]=224|c>>12,out[p++]=128|63&c>>6,out[p++]=128|63&c);return out},byteArrayToString=function(bytes){for(var out=[],pos=0,c=0,c1;posc1)out[c++]=_StringfromCharCode3(c1);else if(191c1){var c2=bytes[pos++];out[c++]=_StringfromCharCode3((31&c1)<<6|63&c2)}else if(239c1){var c2=bytes[pos++],c3=bytes[pos++],c4=bytes[pos++],u=((7&c1)<<18|(63&c2)<<12|(63&c3)<<6|63&c4)-65536;out[c++]=_StringfromCharCode3(55296+(u>>10)),out[c++]=_StringfromCharCode3(56320+(1023&u))}else{var c2=bytes[pos++],c3=bytes[pos++];out[c++]=_StringfromCharCode3((15&c1)<<12|(63&c2)<<6|63&c3)}return out.join("")},base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(input,opt_webSafe){if(!Array.isArray(input))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var byteToCharMap=opt_webSafe?this.byteToCharMapWebSafe_:this.byteToCharMap_,output=[],i=0;i>6,outByte4=63&byte3;haveByte3||(outByte4=64,!haveByte2&&(outByte3=64)),output.push(byteToCharMap[byte1>>2],byteToCharMap[(3&byte1)<<4|byte2>>4],byteToCharMap[outByte3],byteToCharMap[outByte4])}return output.join("")},encodeString:function(input,opt_webSafe){return this.HAS_NATIVE_SUPPORT&&!opt_webSafe?btoa(input):this.encodeByteArray(stringToByteArray(input),opt_webSafe)},decodeString:function(input,opt_webSafe){return this.HAS_NATIVE_SUPPORT&&!opt_webSafe?atob(input):byteArrayToString(this.decodeStringToByteArray(input,opt_webSafe))},decodeStringToByteArray:function(input,opt_webSafe){this.init_();for(var charToByteMap=opt_webSafe?this.charToByteMapWebSafe_:this.charToByteMap_,output=[],i=0;i>4),64!=byte3){if(output.push(240&byte2<<4|byte3>>2),64!=byte4){output.push(192&byte3<<6|byte4)}}}return output},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var i=0;i=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}},base64Decode=function(str){try{return base64.decodeString(str,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},Deferred=function(){function Deferred(){var _this=this;this.promise=new Promise(function(resolve,reject){_this.resolve=resolve,_this.reject=reject})}return Deferred.prototype.wrapCallback=function(callback){var _this=this;return function(error,value){error?_this.reject(error):_this.resolve(value),"function"==typeof callback&&(_this.promise.catch(function(){}),1===callback.length?callback(error):callback(error,value))}},Deferred}(),getUA=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},ERROR_NAME="FirebaseError",captureStackTrace=Error.captureStackTrace,FirebaseError=function(){return function(code,message){if(this.code=code,this.message=message,captureStackTrace)captureStackTrace(this,ErrorFactory.prototype.create);else try{throw Error.apply(this,arguments)}catch(err){this.name=ERROR_NAME,Object.defineProperty(this,"stack",{get:function(){return err.stack}})}}}();FirebaseError.prototype=Object.create(Error.prototype),FirebaseError.prototype.constructor=FirebaseError,FirebaseError.prototype.name=ERROR_NAME;var ErrorFactory=function(){function ErrorFactory(service,serviceName,errors){this.service=service,this.serviceName=serviceName,this.errors=errors,this.pattern=/\{\$([^}]+)}/g}return ErrorFactory.prototype.create=function(code,data){void 0===data&&(data={});var template=this.errors[code],fullCode=this.service+"/"+code,message;message=void 0===template?"Error":template.replace(this.pattern,function(match,key){var value=data[key];return void 0===value?"<"+key+"?>":value.toString()}),message=this.serviceName+": "+message+" ("+fullCode+").";var err=new FirebaseError(fullCode,message);for(var prop in data)data.hasOwnProperty(prop)&&"_"!==prop.slice(-1)&&(err[prop]=data[prop]);return err},ErrorFactory}(),decode=function(token){var header={},claims={},data={},signature="";try{var parts=token.split(".");header=jsonEval(base64Decode(parts[0])||""),claims=jsonEval(base64Decode(parts[1])||""),signature=parts[2],data=claims.d||{},delete claims.d}catch(e){}return{header:header,claims:claims,data:data,signature:signature}},forEach=function(obj,fn){for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&fn(key,obj[key])},extend=function(objTo,objFrom){return forEach(objFrom,function(key,value){objTo[key]=value}),objTo},findKey=function(obj,fn,opt_this){for(var key in obj)if(fn.call(opt_this,obj[key],key,obj))return key},Hash=function(){return function(){this.blockSize=-1}}(),Sha1=function(_super){function Sha1(){var _this=_super.call(this)||this;_this.chain_=[],_this.buf_=[],_this.W_=[],_this.pad_=[],_this.inbuf_=0,_this.total_=0,_this.blockSize=64,_this.pad_[0]=128;for(var i=1;i<_this.blockSize;++i)_this.pad_[i]=0;return _this.reset(),_this}return tslib_1.__extends(Sha1,_super),Sha1.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},Sha1.prototype.compress_=function(buf,opt_offset){opt_offset||(opt_offset=0);var W=this.W_;if("string"==typeof buf)for(var i=0;16>i;i++)W[i]=buf.charCodeAt(opt_offset)<<24|buf.charCodeAt(opt_offset+1)<<16|buf.charCodeAt(opt_offset+2)<<8|buf.charCodeAt(opt_offset+3),opt_offset+=4;else for(var i=0;16>i;i++)W[i]=buf[opt_offset]<<24|buf[opt_offset+1]<<16|buf[opt_offset+2]<<8|buf[opt_offset+3],opt_offset+=4;for(var i=16,t;80>i;i++)t=W[i-3]^W[i-8]^W[i-14]^W[i-16],W[i]=4294967295&(t<<1|t>>>31);for(var a=this.chain_[0],b=this.chain_[1],c=this.chain_[2],d=this.chain_[3],e=this.chain_[4],i=0,f,k;80>i;i++){40>i?20>i?(f=d^b&(c^d),k=1518500249):(f=b^c^d,k=1859775393):60>i?(f=b&c|d&(b|c),k=2400959708):(f=b^c^d,k=3395469782);var t=4294967295&(a<<5|a>>>27)+f+e+k+W[i];e=d,d=c,c=4294967295&(b<<30|b>>>2),b=a,a=t}this.chain_[0]=4294967295&this.chain_[0]+a,this.chain_[1]=4294967295&this.chain_[1]+b,this.chain_[2]=4294967295&this.chain_[2]+c,this.chain_[3]=4294967295&this.chain_[3]+d,this.chain_[4]=4294967295&this.chain_[4]+e},Sha1.prototype.update=function(bytes,opt_length){if(null!=bytes){void 0===opt_length&&(opt_length=bytes.length);for(var lengthMinusBlock=opt_length-this.blockSize,n=0,buf=this.buf_,inbuf=this.inbuf_;nthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var i=this.blockSize-1;56<=i;i--)this.buf_[i]=255&totalBits,totalBits/=256;this.compress_(this.buf_);for(var n=0,i=0;5>i;i++)for(var j=24;0<=j;j-=8)digest[n]=255&this.chain_[i]>>j,++n;return digest},Sha1}(Hash),ObserverProxy=function(){function ObserverProxy(executor,onNoObservers){var _this=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=onNoObservers,this.task.then(function(){executor(_this)}).catch(function(e){_this.error(e)})}return ObserverProxy.prototype.next=function(value){this.forEachObserver(function(observer){observer.next(value)})},ObserverProxy.prototype.error=function(error){this.forEachObserver(function(observer){observer.error(error)}),this.close(error)},ObserverProxy.prototype.complete=function(){this.forEachObserver(function(observer){observer.complete()}),this.close()},ObserverProxy.prototype.subscribe=function(nextOrObserver,error,complete){var _this=this,observer;if(void 0===nextOrObserver&&void 0===error&&void 0===complete)throw new Error("Missing Observer.");observer=implementsAnyMethods(nextOrObserver,["next","error","complete"])?nextOrObserver:{next:nextOrObserver,error:error,complete:complete},void 0===observer.next&&(observer.next=noop),void 0===observer.error&&(observer.error=noop),void 0===observer.complete&&(observer.complete=noop);var unsub=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{_this.finalError?observer.error(_this.finalError):observer.complete()}catch(e){}}),this.observers.push(observer),unsub},ObserverProxy.prototype.unsubscribeOne=function(i){void 0===this.observers||void 0===this.observers[i]||(delete this.observers[i],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},ObserverProxy.prototype.forEachObserver=function(fn){if(!this.finalized)for(var i=0;i=validSince&&now<=validUntil},exports.clone=function(obj){return extend({},obj)},exports.contains=function(obj,key){return Object.prototype.hasOwnProperty.call(obj,key)},exports.every=function(obj,fn){for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)&&!fn(key,obj[key]))return!1;return!0},exports.extend=extend,exports.findKey=findKey,exports.findValue=function(obj,fn,opt_this){var key=findKey(obj,fn,opt_this);return key&&obj[key]},exports.forEach=forEach,exports.getAnyKey=function(obj){for(var key in obj)return key},exports.getCount=function(obj){var rv=0;for(var key in obj)rv++;return rv},exports.getValues=function(obj){var res=[],i=0;for(var key in obj)res[i++]=obj[key];return res},exports.isEmpty=function(obj){for(var key in obj)return!1;return!0},exports.isNonNullObject=function(obj){return"object"==typeof obj&&null!==obj},exports.map=function(obj,f,opt_obj){var res={};for(var key in obj)res[key]=f.call(opt_obj,obj[key],key,obj);return res},exports.safeGet=function(obj,key){if(Object.prototype.hasOwnProperty.call(obj,key))return obj[key]},exports.querystring=function(querystringParams){var params=[];return forEach(querystringParams,function(key,value){Array.isArray(value)?value.forEach(function(arrayVal){params.push(encodeURIComponent(key)+"="+encodeURIComponent(arrayVal))}):params.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}),params.length?"&"+params.join("&"):""},exports.querystringDecode=function(querystring){var obj={},tokens=querystring.replace(/^\?/,"").split("&");return tokens.forEach(function(token){if(token){var key=token.split("=");obj[key[0]]=key[1]}}),obj},exports.Sha1=Sha1,exports.async=function(fn,onError){return function(){for(var args=[],_i=0;_imaxCount&&(argError=0===maxCount?"none":"no more than "+maxCount),argError){var error=fnName+" failed: Was called with "+argCount+(1===argCount?" argument.":" arguments.")+" Expects "+argError+".";throw new Error(error)}},exports.validateCallback=function(fnName,argumentNumber,callback,optional){if((!optional||callback)&&"function"!=typeof callback)throw new Error(errorPrefix(fnName,argumentNumber,optional)+"must be a valid function.")},exports.validateContextObject=function(fnName,argumentNumber,context,optional){if((!optional||context)&&("object"!=typeof context||null===context))throw new Error(errorPrefix(fnName,argumentNumber,optional)+"must be a valid context object.")},exports.validateNamespace=function(fnName,argumentNumber,namespace,optional){if((!optional||namespace)&&"string"!=typeof namespace)throw new Error(errorPrefix(fnName,argumentNumber,optional)+"must be a valid firebase namespace.")},exports.stringLength=function(str){for(var p=0,i=0,c;ic?p++:2048>c?p+=2:55296<=c&&56319>=c?(p+=4,i++):p+=3;return p},exports.stringToByteArray=function(str){for(var out=[],p=0,i=0,c;i=c){var high=c-55296;i++,assert(ic?out[p++]=c:2048>c?(out[p++]=192|c>>6,out[p++]=128|63&c):65536>c?(out[p++]=224|c>>12,out[p++]=128|63&c>>6,out[p++]=128|63&c):(out[p++]=240|c>>18,out[p++]=128|63&c>>12,out[p++]=128|63&c>>6,out[p++]=128|63&c)}return out}},"5E0L":function(module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}exports.__esModule=!0;var _createClass=function(){function defineProperties(target,props){for(var i=0,descriptor;imyIndent)){for(var lastLineInFold=null,i=start.line+1,end=cm.lastLine(),indent;i<=end;++i)if(indent=lineIndent(cm,i),-1==indent);else if(indent>myIndent)lastLineInFold=i;else break;if(lastLineInFold)return{from:CodeMirror.Pos(start.line,cm.getLine(start.line).length),to:CodeMirror.Pos(lastLineInFold,cm.getLine(lastLineInFold).length)}}})})},"6TpT":function(module){"use strict";module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},"6r0S":function(module,exports,__webpack_require__){"use strict";(function(mod){mod(__webpack_require__("tQq4"))})(function(CodeMirror){function forEach(arr,f){for(var i=0,e=arr.length;icur.ch&&(token.end=cur.ch,token.string=token.string.slice(0,cur.ch-token.start)):token={start:cur.ch,end:cur.ch,string:"",state:token.state,type:"."==token.string?"property":null};for(var tprop=token;"property"==tprop.type;){if(tprop=getToken(editor,Pos(cur.line,tprop.start)),"."!=tprop.string)return;if(tprop=getToken(editor,Pos(cur.line,tprop.start)),!context)var context=[];context.push(tprop)}return{list:getCompletions(token,context,keywords,options),from:Pos(cur.line,token.start),to:Pos(cur.line,token.end)}}}}function getCoffeeScriptToken(editor,cur){var token=editor.getTokenAt(cur);return cur.ch==token.start+1&&"."==token.string.charAt(0)?(token.end=token.start,token.string=".",token.type="property"):/^\.[\w$_]*$/.test(token.string)&&(token.type="property",token.start++,token.string=token.string.replace(/\./,"")),token}function forAllProps(obj,callback){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)for(var name in obj)callback(name);else for(var o=obj;o;o=Object.getPrototypeOf(o))Object.getOwnPropertyNames(o).forEach(callback)}function getCompletions(token,context,keywords,options){function maybeAdd(str){0!=str.lastIndexOf(start,0)||arrayContains(found,str)||found.push(str)}function gatherCompletions(obj){"string"==typeof obj?forEach(stringProps,maybeAdd):obj instanceof Array?forEach(arrayProps,maybeAdd):obj instanceof Function&&forEach(funcProps,maybeAdd),forAllProps(obj,maybeAdd)}var found=[],start=token.string,global=options&&options.globalScope||window;if(context&&context.length){var obj=context.pop(),base;for(obj.type&&0===obj.type.indexOf("variable")?(options&&options.additionalContext&&(base=options.additionalContext[obj.string]),(!options||!1!==options.useGlobalScope)&&(base=base||global[obj.string])):"string"==obj.type?base="":"atom"==obj.type?base=1:"function"==obj.type&&(null!=global.jQuery&&("$"==obj.string||"jQuery"==obj.string)&&"function"==typeof global.jQuery?base=global.jQuery():null!=global._&&"_"==obj.string&&"function"==typeof global._&&(base=global._()));null!=base&&context.length;)base=base[context.pop().string];null!=base&&gatherCompletions(base)}else{for(var v=token.state.localVars;v;v=v.next)maybeAdd(v.name);for(var v=token.state.globalVars;v;v=v.next)maybeAdd(v.name);options&&!1===options.useGlobalScope||gatherCompletions(global),forEach(keywords,maybeAdd)}return found}var Pos=CodeMirror.Pos;CodeMirror.registerHelper("hint","javascript",function(editor,options){return scriptHint(editor,javascriptKeywords,function(e,cur){return e.getTokenAt(cur)},options)}),CodeMirror.registerHelper("hint","coffeescript",function(editor,options){return scriptHint(editor,coffeescriptKeywords,getCoffeeScriptToken,options)});var stringProps=["charAt","charCodeAt","indexOf","lastIndexOf","substring","substr","slice","trim","trimLeft","trimRight","toUpperCase","toLowerCase","split","concat","match","replace","search"],arrayProps=["length","concat","join","splice","push","pop","shift","unshift","slice","reverse","sort","indexOf","lastIndexOf","every","some","filter","forEach","map","reduce","reduceRight",""],funcProps=["prototype","apply","call","bind"],javascriptKeywords=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","function","if","in","import","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"],coffeescriptKeywords=["and","break","catch","class","continue","delete","do","else","extends","false","finally","for","if","in","instanceof","isnt","new","no","not","null","of","off","on","or","return","switch","then","throw","true","try","typeof","until","void","while","with","yes"]})},"7EAy":function(module,exports){"use strict";exports.__esModule=!0;var inlineElements=new Set(["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"]),elementMap={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};exports.default=function(parentName){return parentName=(parentName||"").toLowerCase(),elementMap[parentName]||(inlineElements.has(parentName)?"span":"div")}},"7tlB":function(module,exports,__webpack_require__){"use strict";function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,null!=data&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length=this.max)return this.end();switch(this.type){case"string":data=this.data.substring(this.index,nextIndex);break;case"uint8array":data=this.data.subarray(this.index,nextIndex);break;case"array":case"nodebuffer":data=this.data.slice(this.index,nextIndex);}return this.index=nextIndex,this.push({data:data,meta:{percent:this.max?100*(this.index/this.max):0}})},module.exports=DataWorker},AIXc:function(module,exports,__webpack_require__){"use strict";(function(mod){mod(__webpack_require__("tQq4"),__webpack_require__("HeB0"),__webpack_require__("qqFR"),__webpack_require__("ggoL"))})(function(CodeMirror){function maybeBackup(stream,pat,style){var cur=stream.current(),close=cur.search(pat);return-1","i")}function addTags(from,to){for(var tag in from)for(var dest=to[tag]||(to[tag]=[]),source=from[tag],i=source.length-1;0<=i;i--)dest.unshift(source[i])}function findMatchingMode(tagInfo,tagText){for(var i=0,spec;i\s\/]/.test(stream.current())&&(tagName=state.htmlState.tagName&&state.htmlState.tagName.toLowerCase())&&tags.hasOwnProperty(tagName))state.inTag=tagName+" ";else if(state.inTag&&tag&&/>$/.test(stream.current())){var inTag=/^([\S]+) (.*)/.exec(state.inTag);state.inTag=null;var modeSpec=">"==stream.current()&&findMatchingMode(tags[inTag[1]],inTag[2]),mode=CodeMirror.getMode(config,modeSpec),endTagA=getTagRegexp(inTag[1],!0),endTag=getTagRegexp(inTag[1],!1);state.token=function(stream,state){return stream.match(endTagA,!1)?(state.token=html,state.localState=state.localMode=null,null):maybeBackup(stream,endTag,state.localMode.token(stream,state.localState))},state.localMode=mode,state.localState=CodeMirror.startState(mode,htmlMode.indent(state.htmlState,""))}else state.inTag&&(state.inTag+=stream.current(),stream.eol()&&(state.inTag+=" "));return style}var htmlMode=CodeMirror.getMode(config,{name:"xml",htmlMode:!0,multilineTagIndentFactor:parserConfig.multilineTagIndentFactor,multilineTagIndentPastTag:parserConfig.multilineTagIndentPastTag}),tags={},configTags=parserConfig&&parserConfig.tags,configScript=parserConfig&&parserConfig.scriptTypes;if(addTags(defaultTags,tags),configTags&&addTags(configTags,tags),configScript)for(var i=configScript.length-1;0<=i;i--)tags.script.unshift(["type",configScript[i].matches,configScript[i].mode]);return{startState:function(){var state=CodeMirror.startState(htmlMode);return{token:html,inTag:null,localMode:null,localState:null,htmlState:state}},copyState:function(state){var local;return state.localState&&(local=CodeMirror.copyState(state.localMode,state.localState)),{token:state.token,inTag:state.inTag,localMode:state.localMode,localState:local,htmlState:CodeMirror.copyState(htmlMode,state.htmlState)}},token:function(stream,state){return state.token(stream,state)},indent:function(state,textAfter,line){return!state.localMode||/^\s*<\//.test(textAfter)?htmlMode.indent(state.htmlState,textAfter):state.localMode.indent?state.localMode.indent(state.localState,textAfter,line):CodeMirror.Pass},innerMode:function(state){return{state:state.localState||state.htmlState,mode:state.localMode||htmlMode}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed")})},AhD2:function(){"use strict";var _Mathround=Math.round;(function(){function getRGBComponents(node){var color=getComputedStyle(node).color;if(color)try{return color.match(/(\d+), (\d+), (\d+)/).slice(1)}catch(e){return[255,255,255]}else return[255,255,255]}function createParticle(x,y,color){var p={x:x,y:y+10,alpha:1,color:color};return 1===effect?(p.size=random(2,4),p.vx=PARTICLE_VELOCITY_RANGE.x[0]+Math.random()*(PARTICLE_VELOCITY_RANGE.x[1]-PARTICLE_VELOCITY_RANGE.x[0]),p.vy=PARTICLE_VELOCITY_RANGE.y[0]+Math.random()*(PARTICLE_VELOCITY_RANGE.y[1]-PARTICLE_VELOCITY_RANGE.y[0])):2===effect&&(p.size=random(2,8),p.drag=0.92,p.vx=random(-3,3),p.vy=random(-3,3),p.wander=0.15,p.theta=random(0,360)*_MathPI/180),p}function effect1(particle){particle.vy+=PARTICLE_GRAVITY,particle.x+=particle.vx,particle.y+=particle.vy,particle.alpha*=PARTICLE_ALPHA_FADEOUT,ctx.fillStyle="rgba("+particle.color[0]+","+particle.color[1]+","+particle.color[2]+","+particle.alpha+")",ctx.fillRect(_Mathround(particle.x-1),_Mathround(particle.y-1),particle.size,particle.size)}function effect2(particle){particle.x+=particle.vx,particle.y+=particle.vy,particle.vx*=particle.drag,particle.vy*=particle.drag,particle.theta+=random(-0.5,0.5),particle.vx+=0.1*Math.sin(particle.theta),particle.vy+=0.1*Math.cos(particle.theta),particle.size*=0.96,ctx.fillStyle="rgba("+particle.color[0]+","+particle.color[1]+","+particle.color[2]+","+particle.alpha+")",ctx.beginPath(),ctx.arc(_Mathround(particle.x-1),_Mathround(particle.y-1),particle.size,0,2*_MathPI),ctx.fill()}function drawParticles(){for(var i=particles.length,particle;i--;)(particle=particles[i],!(!particle||0.01>particle.alpha||0.5>=particle.size))&&(1===effect?effect1(particle):2===effect&&effect2(particle))}function random(min,max){return max||(max=min,min=0),min+~~(Math.random()*(max-min+1))}function throttle(callback,limit){var wait=!1;return function(){wait||(callback.apply(this,arguments),wait=!0,setTimeout(function(){wait=!1},limit))}}function loop(){isActive&&(ctx.clearRect(0,0,w,h),current_time=new Date().getTime(),!lastTime&&(lastTime=current_time),dt=(current_time-lastTime)/1e3,lastTime=current_time,0src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+meta:edge+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{}","cc:ie":"{}","cc:noie":"{${0}}"},css:{"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${1});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:flex-start|flex-end|center|space-between|space-around|stretch",ai:"align-items:flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:${1:time}",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:#${1:000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:#${1:000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:#${1:000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:#${1:000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:#${1:000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:#${1:000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} #${5:000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:#${1:000}",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters({$0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fz:"font-size",fza:"font-size-adjust",h:"height",jc:"justify-content:flex-start|flex-end|center|space-between|space-around",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:#${1:000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick",op:"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"},xsl:{"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":"{}"}}},BVSg:function(module,exports,__webpack_require__){"use strict";(function(mod){mod(__webpack_require__("tQq4"),__webpack_require__("1JcR"))})(function(CodeMirror){function autoCloseGT(cm){if(cm.getOption("disableInput"))return CodeMirror.Pass;for(var ranges=cm.listSelections(),replacements=[],opt=cm.getOption("autoCloseTags"),i=0;ipos.ch&&(tagName=tagName.slice(0,tagName.length-tok.end+pos.ch));var lowerTagName=tagName.toLowerCase();if(!tagName||"string"==tok.type&&(tok.end!=pos.ch||!/[\"\']/.test(tok.string.charAt(tok.string.length-1))||1==tok.string.length)||"tag"==tok.type&&"closeTag"==state.type||tok.string.indexOf("/")==tok.string.length-1||dontCloseTags&&-1"+(indent?"\n\n":"")+"",newPos:indent?CodeMirror.Pos(pos.line+1,0):CodeMirror.Pos(pos.line,pos.ch+1)}}for(var dontIndentOnAutoClose="object"==typeof opt&&opt.dontIndentOnAutoClose,i=ranges.length-1,info;0<=i;i--){info=replacements[i],cm.replaceRange(info.text,ranges[i].head,ranges[i].anchor,"+insert");var sel=cm.listSelections().slice(0);sel[i]={head:info.newPos,anchor:info.newPos},cm.setSelections(sel),!dontIndentOnAutoClose&&info.indent&&(cm.indentLine(info.newPos.line,null,!0),cm.indentLine(info.newPos.line+1,null,!0))}}function autoCloseCurrent(cm,typingSlash){for(var ranges=cm.listSelections(),replacements=[],head=typingSlash?"/":""!=cm.getLine(pos.line).charAt(tok.end)&&(replacement+=">"),replacements[i]=replacement}if(cm.replaceSelections(replacements),ranges=cm.listSelections(),!dontIndentOnAutoClose)for(var i=0;i'"]=function(cm){return autoCloseGT(cm)}),cm.addKeyMap(map)}});var htmlDontClose=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],htmlIndent=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];CodeMirror.commands.closeTag=function(cm){return autoCloseCurrent(cm)}})},BtxX:function(module){"use strict";(function(root){function noop(){}function bind(fn,thisArg){return function(){fn.apply(thisArg,arguments)}}function Promise(fn){if(!(this instanceof Promise))throw new TypeError("Promises must be constructed via new");if("function"!=typeof fn)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],doResolve(fn,this)}function handle(self,deferred){for(;3===self._state;)self=self._value;return 0===self._state?void self._deferreds.push(deferred):void(self._handled=!0,Promise._immediateFn(function(){var cb=1===self._state?deferred.onFulfilled:deferred.onRejected;if(null===cb)return void(1===self._state?resolve:reject)(deferred.promise,self._value);var ret;try{ret=cb(self._value)}catch(e){return void reject(deferred.promise,e)}resolve(deferred.promise,ret)}))}function resolve(self,newValue){try{if(newValue===self)throw new TypeError("A promise cannot be resolved with itself.");if(newValue&&("object"==typeof newValue||"function"==typeof newValue)){var then=newValue.then;if(newValue instanceof Promise)return self._state=3,self._value=newValue,void finale(self);if("function"==typeof then)return void doResolve(bind(then,newValue),self)}self._state=1,self._value=newValue,finale(self)}catch(e){reject(self,e)}}function reject(self,newValue){self._state=2,self._value=newValue,finale(self)}function finale(self){2===self._state&&0===self._deferreds.length&&Promise._immediateFn(function(){self._handled||Promise._unhandledRejectionFn(self._value)});for(var i=0,len=self._deferreds.length;i=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0>=n||0===state.length&&state.ended?0:state.objectMode?1:n===n?(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0)):state.flowing&&state.length?state.buffer.head.data.length:state.length}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return nstr.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,list.head=p.next?p.next:list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,list.head=p.next?p.next:list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(0=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-nfieldsAmount&&(values=values.slice(0,fieldsAmount-1).concat(values.slice(fieldsAmount-1).join(", ")));values.length;){var value=values.shift(),field=fieldsModel.fields.shift(),delta=value.length-field.length;fieldsModel.string=fieldsModel.string.slice(0,field.location)+value+fieldsModel.string.slice(field.location+field.length);for(var i=0,il=fieldsModel.fields.length;i=byte?0:6==byte>>5?2:14==byte>>4?3:30==byte>>3?4:2==byte>>6?-1:-2}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j=c)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0==n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1==n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}var Buffer=__webpack_require__("38Wu").Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),void 0===r)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i>4).toString(16)}function _toHex(num){return pad(num.toString(16),2)}function pad(value,len){for(;value.lengthn||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length))if(er=arguments[1],er instanceof Error)throw er;else{var err=new Error("Uncaught, unspecified \"error\" event. ("+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;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))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;im&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),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;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;0position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),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)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[],ret},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},GIDK:function(module,exports,__webpack_require__){"use strict";function zswap32(q){return(255&q>>>24)+(65280&q>>>8)+((65280&q)<<8)+((255&q)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new utils.Buf16(320),this.work=new utils.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(strm){var state;return strm&&strm.state?(state=strm.state,strm.total_in=strm.total_out=state.total=0,strm.msg="",state.wrap&&(strm.adler=1&state.wrap),state.mode=HEAD,state.last=0,state.havedict=0,state.dmax=32768,state.head=null,state.hold=0,state.bits=0,state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS),state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS),state.sane=1,state.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(strm){var state;return strm&&strm.state?(state=strm.state,state.wsize=0,state.whave=0,state.wnext=0,inflateResetKeep(strm)):Z_STREAM_ERROR}function inflateReset2(strm,windowBits){var wrap,state;return strm&&strm.state?(state=strm.state,0>windowBits?(wrap=0,windowBits=-windowBits):(wrap=(windowBits>>4)+1,48>windowBits&&(windowBits&=15)),windowBits&&(8>windowBits||15sym;)state.lens[sym++]=8;for(;256>sym;)state.lens[sym++]=9;for(;280>sym;)state.lens[sym++]=7;for(;288>sym;)state.lens[sym++]=8;for(inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9}),sym=0;32>sym;)state.lens[sym++]=5;inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5}),virgin=!1}state.lencode=lenfix,state.lenbits=9,state.distcode=distfix,state.distbits=5}function updatewindow(strm,src,end,copy){var state=strm.state,dist;return null===state.window&&(state.wsize=1<=state.wsize?(utils.arraySet(state.window,src,end-state.wsize,state.wsize,0),state.wnext=0,state.whave=state.wsize):(dist=state.wsize-state.wnext,dist>copy&&(dist=copy),utils.arraySet(state.window,src,end-copy,dist,state.wnext),copy-=dist,copy?(utils.arraySet(state.window,src,end-copy,copy,0),state.wnext=copy,state.whave=state.wsize):(state.wnext+=dist,state.wnext===state.wsize&&(state.wnext=0),state.whavebits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8,state.check=crc32(state.check,hbuf,2,0),hold=0,bits=0,state.mode=FLAGS;break}if(state.flags=0,state.head&&(state.head.done=!1),!(1&state.wrap)||(((255&hold)<<8)+(hold>>8))%31){strm.msg="incorrect header check",state.mode=BAD;break}if((15&hold)!=Z_DEFLATED){strm.msg="unknown compression method",state.mode=BAD;break}if(hold>>>=4,bits-=4,len=(15&hold)+8,0===state.wbits)state.wbits=len;else if(len>state.wbits){strm.msg="invalid window size",state.mode=BAD;break}state.dmax=1<bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>8),512&state.flags&&(hbuf[0]=255&hold,hbuf[1]=255&hold>>>8,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0,state.mode=TIME;case TIME:for(;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8,hbuf[2]=255&hold>>>16,hbuf[3]=255&hold>>>24,state.check=crc32(state.check,hbuf,4,0)),hold=0,bits=0,state.mode=OS;case OS:for(;16>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>8),512&state.flags&&(hbuf[0]=255&hold,hbuf[1]=255&hold>>>8,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0,state.mode=EXLEN;case EXLEN:if(1024&state.flags){for(;16>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0}else state.head&&(state.head.extra=null);state.mode=EXTRA;case EXTRA:if(1024&state.flags&&(copy=state.length,copy>have&&(copy=have),copy&&(state.head&&(len=state.head.extra_len-state.length,!state.head.extra&&(state.head.extra=Array(state.head.extra_len)),utils.arraySet(state.head.extra,input,next,copy,len)),512&state.flags&&(state.check=crc32(state.check,input,copy,next)),have-=copy,next+=copy,state.length-=copy),state.length))break inf_leave;state.length=0,state.mode=NAME;case NAME:if(2048&state.flags){if(0===have)break inf_leave;copy=0;do len=input[next+copy++],state.head&&len&&65536>state.length&&(state.head.name+=_StringfromCharCode4(len));while(len&©state.length&&(state.head.comment+=_StringfromCharCode4(len));while(len&©bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>9,state.head.done=!0),strm.adler=state.check=0,state.mode=TYPE;break;case DICTID:for(;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=7&bits,bits-=7&bits,state.mode=CHECK;break}for(;3>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=1,bits-=1,3&hold){case 0:state.mode=STORED;break;case 1:if(fixedtables(state),state.mode=LEN_,flush===Z_TREES){hold>>>=2,bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type",state.mode=BAD;}hold>>>=2,bits-=2;break;case STORED:for(hold>>>=7&bits,bits-=7&bits;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>16)){strm.msg="invalid stored block lengths",state.mode=BAD;break}if(state.length=65535&hold,hold=0,bits=0,state.mode=COPY_,flush===Z_TREES)break inf_leave;case COPY_:state.mode=COPY;case COPY:if(copy=state.length,copy){if(copy>have&&(copy=have),copy>left&&(copy=left),0===copy)break inf_leave;utils.arraySet(output,input,next,copy,put),have-=copy,next+=copy,left-=copy,put+=copy,state.length-=copy;break}state.mode=TYPE;break;case TABLE:for(;14>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=5,bits-=5,state.ndist=(31&hold)+1,hold>>>=5,bits-=5,state.ncode=(15&hold)+4,hold>>>=4,bits-=4,286bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=3,bits-=3}for(;19>state.have;)state.lens[order[state.have++]]=0;if(state.lencode=state.lendyn,state.lenbits=7,opts={bits:state.lenbits},ret=inflate_table(0,state.lens,0,19,state.lencode,0,state.work,opts),state.lenbits=opts.bits,ret){strm.msg="invalid code lengths set",state.mode=BAD;break}state.have=0,state.mode=CODELENS;case CODELENS:for(;state.have>>24,here_op=255&here>>>16,here_val=65535&here,here_bits<=bits)break;if(0===have)break inf_leave;have--,hold+=input[next++]<here_val)hold>>>=here_bits,bits-=here_bits,state.lens[state.have++]=here_val;else{if(16===here_val){for(n=here_bits+2;bits>>=here_bits,bits-=here_bits,0===state.have){strm.msg="invalid bit length repeat",state.mode=BAD;break}len=state.lens[state.have-1],copy=3+(3&hold),hold>>>=2,bits-=2}else if(17===here_val){for(n=here_bits+3;bits>>=here_bits,bits-=here_bits,len=0,copy=3+(7&hold),hold>>>=3,bits-=3}else{for(n=here_bits+7;bits>>=here_bits,bits-=here_bits,len=0,copy=11+(127&hold),hold>>>=7,bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat",state.mode=BAD;break}for(;copy--;)state.lens[state.have++]=len}}if(state.mode===BAD)break;if(0===state.lens[256]){strm.msg="invalid code -- missing end-of-block",state.mode=BAD;break}if(state.lenbits=9,opts={bits:state.lenbits},ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts),state.lenbits=opts.bits,ret){strm.msg="invalid literal/lengths set",state.mode=BAD;break}if(state.distbits=6,state.distcode=state.distdyn,opts={bits:state.distbits},ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts),state.distbits=opts.bits,ret){strm.msg="invalid distances set",state.mode=BAD;break}if(state.mode=LEN_,flush===Z_TREES)break inf_leave;case LEN_:state.mode=LEN;case LEN:if(6<=have&&258<=left){strm.next_out=put,strm.avail_out=left,strm.next_in=next,strm.avail_in=have,state.hold=hold,state.bits=bits,inflate_fast(strm,_out),put=strm.next_out,output=strm.output,left=strm.avail_out,next=strm.next_in,input=strm.input,have=strm.avail_in,hold=state.hold,bits=state.bits,state.mode===TYPE&&(state.back=-1);break}for(state.back=0;;){if(here=state.lencode[hold&(1<>>24,here_op=255&here>>>16,here_val=65535&here,here_bits<=bits)break;if(0===have)break inf_leave;have--,hold+=input[next++]<>last_bits)],here_bits=here>>>24,here_op=255&here>>>16,here_val=65535&here,last_bits+here_bits<=bits)break;if(0===have)break inf_leave;have--,hold+=input[next++]<>>=last_bits,bits-=last_bits,state.back+=last_bits}if(hold>>>=here_bits,bits-=here_bits,state.back+=here_bits,state.length=here_val,0===here_op){state.mode=LIT;break}if(32&here_op){state.back=-1,state.mode=TYPE;break}if(64&here_op){strm.msg="invalid literal/length code",state.mode=BAD;break}state.extra=15&here_op,state.mode=LENEXT;case LENEXT:if(state.extra){for(n=state.extra;bits>>=state.extra,bits-=state.extra,state.back+=state.extra}state.was=state.length,state.mode=DIST;case DIST:for(;;){if(here=state.distcode[hold&(1<>>24,here_op=255&here>>>16,here_val=65535&here,here_bits<=bits)break;if(0===have)break inf_leave;have--,hold+=input[next++]<>last_bits)],here_bits=here>>>24,here_op=255&here>>>16,here_val=65535&here,last_bits+here_bits<=bits)break;if(0===have)break inf_leave;have--,hold+=input[next++]<>>=last_bits,bits-=last_bits,state.back+=last_bits}if(hold>>>=here_bits,bits-=here_bits,state.back+=here_bits,64&here_op){strm.msg="invalid distance code",state.mode=BAD;break}state.offset=here_val,state.extra=15&here_op,state.mode=DISTEXT;case DISTEXT:if(state.extra){for(n=state.extra;bits>>=state.extra,bits-=state.extra,state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back",state.mode=BAD;break}state.mode=MATCH;case MATCH:if(0===left)break inf_leave;if(copy=_out-left,state.offset>copy){if(copy=state.offset-copy,copy>state.whave&&state.sane){strm.msg="invalid distance too far back",state.mode=BAD;break}copy>state.wnext?(copy-=state.wnext,from=state.wsize-copy):from=state.wnext-copy,copy>state.length&&(copy=state.length),from_source=state.window}else from_source=output,from=put-state.offset,copy=state.length;copy>left&&(copy=left),left-=copy,state.length-=copy;do output[put++]=from_source[from++];while(--copy);0===state.length&&(state.mode=LEN);break;case LIT:if(0===left)break inf_leave;output[put++]=state.length,left--,state.mode=LEN;break;case CHECK:if(state.wrap){for(;32>bits;){if(0===have)break inf_leave;have--,hold|=input[next++]<bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<cm.firstLine();)pos=CodeMirror.Pos(pos.line-1,0),range=getRange(!1);if(range&&!range.cleared&&"unfold"!==force){var myWidget=makeWidget(cm,options);CodeMirror.on(myWidget,"mousedown",function(e){myRange.clear(),CodeMirror.e_preventDefault(e)});var myRange=cm.markText(range.from,range.to,{replacedWith:myWidget,clearOnEnter:getOption(cm,options,"clearOnEnter"),__isFold:!0});myRange.on("clear",function(from,to){CodeMirror.signal(cm,"unfold",cm,from,to)}),CodeMirror.signal(cm,"fold",cm,range.from,range.to)}}function makeWidget(cm,options){var widget=getOption(cm,options,"widget");if("string"==typeof widget){var text=document.createTextNode(widget);widget=document.createElement("span"),widget.appendChild(text),widget.className="CodeMirror-foldmarker"}else widget&&(widget=widget.cloneNode(!0));return widget}function getOption(cm,options,name){if(options&&void 0!==options[name])return options[name];var editorOptions=cm.options.foldOptions;return editorOptions&&void 0!==editorOptions[name]?editorOptions[name]:defaultOptions[name]}CodeMirror.newFoldFunction=function(rangeFinder,widget){return function(cm,pos){doFold(cm,pos,{rangeFinder:rangeFinder,widget:widget})}},CodeMirror.defineExtension("foldCode",function(pos,options,force){doFold(this,pos,options,force)}),CodeMirror.defineExtension("isFolded",function(pos){for(var marks=this.findMarksAt(pos),i=0;i")):null:stream.match("--")?chain(inBlock("comment","-->")):stream.match("DOCTYPE",!0,!0)?(stream.eatWhile(/[\w\._\-]/),chain(doctype(1))):null:stream.eat("?")?(stream.eatWhile(/[\w\._\-]/),state.tokenize=inBlock("meta","?>"),"meta"):(type=stream.eat("/")?"closeTag":"openTag",state.tokenize=inTag,"tag bracket");if("&"==ch){var ok;return ok=stream.eat("#")?stream.eat("x")?stream.eatWhile(/[a-fA-F\d]/)&&stream.eat(";"):stream.eatWhile(/[\d]/)&&stream.eat(";"):stream.eatWhile(/[\w\.\-:]/)&&stream.eat(";"),ok?"atom":"error"}return stream.eatWhile(/[^&<]/),null}function inTag(stream,state){var ch=stream.next();if(">"==ch||"/"==ch&&stream.eat(">"))return state.tokenize=inText,type=">"==ch?"endTag":"selfcloseTag","tag bracket";if("="==ch)return type="equals",null;if("<"==ch){state.tokenize=inText,state.state=baseState,state.tagName=state.tagStart=null;var next=state.tokenize(stream,state);return next?next+" tag error":"tag error"}return /[\'\"]/.test(ch)?(state.tokenize=inAttribute(ch),state.stringStartCol=stream.column(),state.tokenize(stream,state)):(stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function inAttribute(quote){var closure=function(stream,state){for(;!stream.eol();)if(stream.next()==quote){state.tokenize=inTag;break}return"string"};return closure.isInAttribute=!0,closure}function inBlock(style,terminator){return function(stream,state){for(;!stream.eol();){if(stream.match(terminator)){state.tokenize=inText;break}stream.next()}return style}}function doctype(depth){return function(stream,state){for(var ch;null!=(ch=stream.next());){if("<"==ch)return state.tokenize=doctype(depth+1),state.tokenize(stream,state);if(">"==ch)if(1==depth){state.tokenize=inText;break}else return state.tokenize=doctype(depth-1),state.tokenize(stream,state)}return"meta"}}function Context(state,tagName,startOfLine){this.prev=state.context,this.tagName=tagName,this.indent=state.indented,this.startOfLine=startOfLine,(config.doNotIndent.hasOwnProperty(tagName)||state.context&&state.context.noIndent)&&(this.noIndent=!0)}function popContext(state){state.context&&(state.context=state.context.prev)}function maybePopContext(state,nextTagName){for(var parentTagName;;){if(!state.context)return;if(parentTagName=state.context.tagName,!config.contextGrabbers.hasOwnProperty(parentTagName)||!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName))return;popContext(state)}}function baseState(type,stream,state){return"openTag"==type?(state.tagStart=stream.column(),tagNameState):"closeTag"==type?closeTagNameState:baseState}function tagNameState(type,stream,state){return"word"==type?(state.tagName=stream.current(),setStyle="tag",attrState):config.allowMissingTagName&&"endTag"==type?(setStyle="tag bracket",attrState(type,stream,state)):(setStyle="error",tagNameState)}function closeTagNameState(type,stream,state){if("word"==type){var tagName=stream.current();return state.context&&state.context.tagName!=tagName&&config.implicitlyClosed.hasOwnProperty(state.context.tagName)&&popContext(state),state.context&&state.context.tagName==tagName||!1===config.matchClosing?(setStyle="tag",closeState):(setStyle="tag error",closeStateErr)}return config.allowMissingTagName&&"endTag"==type?(setStyle="tag bracket",closeState(type,stream,state)):(setStyle="error",closeStateErr)}function closeState(type,_stream,state){return"endTag"==type?(popContext(state),baseState):(setStyle="error",closeState)}function closeStateErr(type,stream,state){return setStyle="error",closeState(type,stream,state)}function attrState(type,_stream,state){if("word"==type)return setStyle="attribute",attrEqState;if("endTag"==type||"selfcloseTag"==type){var tagName=state.tagName,tagStart=state.tagStart;return state.tagName=state.tagStart=null,"selfcloseTag"==type||config.autoSelfClosers.hasOwnProperty(tagName)?maybePopContext(state,tagName):(maybePopContext(state,tagName),state.context=new Context(state,tagName,tagStart==state.indented)),baseState}return setStyle="error",attrState}function attrEqState(type,stream,state){return"equals"==type?attrValueState:(config.allowMissing||(setStyle="error"),attrState(type,stream,state))}function attrValueState(type,stream,state){return"string"==type?attrContinuedState:"word"==type&&config.allowUnquoted?(setStyle="string",attrState):(setStyle="error",attrState(type,stream,state))}function attrContinuedState(type,stream,state){return"string"==type?attrContinuedState:attrState(type,stream,state)}var indentUnit=editorConf.indentUnit,config={},defaults=config_.htmlMode?htmlConfig:xmlConfig;for(var prop in defaults)config[prop]=defaults[prop];for(var prop in config_)config[prop]=config_[prop];var type,setStyle;return inText.isInText=!0,{startState:function(baseIndent){var state={tokenize:inText,state:baseState,indented:baseIndent||0,tagName:null,tagStart:null,context:null};return null!=baseIndent&&(state.baseIndent=baseIndent),state},token:function(stream,state){if(!state.tagName&&stream.sol()&&(state.indented=stream.indentation()),stream.eatSpace())return null;type=null;var style=state.tokenize(stream,state);return(style||type)&&"comment"!=style&&(setStyle=null,state.state=state.state(type||style,stream,state),setStyle&&(style="error"==setStyle?style+" error":setStyle)),style},indent:function(state,textAfter,fullLine){var context=state.context;if(state.tokenize.isInAttribute)return state.tagStart==state.indented?state.stringStartCol+1:state.indented+indentUnit;if(context&&context.noIndent)return CodeMirror.Pass;if(state.tokenize!=inTag&&state.tokenize!=inText)return fullLine?fullLine.match(/^(\s*)/)[0].length:0;if(state.tagName)return!1===config.multilineTagIndentPastTag?state.tagStart+indentUnit*(config.multilineTagIndentFactor||1):state.tagStart+state.tagName.length+2;if(config.alignCDATA&&/$/,blockCommentStart:"",configuration:config.htmlMode?"html":"xml",helperType:config.htmlMode?"html":"xml",skipAttribute:function(state){state.state==attrValueState&&(state.state=attrState)}}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0})})},HyWd:function(module){"use strict";module.exports=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}}},IDli:function(module,exports,__webpack_require__){"use strict";module.exports=!__webpack_require__("s0rf")&&!__webpack_require__("6TpT")(function(){return 7!=Object.defineProperty(__webpack_require__("kdYR")("div"),"a",{get:function(){return 7}}).a})},IIoC:function(module,exports,__webpack_require__){"use strict";var _Mathround2=Math.round,_Mathfloor=Math.floor,_Mathmax=Math.max;(function(global){(function(){function l(a){return"string"==typeof a}function n(a,b){a=a.split("."),b=b||k;for(var c=0;cb?null:l(a)?a.charAt(b):a[b]}function ua(a){if(!p(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function va(){return Array.prototype.concat.apply([],arguments)}function wa(a){var b=a.length;if(0b?1:0}function y(a){return-1!=x.indexOf(a)}function Ca(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Da(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Ea(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Fa(a){var b={},c;for(c in a)b[c]=a[c];return b}function Ha(a){for(var e=1,c,d;ec.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){e=!0}(e||void 0==c.returnValue)&&(c.returnValue=!0)}for(c=[],e=b.a;e;e=e.parentNode)c.push(e);for(a=a.type,e=c.length-1;0<=e;e--){b.a=c[e];var f=xb(c[e],a,!0,b);d=d&&f}for(e=0;eb.b&&(b.b++,a.next=b.a,b.a=a)}Wb=!1}function Xb(a,b){B.call(this),this.b=a||1,this.a=b||k,this.c=r(this.qb,this),this.g=t()}function Yb(a){a.ea=!1,a.O&&(a.a.clearTimeout(a.O),a.O=null)}function Zb(a,b,c){if(da(a))c&&(a=r(a,c));else if(a&&"function"==typeof a.handleEvent)a=r(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<+b?-1:k.setTimeout(a,b||0)}function $b(a,b,c){w.call(this),this.f=null==c?a:r(a,c),this.c=b,this.b=r(this.kb,this),this.a=[]}function ac(a){a.Y=Zb(a.b,a.c),a.f.apply(null,a.a)}function bc(a){w.call(this),this.b=a,this.a={}}function dc(a,b,c,d){p(c)||(c&&(cc[0]=c.toString()),c=cc);for(var e=0,f;ee.length)){var f=e[1];if(p(f)&&!(1>f.length)){var h=f[0];if("noop"!=h&&"stop"!=h&&"close"!=h)for(var m=1;mb)&&(3!=b||Na||a.a.V())){a.B||4!=b||7==c||(8==c||0>=d?Ac(3):Ac(2)),bd(a);var e=a.a.W();a.C=e,(c=a.a.V())||H(a.b,function(){return"No response text for uri "+a.g+" status "+e}),a.f=200==e,uc(a.b,a.o,a.g,a.c,a.T,b,e),a.f?((d=cd(a))&&(G(a.b,a.c,d,"Initial handshake response via X-HTTP-Initial-Response"),a.v=!0,dd(a,d)),a.K?(ed(a,b,c),Na&&a.f&&3==b&&fd(a)):(G(a.b,a.c,c,null),dd(a,c)),4==b&&gd(a),a.f&&!a.B&&(4==b?a.i.ta(a):(a.f=!1,Zc(a)))):(400==e&&0b.length)?Uc:(b=b.substr(d,c),a.G=d+c,b)}function Zc(a){a.U=t()+a.R,kd(a,a.R)}function kd(a,b){if(null!=a.s)throw Error("WatchDog timer not null");a.s=Ec(r(a.lb,a),b)}function bd(a){a.s&&(k.clearTimeout(a.s),a.s=null)}function hd(a){a.i.La()||a.B||a.i.ta(a)}function gd(a){bd(a);var b=a.I;b&&"function"==typeof b.$&&b.$(),a.I=null,Yb(a.S),ec(a.L),a.a&&(b=a.a,a.a=null,b.abort(),b.$())}function dd(a,b){try{a.i.Oa(a,b),Ac(4)}catch(c){xc(a.b,c,"Error in httprequest callback")}}function ld(a){if(a.A&&"function"==typeof a.A)return a.A();if(l(a))return a.split("");if(ca(a)){for(var b=[],c=a.length,d=0;d2*a.c&&nd(a),!0)}function nd(a){if(a.c!=a.a.length){for(var b=0,c=0,d;bb)throw Error("Bad port number "+b);a.i=b}else a.i=null}function vd(a,b,c){b instanceof yd?(a.c=b,Ed(a.c,a.h)):(c||(b=zd(b,Fd)),a.c=new yd(b,a.h))}function R(a,b,c){a.c.set(b,c)}function $c(a,b,c){p(c)||(c=[c+""]),Gd(a.c,b,c)}function Wc(a){return R(a,"zx",_Mathfloor(2147483648*Math.random()).toString(36)+Math.abs(_Mathfloor(2147483648*Math.random())^t()).toString(36)),a}function Hd(a){return a instanceof Q?M(a):new Q(a,void 0)}function Id(a,b,c,d){var e=new Q(null,void 0);return a&&sd(e,a),b&&td(e,b),c&&ud(e,c),d&&(e.a=d),e}function xd(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function zd(a,b,c){return l(a)?(a=encodeURI(a).replace(b,Jd),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Jd(a){return a=a.charCodeAt(0),"%"+(15&a>>4).toString(16)+(15&a).toString(16)}function yd(a,b){this.b=this.a=null,this.c=a||null,this.f=!!b}function S(a){a.a||(a.a=new O,a.b=0,a.c&&rd(a.c,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}function Ld(a,b){S(a),b=Kd(a,b),P(a.a.b,b)&&(a.c=null,a.b-=a.a.get(b).length,pd(a.a,b))}function Md(a,b){return S(a),b=Kd(a,b),P(a.a.b,b)}function Gd(a,b,c){Ld(a,b),0=a.f}function ee(a,b){return a.b?a=a.b==b:a.a?(b=Yd(b),a=P(a.a.a.b,b)):a=!1,a}function ce(a,b){a.a?a.a.add(b):a.b=b}function fe(a,b){if(a.b&&a.b==b)a.b=null;else{var c;(c=a.a)&&(c=Yd(b),c=P(a.a.a.b,c)),c&&pd(a.a.a,Yd(b))}}function ge(a){if(null!=a.b)return a.c.concat(a.b.u);if(null!=a.a&&0!=a.a.a.c){var b=a.c;return ra(a.a.A(),function(a){b=b.concat(a.u)}),b}return wa(a.c)}function he(a,b){a.c=a.c.concat(b)}function ie(){}function je(){this.a=new ie}function ke(a,b,c){var d=c||"";try{md(a,function(a,c){var e=a;ea(a)&&(e=Db(a)),b.push(d+c+"="+encodeURIComponent(e))})}catch(e){throw b.push(d+"type="+encodeURIComponent("_badmap")),e}}function le(a,b){var c=new sc;H(c,"TestLoadImage: loading "+a);var d=new Image;d.onload=ja(me,c,d,"TestLoadImage: loaded",!0,b),d.onerror=ja(me,c,d,"TestLoadImage: error",!1,b),d.onabort=ja(me,c,d,"TestLoadImage: abort",!1,b),d.ontimeout=ja(me,c,d,"TestLoadImage: timeout",!1,b),k.setTimeout(function(){d.ontimeout&&d.ontimeout()},1E4),d.src=a}function me(a,b,c,d,e){try{H(a,c),b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,e(d)}catch(f){xc(a,f)}}function T(a){B.call(this),this.headers=new O,this.s=a||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ne,this.v=this.o=!1}function se(a){return z&&Va(9)&&"number"==typeof a.timeout&&void 0!==a.ontimeout}function ta(a){return"content-type"==a.toLowerCase()}function qe(a,b){a.c=!1,a.a&&(a.h=!0,a.a.abort(),a.h=!1),a.g=b,a.j=5,te(a),ue(a)}function te(a){a.G||(a.G=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}function ve(a){if(a.c&&"undefined"!=typeof goog)if(a.D[1]&&4==N(a)&&2==a.W())E(a.b,U(a,"Local request error detected and ignored"));else if(a.u&&4==N(a))Zb(a.Na,0,a);else if(a.dispatchEvent("readystatechange"),4==N(a)){E(a.b,U(a,"Request complete")),a.c=!1;try{var b=a.W();a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1;}var d;if(!(d=c)){var e;if(e=0===b){var f=(a.B+"").match(qd)[1]||null;if(!f&&k.self&&k.self.location){var h=k.self.location.protocol;f=h.substr(0,h.length-1)}e=!oe.test(f?f.toLowerCase():"")}d=e}d?(a.dispatchEvent("complete"),a.dispatchEvent("success")):(a.j=6,a.g=a.Ha()+" ["+a.W()+"]",te(a))}finally{ue(a)}}}function ue(a,b){if(a.a){re(a);var c=a.a,d=a.D[0]?aa:null;a.a=null,a.D=null,b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.b)&&a.log(ic,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function re(a){a.a&&a.v&&(a.a.ontimeout=null),a.C&&(k.clearTimeout(a.C),a.C=null)}function N(a){return a.a?a.a.readyState:0}function id(a,b){return a.a?a.a.getResponseHeader(b):null}function U(a,b){return b+" ["+a.K+" "+a.B+" "+a.W()+"]"}function we(a){var b="";return Ca(a,function(a,d){b+=d,b+=":",b+=a,b+="\r\n"}),b}function xe(a,b,c){a:{for(d in c){var d=!1;break a}d=!0}if(d)return a;if(c=we(c),l(a)){if(b=encodeURIComponent(b+""),c=null==c?"":"="+encodeURIComponent(c+""),b+=c){if(c=a.indexOf("#"),0>c&&(c=a.length),d=a.indexOf("?"),0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)],c=a[1],a[1]=b?c?c+"&"+b:b:c,a=a[0]+(a[1]?"?"+a[1]:"")+a[2]}return a}return R(a,b,c),a}function ye(a){this.ya=0,this.g=[],this.a=new sc,this.I=new Wd,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!n("internalChannelParams.failFast",a),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=n("internalChannelParams.baseRetryDelayMs",a)||5E3,this.$a=n("internalChannelParams.retryDelaySeedMs",a)||1E4,this.Ya=n("internalChannelParams.forwardChannelMaxRetries",a)||2,this.wa=n("internalChannelParams.forwardChannelRequestTimeoutMs",a)||2E4,this.Ta=a&&a.Kb||void 0,this.G=void 0,this.S=a&&a.supportsCrossDomainXhr||!1,this.J="",this.c=new $d(a&&a.concurrentRequestLimit),this.la=new je,this.o=a&&void 0!==a.backgroundChannelTest?a.backgroundChannelTest:!0,(this.va=a&&a.fastHandshake||!1)&&!this.o&&(D(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),a&&a.Fa&&this.a.Fa()}function ze(a){if(H(a.a,"disconnect()"),Ae(a),3==a.F){var b=a.R++,c=M(a.D);R(c,"SID",a.J),R(c,"RID",b),R(c,"TYPE","terminate"),Be(a,c),b=new L(a,a.a,b,void 0),b.J=2,b.h=Wc(M(c)),c=!1,k.navigator&&k.navigator.sendBeacon&&(c=k.navigator.sendBeacon(b.h.toString(),"")),!c&&k.Image&&(new Image().src=b.h,c=!0),c||(b.a=b.i.ca(null),b.a.fa(b.h)),b.D=t(),Zc(b)}Ce(a)}function Ae(a){a.C&&(a.C.abort(),a.C=null),a.b&&(a.b.cancel(),a.b=null),a.l&&(k.clearTimeout(a.l),a.l=null),De(a),a.c.cancel(),a.m&&(k.clearTimeout(a.m),a.m=null)}function Ee(a,b){1E3==a.g.length&&J(a.a,function(){return"Already have 1000 queued maps upon queueing "+Db(b)}),a.g.push(new Zd(a.Za++,b)),3==a.F&&Fe(a)}function Fe(a){de(a.c)||a.m||(a.m=Ec(r(a.Qa,a),0),a.v=0)}function Ge(a,b){var c=a.c;return(c.b?1:c.a?c.a.a.c:0)>=a.c.f-(a.m?1:0)?(J(a.a,"Unexpected retry request is scheduled."),!1):a.m?(H(a.a,"Use the retry request that is already scheduled."),a.g=b.u.concat(a.g),!0):1==a.F||2==a.F||a.v>=(a.Xa?0:a.Ya)?!1:(H(a.a,"Going to retry POST"),a.m=Ec(r(a.Qa,a,b),He(a,a.v)),a.v++,!0)}function Je(a,b){var c=b?b.c:a.R++;var d=M(a.D);R(d,"SID",a.J),R(d,"RID",c),R(d,"AID",a.N),Be(a,d),a.h&&a.i&&xe(d,a.h,a.i),c=new L(a,a.a,c,a.v+1),null===a.h&&(c.j=a.i),b&&(a.g=b.u.concat(a.g)),b=Ie(a,c),c.setTimeout(_Mathround2(.5*a.wa)+_Mathround2(.5*a.wa*Math.random())),ce(a.c,c),Vc(c,d,b)}function Be(a,b){a.f&&md({},function(a,d){R(b,d,a)})}function Ie(a,b){var c=Math.min(a.g.length,1E3),d=a.f?r(a.f.ab,a.f,a):null;a:for(var e=a.g,f=-1,h;;){h=["count="+c],-1==f?0I)f=_Mathmax(0,e[v].a-100),m=!1;else try{ke(X,h,"req"+I+"_")}catch(Mb){d&&d(X)}}if(m){d=h.join("&");break a}}return a=a.g.splice(0,c),b.u=a,d}function Ke(a){if(!a.b&&!a.l){a.T=1;var b=a.Pa;Tb||Ub(),Wb||(Tb(),Wb=!0),Pb.add(b,a),a.B=0}}function Le(a){return a.b||a.l?(J(a.a,"Request already in progress"),!1):!(3<=a.B)&&(H(a.a,"Going to retry GET"),a.T++,a.l=Ec(r(a.Pa,a),He(a,a.B)),a.B++,!0)}function Td(a,b,c){H(a.a,"Test Connection Finished");var d=b.l;d&&be(a.c,d),a.ka=c,a.u=b.f,H(a.a,"connectChannel_()"),a.D=Me(a,a.ja),Fe(a)}function Vd(a,b){H(a.a,"Test Connection Failed"),a.u=b.f,V(a,2)}function De(a){null!=a.s&&(k.clearTimeout(a.s),a.s=null)}function He(a,b){var c=a.Wa+_Mathfloor(Math.random()*a.$a);return a.qa()||(H(a.a,"Inactive channel"),c*=2),c*b}function V(a,b){if(F(a.a,"Error code "+b),2==b){var c=null;a.f&&(c=null);var d=r(a.pb,a);c||(c=new Q("//www.google.com/images/cleardot.gif"),k.location&&"http"==k.location.protocol||sd(c,"https"),Wc(c)),le(c.toString(),d)}else K(2);H(a.a,"HttpChannel: error - "+b),a.F=0,a.f&&a.f.Ba(b),Ce(a),Ae(a)}function Ce(a){if(a.F=0,a.u=-1,a.f){var b=ge(a.c);(0!=b.length||0!=a.g.length)&&(H(a.a,function(){return"Number of undelivered maps, pending: "+b.length+", outgoing: "+a.g.length}),a.c.c.length=0,wa(a.g),a.g.length=0),a.f.Aa()}}function Me(a,b){return b=Ne(a,null,b),H(a.a,"GetForwardChannelUri: "+b),b}function Ud(a,b,c){return b=Ne(a,a.ia()?b:null,c),H(a.a,"GetBackChannelUri: "+b),b}function Ne(a,b,c){var d=Hd(c);if(""!=d.b)b&&td(d,b+"."+d.b),ud(d,d.i);else{var e=k.location,f;f=b?b+"."+e.hostname:e.hostname,d=Id(e.protocol,f,e.port,c)}return a.U&&Ca(a.U,function(a,b){R(d,b,a)}),b=a.j,c=a.K,b&&c&&R(d,b,c),R(d,"VER",a.na),Be(a,d),d}function Oe(){}function Pe(){for(var b=arguments[0],c=1,d;cthis.c)throw Error(Ze);this.a=new Ve,this.b=new Xd,this.g=null,this.aa()}function af(a){if("function"==typeof a.$)a.$();else for(var b in a)a[b]=null}function $e(a){return Xe(a.a)+a.b.a.c}function bf(a,b){this.a=a,this.b=b}function cf(a){if(this.a=[],a)a:{if(a instanceof cf){var b=a.M();if(a=a.A(),0>=this.a.length){for(var c=this.a,d=0;d>1,a[d].a>c.a);)a[b]=a[d],b=d;a[b]=c}function ef(){cf.call(this)}function Y(a,b){this.f=new ef,Ye.call(this,a,b)}function Z(a,b,c,d){this.l=a,this.j=!!d,Y.call(this,b,c)}var goog=goog||{},k=this,q="closure_uid_"+(1E9*Math.random()>>>0),fa=0,t=Date.now||function(){return+new Date},g;u(ka,Error),ka.prototype.name="CustomError",u(la,ka),la.prototype.name="AssertionError";var na=0,pa={};w.prototype.i=!1,w.prototype.$=function(){},w.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var qa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(l(a))return l(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;cparseFloat(Sa)){Ra=Ua+"";break a}}Ra=Sa}var Ka={},Xa=k.document,Wa;Wa=Xa&&z?Qa()||("CSS1Compat"==Xa.compatMode?parseInt(Ra,10):5):void 0;var Ya=Object.freeze||function(a){return a},Za=!z||9<=+Wa,$a=z&&!Va("9"),ab=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});return k.addEventListener("test",aa,b),k.removeEventListener("test",aa,b),a}();A.prototype.b=function(){this.Ra=!1},u(bb,A);var cb=Ya({2:"touch",3:"pen",4:"mouse"});bb.prototype.b=function(){bb.H.b.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,$a)try{(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)&&(a.keyCode=-1)}catch(b){}};var db="closure_listenable_"+(0|1E6*Math.random()),eb=0;hb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.a[f],a||(a=this.a[f]=[],this.b++);var h=ib(a,b,d,e);return-1>>0);u(B,w),B.prototype[db]=!0,g=B.prototype,g.addEventListener=function(a,b,c,d){nb(this,a,b,c,d)},g.removeEventListener=function(a,b,c,d){vb(this,a,b,c,d)},g.dispatchEvent=function(a){var c=this.J,b;if(c)for(b=[];c;c=c.J)b.push(c);c=this.N;var d=a.type||a;if(l(a))a=new A(a,c);else if(a instanceof A)a.target=a.target||c;else{var e=a;a=new A(d,c),Ha(a,e)}if(e=!0,b)for(var f=b.length-1,h;0<=f;f--)h=a.a=b[f],e=Ab(h,d,!0,a)&&e;if(h=a.a=c,e=Ab(h,d,!0,a)&&e,e=Ab(h,d,!1,a)&&e,b)for(f=0;f=nc(this).value)for(da(b)&&(b=b()),a=new fc(a,b+"",this.f),c&&(a.a=c),c=this;c;)c=c.a};var oc={},pc=null;sc.prototype.Fa=function(){this.b=!1};var yc=new B;u(zc,A),u(Bc,A),u(Cc,A);var Fc={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Gc={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};Hc.prototype.a=null;var Lc={OPEN:"a",sb:"b",Va:"c",Bb:"d"};u(Mc,A),u(Nc,A);var Oc;u(Pc,Hc),Oc=new Pc;var Rc=45E3,Tc={},Uc={};g=L.prototype,g.setTimeout=function(a){this.R=a},g.nb=function(a){a=a.target;var b=this.I;b&&3==N(a)?(H(this.b,"Throttling readystatechange."),b.cb()):this.Sa(a)},g.Sa=function(a){try{a==this.a?ad(this):D(this.b.a,"Called back with an unexpected xmlhttp")}catch(c){if(H(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var b=this;xc(this.b,c,function(){return"ResponseText: "+b.a.V()})}else xc(this.b,c,"No response text")}finally{}},g.mb=function(){if(this.a){var a=N(this.a),b=this.a.V();this.Gb&&this.ka&&0==this.B&&!this.s&&(this.s=Ec(r(this.ib,this),6E3)))}else if((a.v||this.b==a)&&De(this),!xa(b))for(b=c=this.la.a.parse(b),c=0;ca-this.g)){for(var b;0this.c&&0=e)f=void 0;else{if(1==e)ua(d);else{d[0]=d.pop(),d=0,c=c.a,e=c.length;for(var h=c[d];d>1;){var m=2*d+1,v=2*d+2;if(m=vh.a)break;c[d]=c[m],d=m}c[d]=h}f=f.b}f.apply(this,[b])}},g.ma=function(a){Y.H.ma.call(this,a),this.ra()},g.aa=function(){Y.H.aa.call(this),this.ra()},g.w=function(){Y.H.w.call(this),k.clearTimeout(void 0),ua(this.f.a),this.f=null},u(Z,Y),Z.prototype.pa=function(){var a=new T,b=this.l;return b&&b.forEach(function(b,d){a.headers.set(d,b)}),this.j&&(a.o=!0),a},Z.prototype.sa=function(a){return!a.i&&!a.a},Qe.prototype.createWebChannel=Qe.prototype.a,W.prototype.send=W.prototype.gb,W.prototype.open=W.prototype.fb,W.prototype.close=W.prototype.close,Fc.NO_ERROR=0,Fc.TIMEOUT=8,Fc.HTTP_ERROR=6,Gc.COMPLETE="complete",Kc.EventType=Lc,Lc.OPEN="a",Lc.CLOSE="b",Lc.ERROR="c",Lc.MESSAGE="d",B.prototype.listen=B.prototype.Ia,Z.prototype.getObject=Z.prototype.da,Z.prototype.releaseObject=Z.prototype.ob,T.prototype.listenOnce=T.prototype.Ja,T.prototype.getLastError=T.prototype.hb,T.prototype.getLastErrorCode=T.prototype.Ga,T.prototype.getStatus=T.prototype.W,T.prototype.getStatusText=T.prototype.Ha,T.prototype.getResponseJson=T.prototype.eb,T.prototype.getResponseText=T.prototype.V,T.prototype.getResponseText=T.prototype.V,T.prototype.send=T.prototype.fa,module.exports={createWebChannelTransport:Ue,ErrorCode:Fc,EventType:Gc,WebChannel:Kc,XhrIoPool:Z}}).call("undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)}).call(exports,__webpack_require__("h6ac"))},IYZm:function(module,exports,__webpack_require__){"use strict";(function(mod){mod(__webpack_require__("tQq4"),__webpack_require__("LiPu"))})(function(CodeMirror){function populate(obj){for(var attr in globalAttrs)globalAttrs.hasOwnProperty(attr)&&(obj.attrs[attr]=globalAttrs[attr])}var langs=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za","zu"],targets=["_blank","_self","_top","_parent"],charsets=["ascii","utf-8","utf-16","latin1","latin1"],methods=["get","post","put","delete"],encs=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],media=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},data={a:{attrs:{href:null,ping:null,type:null,media:media,target:targets,hreflang:langs}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:media,hreflang:langs,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:targets}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:encs,formmethod:methods,formnovalidate:["","novalidate"],formtarget:targets,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":charsets,autocomplete:["on","off"],enctype:encs,method:methods,novalidate:["","novalidate"],target:targets}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:encs,formmethod:methods,formnovalidate:["","novalidate"],formtarget:targets,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:langs,media:media,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:charsets,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s:s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:charsets}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:media,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:langs}},tt:s,u:s,ul:s,var:s,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:s},globalAttrs={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};for(var tag in populate(s),data)data.hasOwnProperty(tag)&&data[tag]!=s&&populate(data[tag]);CodeMirror.htmlSchema=data,CodeMirror.registerHelper("hint","html",function(cm,options){var local={schemaInfo:data};if(options)for(var opt in options)local[opt]=options[opt];return CodeMirror.hint.xml(cm,local)})})},Ib92:function(module,exports,__webpack_require__){"use strict";var ctx=__webpack_require__("iktq"),invoke=__webpack_require__("3Rhr"),html=__webpack_require__("zH6J"),cel=__webpack_require__("kdYR"),global=__webpack_require__("3Vd+"),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id],fn()}},listener=function(event){run.call(event.data)},defer,channel,port;setTask&&clearTask||(setTask=function(fn){for(var args=[],i=1;arguments.length>i;)args.push(arguments[i++]);return queue[++counter]=function(){invoke("function"==typeof fn?fn:Function(fn),args)},defer(counter),counter},clearTask=function(id){delete queue[id]},"process"==__webpack_require__("1ROC")(process)?defer=function(id){process.nextTick(ctx(run,id,1))}:MessageChannel?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=ctx(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(id){global.postMessage(id+"","*")},global.addEventListener("message",listener,!1)):ONREADYSTATECHANGE in cel("script")?defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(id)}}:defer=function(id){setTimeout(ctx(run,id,1),0)}),module.exports={set:setTask,clear:clearTask}},Ipt8:function(module,exports){"use strict";function replaceInNode(node,variables){for(var attrs=node.attributes,i=0,il=attrs.length,attr;i>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i],e,m;for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;0>=-nBits,nBits+=mLen;0>1,rt=23===mLen?5.960464477539063e-8-6.617444900424222e-24:0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0,e,m,c;for(value=Math.abs(value),isNaN(value)||value===Infinity?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),1>value*(c=_Mathpow(2,-e))&&(e--,c*=2),value+=1<=e+eBias?rt/c:rt*_Mathpow(2,1-eBias),2<=value*c&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):1<=e+eBias?(m=(value*c-1)*_Mathpow(2,mLen),e+=eBias):(m=value*_Mathpow(2,eBias-1)*_Mathpow(2,mLen),e=0));8<=mLen;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<to.line&&document.querySelector&&(dialog=cm.display.wrapper.querySelector(".CodeMirror-dialog"))&&dialog.getBoundingClientRect().bottom-4>cm.cursorCoords(to,"window").top&&((hiding=dialog).style.opacity=.4)}))};persistentDialog(cm,queryDialog,q,searchNext,function(event,query){var keyName=CodeMirror.keyName(event),extra=cm.getOption("extraKeys"),cmd=extra&&extra[keyName]||CodeMirror.keyMap[cm.getOption("keyMap")][keyName];"findNext"==cmd||"findPrev"==cmd||"findPersistentNext"==cmd||"findPersistentPrev"==cmd?(CodeMirror.e_stop(event),startSearch(cm,getSearchState(cm),query),cm.execCommand(cmd)):("find"==cmd||"findPersistent"==cmd)&&(CodeMirror.e_stop(event),searchNext(query,event))}),immediate&&q&&(startSearch(cm,state,q),findNext(cm,rev))}else dialog(cm,queryDialog,"Search for:",q,function(query){query&&!state.query&&cm.operation(function(){startSearch(cm,state,query),state.posFrom=state.posTo=cm.getCursor(),findNext(cm,rev)})})}function findNext(cm,rev,callback){cm.operation(function(){var state=getSearchState(cm),cursor=getSearchCursor(cm,state.query,rev?state.posFrom:state.posTo);!cursor.find(rev)&&(cursor=getSearchCursor(cm,state.query,rev?CodeMirror.Pos(cm.lastLine()):CodeMirror.Pos(cm.firstLine(),0)),!cursor.find(rev))||(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()},20),state.posFrom=cursor.from(),state.posTo=cursor.to(),callback&&callback(cursor.from(),cursor.to()))})}function clearSearch(cm){cm.operation(function(){var state=getSearchState(cm);state.lastQuery=state.query,state.query&&(state.query=state.queryText=null,cm.removeOverlay(state.overlay),state.annotate&&(state.annotate.clear(),state.annotate=null))})}function replaceAll(cm,query,text){cm.operation(function(){for(var cursor=getSearchCursor(cm,query);cursor.findNext();)if("string"!=typeof query){var match=cm.getRange(cursor.from(),cursor.to()).match(query);cursor.replace(text.replace(/\$(\d)/g,function(_,i){return match[i]}))}else cursor.replace(text)})}function replace(cm,all){if(!cm.getOption("readOnly")){var query=cm.getSelection()||getSearchState(cm).lastQuery,dialogText=""+(all?"Replace all:":"Replace:")+"";dialog(cm,dialogText+replaceQueryDialog,dialogText,query,function(query){query&&(query=parseQuery(query),dialog(cm,replacementQueryDialog,"Replace with:","",function(text){if(text=parseString(text),all)replaceAll(cm,query,text);else{clearSearch(cm);var cursor=getSearchCursor(cm,query,cm.getCursor("from")),advance=function advance(){var start=cursor.from(),match;!(match=cursor.findNext())&&(cursor=getSearchCursor(cm,query),!(match=cursor.findNext())||start&&cursor.from().line==start.line&&cursor.from().ch==start.ch)||(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()}),confirmDialog(cm,doReplaceConfirm,"Replace?",[function(){doReplace(match)},advance,function(){replaceAll(cm,query,text)}]))},doReplace=function(match){cursor.replace("string"==typeof query?text:text.replace(/\$(\d)/g,function(_,i){return match[i]})),advance()};advance()}}))})}}var queryDialog="Search: (Use /re/ syntax for regexp search)",replaceQueryDialog=" (Use /re/ syntax for regexp search)",replacementQueryDialog="With: ",doReplaceConfirm="Replace? ";CodeMirror.commands.find=function(cm){clearSearch(cm),doSearch(cm)},CodeMirror.commands.findPersistent=function(cm){clearSearch(cm),doSearch(cm,!1,!0)},CodeMirror.commands.findPersistentNext=function(cm){doSearch(cm,!1,!0,!0)},CodeMirror.commands.findPersistentPrev=function(cm){doSearch(cm,!0,!0,!0)},CodeMirror.commands.findNext=doSearch,CodeMirror.commands.findPrev=function(cm){doSearch(cm,!0)},CodeMirror.commands.clearSearch=clearSearch,CodeMirror.commands.replace=replace,CodeMirror.commands.replaceAll=function(cm){replace(cm,!0)}})},KM04:function(module){"use strict";!function(){function e(){}function t(t,n){var a=E,o,r,i,l;for(l=arguments.length;2bits&&(hold+=input[_in++]<>>24,hold>>>=op,bits-=op,op=255&here>>>16,0===op)output[_out++]=65535&here;else if(16&op){len=65535&here,op&=15,op&&(bits>>=op,bits-=op),15>bits&&(hold+=input[_in++]<>>24,hold>>>=op,bits-=op,op=255&here>>>16,16&op){if(dist=65535&here,op&=15,bitsdmax){strm.msg="invalid distance too far back",state.mode=BAD;break top}if(hold>>>=op,bits-=op,op=_out-beg,dist>op){if(op=dist-op,op>whave&&state.sane){strm.msg="invalid distance too far back",state.mode=BAD;break top}if(from=0,from_source=s_window,0===wnext){if(from+=wsize-op,op>3,_in-=len,bits-=len<<3,hold&=(1<cur.ch&&(token.end=cur.ch,token.string=token.string.slice(0,cur.ch-token.start));var inner=CodeMirror.innerMode(cm.getMode(),token.state);if("xml"==inner.mode.name){var result=[],replaceToken=!1,tag=/\btag\b/.test(token.type)&&!/>$/.test(token.string),tagName=tag&&/^\w/.test(token.string),prefix,tagStart;if(tagName){var before=cm.getLine(cur.line).slice(_Mathmax2(0,token.start-2),token.start),tagType=/<\/$/.test(before)?"close":/<$/.test(before)?"open":null;tagType&&(tagStart=token.start-("close"==tagType?2:1))}else tag&&"<"==token.string?tagType="open":tag&&"")}else{var curTag=tags[inner.state.tagName],attrs=curTag&&curTag.attrs,globalAttrs=tags["!attrs"];if(!attrs&&!globalAttrs)return;if(!attrs)attrs=globalAttrs;else if(globalAttrs){var set={};for(var nm in globalAttrs)globalAttrs.hasOwnProperty(nm)&&(set[nm]=globalAttrs[nm]);for(var nm in attrs)attrs.hasOwnProperty(nm)&&(set[nm]=attrs[nm]);attrs=set}if("string"==token.type||"="==token.string){var before=cm.getRange(Pos(cur.line,_Mathmax2(0,cur.ch-60)),Pos(cur.line,"string"==token.type?token.start:token.end)),atName=before.match(/([^\s\u00a0=<>\"\']+)=$/),atValues;if(!atName||!attrs.hasOwnProperty(atName[1])||!(atValues=attrs[atName[1]]))return;if("function"==typeof atValues&&(atValues=atValues.call(this,cm)),"string"==token.type){prefix=token.string;var n=0;/['"]/.test(token.string.charAt(0))&&(quote=token.string.charAt(0),prefix=token.string.slice(1),n++);var len=token.string.length;/['"]/.test(token.string.charAt(len-1))&&(quote=token.string.charAt(len-1),prefix=token.string.substr(n,len-2)),replaceToken=!0}for(var i=0;i=this.end},StreamReader.prototype.limit=function(start,end){return new this.constructor(this.string,start,end)},StreamReader.prototype.peek=function(){return this.string.charCodeAt(this.pos)},StreamReader.prototype.next=function(){if(this.posthis.status,this.statusText="statusText"in options?options.statusText:"OK",this.headers=new Headers(options.headers),this.url=options.url||"",this._initBody(bodyInit)}if(!self.fetch){var support={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(support.arrayBuffer)var viewClasses=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],isDataView=function(obj){return obj&&DataView.prototype.isPrototypeOf(obj)},isArrayBufferView=ArrayBuffer.isView||function(obj){return obj&&-1newIndex)throw new Error("End of data reached (data length = "+this.length+", asked index = "+newIndex+"). Corrupted zip ?")},setIndex:function(newIndex){this.checkIndex(newIndex),this.index=newIndex},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(size){var result=0,i;for(this.checkOffset(size),i=this.index+size-1;i>=this.index;i--)result=(result<<8)+this.byteAt(i);return this.index+=size,result},readString:function(size){return utils.transformTo("string",this.readData(size))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var dostime=this.readInt(4);return new Date(Date.UTC((127&dostime>>25)+1980,(15&dostime>>21)-1,31&dostime>>16,31&dostime>>11,63&dostime>>5,(31&dostime)<<1))}},module.exports=DataReader},PO9O:function(module,exports,__webpack_require__){"use strict";function CompressedObject(compressedSize,uncompressedSize,crc32,compression,data){this.compressedSize=compressedSize,this.uncompressedSize=uncompressedSize,this.crc32=crc32,this.compression=compression,this.compressedContent=data}var external=__webpack_require__("8JlO"),DataWorker=__webpack_require__("ABU1"),DataLengthProbe=__webpack_require__("S9RN"),Crc32Probe=__webpack_require__("gpbE"),DataLengthProbe=__webpack_require__("S9RN");CompressedObject.prototype={getContentWorker:function(){var worker=new DataWorker(external.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new DataLengthProbe("data_length")),that=this;return worker.on("end",function(){if(this.streamInfo.data_length!==that.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),worker},getCompressedWorker:function(){return new DataWorker(external.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},CompressedObject.createWorkerFrom=function(uncompressedWorker,compression,compressionOptions){return uncompressedWorker.pipe(new Crc32Probe).pipe(new DataLengthProbe("uncompressedSize")).pipe(compression.compressWorker(compressionOptions)).pipe(new DataLengthProbe("compressedSize")).withStreamInfo("compression",compression)},module.exports=CompressedObject},Ps3q:function(module,exports,__webpack_require__){"use strict";var utils=__webpack_require__("dvMn"),support=__webpack_require__("untT"),_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";exports.encode=function(input){for(var output=[],i=0,len=input.length,remainingBytes=len,isArray="string"!==utils.getTypeOf(input),chr1,chr2,chr3,enc1,enc2,enc3,enc4;i>2,enc2=(3&chr1)<<4|chr2>>4,enc3=1>6:64,enc4=2>4,chr2=(15&enc2)<<4|enc3>>2,chr3=(3&enc3)<<6|enc4,output[resultIndex++]=chr1,64!==enc3&&(output[resultIndex++]=chr2),64!==enc4&&(output[resultIndex++]=chr3);return output}},Q14w:function(module,exports){"use strict";function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=function(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)},exports.isBoolean=function(arg){return"boolean"==typeof arg},exports.isNull=function(arg){return null===arg},exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=function(arg){return"number"==typeof arg},exports.isString=function(arg){return"string"==typeof arg},exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=function(arg){return void 0===arg},exports.isRegExp=function(re){return"[object RegExp]"===objectToString(re)},exports.isObject=function(arg){return"object"==typeof arg&&null!==arg},exports.isDate=function(d){return"[object Date]"===objectToString(d)},exports.isError=function(e){return"[object Error]"===objectToString(e)||e instanceof Error},exports.isFunction=function(arg){return"function"==typeof arg},exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg},exports.isBuffer=Buffer.isBuffer},QAmr:function(module,exports){"use strict";exports.__esModule=!0;var index="function"==typeof fetch?fetch.bind():function(url,options){return options=options||{},new Promise(function(resolve,reject){function response(){var _keys=[],all=[],headers={},header;return request.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(m,key,value){_keys.push(key=key.toLowerCase()),all.push([key,value]),header=headers[key],headers[key]=header?header+","+value:value}),{ok:1==(0|request.status/200),status:request.status,statusText:request.statusText,url:request.responseURL,clone:response,text:function(){return Promise.resolve(request.responseText)},json:function(){return Promise.resolve(request.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([request.response]))},headers:{keys:function(){return _keys},entries:function(){return all},get:function(n){return headers[n.toLowerCase()]},has:function(n){return n.toLowerCase()in headers}}}}var request=new XMLHttpRequest;for(var i in request.open(options.method||"get",url),options.headers)request.setRequestHeader(i,options.headers[i]);request.withCredentials="include"==options.credentials,request.onload=function(){resolve(response())},request.onerror=reject,request.send(options.body)})};exports.default=index},R0uB:function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _mark(string,fields,token){token=token||createToken;var ordered=fields.map(function(field,order){return{order:order,field:field,end:field.location+field.length}}).sort(function(a,b){return a.end-b.end||a.order-b.order}),offset=0,result=ordered.map(function(item){var placeholder=string.substr(item.field.location,item.field.length),prefix=string.slice(offset,item.field.location);return offset=item.end,prefix+token(item.field.index,placeholder)});return result.join("")+string.slice(offset)}function createToken(index,placeholder){return placeholder?"${"+index+":"+placeholder+"}":"${"+index+"}"}function consumeField(stream,location){var start=stream.pos;if(stream.eat(DOLLAR)){var index=consumeIndex(stream),placeholder="";if(null!=index)return new Field(index,placeholder,location);if(stream.eat(OPEN_BRACE)&&(index=consumeIndex(stream),null!=index&&(stream.eat(COLON)&&(placeholder=consumePlaceholder(stream)),stream.eat(CLOSE_BRACE))))return new Field(index,placeholder,location)}stream.pos=start}function consumePlaceholder(stream){var code=void 0,stack=[];for(stream.start=stream.pos;!stream.eof();){if(code=stream.peek(),code===OPEN_BRACE)stack.push(stream.pos);else if(code===CLOSE_BRACE){if(!stack.length)break;stack.pop()}stream.next()}if(stack.length)throw stream.error("Unable to find matching \"}\" for curly brace at "+stack.pop());return stream.current()}function consumeIndex(stream){if(stream.start=stream.pos,stream.eatWhile(_streamReaderUtils.isNumber))return+stream.current()}exports.__esModule=!0,exports.createToken=exports.mark=void 0;var _streamReader=__webpack_require__("Lu2N"),_streamReader2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_streamReader),_streamReaderUtils=__webpack_require__("rc1b"),DOLLAR=36,COLON=58,OPEN_BRACE=123,CLOSE_BRACE=125,Field=function Field(index,placeholder,location){_classCallCheck(this,Field),this.index=index,this.placeholder=placeholder,this.location=location,this.length=this.placeholder.length},FieldString=function(){function FieldString(string,fields){_classCallCheck(this,FieldString),this.string=string,this.fields=fields}return FieldString.prototype.mark=function(token){return _mark(this.string,this.fields,token)},FieldString.prototype.toString=function(){return this.string},FieldString}();exports.default=function(string){for(var stream=new _streamReader2.default(string),fields=[],cleanString="",offset=0,pos=0,code=void 0,field=void 0;!stream.eof();)code=stream.peek(),pos=stream.pos,code===92?(stream.next(),stream.next()):(field=consumeField(stream,cleanString.length+pos-offset))?(fields.push(field),cleanString+=stream.string.slice(offset,pos)+field.placeholder,offset=stream.pos):stream.next();return new FieldString(cleanString+stream.string.slice(offset),fields)},exports.mark=_mark,exports.createToken=createToken},REa7:function(module){"use strict";var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},RJVP:function(module,exports,__webpack_require__){"use strict";var _Mathfloor2=Math.floor,_Mathmax3=Math.max;(function(global){(function(){function l(a){return"string"==typeof a}function ba(a){return"boolean"==typeof a}function ca(){}function da(a){var b=typeof a;if("object"==b){if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";}else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ea(a){return null===a}function fa(a){return"array"==da(a)}function ha(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function n(a){return"function"==da(a)}function q(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ka(a){return a.call.apply(a.bind,arguments)}function la(a,b){if(!a)throw Error();if(2a.b&&(a.b++,b.next=a.a,a.a=b)}function ua(){this.b=this.a=null}function xa(){var a=ya,b=null;return a.a&&(b=a.a,a.a=a.a.next,a.a||(a.b=null),b.next=null),b}function va(){this.next=this.b=this.a=null}function Aa(a,b){var c=a.length,d=l(a)?a.split(""):a;for(--c;0<=c;--c)c in d&&b.call(void 0,d[c],c,a)}function Da(a){a:{for(var b=Ea,c=a.length,d=l(a)?a.split(""):a,e=0;eb?null:l(a)?a.charAt(b):a[b]}function Fa(a,b){return 0<=za(a,b)}function Ga(a,b){b=za(a,b);var c;return(c=0<=b)&&Array.prototype.splice.call(a,b,1),c}function Ha(a,b){var c=0;Aa(a,function(d,e){b.call(void 0,d,e,a)&&1==Array.prototype.splice.call(a,e,1).length&&c++})}function Ia(){return Array.prototype.concat.apply([],arguments)}function Ja(a){var b=a.length;if(0")&&(a=a.replace(Qa,">")),-1!=a.indexOf("\"")&&(a=a.replace(Ra,""")),-1!=a.indexOf("'")&&(a=a.replace(Sa,"'")),-1!=a.indexOf("\0")&&(a=a.replace(Ta,"�")),a):a}function w(a,b){return-1!=a.indexOf(b)}function Ua(a,b){return ab?1:0}function x(a){return w(Va,a)}function Ya(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Za(a){for(var b in a)return!1;return!0}function $a(a){var b={},c;for(c in a)b[c]=a[c];return b}function bb(a){for(var e=1,c,d;ed.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(h){e=!0}(e||void 0==d.returnValue)&&(d.returnValue=!0)}for(d=[],e=b.b;e;e=e.parentNode)d.push(e);for(a=a.type,e=d.length-1;0<=e;e--){b.b=d[e];var f=Cc(d[e],a,!0,b);c=c&&f}for(e=0;eb)throw Error("Bad port number "+b);a.i=b}else a.i=null}function Vc(a,b,c){b instanceof Uc?(a.a=b,bd(a.a,a.f)):(c||(b=Xc(b,cd)),a.a=new Uc(b,a.f))}function F(a,b,c){a.a.set(b,c)}function dd(a,b){return a.a.get(b)}function ed(a){return a instanceof Rc?new Rc(a):new Rc(a,void 0)}function fd(a,b){var c=new Rc(null,void 0);return Sc(c,"https"),a&&(c.b=a),b&&(c.g=b),c}function Wc(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function Xc(a,b,c){return l(a)?(a=encodeURI(a).replace(b,gd),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function gd(a){return a=a.charCodeAt(0),"%"+(15&a>>4).toString(16)+(15&a).toString(16)}function Uc(a,b){this.b=this.a=null,this.c=a||null,this.f=!!b}function hd(a){a.a||(a.a=new Lc,a.b=0,a.c&&Qc(a.c,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}function id(a){var b=Jc(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new Uc(null,void 0);a=Ic(a);for(var d=0;d2*a.c&&Mc(a)))}function md(a,b){return hd(a),b=kd(a,b),Nc(a.a.b,b)}function jd(a,b,c){ld(a,b),0"),f=f.join("")}return f=e.createElement(f),h&&(l(h)?f.className=h:fa(h)?f.className=h.join(" "):Kd(f,h)),2a?!1:!Ob||!Zb||9",a=Id(a),h.document.write(Hd(a)),h.document.close())):(h=d.open(Bd(b),c,h))&&a.noopener&&(h.opener=null),h)try{h.focus()}catch(m){}return h}function fe(a){return new y(function(b){function c(){Hc(2E3).then(function(){return!a||a.closed?void b():c()})}return c()})}function he(){var a=null;return new y(function(b){"complete"==k.document.readyState?b():(a=function(){b()},sc(window,"load",a))}).s(function(b){throw D(window,"load",a),b})}function ie(){return je(void 0)?he().then(function(){return new y(function(a,b){var c=k.document,d=setTimeout(function(){b(Error("Cordova framework is not ready."))},1E3);c.addEventListener("deviceready",function(){clearTimeout(d),a()},!1)})}):B(Error("Cordova must run in an Android or iOS file scheme."))}function je(a){return a=a||G(),"file:"===ke()&&a.toLowerCase().match(/iphone|ipad|ipod|android/)}function le(){var a=k.window;try{return a&&a!=a.top}catch(b){return!1}}function me(){return"object"!=typeof k.window&&"function"==typeof k.importScripts}function ne(){return firebase.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":firebase.INTERNAL.hasOwnProperty("node")?"Node":me()?"Worker":"Browser"}function oe(){var a=ne();return"ReactNative"===a||"Node"===a}function pe(){for(var a=50,b=[];0b)throw Error("Short delay should be less than long delay!");this.a=a,this.c=b,a=G(),b=ne(),this.b=be(a)||"ReactNative"===b}function De(){var a=k.document;return a&&"undefined"!=typeof a.visibilityState?"visible"==a.visibilityState:!0}function Ee(){var a=k.document,_b=null;return De()||!a?A():new y(function(c){_b=function(){De()&&(a.removeEventListener("visibilitychange",_b,!1),c())},a.addEventListener("visibilitychange",_b,!1)}).s(function(c){throw a.removeEventListener("visibilitychange",_b,!1),c})}function Fe(a){try{var b=new Date(parseInt(a,10));if(!isNaN(b.getTime())&&!/[^0-9]/.test(a))return b.toUTCString()}catch(c){}return null}function Ge(){return H("fireauth.oauthhelper",k)||H("fireauth.iframe",k)}function Ie(a){He[a]||(He[a]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(a))}function I(a,b,c){Je?Object.defineProperty(a,b,{configurable:!0,enumerable:!0,value:c}):a[b]=c}function J(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&I(a,c,b[c])}function Le(a){var b={};return J(b,a),b}function Me(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function Ne(a,b){if(!b||!b.length)return!0;if(!a)return!1;for(var c=0,d;c>4),64!=h&&(b(240&f<<4|h>>2),64!=m&&b(192&h<<6|m))}}function qf(){if(!mf){mf={},nf={};for(var a=0;65>a;a++)mf[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),nf[mf[a]]=a,62<=a&&(nf["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}}function rf(a){this.c=a.sub,na(),this.a=a.provider_id||a.firebase&&a.firebase.sign_in_provider||null,this.b=!!a.is_anonymous||"anonymous"==this.a}function sf(a){return(a=tf(a))&&a.sub&&a.iss&&a.aud&&a.exp?new rf(a):null}function tf(a){if(!a)return null;if(a=a.split("."),3!=a.length)return null;a=a[1];for(var b=(4-a.length%4)%4,c=0;c Auth section -> Sign in method tab.",a):"http"==d||"https"==d?c=Ka("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",a):b="operation-not-supported-in-this-environment",K.call(this,b,c)}function sg(a,b,c){K.call(this,a,c),a=b||{},a.wb&&I(this,"email",a.wb),a.$&&I(this,"phoneNumber",a.$),a.credential&&I(this,"credential",a.credential)}function tg(a){if(a.code){var b=a.code||"";0==b.indexOf(Ye)&&(b=b.substring(Ye.length));var c={credential:lg(a)};if(a.email)c.wb=a.email;else if(a.phoneNumber)c.$=a.phoneNumber;else return new K(b,a.message||void 0);return new sg(b,c,a.message)}return null}function vg(){}function wg(a){return a.c||(a.c=a.b())}function yg(){}function zg(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0,d;cb;b++){e=0|c[b-15],d=0|c[b-2];var f=0|(0|c[b-16])+((e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3),h=0|(0|c[b-7])+((d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10);c[b]=0|f+h}d=0|a.a[0],e=0|a.a[1];var m=0|a.a[2],p=0|a.a[3],z=0|a.a[4],pc=0|a.a[5],Pc=0|a.a[6];for(f=0|a.a[7],b=0;64>b;b++){var Rl=0|((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&e^d&m^e&m);h=z&pc^~z&Pc,f=0|f+((z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7)),h=0|h+(0|Jj[b]),h=0|f+(0|h+(0|c[b])),f=Pc,Pc=pc,pc=z,z=0|p+h,p=m,m=e,e=d,d=0|h+Rl}a.a[0]=0|a.a[0]+d,a.a[1]=0|a.a[1]+e,a.a[2]=0|a.a[2]+m,a.a[3]=0|a.a[3]+p,a.a[4]=0|a.a[4]+z,a.a[5]=0|a.a[5]+pc,a.a[6]=0|a.a[6]+Pc,a.a[7]=0|a.a[7]+f}function Qj(a,b,c){void 0===c&&(c=b.length);var d=0,e=a.c;if(l(b))for(;d=f&&f==(0|f)))throw Error("message must be a byte array");a.f[e++]=f,e==a.b&&(Pj(a),e=0)}else throw Error("message must be string or array");a.c=e,a.g+=c}function Rj(){Hj.call(this,8,Sj)}function Tj(a,b,c,d,e){this.l=a,this.i=b,this.m=c,this.o=d||null,this.u=e||null,this.h=b+":"+c,this.v=new Fj,this.g=new Cj(this.h),this.f=null,this.b=[],this.a=this.c=null}function Uj(a){return new K("invalid-cordova-configuration",a)}function Vj(){for(var a=20,b=[];0b.c?Qj(b,Oj,56-b.c):Qj(b,Oj,b.b-(b.c-56));for(var d=63;56<=d;d--)b.f[d]=255&c,c/=256;for(Pj(b),d=c=0;d>e;return lf(a)}function Yj(a,b,c,d){var e=Vj(),f=new ng(b,d,null,e,new K("no-auth-event")),h=H("BuildInfo.packageName",k);if("string"!=typeof h)throw new K("invalid-cordova-configuration");var m=H("BuildInfo.displayName",k),p={};if(G().toLowerCase().match(/iphone|ipad|ipod/))p.ibi=h;else if(G().toLowerCase().match(/android/))p.apn=h;else return B(new K("operation-not-supported-in-this-environment"));m&&(p.appDisplayName=m),e=Wj(e),p.sessionId=e;var z=Ri(a.l,a.i,a.m,b,c,null,d,a.o,p,a.u);return a.ga().then(function(){var b=a.h;return a.v.a.set(Dj,f.D(),b)}).then(function(){var b=H("cordova.plugins.browsertab.isAvailable",k);if("function"!=typeof b)throw new K("invalid-cordova-configuration");var c=null;b(function(b){if(b){if(c=H("cordova.plugins.browsertab.openUrl",k),"function"!=typeof c)throw new K("invalid-cordova-configuration");c(z)}else{if(c=H("cordova.InAppBrowser.open",k),"function"!=typeof c)throw new K("invalid-cordova-configuration");b=G(),b=b.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||b.match(/(iPad|iPhone|iPod).*OS 8_\d/i),a.a=c(z,b?"_blank":"_system","location=yes")}})})}function ak(a,b){for(var c=0;ca.f&&(a.a=a.f),b)}function Fk(a,b){a.stop(),a.b=Hc(Gk(a,b)).then(function(){return Ee()}).then(function(){return a.h()}).then(function(){Fk(a,!0)}).s(function(b){a.i(b)&&Fk(a,!1)})}function Hk(a){this.f=a,this.b=this.a=null,this.c=0}function Ik(a,b){var c=b[L],d=b.refreshToken;b=Jk(b.expiresIn),a.b=c,a.c=b,a.a=d}function Kk(a,b){a.b=b.b,a.a=b.a,a.c=b.c}function Jk(a){return na()+1E3*parseInt(a,10)}function Lk(a,b){return Mh(a.f,b).then(function(b){return a.b=b.access_token,a.c=Jk(b.expires_in),a.a=b.refresh_token,{accessToken:a.b,expirationTime:a.c,refreshToken:a.a}}).s(function(b){throw"auth/user-token-expired"==b.code&&(a.a=null),b})}function Mk(a,b){this.a=a||null,this.b=b||null,J(this,{lastSignInTime:Fe(b||null),creationTime:Fe(a||null)})}function Nk(a){return new Mk(a.a,a.b)}function Ok(a,b,c,d,e,f){J(this,{uid:a,displayName:d||null,photoURL:e||null,email:c||null,phoneNumber:f||null,providerId:b})}function Pk(a,b){for(var c in C.call(this,a),b)this[c]=b[c]}function Q(a,b,c){this.G=[],this.l=a.apiKey,this.o=a.appName,this.u=a.authDomain||null,a=firebase.SDK_VERSION?re(firebase.SDK_VERSION):null,this.b=new Ah(this.l,xi(yi),a),this.h=new Hk(this.b),Qk(this,b[L]),Ik(this.h,b),I(this,"refreshToken",this.h.a),Rk(this,c||{}),E.call(this),this.I=!1,this.u&&ue()&&(this.a=tk(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=Sk(this),this.V=r(this.Ha,this);var d=this;this.ka=null,this.sa=function(a){d.oa(a.g)},this.X=null,this.O=[],this.ra=function(a){Tk(d,a.c)},this.W=null}function Uk(a,b){a.X&&D(a.X,"languageCodeChanged",a.sa),(a.X=b)&&rc(b,"languageCodeChanged",a.sa)}function Tk(a,b){a.O=b,Hh(a.b,firebase.SDK_VERSION?re(firebase.SDK_VERSION,a.O):null)}function Vk(a,b){a.W&&D(a.W,"frameworkChanged",a.ra),(a.W=b)&&rc(b,"frameworkChanged",a.ra)}function Wk(a){try{return firebase.app(a.o).auth()}catch(b){throw new K("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+a.o+"'!")}}function Sk(a){return new Ek(function(){return a.F(!0)},function(a){return a&&"auth/network-request-failed"==a.code},function(){var b=a.h.c-na()-3E5;return 0e||e>=xm.length)throw new K("internal-error","Argument validator received an unsupported number of arguments.");c=xm[e],d=(d?"":c+" argument ")+(b.name?"\""+b.name+"\" ":"")+"must be "+b.K+".";break a}d=null}}if(d)throw new K("argument-error",a+" failed: "+d)}function V(a,b){return{name:a||"",K:"a valid string",optional:!!b,M:l}}function ym(a,b){return{name:a||"",K:"a boolean",optional:!!b,M:ba}}function W(a,b){return{name:a||"",K:"a valid object",optional:!!b,M:q}}function zm(a,b){return{name:a||"",K:"a function",optional:!!b,M:n}}function Am(a,b){return{name:a||"",K:"null",optional:!!b,M:ea}}function Bm(){return{name:"",K:"an HTML element",optional:!1,M:function(a){return!!(a&&a instanceof Element)}}}function Cm(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(a){return!!(a&&a instanceof Kl)}}}function Dm(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(a){return!!(a&&a instanceof firebase.app.App)}}}function Em(a){return{name:a?a+"Credential":"credential",K:a?"a valid "+a+" credential":"a valid credential",optional:!1,M:function(b){if(!b)return!1;var c=!a||b.providerId===a;return b.ya&&c}}}function Fm(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}}function Gm(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(a){return!!(a&&l(a.type)&&n(a.verify))}}}function X(a,b,c,d){return{name:c||"",K:a.K+" or "+b.K,optional:!!d,M:function(c){return a.M(c)||b.M(c)}}}function Y(a,b){for(var c in b){var d=b[c].name;a[d]=Hm(d,a[c],b[c].j)}}function Im(a,b){for(var c in b){var d=b[c].name;if(d!==c){var e=b[c].qb;Object.defineProperty(a,d,{get:function(){return this[c]},set:function(a){wm(d,[e],[a],!0),this[c]=a},enumerable:!0})}}}function Z(a,b,c,d){a[b]=Hm(b,c,d)}function Hm(a,b,c){function d(){var a=Array.prototype.slice.call(arguments);return wm(e,c,a),b.apply(this,a)}if(!c)return b;var e=Jm(a),f;for(f in b)d[f]=b[f];for(f in b.prototype)d.prototype[f]=b.prototype[f];return d}function Jm(a){return a=a.split("."),a[a.length-1]}var firebase=__webpack_require__("dP58").default,aa=aa||{},k=this,ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0,na=Date.now||function(){return+new Date},g;t(u,Error),u.prototype.name="CustomError",t(qa,u),qa.prototype.name="AssertionError",sa.prototype.get=function(){if(0/g,Ra=/"/g,Sa=/'/g,Ta=/\x00/g,Na=/[\x00&<>"']/,Va;a:{var Wa=k.navigator;if(Wa){var Xa=Wa.userAgent;if(Xa){Va=Xa;break a}}Va=""}var ab=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ib=!1,ya=new ua,kb=0,mb=2,ob=3,db,gb;pb.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var qb=new sa(function(){return new pb},function(a){a.reset()});y.prototype.then=function(a,b,c){return wb(this,n(a)?a:null,n(b)?b:null,c)},oa(y),g=y.prototype,g.ia=function(a,b){return a=rb(a,a,b),a.c=!0,xb(this,a),this},g.s=function(a,b){return wb(this,null,a,b)},g.cancel=function(a){this.a==kb&&fb(function(){var b=new nb(a);yb(this,b)},this)},g.Lc=function(a){this.a=kb,lb(this,mb,a)},g.Mc=function(a){this.a=kb,lb(this,ob,a)},g.Ub=function(){for(var a;a=zb(this);)Ab(this,a,this.a,this.i);this.h=!1};var Fb=cb;t(nb,u),nb.prototype.name="cancel";var Hb=0,Ib={};Gb.prototype.pa=!1,Gb.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},Kb[" "]=ca;var Nb=x("Opera"),Ob=x("Trident")||x("MSIE"),Pb=x("Edge"),Qb=Pb||Ob,Rb=x("Gecko")&&(!w(Va.toLowerCase(),"webkit")||x("Edge"))&&!(x("Trident")||x("MSIE"))&&!x("Edge"),Sb=w(Va.toLowerCase(),"webkit")&&!x("Edge"),Ub;a:{var Vb="",Wb=function(){var a=Va;return Rb?/rv:([^\);]+)(\)|;)/.exec(a):Pb?/Edge\/([\d\.]+)/.exec(a):Ob?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):Sb?/WebKit\/(\S+)/.exec(a):Nb?/(?:Version)[ \/]?(\S+)/.exec(a):void 0}();if(Wb&&(Vb=Wb?Wb[1]:""),Ob){var Xb=Tb();if(null!=Xb&&Xb>parseFloat(Vb)){Ub=Xb+"";break a}}Ub=Vb}var Mb={},$b=k.document,Zb;Zb=$b&&Ob?Tb()||("CSS1Compat"==$b.compatMode?parseInt(Ub,10):5):void 0;var ac=Object.freeze||function(a){return a},bc=!Ob||9<=+Zb,cc=Ob&&!Yb("9"),dc=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});return k.addEventListener("test",ca,b),k.removeEventListener("test",ca,b),a}();C.prototype.preventDefault=function(){this.Gb=!1},t(ec,C);var fc=ac({2:"touch",3:"pen",4:"mouse"});ec.prototype.preventDefault=function(){ec.lb.preventDefault.call(this);var a=this.a;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,cc)try{(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)&&(a.keyCode=-1)}catch(b){}},ec.prototype.f=function(){return this.a};var gc="closure_listenable_"+(0|1E6*Math.random()),hc=0;kc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.a[f],a||(a=this.a[f]=[],this.b++);var h=lc(a,b,d,e);return-1>>0);t(E,Gb),E.prototype[gc]=!0,E.prototype.addEventListener=function(a,b,c,d){rc(this,a,b,c,d)},E.prototype.removeEventListener=function(a,b,c,d){D(this,a,b,c,d)},E.prototype.dispatchEvent=function(a){var c=this.Ua,b;if(c)for(b=[];c;c=c.Ua)b.push(c);c=this.Nb;var d=a.type||a;if(l(a))a=new C(a,c);else if(a instanceof C)a.target=a.target||c;else{var e=a;a=new C(d,c),bb(a,e)}if(e=!0,b)for(var f=b.length-1,h;0<=f;f--)h=a.b=b[f],e=Fc(h,d,!0,a)&&e;if(h=a.b=c,e=Fc(h,d,!0,a)&&e,e=Fc(h,d,!1,a)&&e,b)for(f=0;f"),Id(""),Id("
");var Ld={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Td={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\u000b"},Ud=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,ge=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ee="Firefox",ae="Chrome",qe={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};Ce.prototype.get=function(){var a=k.navigator;return(a&&"boolean"==typeof a.onLine&&(ve()||"chrome-extension:"===ke()||"undefined"!=typeof a.connection)?a.onLine:1)?this.b?this.c:this.a:Math.min(5E3,this.a)};var He={},Je;try{var Ke={};Object.defineProperty(Ke,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Ke,"abcd",{configurable:!0,enumerable:!0,value:2}),Je=2==Ke.abcd}catch(a){Je=!1}var Te="EMAIL_SIGNIN",Qe="email",Re="newEmail",Se="requestType",Ve="email",Ue="fromEmail",Xe="data",We="operation";t(K,Error),K.prototype.D=function(){return{code:this.code,message:this.message}},K.prototype.toJSON=function(){return this.D()};var Ye="auth/",Ze={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":"This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled.","popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},cf="android",jf="handleCodeInApp",gf="iOS",bf="url",ef="installApp",ff="minimumVersion",df="packageName",hf="bundleId",mf=null,nf=null;rf.prototype.f=function(){return this.b};var uf=["oauth_consumer_key","oauth_nonce","oauth_signature","oauth_signature_method","oauth_timestamp","oauth_token","oauth_version"],vf=["client_id","response_type","scope","redirect_uri","state"],wf={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:vf},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:vf},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:vf},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:uf}},Ff="idToken",Df="providerId";t(Ef,Gf),t(zf,Ef),t(Bf,Ef),t(Af,Ef),t(Cf,Ef),Kf.prototype.ya=function(a){return Lf(a,Mf(this))},Kf.prototype.c=function(a,b){var c=Mf(this);return c.idToken=b,Nf(a,c)},Kf.prototype.f=function(a,b){var c=Mf(this);return Jf(Of(a,c),b)},Kf.prototype.D=function(){var a={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(a.oauthIdToken=this.idToken),this.accessToken&&(a.oauthAccessToken=this.accessToken),this.secret&&(a.oauthTokenSecret=this.secret),a},Pf.prototype.Da=function(a){return this.vb=$a(a),this},t(M,Pf),M.prototype.ta=function(a){return Fa(this.a,a)||this.a.push(a),this},M.prototype.Ab=function(){return Ja(this.a)},M.prototype.credential=function(a,b){if(!a&&!b)throw new K("argument-error","credential failed: must provide the ID token and/or the access token.");return new Kf(this.providerId,{idToken:a||null,accessToken:b||null},this.providerId)},t(Qf,M),I(Qf,"PROVIDER_ID","facebook.com"),I(Qf,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),t(Sf,M),I(Sf,"PROVIDER_ID","github.com"),I(Sf,"GITHUB_SIGN_IN_METHOD","github.com"),t(Uf,M),I(Uf,"PROVIDER_ID","google.com"),I(Uf,"GOOGLE_SIGN_IN_METHOD","google.com"),t(Wf,Pf),I(Wf,"PROVIDER_ID","twitter.com"),I(Wf,"TWITTER_SIGN_IN_METHOD","twitter.com"),Yf.prototype.ya=function(a){return this.signInMethod==N.EMAIL_LINK_SIGN_IN_METHOD?O(a,Zf,{email:this.a,oobCode:this.b}):O(a,$f,{email:this.a,password:this.b})},Yf.prototype.c=function(a,b){return this.signInMethod==N.EMAIL_LINK_SIGN_IN_METHOD?O(a,ag,{idToken:b,email:this.a,oobCode:this.b}):O(a,bg,{idToken:b,email:this.a,password:this.b})},Yf.prototype.f=function(a,b){return Jf(this.ya(a),b)},Yf.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},J(N,{PROVIDER_ID:"password"}),J(N,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),J(N,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),eg.prototype.ya=function(a){return a.Ta(fg(this))},eg.prototype.c=function(a,b){var c=fg(this);return c.idToken=b,O(a,gg,c)},eg.prototype.f=function(a,b){var c=fg(this);return c.operation="REAUTH",a=O(a,hg,c),Jf(a,b)},eg.prototype.D=function(){var a={providerId:"phone"};return this.a.Sa&&(a.verificationId=this.a.Sa),this.a.Ra&&(a.verificationCode=this.a.Ra),this.a.Fa&&(a.temporaryProof=this.a.Fa),this.a.$&&(a.phoneNumber=this.a.$),a},ig.prototype.Ta=function(a,b){var c=this.a.b;return A(b.verify()).then(function(d){if(!l(d))throw new K("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(b.type){case"recaptcha":return jg(c,{phoneNumber:a,recaptchaToken:d}).then(function(a){return"function"==typeof b.reset&&b.reset(),a},function(a){throw"function"==typeof b.reset&&b.reset(),a});default:throw new K("argument-error","Only firebase.auth.ApplicationVerifiers with type=\"recaptcha\" are currently supported.");}})},J(ig,{PROVIDER_ID:"phone"}),J(ig,{PHONE_SIGN_IN_METHOD:"phone"}),ng.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var qg=null;pg.prototype.subscribe=function(a){var b=this;this.a.push(a),this.b||(this.b=function(a){for(var c=0;c=Lg(this).value)for(n(b)&&(b=b()),a=new Dg(a,b+"",this.f),c&&(a.a=c),c=this;c;)c=c.a};var Mg={},Ng=null;t(Pg,vg),Pg.prototype.a=function(){return new Qg(this.f)},Pg.prototype.b=function(a){return function(){return a}}({}),t(Qg,E);var Rg=0;g=Qg.prototype,g.open=function(a,b){if(this.readyState!=Rg)throw this.abort(),Error("Error reopening a connection");this.h=a,this.c=b,this.readyState=1,Sg(this)},g.send=function(a){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var b={headers:this.g,method:this.h,credentials:void 0,cache:void 0};a&&(b.body=a),this.i.fetch(new Request(this.c,b)).then(this.ec.bind(this),this.Cb.bind(this))},g.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,Sg(this)),this.readyState=Rg},g.ec=function(a){this.a&&(this.b||(this.b=a.headers,this.readyState=2,Sg(this)),this.a&&(this.readyState=3,Sg(this),this.a&&a.text().then(this.dc.bind(this,a),this.Cb.bind(this))))},g.dc=function(a,b){this.a&&(this.status=a.status,this.statusText=a.statusText,this.responseText=b,this.readyState=4,Sg(this))},g.Cb=function(a){var b=this.f;b&&b.log(Ig,"Failed to fetch url "+this.c,a instanceof Error?a:Error(a)),this.a&&(this.readyState=4,Sg(this))},g.setRequestHeader=function(a,b){this.g.append(a,b)},g.getResponseHeader=function(a){return this.b?this.b.get(a.toLowerCase())||"":((a=this.f)&&a.log(Ig,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},g.getAllResponseHeaders=function(){if(!this.b){var a=this.f;return a&&a.log(Ig,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}a=[];for(var b=this.b.entries(),c=b.next();!c.done;)c=c.value,a.push(c[0]+": "+c[1]),c=b.next();return a.join("\r\n")},t(Tg,E);var Ug="";Tg.prototype.b=Og("goog.net.XhrIo");var Vg=/^https?$/i,Wg=["POST","PUT"];g=Tg.prototype,g.Ga=function(){"undefined"!=typeof aa&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",P(this.b,Yg(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},g.abort=function(){this.a&&this.c&&(P(this.b,Yg(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ch(this))},g.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),ch(this,!0)),Tg.lb.ua.call(this)},g.Fb=function(){this.pa||(this.I||this.i||this.f?dh(this):this.tc())},g.tc=function(){dh(this)},g.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case Ug:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer;}var a=this.b;return a&&a.log(Hg,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(b){return P(this.b,"Can not get response: "+b.message),null}},hh.prototype.cancel=function(a){if(this.a)this.c instanceof hh&&this.c.cancel();else{if(this.b){var b=this.b;delete this.b,a?b.cancel(a):(b.m--,0>=b.m&&b.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(a=new ih(this),jh(this),kh(this,!1,a))}},hh.prototype.o=function(a,b){this.i=!1,kh(this,a,b)},hh.prototype.C=function(){jh(this),kh(this,!0,null)},hh.prototype.then=function(a,b,c){var f=new y(function(a,b){d=a,e=b}),d,e;return oh(this,d,function(a){a instanceof ih?f.cancel():e(a)}),f.then(a,b,c)},oa(hh),t(mh,u),mh.prototype.message="Deferred has already fired",mh.prototype.name="AlreadyCalledError",t(ih,u),ih.prototype.message="Deferred was canceled",ih.prototype.name="CanceledError",rh.prototype.c=function(){throw delete qh[this.a],this.b};var qh={},xh=0,wh=1;t(vh,u),t(zh,vg),zh.prototype.a=function(){return new this.f},zh.prototype.b=function(){return{}};var L="idToken",Bh=new Ce(3E4,6E4),Ch={"Content-Type":"application/x-www-form-urlencoded"},Dh=new Ce(3E4,6E4),Eh={"Content-Type":"application/json"},Fh;Ah.prototype.o=function(a,b,c,d,e,f){if(me()&&("undefined"==typeof k.fetch||"undefined"==typeof k.Headers||"undefined"==typeof k.Request))throw new K("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var h=new Tg(this.c);if(f){h.g=_Mathmax3(0,f);var m=setTimeout(function(){h.dispatchEvent("timeout")},f)}uc(h,"complete",function(){m&&clearTimeout(m);var a=null;try{a=JSON.parse(gh(this))||null}catch(z){a=null}b&&b(a)}),Ac(h,"ready",function(){m&&clearTimeout(m),Jb(this)}),Ac(h,"timeout",function(){m&&clearTimeout(m),Jb(this),b&&b(null)}),Xg(h,a,c,d,e)};var Kh=rd("https://apis.google.com/js/client.js?onload=%{onload}"),Lh="__fcb"+_Mathfloor2(1E6*Math.random()).toString();Ah.prototype.l=function(a,b,c,d,e){var f=this;Fh.then(function(){window.gapi.client.setApiKey(f.b);var h=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:a,method:c,body:d,headers:e,authType:"none",callback:function(a){window.gapi.auth.setToken(h),b&&b(a)}})}).s(function(a){b&&b({error:{message:a&&a.message||"CORS_UNSUPPORTED"}})})},Ah.prototype.Pa=function(){return O(this,Yh,{})},Ah.prototype.mb=function(a,b){return O(this,Zh,{idToken:a,email:b})},Ah.prototype.nb=function(a,b){return O(this,bg,{idToken:a,password:b})};var $h={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};g=Ah.prototype,g.ob=function(a,b){var c={idToken:a},d=[];return Ya($h,function(a,f){var e=b[f];null===e?d.push(a):f in b&&(c[f]=e)}),d.length&&(c.deleteAttribute=d),O(this,Zh,c)},g.hb=function(a,b){return a={requestType:"PASSWORD_RESET",email:a},bb(a,b),O(this,ai,a)},g.ib=function(a,b){return a={requestType:"EMAIL_SIGNIN",email:a},bb(a,b),O(this,bi,a)},g.gb=function(a,b){return a={requestType:"VERIFY_EMAIL",idToken:a},bb(a,b),O(this,ci,a)},g.Ta=function(a){return O(this,ei,a)},g.Xa=function(a,b){return O(this,oi,{oobCode:a,newPassword:b})},g.Ja=function(a){return O(this,pi,{oobCode:a})},g.Va=function(a){return O(this,qi,{oobCode:a})};var qi={endpoint:"setAccountInfo",B:ni,da:"email"},pi={endpoint:"resetPassword",B:ni,J:function(a){var b=a.requestType;if(!b||!a.email&&"EMAIL_SIGNIN"!=b)throw new K("internal-error")}},ri={endpoint:"signupNewUser",B:function(a){if(Ph(a),!a.password)throw new K("weak-password")},J:Wh,R:!0},Sh={endpoint:"createAuthUri"},si={endpoint:"deleteAccount",T:["idToken"]},gi={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(a){if(!fa(a.deleteProvider))throw new K("internal-error")}},Zf={endpoint:"emailLinkSignin",T:["email","oobCode"],B:Ph,J:Wh,R:!0},ag={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:Ph,J:Wh,R:!0},ti={endpoint:"getAccountInfo"},bi={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(a){if("EMAIL_SIGNIN"!=a.requestType)throw new K("internal-error");Ph(a)},da:"email"},ci={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(a){if("VERIFY_EMAIL"!=a.requestType)throw new K("internal-error")},da:"email"},ai={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(a){if("PASSWORD_RESET"!=a.requestType)throw new K("internal-error");Ph(a)},da:"email"},Vh={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},ui={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(a){if(!a.recaptchaSiteKey)throw new K("internal-error")}},oi={endpoint:"resetPassword",B:ni,da:"email"},di={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},Zh={endpoint:"setAccountInfo",T:["idToken"],B:Qh,R:!0},bg={endpoint:"setAccountInfo",T:["idToken"],B:function(a){if(Qh(a),!a.password)throw new K("weak-password")},J:Wh,R:!0},Yh={endpoint:"signupNewUser",J:Wh,R:!0},ki={endpoint:"verifyAssertion",B:hi,J:ii,R:!0},mi={endpoint:"verifyAssertion",B:hi,J:function(a){if(a.errorMessage&&"USER_NOT_FOUND"==a.errorMessage)throw new K("user-not-found");if(a.errorMessage)throw ji(a.errorMessage);if(!a[L])throw new K("internal-error")},R:!0},li={endpoint:"verifyAssertion",B:function(a){if(hi(a),!a.idToken)throw new K("internal-error")},J:ii,R:!0},vi={endpoint:"verifyCustomToken",B:function(a){if(!a.token)throw new K("invalid-custom-token")},J:Wh,R:!0},$f={endpoint:"verifyPassword",B:function(a){if(Ph(a),!a.password)throw new K("wrong-password")},J:Wh,R:!0},ei={endpoint:"verifyPhoneNumber",B:Xh,J:Wh},gg={endpoint:"verifyPhoneNumber",B:function(a){if(!a.idToken)throw new K("internal-error");Xh(a)},J:function(a){if(a.temporaryProof)throw a.code="credential-already-in-use",tg(a);Wh(a)}},hg={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:Xh,J:Wh},wi={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}},yi;yi=xi("__EID__")?"__EID__":void 0;var Fi=rd("https://apis.google.com/js/api.js?onload=%{onload}"),Gi=new Ce(3E4,6E4),Ci=new Ce(5E3,15E3),Hi=null;Ii.prototype.toString=function(){return this.f?F(this.a,"v",this.f):ld(this.a.a,"v"),this.b?F(this.a,"eid",this.b):ld(this.a.a,"eid"),this.c.length?F(this.a,"fw",this.c.join(",")):ld(this.a.a,"fw"),this.a.toString()},Ji.prototype.toString=function(){var a=fd(this.o,"/__/auth/handler");if(F(a,"apiKey",this.l),F(a,"appName",this.c),F(a,"authType",this.m),this.a.isOAuthProvider){var b=this.a;try{var c=firebase.app(this.c).auth().ea()}catch(m){c=null}for(var d in b.Ya=c,F(a,"providerId",this.a.providerId),b=this.a,c=ye(b.vb),c)c[d]=c[d].toString();d=b.Ac,c=$a(c);for(var e=0,f;ethis.c-3E4?this.a?Lk(this,{grant_type:"refresh_token",refresh_token:this.a}):A(null):A({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Mk.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},t(Pk,C),t(Q,E),Q.prototype.oa=function(a){this.ka=a,Gh(this.b,a)},Q.prototype.ea=function(){return this.ka},Q.prototype.xa=function(){return Ja(this.O)},Q.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},I(Q.prototype,"providerId","firebase"),g=Q.prototype,g.reload=function(){var a=this;return R(this,cl(this).then(function(){return il(a).then(function(){return $k(a)}).then(bl)}))},g.ac=function(a){return this.F(a).then(function(a){return new Dk(a)})},g.F=function(a){var b=this;return R(this,cl(this).then(function(){return b.h.getToken(a)}).then(function(a){if(!a)throw new K("internal-error");return a.accessToken!=b.qa&&(Qk(b,a.accessToken),b.dispatchEvent(new Pk("tokenChanged"))),gl(b,"refreshToken",a.refreshToken),a.accessToken}))},g.uc=function(a){if(a=a.users,!a||!a.length)throw new K("internal-error");a=a[0],Rk(this,{uid:a.localId,displayName:a.displayName,photoURL:a.photoUrl,email:a.email,emailVerified:!!a.emailVerified,phoneNumber:a.phoneNumber,lastLoginAt:a.lastLoginAt,createdAt:a.createdAt});for(var b=ll(a),c=0;cthis.u&&(this.u=0),0==this.u&&U(this)&&Yk(U(this)),this.removeAuthTokenListener(a)},g.addAuthTokenListener=function(a){var b=this;this.o.push(a),T(this,this.i.then(function(){b.l||Fa(b.o,a)&&a(Zl(b))}))},g.removeAuthTokenListener=function(a){Ha(this.o,function(b){return b==a})},g.delete=function(){this.l=!0;for(var a=0;ai;i++)_utf8len[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=function(str){var str_len=str.length,buf_len=0,buf,c,c2,m_pos,i;for(m_pos=0;m_posc?1:2048>c?2:65536>c?3:4;for(buf=support.uint8array?new Uint8Array(buf_len):Array(buf_len),i=0,m_pos=0;ic?buf[i++]=c:2048>c?(buf[i++]=192|c>>>6,buf[i++]=128|63&c):65536>c?(buf[i++]=224|c>>>12,buf[i++]=128|63&c>>>6,buf[i++]=128|63&c):(buf[i++]=240|c>>>18,buf[i++]=128|63&c>>>12,buf[i++]=128|63&c>>>6,buf[i++]=128|63&c);return buf},utf8border=function(buf,max){var pos;for(max=max||buf.length,max>buf.length&&(max=buf.length),pos=max-1;0<=pos&&128==(192&buf[pos]);)pos--;return 0>pos?max:0===pos?max:pos+_utf8len[buf[pos]]>max?pos:max},buf2string=function(buf){var len=buf.length,utf16buf=Array(2*len),i,out,c,c_len;for(out=0,i=0;ic){utf16buf[out++]=c;continue}if(c_len=_utf8len[c],4c?utf16buf[out++]=c:(c-=65536,utf16buf[out++]=55296|1023&c>>10,utf16buf[out++]=56320|1023&c)}return utf16buf.length!==out&&(utf16buf.subarray?utf16buf=utf16buf.subarray(0,out):utf16buf.length=out),utils.applyFromCharCode(utf16buf)};exports.utf8encode=function(str){return support.nodebuffer?nodejsUtils.newBufferFrom(str,"utf-8"):string2buf(str)},exports.utf8decode=function(buf){return support.nodebuffer?utils.transformTo("nodebuffer",buf).toString("utf-8"):(buf=utils.transformTo(support.uint8array?"uint8array":"array",buf),buf2string(buf))},utils.inherits(Utf8DecodeWorker,GenericWorker),Utf8DecodeWorker.prototype.processChunk=function(chunk){var data=utils.transformTo(support.uint8array?"uint8array":"array",chunk.data);if(this.leftOver&&this.leftOver.length){if(support.uint8array){var previousData=data;data=new Uint8Array(previousData.length+this.leftOver.length),data.set(this.leftOver,0),data.set(previousData,this.leftOver.length)}else data=this.leftOver.concat(data);this.leftOver=null}var nextBoundary=utf8border(data),usableData=data;nextBoundary!==data.length&&(support.uint8array?(usableData=data.subarray(0,nextBoundary),this.leftOver=data.subarray(nextBoundary,data.length)):(usableData=data.slice(0,nextBoundary),this.leftOver=data.slice(nextBoundary,data.length))),this.push({data:exports.utf8decode(usableData),meta:chunk.meta})},Utf8DecodeWorker.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:exports.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},exports.Utf8DecodeWorker=Utf8DecodeWorker,utils.inherits(Utf8EncodeWorker,GenericWorker),Utf8EncodeWorker.prototype.processChunk=function(chunk){this.push({data:exports.utf8encode(chunk.data),meta:chunk.meta})},exports.Utf8EncodeWorker=Utf8EncodeWorker},TCoK:function(module,exports,__webpack_require__){"use strict";function ArrayReader(data){DataReader.call(this,data);for(var i=0;in;n++){c=n;for(var k=0;8>k;k++)c=1&c?3988292384^c>>>1:c>>>1;table[n]=c}return table}();module.exports=function(crc,buf,len,pos){crc^=-1;for(var i=pos;i>>8^crcTable[255&(crc^buf[i])];return-1^crc}},X7my:function(module,exports,__webpack_require__){"use strict";var _Mathmin=Math.min;(function(mod){mod(__webpack_require__("tQq4"))})(function(CodeMirror){function firstNonWS(str){var found=str.search(nonWS);return-1==found?0:found}function probablyInsideString(cm,pos,line){return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line,0)))&&!/^[\'\"\`]/.test(line)}function getMode(cm,pos){var mode=cm.getMode();return!1!==mode.useInnerComments&&mode.innerMode?cm.getModeAt(pos):mode}var noOptions={},nonWS=/[^\s\u00a0]/,Pos=CodeMirror.Pos;CodeMirror.commands.toggleComment=function(cm){cm.toggleComment()},CodeMirror.defineExtension("toggleComment",function(options){options||(options=noOptions);for(var cm=this,minLine=Infinity,ranges=this.listSelections(),mode=null,i=ranges.length-1;0<=i;i--){var from=ranges[i].from(),to=ranges[i].to();from.line>=minLine||(to.line>=minLine&&(to=Pos(minLine,0)),minLine=from.line,null==mode?cm.uncomment(from,to,options)?mode="un":(cm.lineComment(from,to,options),mode="line"):"un"==mode?cm.uncomment(from,to,options):cm.lineComment(from,to,options))}}),CodeMirror.defineExtension("lineComment",function(from,to,options){options||(options=noOptions);var self=this,mode=getMode(self,from),firstLine=self.getLine(from.line);if(!(null==firstLine||probablyInsideString(self,from,firstLine))){var commentString=options.lineComment||mode.lineComment;if(!commentString)return void((options.blockCommentStart||mode.blockCommentStart)&&(options.fullLines=!0,self.blockComment(from,to,options)));var end=_Mathmin(0!=to.ch||to.line==from.line?to.line+1:to.line,self.lastLine()+1),pad=null==options.padding?" ":options.padding,blankLines=options.commentBlankLines||from.line==to.line;self.operation(function(){if(options.indent){for(var baseString=null,i=from.line;iwhitespace.length)&&(baseString=whitespace)}for(var i=from.line;iend||self.operation(function(){if(!1!=options.fullLines){var lastLineHasText=nonWS.test(self.getLine(end));self.replaceRange(pad+endString,Pos(end)),self.replaceRange(startString+pad,Pos(from.line,0));var lead=options.blockCommentLead||mode.blockCommentLead;if(null!=lead)for(var i=from.line+1;i<=end;++i)(i!=end||lastLineHasText)&&self.replaceRange(lead+pad,Pos(i,0))}else self.replaceRange(endString,to),self.replaceRange(startString,from)})}}),CodeMirror.defineExtension("uncomment",function(from,to,options){options||(options=noOptions);var self=this,mode=getMode(self,from),end=_Mathmin(0!=to.ch||to.line==from.line?to.line:to.line-1,self.lastLine()),start=_Mathmin(from.line,end),lineString=options.lineComment||mode.lineComment,lines=[],pad=null==options.padding?" ":options.padding,didSomething;lineComment:{if(!lineString)break lineComment;for(var i=start;i<=end;++i){var line=self.getLine(i),found=line.indexOf(lineString);if(-1pos||(line.slice(endPos,endPos+pad.length)==pad&&(endPos+=pad.length),didSomething=!0,self.replaceRange("",Pos(i,pos),Pos(i,endPos)))}}),didSomething)return!0}var startString=options.blockCommentStart||mode.blockCommentStart,endString=options.blockCommentEnd||mode.blockCommentEnd;if(!startString||!endString)return!1;var lead=options.blockCommentLead||mode.blockCommentLead,startLine=self.getLine(start),open=startLine.indexOf(startString);if(-1==open)return!1;var endLine=end==start?startLine:self.getLine(end),close=endLine.indexOf(endString,end==start?open+startString.length:0),insideStart=Pos(start,open+1),insideEnd=Pos(end,close+1);if(-1==close||!/comment/.test(self.getTokenTypeAt(insideStart))||!/comment/.test(self.getTokenTypeAt(insideEnd))||-1dir&&0==start.ch)return doc.clipPos(Pos(start.line-1));var line=doc.getLine(start.line);if(0=line.length)return doc.clipPos(Pos(start.line+1,0));for(var state="start",pos=start.ch,e=0>dir?0:line.length,i=0,type;pos!=e;pos+=dir,i++){var next=line.charAt(0>dir?pos-1:pos),cat="_"!=next&&CodeMirror.isWordChar(next)?"w":"o";if("w"==cat&&next.toUpperCase()==next&&(cat="W"),"start"==state)"o"!=cat&&(state="in",type=cat);else if("in"==state&&type!=cat){if("w"==type&&"W"==cat&&0>dir&&pos--,"W"==type&&"w"==cat&&0dir?range.from():range.to()})}function insertLine(cm,above){return cm.isReadOnly()?CodeMirror.Pass:void(cm.operation(function(){for(var len=cm.listSelections().length,newSelection=[],last=-1,i=0,head;i=visibleBottomLine&&cm.execCommand("goLineUp")}cm.scrollTo(null,info.top-cm.defaultTextHeight())},cmds.scrollLineDown=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleTopLine=cm.lineAtHeight(info.top,"local")+1;cm.getCursor().line<=visibleTopLine&&cm.execCommand("goLineDown")}cm.scrollTo(null,info.top+cm.defaultTextHeight())},cmds.splitSelectionByLine=function(cm){for(var ranges=cm.listSelections(),lineRanges=[],i=0;ifrom.line&&line==to.line&&0==to.ch||lineRanges.push({anchor:line==from.line?from:Pos(line,0),head:line==to.line?to:Pos(line)});cm.setSelections(lineRanges,0)},cmds.singleSelectionTop=function(cm){var range=cm.listSelections()[0];cm.setSelection(range.anchor,range.head,{scroll:!1})},cmds.selectLine=function(cm){for(var ranges=cm.listSelections(),extended=[],i=0,range;iat?linesToMove.push(from,to):linesToMove.length&&(linesToMove[linesToMove.length-1]=to),at=to}cm.operation(function(){for(var i=0;icm.lastLine()?cm.replaceRange("\n"+line,Pos(cm.lastLine()),null,"+swapLine"):cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.setSelections(newSels),cm.scrollIntoView()})},cmds.swapLineDown=function(cm){if(cm.isReadOnly())return CodeMirror.Pass;for(var ranges=cm.listSelections(),linesToMove=[],at=cm.lastLine()+1,i=ranges.length-1;0<=i;i--){var range=ranges[i],from=range.to().line+1,to=range.from().line;0!=range.to().ch||range.empty()||from--,from "+me:me}},module.exports=GenericWorker},ZTma:function(module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function isQuote(c){return c===SINGLE_QUOTE||c===DOUBLE_QUOTE}function eatQuoted(stream){var start=stream.pos,quote=stream.prev();if(isQuote(quote))for(;!stream.sol();)if(stream.prev()===quote&&stream.peek()!==ESCAPE)return!0;return stream.pos=start,!1}function eatAttribute(stream){return eatAttributeWithQuotedValue(stream)||eatAttributeWithUnquotedValue(stream)}function eatAttributeWithQuotedValue(stream){var start=stream.pos;return eatQuoted(stream)&&stream.eat(EQUALS)&&eatIdent(stream)||(stream.pos=start,!1)}function eatAttributeWithUnquotedValue(stream){var start=stream.pos;return stream.eatWhile(isUnquotedValue)&&stream.eat(EQUALS)&&eatIdent(stream)||(stream.pos=start,!1)}function eatIdent(stream){return stream.eatWhile(isIdent)}function isIdent(c){return c===COLON||c===DASH||isAlpha(c)||isNumber(c)}function isAlpha(c){return c&=-33,65<=c&&90>=c}function isNumber(c){return 47c}function isWhiteSpace(c){return c===SPACE||c===TAB}function isUnquotedValue(c){return c&&c!==EQUALS&&!isWhiteSpace(c)&&!isQuote(c)}function offsetPastAutoClosed(line,pos,options){for(isQuote(line.charCodeAt(pos))&&pos++;isCloseBrace(line.charCodeAt(pos),options.syntax);)pos++;return pos}function getStartOffset(line,pos,prefix){if(!prefix)return 0;var stream=new StreamReader(line),compiledPrefix=(prefix+"").split("").map(code);stream.pos=pos;for(var result;!stream.sol();)if(!(consumePair(stream,SQUARE_BRACE_R,SQUARE_BRACE_L)||consumePair(stream,CURLY_BRACE_R,CURLY_BRACE_L))){if(result=stream.pos,consumeArray(stream,compiledPrefix))return result;stream.pos--}return-1}function consumePair(stream,close,open){var start=stream.pos;if(stream.eat(close))for(;!stream.sol();){if(stream.eat(open))return!0;stream.pos--}return stream.pos=start,!1}function consumeArray(stream,arr){for(var start=stream.pos,consumed=!1,i=arr.length-1;0<=i&&!stream.sol()&&!!stream.eat(arr[i]);i--)consumed=0===i;return consumed||(stream.pos=start),consumed}function has(arr,value){return-1!==arr.indexOf(value)}function isAbbreviation(c){return 64c||96c||47c||specialChars.has(c)}function isOpenBrace(c,syntax){return c===ROUND_BRACE_L||"markup"===syntax&&(c===SQUARE_BRACE_L||c===CURLY_BRACE_L)}function isCloseBrace(c,syntax){return c===ROUND_BRACE_R||"markup"===syntax&&(c===SQUARE_BRACE_R||c===CURLY_BRACE_R)}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1,source;i","/"].map(code)),bracePairs=new Map().set(SQUARE_BRACE_L,SQUARE_BRACE_R).set(ROUND_BRACE_L,ROUND_BRACE_R).set(CURLY_BRACE_L,CURLY_BRACE_R),defaultOptions={syntax:"markup",lookAhead:null,prefix:""};exports.default=function(line,pos,options){pos=Math.min(line.length,Math.max(0,null==pos?line.length:pos)),options="boolean"==typeof options?_extends({},defaultOptions,{lookAhead:options}):_extends({},defaultOptions,options),(null==options.lookAhead||!0===options.lookAhead)&&(pos=offsetPastAutoClosed(line,pos,options));var c=void 0,start=getStartOffset(line,pos,options.prefix);if(-1===start)return null;var stream=new StreamReader(line,start);stream.pos=pos;for(var stack=[];!stream.sol();){if(c=stream.peek(),isCloseBrace(c,options.syntax))stack.push(c);else if(isOpenBrace(c,options.syntax)){if(stack.pop()!==bracePairs.get(c))break;}else if(has(stack,SQUARE_BRACE_R)||has(stack,CURLY_BRACE_R)){stream.pos--;continue}else if(isAtHTMLTag(stream)||!isAbbreviation(c))break;stream.pos--}if(!stack.length&&stream.pos!==pos){var abbreviation=line.slice(stream.pos,pos).replace(/^[*+>^]+/,"");return{abbreviation:abbreviation,location:pos-abbreviation.length,start:options.prefix?start-options.prefix.length:pos-abbreviation.length,end:pos}}}},ZUoI:function(module,exports,__webpack_require__){"use strict";__webpack_require__("wGjj");var firebase=function(ex){return ex&&"object"==typeof ex&&"default"in ex?ex["default"]:ex}(__webpack_require__("dP58"));module.exports=firebase},Znrd:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function template(str,data){if(null==str)return str;for(var stack=[],replacer=function(str,left,token,right){return null==data[token]?"":left+data[token]+right},output="",offset=0,i=0,code=void 0,lastPos=void 0;i=profile.get("inlineBreak"))return!0}for(var i=0,il=node.children.length;ilevel?0:level}function commentNode(outNode,options){var node=outNode.node;if(options.enabled&&options.trigger&&node.name)for(var attrs=outNode.node.attributes.reduce(function(out,attr){return attr.name&&null!=attr.value&&(out[attr.name.toUpperCase().replace(/-/g,"_")]=attr.value),out},{}),i=0,il=options.trigger.length;ilevel?0:level}function updateFormatting(outNode,profile){var node=outNode.node;return!node.isTextOnly&&node.value&&(outNode.beforeText=reNl.test(node.value)?outNode.newline+outNode.indent+profile.indent(1):" "),outNode}function formatNodeValue(node,profile){if(null!=node.value&&reNl.test(node.value)){var lines=splitByLines(node.value),indent=profile.indent(1),maxLength=lines.reduce(function(prev,line){return Math.max(prev,line.length)},0);return lines.map(function(line,i){return""+(i?indent:"")+pad(line,maxLength)+" |"}).join("\n")}return node.value}function pad(text,len){for(;text.length"},reId=/^id$/i,reClass=/^class$/i,defaultAttrOptions={primary:function(attrs){return attrs.join("")},secondary:function(attrs){return attrs.map(function(attr){return attr.isBoolean?attr.name:attr.name+"="+attr.value}).join(", ")}},defaultNodeOptions={open:null,close:null,omitName:/^div$/i,attributes:defaultAttrOptions},reNl=/\n|\r/,reNl$1=/\n|\r/,secondaryAttrs={none:"[ SECONDARY_ATTRS]",round:"[(SECONDARY_ATTRS)]",curly:"[{SECONDARY_ATTRS}]",square:"[[SECONDARY_ATTRS]"},reNl$2=/\n|\r/,supportedSyntaxes={html:function(tree,profile,options){options=_extends({},options);var format=getFormatOptions(options);return(0,_outputRenderer2.default)(tree,options.field,function(outNode){if(outNode=setFormatting(outNode,profile),!handlePseudoSnippet(outNode)){var node=outNode.node;if(node.name){var name=profile.name(node.name),attrs=formatAttributes(outNode,profile);outNode.open="<"+name+attrs+(node.selfClosing?profile.selfClose():"")+">",node.selfClosing||(outNode.close=""),commentNode(outNode,format.comment)}!node.value&&(node.children.length||node.selfClosing)||(outNode.text=outNode.renderFields(node.value))}return outNode})},haml:function(tree,profile,options){options=options||{};var nodeOptions={open:"[%NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)][SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(attrs){return attrs.map(function(attr){return attr.isBoolean?""+attr.name+(profile.get("compactBooleanAttributes")?"":"=true"):attr.name+"="+profile.quote(attr.value)}).join(" ")}}};return(0,_outputRenderer2.default)(tree,options.field,function(outNode){if(outNode=indentFormat(outNode,profile,nodeOptions),outNode=updateFormatting(outNode,profile),!handlePseudoSnippet(outNode)){var node=outNode.node;!node.value&&(node.children.length||node.selfClosing)||(outNode.text=outNode.renderFields(formatNodeValue(node,profile)))}return outNode})},slim:function(tree,profile,options){options=options||{};var SECONDARY_ATTRS=options.attributeWrap&&secondaryAttrs[options.attributeWrap]||secondaryAttrs.none,booleanAttr=SECONDARY_ATTRS===secondaryAttrs.none?function(attr){return attr.name+"=true"}:function(attr){return attr.name},nodeOptions={open:"[NAME][PRIMARY_ATTRS]"+SECONDARY_ATTRS+"[SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(attrs){return attrs.map(function(attr){return attr.isBoolean?booleanAttr(attr):attr.name+"="+profile.quote(attr.value)}).join(" ")}}};return(0,_outputRenderer2.default)(tree,options.field,function(outNode){if(outNode=indentFormat(outNode,profile,nodeOptions),outNode=updateFormatting$1(outNode,profile),!handlePseudoSnippet(outNode)){var node=outNode.node;!node.value&&(node.children.length||node.selfClosing)||(outNode.text=outNode.renderFields(formatNodeValue$1(node,profile)))}return outNode})},pug:function(tree,profile,options){options=options||{};var nodeOptions={open:"[NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)]",attributes:{secondary:function(attrs){return attrs.map(function(attr){return attr.isBoolean?attr.name:attr.name+"="+profile.quote(attr.value)}).join(", ")}}};return(0,_outputRenderer2.default)(tree,options.field,function(outNode){if(outNode=indentFormat(outNode,profile,nodeOptions),outNode=updateFormatting$2(outNode,profile),!handlePseudoSnippet(outNode)){var node=outNode.node;!node.value&&(node.children.length||node.selfClosing)||(outNode.text=outNode.renderFields(formatNodeValue$2(node,profile)))}return outNode})}};exports.default=function(tree,profile,syntax,options){return"object"==typeof syntax&&(options=syntax,syntax=null),supports(syntax)||(syntax="html"),supportedSyntaxes[syntax](tree,profile,options)},exports.supports=supports,exports.template=template},aBJ1:function(module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function createAttribute(name,value){return name instanceof Attribute?name:"string"==typeof name?new Attribute(name,value):name&&"object"==typeof name?new Attribute(name.name,name.value,name.options):void 0}function normalize(str){return(str+"").trim()}function uniqueClass(item,i,arr){return item&&arr.indexOf(item)===i}exports.__esModule=!0;var _createClass=function(){function defineProperties(target,props){for(var i=0,descriptor;ipos||pos>this.children.length)throw new Error("Unable to insert node: position is out of child list range");var prev=this.children[pos-1],next=this.children[pos];node.remove(),node.parent=this,this.children.splice(pos,0,node),prev&&(node.previous=prev,prev.next=node),next&&(node.next=next,next.previous=node)},Node.prototype.removeChild=function(node){var ix=this.children.indexOf(node);-1!==ix&&(this.children.splice(ix,1),node.previous&&(node.previous.next=node.next),node.next&&(node.next.previous=node.previous),node.parent=node.next=node.previous=null)},Node.prototype.remove=function(){this.parent&&this.parent.removeChild(this)},Node.prototype.clone=function(deep){var clone=new Node(this.name);return clone.value=this.value,clone.selfClosing=this.selfClosing,this.repeat&&(clone.repeat=_extends({},this.repeat)),this._attributes.forEach(function(attr){return clone.setAttribute(attr.clone())}),deep&&this.children.forEach(function(child){return clone.appendChild(child.clone(!0))}),clone},Node.prototype.walk=function(fn,_level){_level=_level||0;for(var ctx=this.firstChild,next;ctx;){if(next=ctx.next,!1===fn(ctx,_level)||!1===ctx.walk(fn,_level+1))return!1;ctx=next}},Node.prototype.use=function(fn){for(var args=[this],i=1;i=maxScore&&(maxScore=score,matchedItem=item)}return maxScore>=fuzzySearchMinScore?matchedItem:null}function getScoringPart(item,key){var value=item&&"object"==typeof item?item[key]:item,m=(value||"").match(/^[\w-@]+/);return m?m[0]:value}function getUnmatchedPart(abbr,string){for(var i=0,lastPos=0;i=at?-1:lineText.lastIndexOf(startToken,at-1),-1==found){if(1==pass)return;pass=1,at=lineText.length;continue}if(1==pass&&foundnextOpen&&(nextOpen=text.length),0>nextClose&&(nextClose=text.length),pos=Math.min(nextOpen,nextClose),pos==text.length)break;if(pos==nextOpen)++depth;else if(! --depth){end=i,endCh=pos;break outer}++pos}return null==end||line==end&&endCh==startCh?void 0:{from:CodeMirror.Pos(line,startCh),to:CodeMirror.Pos(end,endCh)}}})})},bdtv:function(module){"use strict";module.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},c5OX:function(module){"use strict";module.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(data,encoding){return new Buffer(data,encoding)},allocBuffer:function(size){return Buffer.alloc?Buffer.alloc(size):new Buffer(size)},isBuffer:function(b){return Buffer.isBuffer(b)},isStream:function(obj){return obj&&"function"==typeof obj.on&&"function"==typeof obj.pause&&"function"==typeof obj.resume}}},cVWy:function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__("3Vd+"),core=__webpack_require__("KxJl"),ctx=__webpack_require__("iktq"),hide=__webpack_require__("3bh8"),PROTOTYPE="prototype",$export=function $export(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports[PROTOTYPE],target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE],key,own,out;for(key in IS_GLOBAL&&(source=name),source)own=!IS_FORCED&&target&&void 0!==target[key],own&&key in exports||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(a,b,c){if(this instanceof C){switch(arguments.length){case 0:return new C;case 1:return new C(a);case 2:return new C(a,b);}return new C(a,b,c)}return C.apply(this,arguments)};return F[PROTOTYPE]=C[PROTOTYPE],F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports.virtual||(exports.virtual={}))[key]=out,type&$export.R&&expProto&&!expProto[key]&&hide(expProto,key,out)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},cvyR:function(module,exports,__webpack_require__){"use strict";function crc32(crc,buf,len,pos){crc^=-1;for(var i=pos;i>>8^crcTable[255&(crc^buf[i])];return-1^crc}function crc32str(crc,str,len,pos){crc^=-1;for(var i=pos;i>>8^crcTable[255&(crc^str.charCodeAt(i))];return-1^crc}var utils=__webpack_require__("dvMn"),crcTable=function(){for(var table=[],n=0,c;256>n;n++){c=n;for(var k=0;8>k;k++)c=1&c?3988292384^c>>>1:c>>>1;table[n]=c}return table}();module.exports=function(input,crc){if("undefined"==typeof input||!input.length)return 0;var isArray="string"!==utils.getTypeOf(input);return isArray?crc32(0|crc,input,input.length,0):crc32str(0|crc,input,input.length,0)}},dFUs:function(module,exports,__webpack_require__){"use strict";function ZipEntry(options,loadOptions){this.options=options,this.loadOptions=loadOptions}var readerFor=__webpack_require__("9Uuy"),utils=__webpack_require__("dvMn"),CompressedObject=__webpack_require__("PO9O"),crc32fn=__webpack_require__("cvyR"),utf8=__webpack_require__("Sm7/"),compressions=__webpack_require__("XfO6"),support=__webpack_require__("untT"),findCompression=function(compressionMethod){for(var method in compressions)if(compressions.hasOwnProperty(method)&&compressions[method].magic===compressionMethod)return compressions[method];return null};ZipEntry.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(reader){var compression,localExtraFieldsLength;if(reader.skip(22),this.fileNameLength=reader.readInt(2),localExtraFieldsLength=reader.readInt(2),this.fileName=reader.readData(this.fileNameLength),reader.skip(localExtraFieldsLength),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(compression=findCompression(this.compressionMethod),null===compression)throw new Error("Corrupted zip : compression "+utils.pretty(this.compressionMethod)+" unknown (inner file : "+utils.transformTo("string",this.fileName)+")");this.decompressed=new CompressedObject(this.compressedSize,this.uncompressedSize,this.crc32,compression,reader.readData(this.compressedSize))},readCentralPart:function(reader){this.versionMadeBy=reader.readInt(2),reader.skip(2),this.bitFlag=reader.readInt(2),this.compressionMethod=reader.readString(2),this.date=reader.readDate(),this.crc32=reader.readInt(4),this.compressedSize=reader.readInt(4),this.uncompressedSize=reader.readInt(4);var fileNameLength=reader.readInt(2);if(this.extraFieldsLength=reader.readInt(2),this.fileCommentLength=reader.readInt(2),this.diskNumberStart=reader.readInt(2),this.internalFileAttributes=reader.readInt(2),this.externalFileAttributes=reader.readInt(4),this.localHeaderOffset=reader.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");reader.skip(fileNameLength),this.readExtraFields(reader),this.parseZIP64ExtraField(reader),this.fileComment=reader.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var madeBy=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),madeBy==0&&(this.dosPermissions=63&this.externalFileAttributes),madeBy==3&&(this.unixPermissions=65535&this.externalFileAttributes>>16),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var extraReader=readerFor(this.extraFields[1].value);this.uncompressedSize===utils.MAX_VALUE_32BITS&&(this.uncompressedSize=extraReader.readInt(8)),this.compressedSize===utils.MAX_VALUE_32BITS&&(this.compressedSize=extraReader.readInt(8)),this.localHeaderOffset===utils.MAX_VALUE_32BITS&&(this.localHeaderOffset=extraReader.readInt(8)),this.diskNumberStart===utils.MAX_VALUE_32BITS&&(this.diskNumberStart=extraReader.readInt(4))}},readExtraFields:function(reader){var end=reader.index+this.extraFieldsLength,extraFieldId,extraFieldLength,extraFieldValue;for(this.extraFields||(this.extraFields={});reader.indexsize)throw new RangeError("\"size\" argument must not be negative")}function alloc(that,size,fill,encoding){return assertSize(size),0>=size?createBuffer(that,size):void 0===fill?createBuffer(that,size):"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,0>size?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;iarray.length?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;ibyteOffset||array.byteLength=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0;}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||0>start)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),0>=end)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)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=!0;}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):2147483647byteOffset&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),0>byteOffset&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(0>byteOffset)if(dir)byteOffset=0;else return-1;if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1==indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=(encoding+"").toLowerCase(),"ucs2"===encoding||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(2>arr.length||2>val.length)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;0<=i;i--){for(var found=!0,j=0;jremaining&&(length=remaining)):length=remaining;var strLen=string.length;if(0!=strLen%2)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0,parsed;ifirstByte&&(codePoint=firstByte):2==bytesPerSequence?(secondByte=buf[i+1],128==(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,127tempCodePoint||57343tempCodePoint&&(codePoint=tempCodePoint))):void 0}null===codePoint?(codePoint=65533,bytesPerSequence=1):65535>>10),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return _StringfromCharCode5.apply(String,codePoints);for(var res="",i=0;istart)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;ioffset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}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||valuebuf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){0>value&&(value=65535+value+1);for(var i=0,j=_Mathmin2(buf.length-offset,2);i>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){0>value&&(value=4294967295+value+1);for(var i=0,j=_Mathmin2(buf.length-offset,4);i>>8*(littleEndian?i:3-i)}function checkIEEE754(buf,value,offset,ext){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(0>offset)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),2>str.length)return"";for(;0!=str.length%4;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;for(var length=string.length,leadSurrogate=null,bytes=[],i=0,codePoint;icodePoint){if(!leadSurrogate){if(56319codePoint){-1<(units-=3)&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&-1<(units-=3)&&bytes.push(239,191,189);if(leadSurrogate=null,128>codePoint){if(0>(units-=1))break;bytes.push(codePoint)}else if(2048>codePoint){if(0>(units-=2))break;bytes.push(192|codePoint>>6,128|63&codePoint)}else if(65536>codePoint){if(0>(units-=3))break;bytes.push(224|codePoint>>12,128|63&codePoint>>6,128|63&codePoint)}else if(1114112>codePoint){if(0>(units-=4))break;bytes.push(240|codePoint>>18,128|63&codePoint>>12,128|63&codePoint>>6,128|63&codePoint)}else throw new Error("Invalid code point")}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i(units-=2));++i)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=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=__webpack_require__("yh9p"),ieee754=__webpack_require__("JgNJ"),isArray=__webpack_require__("REa7");exports.Buffer=Buffer,exports.SlowBuffer=function(length){return+length!=length&&(length=0),Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0===global.TYPED_ARRAY_SUPPORT?function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}():global.TYPED_ARRAY_SUPPORT,exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!!(null!=b&&b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=_Mathmin2(x,y);imax&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),0>start||end>target.length||0>thisStart||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;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=_Mathmin2(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;iremaining)&&(length=remaining),0length||0>offset)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)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=!0;}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),end=mul&&(val-=_Mathpow2(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];0=mul&&(val-=_Mathpow2(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){var maxBytes=_Mathpow2(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=_Mathpow2(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++ivalue&&0==sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=255&(value/mul>>0)-sub;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=_Mathpow2(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;0<=--i&&(mul*=256);)0>value&&0==sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=255&(value/mul>>0)-sub;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=_Mathfloor3(value)),0>value&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),0targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("sourceStart out of bounds");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStartlen||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;icode&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val&=255);if(0>start||this.length>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;icode?"0":"")+code.toString(16).toUpperCase();return res},exports.delay=function(callback,args,self){setImmediate(function(){callback.apply(self||null,args||[])})},exports.inherits=function(ctor,superCtor){var Obj=function(){};Obj.prototype=superCtor.prototype,ctor.prototype=new Obj},exports.extend=function(){var result={},i,attr;for(i=0;iwords.length)return words;words=words.slice();var len=words.length,hasComma=/,$/,totalCommas=0;totalCommas=3=len?rand(0,1):6=len?rand(0,2):rand(1,4);for(var i=0,pos;imaxNumberOfArgs)throw new FirestoreError(Code.INVALID_ARGUMENT,"Function "+functionName+"() requires between "+minNumberOfArgs+" and "+(maxNumberOfArgs+" arguments, but was called with ")+formatPlural(args.length,"argument")+".")}function validateNamedArrayAtLeastNumberOfElements(functionName,value,name,minNumberOfElements){if(!(value instanceof Array)||value.lengthoptionNames.indexOf(key))throw new FirestoreError(Code.INVALID_ARGUMENT,"Unknown option '"+key+"' passed to function "+functionName+"(). Available options: "+optionNames.join(", "))})}function invalidClassError(functionName,type,position,argument){var description=valueDescription(argument);return new FirestoreError(Code.INVALID_ARGUMENT,"Function "+functionName+"() requires its "+ordinal(position)+" "+("argument to be a "+type+", but it was: "+description))}function ordinal(num){return 1===num?"first":2===num?"second":3===num?"third":num+"th"}function formatPlural(num,str){return num+" "+str+(1===num?"":"s")}function primitiveComparator(left,right){return leftright?1:0}function equals(left,right){return null!==left&&void 0!==left?!!(right&&left.isEqual(right)):left===right}function arrayEquals(left,right){if(left.length!==right.length)return!1;for(var i=0;iright?1:left===right?0:isNaN(left)?isNaN(right)?0:-1:1}function numericEquals(left,right){return left===right?0!==left||1/left==1/right:left!==left&&right!==right}function isNullOrUndefined(value){return null===value||void 0===value}function isSafeInteger(value){return isInteger(value)&&value<=MAX_SAFE_INTEGER&&value>=MIN_SAFE_INTEGER}function fieldFilter(field,op,value){if(value.isEqual(NullValue.INSTANCE)){if(op!==RelationOp.EQUAL)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new NullFilter(field)}if(value.isEqual(DoubleValue.NAN)){if(op!==RelationOp.EQUAL)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new NanFilter(field)}return new RelationFilter(field,op,value)}function isPermanentError(code){return code===Code.OK?fail("Treated status OK as error"):code===Code.CANCELLED||code===Code.UNKNOWN||code===Code.DEADLINE_EXCEEDED||code===Code.RESOURCE_EXHAUSTED||code===Code.INTERNAL||code===Code.UNAVAILABLE||code===Code.UNAUTHENTICATED?!1:code===Code.INVALID_ARGUMENT||code===Code.NOT_FOUND||code===Code.ALREADY_EXISTS||code===Code.PERMISSION_DENIED||code===Code.FAILED_PRECONDITION||code===Code.ABORTED||code===Code.OUT_OF_RANGE||code===Code.UNIMPLEMENTED||code===Code.DATA_LOSS||fail("Unknown status code: "+code)}function mapCodeFromRpcStatus(status){var code=RpcCode[status];return void 0===code?void 0:mapCodeFromRpcCode(code)}function mapCodeFromRpcCode(code){return void 0===code?(error("GRPC error has no .code"),Code.UNKNOWN):code===RpcCode.OK?Code.OK:code===RpcCode.CANCELLED?Code.CANCELLED:code===RpcCode.UNKNOWN?Code.UNKNOWN:code===RpcCode.DEADLINE_EXCEEDED?Code.DEADLINE_EXCEEDED:code===RpcCode.RESOURCE_EXHAUSTED?Code.RESOURCE_EXHAUSTED:code===RpcCode.INTERNAL?Code.INTERNAL:code===RpcCode.UNAVAILABLE?Code.UNAVAILABLE:code===RpcCode.UNAUTHENTICATED?Code.UNAUTHENTICATED:code===RpcCode.INVALID_ARGUMENT?Code.INVALID_ARGUMENT:code===RpcCode.NOT_FOUND?Code.NOT_FOUND:code===RpcCode.ALREADY_EXISTS?Code.ALREADY_EXISTS:code===RpcCode.PERMISSION_DENIED?Code.PERMISSION_DENIED:code===RpcCode.FAILED_PRECONDITION?Code.FAILED_PRECONDITION:code===RpcCode.ABORTED?Code.ABORTED:code===RpcCode.OUT_OF_RANGE?Code.OUT_OF_RANGE:code===RpcCode.UNIMPLEMENTED?Code.UNIMPLEMENTED:code===RpcCode.DATA_LOSS?Code.DATA_LOSS:fail("Unknown status code: "+code)}function mapRpcCodeFromCode(code){return void 0===code?RpcCode.OK:code===Code.OK?RpcCode.OK:code===Code.CANCELLED?RpcCode.CANCELLED:code===Code.UNKNOWN?RpcCode.UNKNOWN:code===Code.DEADLINE_EXCEEDED?RpcCode.DEADLINE_EXCEEDED:code===Code.RESOURCE_EXHAUSTED?RpcCode.RESOURCE_EXHAUSTED:code===Code.INTERNAL?RpcCode.INTERNAL:code===Code.UNAVAILABLE?RpcCode.UNAVAILABLE:code===Code.UNAUTHENTICATED?RpcCode.UNAUTHENTICATED:code===Code.INVALID_ARGUMENT?RpcCode.INVALID_ARGUMENT:code===Code.NOT_FOUND?RpcCode.NOT_FOUND:code===Code.ALREADY_EXISTS?RpcCode.ALREADY_EXISTS:code===Code.PERMISSION_DENIED?RpcCode.PERMISSION_DENIED:code===Code.FAILED_PRECONDITION?RpcCode.FAILED_PRECONDITION:code===Code.ABORTED?RpcCode.ABORTED:code===Code.OUT_OF_RANGE?RpcCode.OUT_OF_RANGE:code===Code.UNIMPLEMENTED?RpcCode.UNIMPLEMENTED:code===Code.DATA_LOSS?RpcCode.DATA_LOSS:fail("Unknown status code: "+code)}function mapCodeFromHttpStatus(status){return 200===status?Code.OK:400===status?Code.INVALID_ARGUMENT:401===status?Code.UNAUTHENTICATED:403===status?Code.PERMISSION_DENIED:404===status?Code.NOT_FOUND:409===status?Code.ABORTED:416===status?Code.OUT_OF_RANGE:429===status?Code.RESOURCE_EXHAUSTED:499===status?Code.CANCELLED:500===status?Code.UNKNOWN:501===status?Code.UNIMPLEMENTED:503===status?Code.UNAVAILABLE:504===status?Code.DEADLINE_EXCEEDED:200<=status&&300>status?Code.OK:400<=status&&500>status?Code.FAILED_PRECONDITION:500<=status&&600>status?Code.INTERNAL:Code.UNKNOWN}function maybeDocumentMap(){return EMPTY_MAYBE_DOCUMENT_MAP}function documentMap(){return EMPTY_DOCUMENT_MAP}function documentVersionMap(){return EMPTY_DOCUMENT_VERSION_MAP}function documentKeySet(){return EMPTY_DOCUMENT_KEY_SET}function applyResumeToken(change,resumeToken){0end||end>length-2)&&fail("Invalid encoded resource path: \""+path+"\"");var next=path.charAt(end+1);switch(next){case encodedSeparatorChar:var currentPiece=path.substring(start,end),segment=void 0;0===segmentBuilder.length?segment=currentPiece:(segmentBuilder+=currentPiece,segment=segmentBuilder,segmentBuilder=""),segments.push(segment);break;case encodedNul:segmentBuilder+=path.substring(start,end),segmentBuilder+="\0";break;case encodedEscape:segmentBuilder+=path.substring(start,end+1);break;default:fail("Invalid encoded resource path: \""+path+"\"");}start=end+2}return new ResourcePath(segments)}function createOrUpgradeDb(db,txn,fromVersion,toVersion){assert(fromVersion=toVersion,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),1>fromVersion&&1<=toVersion&&(createOwnerStore(db),createMutationQueue(db),createQueryCache(db),createRemoteDocumentCache(db));var p=PersistencePromise.resolve();return 2>fromVersion&&2<=toVersion&&(p=ensureTargetGlobalExists(txn).next(function(targetGlobal){return saveTargetCount(txn,targetGlobal)})),p}function createOwnerStore(db){db.createObjectStore(DbOwner.store)}function createMutationQueue(db){db.createObjectStore(DbMutationQueue.store,{keyPath:DbMutationQueue.keyPath}),db.createObjectStore(DbMutationBatch.store,{keyPath:DbMutationBatch.keyPath}),db.createObjectStore(DbDocumentMutation.store)}function createRemoteDocumentCache(db){db.createObjectStore(DbRemoteDocument.store)}function createQueryCache(db){var targetDocumentsStore=db.createObjectStore(DbTargetDocument.store,{keyPath:DbTargetDocument.keyPath});targetDocumentsStore.createIndex(DbTargetDocument.documentTargetsIndex,DbTargetDocument.documentTargetsKeyPath,{unique:!0});var targetStore=db.createObjectStore(DbTarget.store,{keyPath:DbTarget.keyPath});targetStore.createIndex(DbTarget.queryTargetsIndexName,DbTarget.queryTargetsKeyPath,{unique:!0}),db.createObjectStore(DbTargetGlobal.store)}function saveTargetCount(txn,metadata){var globalStore=txn.store(DbTargetGlobal.store),targetStore=txn.store(DbTarget.store);return targetStore.count().next(function(count){return metadata.targetCount=count,globalStore.put(DbTargetGlobal.key,metadata)})}function ensureTargetGlobalExists(txn){var globalStore=txn.store(DbTargetGlobal.store);return globalStore.get(DbTargetGlobal.key).next(function(metadata){return null==metadata?(metadata=new DbTargetGlobal(0,0,SnapshotVersion.MIN.toTimestamp(),0),globalStore.put(DbTargetGlobal.key,metadata).next(function(){return metadata})):PersistencePromise.resolve(metadata)})}function wrapRequest(request){return new PersistencePromise(function(resolve,reject){request.onsuccess=function(event){var result=event.target.result;resolve(result)},request.onerror=function(event){reject(event.target.error)}})}function convertStreamToken(token){return token instanceof Uint8Array?(assert("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),token.toString()):token}function mutationsStore(txn){return getStore(txn,DbMutationBatch.store)}function documentMutationsStore(txn){return getStore(txn,DbDocumentMutation.store)}function mutationQueuesStore(txn){return getStore(txn,DbMutationQueue.store)}function getStore(txn,store){return txn instanceof SimpleDbTransaction?txn.store(store):fail("Invalid transaction object provided!")}function targetsStore(txn){return getStore$1(txn,DbTarget.store)}function globalTargetStore(txn){return getStore$1(txn,DbTargetGlobal.store)}function documentTargetStore(txn){return getStore$1(txn,DbTargetDocument.store)}function getStore$1(txn,store){return txn instanceof SimpleDbTransaction?txn.store(store):fail("Invalid transaction object provided!")}function remoteDocumentsStore(txn){return txn instanceof SimpleDbTransaction?txn.store(DbRemoteDocument.store):fail("Invalid transaction object provided!")}function dbKey(docKey){return docKey.path.toArray()}function isDocumentQuery(dbQuery){return void 0!==dbQuery.documents}function makeCredentialsProvider(credentials){if(!credentials)return new EmptyCredentialsProvider;switch(credentials.type){case"gapi":return new FirstPartyCredentialsProvider(credentials.client,credentials.sessionIndex||"0");case"provider":return credentials.client;default:throw new FirestoreError(Code.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type");}}function isPartialObserver(obj){return implementsAnyMethods$1(obj,["next","error","complete"])}function implementsAnyMethods$1(obj,methods){if("object"!=typeof obj||null===obj)return!1;for(var object=obj,_i=0,methods_1=methods,method;_isnapshot.query.docComparator(lastDoc_1,change.doc),"Got added events in wrong order"),lastDoc_1=change.doc,{type:"added",doc:doc,oldIndex:-1,newIndex:index_1++}})}var indexTracker_1=snapshot.oldDocs;return snapshot.docChanges.filter(function(change){return includeMetadataChanges||change.type!==ChangeType.Metadata}).map(function(change){var doc=new QueryDocumentSnapshot(firestore,change.doc.key,change.doc,snapshot.fromCache),oldIndex=-1,newIndex=-1;return change.type!==ChangeType.Added&&(oldIndex=indexTracker_1.indexOf(change.doc.key),assert(0<=oldIndex,"Index for document not found"),indexTracker_1=indexTracker_1.delete(change.doc.key)),change.type!==ChangeType.Removed&&(indexTracker_1=indexTracker_1.add(change.doc),newIndex=indexTracker_1.indexOf(change.doc.key)),{type:resultChangeType(change.type),doc:doc,oldIndex:oldIndex,newIndex:newIndex}})}function resultChangeType(type){return type===ChangeType.Added?"added":type===ChangeType.Modified||type===ChangeType.Metadata?"modified":type===ChangeType.Removed?"removed":fail("Unknown change type: "+type)}function configureForFirebase(firebase$$1){firebase$$1.INTERNAL.registerService("firestore",function(app){return new Firestore(app)},shallowCopy(firestoreNamespace))}function registerFirestore(instance){configureForFirebase(instance)}var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor4=Math.floor,_StringfromCharCode7=String.fromCharCode,_Mathmin5=Math.min,_Mathmax4=Math.max;Object.defineProperty(exports,"__esModule",{value:!0});var firebase=function(ex){return ex&&"object"==typeof ex&&"default"in ex?ex["default"]:ex}(__webpack_require__("dP58")),logger=__webpack_require__("TUpU"),tslib_1=__webpack_require__("vCxL"),webchannelWrapper=__webpack_require__("IIoC"),SDK_VERSION=firebase.SDK_VERSION,logClient=new logger.Logger("@firebase/firestore"),LogLevel;(function(LogLevel){LogLevel[LogLevel.DEBUG=0]="DEBUG",LogLevel[LogLevel.ERROR=1]="ERROR",LogLevel[LogLevel.SILENT=2]="SILENT"})(LogLevel||(LogLevel={}));var PlatformSupport=function(){function PlatformSupport(){}return PlatformSupport.setPlatform=function(platform){PlatformSupport.platform&&fail("Platform already defined"),PlatformSupport.platform=platform},PlatformSupport.getPlatform=function(){return PlatformSupport.platform||fail("Platform not set"),PlatformSupport.platform},PlatformSupport}(),Code={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},FirestoreError=function(_super){function FirestoreError(code,message){var _this=_super.call(this,message)||this;return _this.code=code,_this.message=message,_this.name="FirebaseError",_this.toString=function(){return _this.name+": [code="+_this.code+"]: "+_this.message},_this}return tslib_1.__extends(FirestoreError,_super),FirestoreError}(Error),AutoId=function(){function AutoId(){}return AutoId.newId=function(){for(var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",autoId="",i=0;20>i;i++)autoId+=chars.charAt(_Mathfloor4(Math.random()*chars.length));return assert(20===autoId.length,"Invalid auto ID: "+autoId),autoId},AutoId}(),Blob=function(){function Blob(binaryString){assertBase64Available(),this._binaryString=binaryString}return Blob.fromBase64String=function(base64){validateExactNumberOfArgs("Blob.fromBase64String",arguments,1),validateArgType("Blob.fromBase64String","string",1,base64),assertBase64Available();try{var binaryString=PlatformSupport.getPlatform().atob(base64);return new Blob(binaryString)}catch(e){throw new FirestoreError(Code.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+e)}},Blob.fromUint8Array=function(array){if(validateExactNumberOfArgs("Blob.fromUint8Array",arguments,1),assertUint8ArrayAvailable(),!(array instanceof Uint8Array))throw invalidClassError("Blob.fromUint8Array","Uint8Array",1,array);var binaryString=Array.prototype.map.call(array,function(char){return _StringfromCharCode7(char)}).join("");return new Blob(binaryString)},Blob.prototype.toBase64=function(){return validateExactNumberOfArgs("Blob.toBase64",arguments,0),assertBase64Available(),PlatformSupport.getPlatform().btoa(this._binaryString)},Blob.prototype.toUint8Array=function(){validateExactNumberOfArgs("Blob.toUint8Array",arguments,0),assertUint8ArrayAvailable();for(var buffer=new Uint8Array(this._binaryString.length),i=0;ilatitude||90longitude||180nanoseconds)throw new FirestoreError(Code.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+nanoseconds);if(1e9<=nanoseconds)throw new FirestoreError(Code.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+nanoseconds);if(-62135596800>seconds)throw new FirestoreError(Code.INVALID_ARGUMENT,"Timestamp seconds out of range: "+seconds);if(253402300800<=seconds)throw new FirestoreError(Code.INVALID_ARGUMENT,"Timestamp seconds out of range: "+seconds)}return Timestamp.now=function(){return Timestamp.fromMillis(Date.now())},Timestamp.fromDate=function(date){return Timestamp.fromMillis(date.getTime())},Timestamp.fromMillis=function(milliseconds){var seconds=_Mathfloor4(milliseconds/1e3);return new Timestamp(seconds,1e6*(milliseconds-1e3*seconds))},Timestamp.prototype.toDate=function(){return new Date(this.toMillis())},Timestamp.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},Timestamp.prototype._compareTo=function(other){return this.seconds===other.seconds?primitiveComparator(this.nanoseconds,other.nanoseconds):primitiveComparator(this.seconds,other.seconds)},Timestamp.prototype.isEqual=function(other){return other.seconds===this.seconds&&other.nanoseconds===this.nanoseconds},Timestamp.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},Timestamp}(),DatabaseInfo=function(){return function(databaseId,persistenceKey,host,ssl){this.databaseId=databaseId,this.persistenceKey=persistenceKey,this.host=host,this.ssl=ssl}}(),DEFAULT_DATABASE_NAME="(default)",DatabaseId=function(){function DatabaseId(projectId,database){this.projectId=projectId,this.database=database?database:DEFAULT_DATABASE_NAME}return Object.defineProperty(DatabaseId.prototype,"isDefaultDatabase",{get:function(){return this.database===DEFAULT_DATABASE_NAME},enumerable:!0,configurable:!0}),DatabaseId.prototype.isEqual=function(other){return other instanceof DatabaseId&&other.projectId===this.projectId&&other.database===this.database},DatabaseId.prototype.compareTo=function(other){return primitiveComparator(this.projectId,other.projectId)||primitiveComparator(this.database,other.database)},DatabaseId}(),DOCUMENT_KEY_NAME="__name__",Path=function(){function Path(segments,offset,length){this.init(segments,offset,length)}return Path.prototype.init=function(segments,offset,length){void 0===offset?offset=0:offset>segments.length&&fail("offset "+offset+" out of range "+segments.length),void 0===length?length=segments.length-offset:length>segments.length-offset&&fail("length "+length+" out of range "+(segments.length-offset)),this.segments=segments,this.offset=offset,this.len=length},Path.prototype.construct=function(segments,offset,length){var path=Object.create(Object.getPrototypeOf(this));return path.init(segments,offset,length),path},Object.defineProperty(Path.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),Path.prototype.isEqual=function(other){return 0===Path.comparator(this,other)},Path.prototype.child=function(nameOrPath){var segments=this.segments.slice(this.offset,this.limit());return nameOrPath instanceof Path?nameOrPath.forEach(function(segment){segments.push(segment)}):"string"==typeof nameOrPath?segments.push(nameOrPath):fail("Unknown parameter type for Path.child(): "+nameOrPath),this.construct(segments)},Path.prototype.limit=function(){return this.offset+this.length},Path.prototype.popFirst=function(size){return size=void 0===size?1:size,assert(this.length>=size,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+size,this.length-size)},Path.prototype.popLast=function(){return assert(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},Path.prototype.firstSegment=function(){return assert(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},Path.prototype.lastSegment=function(){return assert(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},Path.prototype.get=function(index){return assert(indexright)return 1}return p1.lengthp2.length?1:0},Path}(),ResourcePath=function(_super){function ResourcePath(){return null!==_super&&_super.apply(this,arguments)||this}return tslib_1.__extends(ResourcePath,_super),ResourcePath.prototype.canonicalString=function(){return this.toArray().join("/")},ResourcePath.prototype.toString=function(){return this.canonicalString()},ResourcePath.fromString=function(path){if(0<=path.indexOf("//"))throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid path ("+path+"). Paths must not contain // in them.");var segments=path.split("/").filter(function(segment){return 0cmp?node=node.left:0cmp?node=node.left:(prunedNodes+=node.left.size+1,node=node.right)}return-1},SortedMap.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(SortedMap.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),SortedMap.prototype.minKey=function(){return this.root.minKey()},SortedMap.prototype.maxKey=function(){return this.root.maxKey()},SortedMap.prototype.inorderTraversal=function(action){return this.root.inorderTraversal(action)},SortedMap.prototype.forEach=function(fn){this.inorderTraversal(function(k,v){return fn(k,v),!1})},SortedMap.prototype.reverseTraversal=function(action){return this.root.reverseTraversal(action)},SortedMap.prototype.getIterator=function(){return new SortedMapIterator(this.root,null,this.comparator,!1)},SortedMap.prototype.getIteratorFrom=function(key){return new SortedMapIterator(this.root,key,this.comparator,!1)},SortedMap.prototype.getReverseIterator=function(){return new SortedMapIterator(this.root,null,this.comparator,!0)},SortedMap.prototype.getReverseIteratorFrom=function(key){return new SortedMapIterator(this.root,key,this.comparator,!0)},SortedMap}(),SortedMapIterator=function(){function SortedMapIterator(node,startKey,comparator,isReverse){this.isReverse=isReverse,this.nodeStack=[];for(var cmp=1;!node.isEmpty();)if(cmp=startKey?comparator(node.key,startKey):1,isReverse&&(cmp*=-1),0>cmp)node=this.isReverse?node.left:node.right;else if(0===cmp){this.nodeStack.push(node);break}else this.nodeStack.push(node),node=this.isReverse?node.right:node.left}return SortedMapIterator.prototype.getNext=function(){assert(0cmp?n.copy(null,null,null,n.left.insert(key,value,comparator),null):0===cmp?n.copy(null,value,null,null,null):n.copy(null,null,null,null,n.right.insert(key,value,comparator)),n.fixUp()},LLRBNode.prototype.removeMin=function(){if(this.left.isEmpty())return LLRBNode.EMPTY;var n=this;return n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.removeMin(),null),n.fixUp()},LLRBNode.prototype.remove=function(key,comparator){var n=this,smallest;if(0>comparator(key,n.key))n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(key,comparator),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),0===comparator(key,n.key)){if(n.right.isEmpty())return LLRBNode.EMPTY;smallest=n.right.min(),n=n.copy(smallest.key,smallest.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(key,comparator))}return n.fixUp()},LLRBNode.prototype.isRed=function(){return this.color},LLRBNode.prototype.fixUp=function(){var n=this;return n.right.isRed()&&!n.left.isRed()&&(n=n.rotateLeft()),n.left.isRed()&&n.left.left.isRed()&&(n=n.rotateRight()),n.left.isRed()&&n.right.isRed()&&(n=n.colorFlip()),n},LLRBNode.prototype.moveRedLeft=function(){var n=this.colorFlip();return n.right.left.isRed()&&(n=n.copy(null,null,null,null,n.right.rotateRight()),n=n.rotateLeft(),n=n.colorFlip()),n},LLRBNode.prototype.moveRedRight=function(){var n=this.colorFlip();return n.left.left.isRed()&&(n=n.rotateRight(),n=n.colorFlip()),n},LLRBNode.prototype.rotateLeft=function(){var nl=this.copy(null,null,LLRBNode.RED,null,this.right.left);return this.right.copy(null,null,this.color,nl,null)},LLRBNode.prototype.rotateRight=function(){var nr=this.copy(null,null,LLRBNode.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,nr)},LLRBNode.prototype.colorFlip=function(){var left=this.left.copy(null,null,!this.left.color,null,null),right=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,left,right)},LLRBNode.prototype.checkMaxDepth=function(){var blackDepth=this.check();return!!(Math.pow(2,blackDepth)<=this.size+1)},LLRBNode.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw fail("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw fail("Right child of ("+this.key+","+this.value+") is red");var blackDepth=this.left.check();if(blackDepth!==this.right.check())throw fail("Black depths differ");else return blackDepth+(this.isRed()?0:1)},LLRBNode.EMPTY=null,LLRBNode.RED=!0,LLRBNode.BLACK=!1,LLRBNode}(),LLRBEmptyNode=function(){function LLRBEmptyNode(){this.size=0}return LLRBEmptyNode.prototype.copy=function(){return this},LLRBEmptyNode.prototype.insert=function(key,value){return new LLRBNode(key,value)},LLRBEmptyNode.prototype.remove=function(){return this},LLRBEmptyNode.prototype.isEmpty=function(){return!0},LLRBEmptyNode.prototype.inorderTraversal=function(){return!1},LLRBEmptyNode.prototype.reverseTraversal=function(){return!1},LLRBEmptyNode.prototype.minKey=function(){return null},LLRBEmptyNode.prototype.maxKey=function(){return null},LLRBEmptyNode.prototype.isRed=function(){return!1},LLRBEmptyNode.prototype.checkMaxDepth=function(){return!0},LLRBEmptyNode.prototype.check=function(){return 0},LLRBEmptyNode}();LLRBNode.EMPTY=new LLRBEmptyNode;var TypeOrder;(function(TypeOrder){TypeOrder[TypeOrder.NullValue=0]="NullValue",TypeOrder[TypeOrder.BooleanValue=1]="BooleanValue",TypeOrder[TypeOrder.NumberValue=2]="NumberValue",TypeOrder[TypeOrder.TimestampValue=3]="TimestampValue",TypeOrder[TypeOrder.StringValue=4]="StringValue",TypeOrder[TypeOrder.BlobValue=5]="BlobValue",TypeOrder[TypeOrder.RefValue=6]="RefValue",TypeOrder[TypeOrder.GeoPointValue=7]="GeoPointValue",TypeOrder[TypeOrder.ArrayValue=8]="ArrayValue",TypeOrder[TypeOrder.ObjectValue=9]="ObjectValue"})(TypeOrder||(TypeOrder={}));var ServerTimestampBehavior;(function(ServerTimestampBehavior){ServerTimestampBehavior[ServerTimestampBehavior.Default=0]="Default",ServerTimestampBehavior[ServerTimestampBehavior.Estimate=1]="Estimate",ServerTimestampBehavior[ServerTimestampBehavior.Previous=2]="Previous"})(ServerTimestampBehavior||(ServerTimestampBehavior={}));var FieldValueOptions=function(){function FieldValueOptions(serverTimestampBehavior,timestampsInSnapshots){this.serverTimestampBehavior=serverTimestampBehavior,this.timestampsInSnapshots=timestampsInSnapshots}return FieldValueOptions.fromSnapshotOptions=function(options,timestampsInSnapshots){switch(options.serverTimestamps){case"estimate":return new FieldValueOptions(ServerTimestampBehavior.Estimate,timestampsInSnapshots);case"previous":return new FieldValueOptions(ServerTimestampBehavior.Previous,timestampsInSnapshots);case"none":case void 0:return new FieldValueOptions(ServerTimestampBehavior.Default,timestampsInSnapshots);default:return fail("fromSnapshotOptions() called with invalid options.");}},FieldValueOptions}(),FieldValue=function(){function FieldValue(){}return FieldValue.prototype.toString=function(){var val=this.value();return null===val?"null":val.toString()},FieldValue.prototype.defaultCompareTo=function(other){assert(this.typeOrder!==other.typeOrder,"Default compareTo should not be used for values of same type.");var cmp=primitiveComparator(this.typeOrder,other.typeOrder);return cmp},FieldValue}(),NullValue=function(_super){function NullValue(){var _this=_super.call(this)||this;return _this.typeOrder=TypeOrder.NullValue,_this.internalValue=null,_this}return tslib_1.__extends(NullValue,_super),NullValue.prototype.value=function(){return null},NullValue.prototype.isEqual=function(other){return other instanceof NullValue},NullValue.prototype.compareTo=function(other){return other instanceof NullValue?0:this.defaultCompareTo(other)},NullValue.INSTANCE=new NullValue,NullValue}(FieldValue),BooleanValue=function(_super){function BooleanValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.BooleanValue,_this}return tslib_1.__extends(BooleanValue,_super),BooleanValue.prototype.value=function(){return this.internalValue},BooleanValue.prototype.isEqual=function(other){return other instanceof BooleanValue&&this.internalValue===other.internalValue},BooleanValue.prototype.compareTo=function(other){return other instanceof BooleanValue?primitiveComparator(this,other):this.defaultCompareTo(other)},BooleanValue.of=function(value){return value?BooleanValue.TRUE:BooleanValue.FALSE},BooleanValue.TRUE=new BooleanValue(!0),BooleanValue.FALSE=new BooleanValue(!1),BooleanValue}(FieldValue),NumberValue=function(_super){function NumberValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.NumberValue,_this}return tslib_1.__extends(NumberValue,_super),NumberValue.prototype.value=function(){return this.internalValue},NumberValue.prototype.compareTo=function(other){return other instanceof NumberValue?numericComparator(this.internalValue,other.internalValue):this.defaultCompareTo(other)},NumberValue}(FieldValue),IntegerValue=function(_super){function IntegerValue(internalValue){return _super.call(this,internalValue)||this}return tslib_1.__extends(IntegerValue,_super),IntegerValue.prototype.isEqual=function(other){return!!(other instanceof IntegerValue)&&numericEquals(this.internalValue,other.internalValue)},IntegerValue}(NumberValue),DoubleValue=function(_super){function DoubleValue(internalValue){var _this=_super.call(this,internalValue)||this;return _this.internalValue=internalValue,_this}return tslib_1.__extends(DoubleValue,_super),DoubleValue.prototype.isEqual=function(other){return!!(other instanceof DoubleValue)&&numericEquals(this.internalValue,other.internalValue)},DoubleValue.NAN=new DoubleValue(NaN),DoubleValue.POSITIVE_INFINITY=new DoubleValue(Infinity),DoubleValue.NEGATIVE_INFINITY=new DoubleValue(-Infinity),DoubleValue}(NumberValue),StringValue=function(_super){function StringValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.StringValue,_this}return tslib_1.__extends(StringValue,_super),StringValue.prototype.value=function(){return this.internalValue},StringValue.prototype.isEqual=function(other){return other instanceof StringValue&&this.internalValue===other.internalValue},StringValue.prototype.compareTo=function(other){return other instanceof StringValue?primitiveComparator(this.internalValue,other.internalValue):this.defaultCompareTo(other)},StringValue}(FieldValue),TimestampValue=function(_super){function TimestampValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.TimestampValue,_this}return tslib_1.__extends(TimestampValue,_super),TimestampValue.prototype.value=function(options){return options&&options.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},TimestampValue.prototype.isEqual=function(other){return other instanceof TimestampValue&&this.internalValue.isEqual(other.internalValue)},TimestampValue.prototype.compareTo=function(other){return other instanceof TimestampValue?this.internalValue._compareTo(other.internalValue):other instanceof ServerTimestampValue?-1:this.defaultCompareTo(other)},TimestampValue}(FieldValue),ServerTimestampValue=function(_super){function ServerTimestampValue(localWriteTime,previousValue){var _this=_super.call(this)||this;return _this.localWriteTime=localWriteTime,_this.previousValue=previousValue,_this.typeOrder=TypeOrder.TimestampValue,_this}return tslib_1.__extends(ServerTimestampValue,_super),ServerTimestampValue.prototype.value=function(options){return options&&options.serverTimestampBehavior===ServerTimestampBehavior.Estimate?new TimestampValue(this.localWriteTime).value(options):options&&options.serverTimestampBehavior===ServerTimestampBehavior.Previous?this.previousValue?this.previousValue.value(options):null:null},ServerTimestampValue.prototype.isEqual=function(other){return other instanceof ServerTimestampValue&&this.localWriteTime.isEqual(other.localWriteTime)},ServerTimestampValue.prototype.compareTo=function(other){return other instanceof ServerTimestampValue?this.localWriteTime._compareTo(other.localWriteTime):other instanceof TimestampValue?1:this.defaultCompareTo(other)},ServerTimestampValue.prototype.toString=function(){return""},ServerTimestampValue}(FieldValue),BlobValue=function(_super){function BlobValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.BlobValue,_this}return tslib_1.__extends(BlobValue,_super),BlobValue.prototype.value=function(){return this.internalValue},BlobValue.prototype.isEqual=function(other){return other instanceof BlobValue&&this.internalValue.isEqual(other.internalValue)},BlobValue.prototype.compareTo=function(other){return other instanceof BlobValue?this.internalValue._compareTo(other.internalValue):this.defaultCompareTo(other)},BlobValue}(FieldValue),RefValue=function(_super){function RefValue(databaseId,key){var _this=_super.call(this)||this;return _this.databaseId=databaseId,_this.key=key,_this.typeOrder=TypeOrder.RefValue,_this}return tslib_1.__extends(RefValue,_super),RefValue.prototype.value=function(){return this.key},RefValue.prototype.isEqual=function(other){return!!(other instanceof RefValue)&&this.key.isEqual(other.key)&&this.databaseId.isEqual(other.databaseId)},RefValue.prototype.compareTo=function(other){if(other instanceof RefValue){var cmp=this.databaseId.compareTo(other.databaseId);return 0===cmp?DocumentKey.comparator(this.key,other.key):cmp}return this.defaultCompareTo(other)},RefValue}(FieldValue),GeoPointValue=function(_super){function GeoPointValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.GeoPointValue,_this}return tslib_1.__extends(GeoPointValue,_super),GeoPointValue.prototype.value=function(){return this.internalValue},GeoPointValue.prototype.isEqual=function(other){return other instanceof GeoPointValue&&this.internalValue.isEqual(other.internalValue)},GeoPointValue.prototype.compareTo=function(other){return other instanceof GeoPointValue?this.internalValue._compareTo(other.internalValue):this.defaultCompareTo(other)},GeoPointValue}(FieldValue),ObjectValue=function(_super){function ObjectValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.ObjectValue,_this}return tslib_1.__extends(ObjectValue,_super),ObjectValue.prototype.value=function(options){var result={};return this.internalValue.inorderTraversal(function(key,val){result[key]=val.value(options)}),result},ObjectValue.prototype.forEach=function(action){this.internalValue.inorderTraversal(action)},ObjectValue.prototype.isEqual=function(other){if(other instanceof ObjectValue){for(var it1=this.internalValue.getIterator(),it2=other.internalValue.getIterator();it1.hasNext()&&it2.hasNext();){var next1=it1.getNext(),next2=it2.getNext();if(next1.key!==next2.key||!next1.value.isEqual(next2.value))return!1}return!it1.hasNext()&&!it2.hasNext()}return!1},ObjectValue.prototype.compareTo=function(other){if(other instanceof ObjectValue){for(var it1=this.internalValue.getIterator(),it2=other.internalValue.getIterator();it1.hasNext()&&it2.hasNext();){var next1=it1.getNext(),next2=it2.getNext(),cmp=primitiveComparator(next1.key,next2.key)||next1.value.compareTo(next2.value);if(cmp)return cmp}return primitiveComparator(it1.hasNext(),it2.hasNext())}return this.defaultCompareTo(other)},ObjectValue.prototype.set=function(path,to){if(assert(!path.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===path.length)return this.setChild(path.firstSegment(),to);var child=this.child(path.firstSegment());child instanceof ObjectValue||(child=ObjectValue.EMPTY);var newChild=child.set(path.popFirst(),to);return this.setChild(path.firstSegment(),newChild)},ObjectValue.prototype.delete=function(path){if(assert(!path.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===path.length)return new ObjectValue(this.internalValue.remove(path.firstSegment()));var child=this.child(path.firstSegment());if(child instanceof ObjectValue){var newChild=child.delete(path.popFirst());return new ObjectValue(this.internalValue.insert(path.firstSegment(),newChild))}return this},ObjectValue.prototype.contains=function(path){return void 0!==this.field(path)},ObjectValue.prototype.field=function(path){assert(!path.isEmpty(),"Can't get field of empty path");var field=this;return path.forEach(function(pathSegment){field=field instanceof ObjectValue?field.internalValue.get(pathSegment)||void 0:void 0}),field},ObjectValue.prototype.toString=function(){return JSON.stringify(this.value())},ObjectValue.prototype.child=function(childName){return this.internalValue.get(childName)||void 0},ObjectValue.prototype.setChild=function(childName,value){return new ObjectValue(this.internalValue.insert(childName,value))},ObjectValue.EMPTY=new ObjectValue(new SortedMap(primitiveComparator)),ObjectValue}(FieldValue),ArrayValue=function(_super){function ArrayValue(internalValue){var _this=_super.call(this)||this;return _this.internalValue=internalValue,_this.typeOrder=TypeOrder.ArrayValue,_this}return tslib_1.__extends(ArrayValue,_super),ArrayValue.prototype.value=function(options){return this.internalValue.map(function(v){return v.value(options)})},ArrayValue.prototype.forEach=function(action){this.internalValue.forEach(action)},ArrayValue.prototype.isEqual=function(other){if(other instanceof ArrayValue){if(this.internalValue.length!==other.internalValue.length)return!1;for(var i=0;i="===op?RelationOp.GREATER_THAN_OR_EQUAL:">"===op?RelationOp.GREATER_THAN:"array-contains"===op?RelationOp.ARRAY_CONTAINS:fail("Unknown relation: "+op)},RelationOp.prototype.toString=function(){return this.name},RelationOp.prototype.isEqual=function(other){return this.name===other.name},RelationOp.LESS_THAN=new RelationOp("<"),RelationOp.LESS_THAN_OR_EQUAL=new RelationOp("<="),RelationOp.EQUAL=new RelationOp("=="),RelationOp.GREATER_THAN=new RelationOp(">"),RelationOp.GREATER_THAN_OR_EQUAL=new RelationOp(">="),RelationOp.ARRAY_CONTAINS=new RelationOp("array-contains"),RelationOp}(),RelationFilter=function(){function RelationFilter(field,op,value){this.field=field,this.op=op,this.value=value}return RelationFilter.prototype.matches=function(doc){if(this.field.isKeyField()){assert(this.value instanceof RefValue,"Comparing on key, but filter value not a RefValue"),assert(this.op!==RelationOp.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var refValue=this.value,comparison=DocumentKey.comparator(doc.key,refValue.key);return this.matchesComparison(comparison)}var val=doc.field(this.field);return void 0!==val&&this.matchesValue(val)},RelationFilter.prototype.matchesValue=function(value){var _this=this;return this.op===RelationOp.ARRAY_CONTAINS?value instanceof ArrayValue&&void 0!==value.internalValue.find(function(element){return element.isEqual(_this.value)}):this.value.typeOrder===value.typeOrder&&this.matchesComparison(value.compareTo(this.value))},RelationFilter.prototype.matchesComparison=function(comparison){switch(this.op){case RelationOp.LESS_THAN:return 0>comparison;case RelationOp.LESS_THAN_OR_EQUAL:return 0>=comparison;case RelationOp.EQUAL:return 0===comparison;case RelationOp.GREATER_THAN:return 0=comparison:0>comparison},Bound.prototype.isEqual=function(other){if(null===other)return!1;if(this.before!==other.before||this.position.length!==other.position.length)return!1;for(var i=0;i":value.toString()}),message=this.serviceName+": "+message+" ("+fullCode+").";var err=new FirebaseError(fullCode,message);for(var prop in data)data.hasOwnProperty(prop)&&"_"!==prop.slice(-1)&&(err[prop]=data[prop]);return err},ErrorFactory}(),Hash=function(){return function(){this.blockSize=-1}}(),Sha1=function(_super){function Sha1(){var _this=_super.call(this)||this;_this.chain_=[],_this.buf_=[],_this.W_=[],_this.pad_=[],_this.inbuf_=0,_this.total_=0,_this.blockSize=64,_this.pad_[0]=128;for(var i=1;i<_this.blockSize;++i)_this.pad_[i]=0;return _this.reset(),_this}return tslib_1.__extends(Sha1,_super),Sha1.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},Sha1.prototype.compress_=function(buf,opt_offset){opt_offset||(opt_offset=0);var W=this.W_;if("string"==typeof buf)for(var i=0;16>i;i++)W[i]=buf.charCodeAt(opt_offset)<<24|buf.charCodeAt(opt_offset+1)<<16|buf.charCodeAt(opt_offset+2)<<8|buf.charCodeAt(opt_offset+3),opt_offset+=4;else for(var i=0;16>i;i++)W[i]=buf[opt_offset]<<24|buf[opt_offset+1]<<16|buf[opt_offset+2]<<8|buf[opt_offset+3],opt_offset+=4;for(var i=16,t;80>i;i++)t=W[i-3]^W[i-8]^W[i-14]^W[i-16],W[i]=4294967295&(t<<1|t>>>31);for(var a=this.chain_[0],b=this.chain_[1],c=this.chain_[2],d=this.chain_[3],e=this.chain_[4],i=0,f,k;80>i;i++){40>i?20>i?(f=d^b&(c^d),k=1518500249):(f=b^c^d,k=1859775393):60>i?(f=b&c|d&(b|c),k=2400959708):(f=b^c^d,k=3395469782);var t=4294967295&(a<<5|a>>>27)+f+e+k+W[i];e=d,d=c,c=4294967295&(b<<30|b>>>2),b=a,a=t}this.chain_[0]=4294967295&this.chain_[0]+a,this.chain_[1]=4294967295&this.chain_[1]+b,this.chain_[2]=4294967295&this.chain_[2]+c,this.chain_[3]=4294967295&this.chain_[3]+d,this.chain_[4]=4294967295&this.chain_[4]+e},Sha1.prototype.update=function(bytes,opt_length){if(null!=bytes){void 0===opt_length&&(opt_length=bytes.length);for(var lengthMinusBlock=opt_length-this.blockSize,n=0,buf=this.buf_,inbuf=this.inbuf_;nthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var i=this.blockSize-1;56<=i;i--)this.buf_[i]=255&totalBits,totalBits/=256;this.compress_(this.buf_);for(var n=0,i=0;5>i;i++)for(var j=24;0<=j;j-=8)digest[n]=255&this.chain_[i]>>j,++n;return digest},Sha1}(Hash),StreamBridge=function(){function StreamBridge(args){this.sendFn=args.sendFn,this.closeFn=args.closeFn}return StreamBridge.prototype.onOpen=function(callback){assert(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=callback},StreamBridge.prototype.onClose=function(callback){assert(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=callback},StreamBridge.prototype.onMessage=function(callback){assert(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=callback},StreamBridge.prototype.close=function(){this.closeFn()},StreamBridge.prototype.send=function(msg){this.sendFn(msg)},StreamBridge.prototype.callOnOpen=function(){assert(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},StreamBridge.prototype.callOnClose=function(err){assert(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(err)},StreamBridge.prototype.callOnMessage=function(msg){assert(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(msg)},StreamBridge}(),LOG_TAG="Connection",RPC_NAME_REST_MAPPING={BatchGetDocuments:"batchGet",Commit:"commit"},WebChannelConnection=function(){function WebChannelConnection(info){this.databaseId=info.databaseId,this.pool=new webchannelWrapper.XhrIoPool;var proto=info.ssl?"https":"http";this.baseUrl=proto+"://"+info.host}return WebChannelConnection.prototype.modifyHeadersForRequest=function(headers,token){if(token)for(var header in token.authHeaders)token.authHeaders.hasOwnProperty(header)&&(headers[header]=token.authHeaders[header]);headers["X-Goog-Api-Client"]="gl-js/ fire/"+SDK_VERSION},WebChannelConnection.prototype.invokeRPC=function(rpcName,request,token){var _this=this,url=this.makeUrl(rpcName);return new Promise(function(resolve,reject){_this.pool.getObject(function(xhr){xhr.listenOnce(webchannelWrapper.EventType.COMPLETE,function(){try{switch(xhr.getLastErrorCode()){case webchannelWrapper.ErrorCode.NO_ERROR:var json=xhr.getResponseJson();debug(LOG_TAG,"XHR received:",JSON.stringify(json)),resolve(json);break;case webchannelWrapper.ErrorCode.TIMEOUT:debug(LOG_TAG,"RPC \""+rpcName+"\" timed out"),reject(new FirestoreError(Code.DEADLINE_EXCEEDED,"Request time out"));break;case webchannelWrapper.ErrorCode.HTTP_ERROR:var status_1=xhr.getStatus();debug(LOG_TAG,"RPC \""+rpcName+"\" failed with status:",status_1,"response text:",xhr.getResponseText()),0>RESERVED_BITS<=generatorId?afterWithoutGenerator|this.generatorId:(afterWithoutGenerator|this.generatorId)-(1<",keyOrValue),request=this.store.put(keyOrValue)):(debug(LOG_TAG$2,"PUT",this.store.name,keyOrValue,value),request=this.store.put(value,keyOrValue)),wrapRequest(request)},SimpleDbStore.prototype.get=function(key){var _this=this,request=this.store.get(key);return wrapRequest(request).next(function(result){return void 0===result&&(result=null),debug(LOG_TAG$2,"GET",_this.store.name,key,result),result})},SimpleDbStore.prototype.delete=function(key){debug(LOG_TAG$2,"DELETE",this.store.name,key);var request=this.store.delete(key);return wrapRequest(request)},SimpleDbStore.prototype.count=function(){debug(LOG_TAG$2,"COUNT",this.store.name);var request=this.store.count();return wrapRequest(request)},SimpleDbStore.prototype.loadAll=function(indexOrRange,range){var cursor=this.cursor(this.options(indexOrRange,range)),results=[];return this.iterateCursor(cursor,function(key,value){results.push(value)}).next(function(){return results})},SimpleDbStore.prototype.deleteAll=function(indexOrRange,range){debug(LOG_TAG$2,"DELETE ALL",this.store.name);var options=this.options(indexOrRange,range);options.keysOnly=!1;var cursor=this.cursor(options);return this.iterateCursor(cursor,function(key,value,control){return control.delete()})},SimpleDbStore.prototype.iterate=function(optionsOrCallback,callback){var options;callback?options=optionsOrCallback:(options={},callback=optionsOrCallback);var cursor=this.cursor(options);return this.iterateCursor(cursor,callback)},SimpleDbStore.prototype.iterateCursor=function(cursorRequest,fn){var results=[];return new PersistencePromise(function(resolve,reject){cursorRequest.onerror=function(event){reject(event.target.error)},cursorRequest.onsuccess=function(event){var cursor=event.target.result;if(!cursor)return void resolve();var controller=new IterationController(cursor),userResult=fn(cursor.primaryKey,cursor.value,controller);userResult instanceof PersistencePromise&&results.push(userResult),controller.isDone?resolve():null===controller.skipToKey?cursor.continue():cursor.continue(controller.skipToKey)}}).next(function(){return PersistencePromise.waitFor(results)})},SimpleDbStore.prototype.options=function(indexOrRange,range){var indexName;return void 0!==indexOrRange&&("string"==typeof indexOrRange?indexName=indexOrRange:(assert(void 0===range,"3rd argument must not be defined if 2nd is a range."),range=indexOrRange)),{index:indexName,range:range}},SimpleDbStore.prototype.cursor=function(options){var direction="next";if(options.reverse&&(direction="prev"),options.index){var index=this.store.index(options.index);return options.keysOnly?index.openKeyCursor(options.range,direction):index.openCursor(options.range,direction)}return this.store.openCursor(options.range,direction)},SimpleDbStore}(),IndexedDbMutationQueue=function(){function IndexedDbMutationQueue(userId,serializer){this.userId=userId,this.serializer=serializer,this.garbageCollector=null}return IndexedDbMutationQueue.forUser=function(user,serializer){assert(""!==user.uid,"UserID must not be an empty string.");var userId=user.isAuthenticated()?user.uid:"";return new IndexedDbMutationQueue(userId,serializer)},IndexedDbMutationQueue.prototype.start=function(transaction){var _this=this;return IndexedDbMutationQueue.loadNextBatchIdFromDb(transaction).next(function(nextBatchId){return _this.nextBatchId=nextBatchId,mutationQueuesStore(transaction).get(_this.userId)}).next(function(metadata){return metadata||(metadata=new DbMutationQueue(_this.userId,BATCHID_UNKNOWN,"")),_this.metadata=metadata,_this.metadata.lastAcknowledgedBatchId>=_this.nextBatchId?_this.checkEmpty(transaction).next(function(empty){return assert(empty,"Reset nextBatchID is only possible when the queue is empty"),_this.metadata.lastAcknowledgedBatchId=BATCHID_UNKNOWN,mutationQueuesStore(transaction).put(_this.metadata)}):PersistencePromise.resolve()})},IndexedDbMutationQueue.loadNextBatchIdFromDb=function(txn){var maxBatchId=BATCHID_UNKNOWN;return mutationsStore(txn).iterate({reverse:!0},function(key,batch,control){var userId=key[0],batchId=key[1];if(batchId>maxBatchId&&(maxBatchId=batch.batchId),""===userId)control.done();else{var nextUser=immediatePredecessor(userId);control.skip([nextUser])}}).next(function(){return maxBatchId+1})},IndexedDbMutationQueue.prototype.checkEmpty=function(transaction){var empty=!0,range=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return mutationsStore(transaction).iterate({range:range},function(key,value,control){empty=!1,control.done()}).next(function(){return empty})},IndexedDbMutationQueue.prototype.getNextBatchId=function(){return PersistencePromise.resolve(this.nextBatchId)},IndexedDbMutationQueue.prototype.getHighestAcknowledgedBatchId=function(){return PersistencePromise.resolve(this.metadata.lastAcknowledgedBatchId)},IndexedDbMutationQueue.prototype.acknowledgeBatch=function(transaction,batch,streamToken){var batchId=batch.batchId;return assert(batchId>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=batchId,this.metadata.lastStreamToken=convertStreamToken(streamToken),mutationQueuesStore(transaction).put(this.metadata)},IndexedDbMutationQueue.prototype.getLastStreamToken=function(){return PersistencePromise.resolve(this.metadata.lastStreamToken)},IndexedDbMutationQueue.prototype.setLastStreamToken=function(transaction,streamToken){return this.metadata.lastStreamToken=convertStreamToken(streamToken),mutationQueuesStore(transaction).put(this.metadata)},IndexedDbMutationQueue.prototype.addMutationBatch=function(transaction,localWriteTime,mutations){var _this=this,batchId=this.nextBatchId;this.nextBatchId++;var batch=new MutationBatch(batchId,localWriteTime,mutations),dbBatch=this.serializer.toDbMutationBatch(this.userId,batch);return mutationsStore(transaction).put(dbBatch).next(function(){for(var promises=[],_i=0,mutations_1=mutations;_i=nextBatchId,"Should have found mutation after "+nextBatchId),foundBatch=_this.serializer.fromDbMutationBatch(dbBatch)),control.done()}).next(function(){return foundBatch})},IndexedDbMutationQueue.prototype.getAllMutationBatches=function(transaction){var _this=this,range=IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN),this.keyForBatchId(Number.POSITIVE_INFINITY));return mutationsStore(transaction).loadAll(range).next(function(dbBatches){return dbBatches.map(function(dbBatch){return _this.serializer.fromDbMutationBatch(dbBatch)})})},IndexedDbMutationQueue.prototype.getAllMutationBatchesThroughBatchId=function(transaction,batchId){var _this=this,range=IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN),this.keyForBatchId(batchId));return mutationsStore(transaction).loadAll(range).next(function(dbBatches){return dbBatches.map(function(dbBatch){return _this.serializer.fromDbMutationBatch(dbBatch)})})},IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey=function(transaction,documentKey){var _this=this,indexPrefix=DbDocumentMutation.prefixForPath(this.userId,documentKey.path),indexStart=IDBKeyRange.lowerBound(indexPrefix),results=[];return documentMutationsStore(transaction).iterate({range:indexStart},function(indexKey,_,control){var userID=indexKey[0],encodedPath=indexKey[1],batchID=indexKey[2],path=decode$1(encodedPath);if(userID!==_this.userId||!documentKey.path.isEqual(path))return void control.done();var mutationKey=_this.keyForBatchId(batchID);return mutationsStore(transaction).get(mutationKey).next(function(dbBatch){null===dbBatch&&fail("Dangling document-mutation reference found: "+indexKey+" which points to "+mutationKey),results.push(_this.serializer.fromDbMutationBatch(dbBatch))})}).next(function(){return results})},IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingQuery=function(transaction,query){var _this=this;assert(!query.isDocumentQuery(),"Document queries shouldn't go down this path");var queryPath=query.path,immediateChildrenLength=queryPath.length+1,indexPrefix=DbDocumentMutation.prefixForPath(this.userId,queryPath),indexStart=IDBKeyRange.lowerBound(indexPrefix),uniqueBatchIDs=new SortedSet(primitiveComparator);return documentMutationsStore(transaction).iterate({range:indexStart},function(indexKey,_,control){var userID=indexKey[0],encodedPath=indexKey[1],batchID=indexKey[2],path=decode$1(encodedPath);return userID===_this.userId&&queryPath.isPrefixOf(path)?void(path.length!==immediateChildrenLength||(uniqueBatchIDs=uniqueBatchIDs.add(batchID))):void control.done()}).next(function(){var results=[],promises=[];return uniqueBatchIDs.forEach(function(batchID){var mutationKey=_this.keyForBatchId(batchID);promises.push(mutationsStore(transaction).get(mutationKey).next(function(mutation){null===mutation&&fail("Dangling document-mutation reference found, which points to "+mutationKey),results.push(_this.serializer.fromDbMutationBatch(mutation))}))}),PersistencePromise.waitFor(promises).next(function(){return results})})},IndexedDbMutationQueue.prototype.removeMutationBatches=function(transaction,batches){for(var txn=mutationsStore(transaction),indexTxn=documentMutationsStore(transaction),promises=[],_loop_1=function(batch){var range=IDBKeyRange.only(this_1.keyForBatchId(batch.batchId)),numDeleted=0,removePromise=txn.iterate({range:range},function(key,value,control){return numDeleted++,control.delete()});promises.push(removePromise.next(function(){assert(1==numDeleted,"Dangling document-mutation reference found: Missing batch "+batch.batchId)}));for(var _i=0,_a=batch.mutations;_i<_a.length;_i++){var mutation=_a[_i],indexKey=DbDocumentMutation.key(this_1.userId,mutation.key.path,batch.batchId);promises.push(indexTxn.delete(indexKey)),null!==this_1.garbageCollector&&this_1.garbageCollector.addPotentialGarbageKey(mutation.key)}},this_1=this,_i=0,batches_1=batches,batch;_ithis.metadata.highestTargetId&&(this.metadata.highestTargetId=queryData.targetId,needsUpdate=!0),needsUpdate},Object.defineProperty(IndexedDbQueryCache.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),IndexedDbQueryCache.prototype.getQueryData=function(transaction,query){var _this=this,canonicalId=query.canonicalId(),range=IDBKeyRange.bound([canonicalId,Number.NEGATIVE_INFINITY],[canonicalId,_NumberPOSITIVE_INFINITY]),result=null;return targetsStore(transaction).iterate({range:range,index:DbTarget.queryTargetsIndexName},function(key,value,control){var found=_this.serializer.fromDbTarget(value);query.isEqual(found.query)&&(result=found,control.done())}).next(function(){return result})},IndexedDbQueryCache.prototype.addMatchingKeys=function(txn,keys,targetId){var promises=[],store=documentTargetStore(txn);return keys.forEach(function(key){var path=encode(key.path);promises.push(store.put(new DbTargetDocument(targetId,path)))}),PersistencePromise.waitFor(promises)},IndexedDbQueryCache.prototype.removeMatchingKeys=function(txn,keys,targetId){var _this=this,promises=[],store=documentTargetStore(txn);return keys.forEach(function(key){var path=encode(key.path);promises.push(store.delete([targetId,path])),null!==_this.garbageCollector&&_this.garbageCollector.addPotentialGarbageKey(key)}),PersistencePromise.waitFor(promises)},IndexedDbQueryCache.prototype.removeMatchingKeysForTargetId=function(txn,targetId){var store=documentTargetStore(txn),range=IDBKeyRange.bound([targetId],[targetId+1],!1,!0);return this.notifyGCForRemovedKeys(txn,range).next(function(){return store.delete(range)})},IndexedDbQueryCache.prototype.notifyGCForRemovedKeys=function(txn,range){var _this=this,store=documentTargetStore(txn);return null!==this.garbageCollector&&this.garbageCollector.isEager?store.iterate({range:range,keysOnly:!0},function(key){var path=decode$1(key[1]),docKey=new DocumentKey(path);assert(null!==_this.garbageCollector,"GarbageCollector for query cache set to null during key removal."),_this.garbageCollector.addPotentialGarbageKey(docKey)}):PersistencePromise.resolve()},IndexedDbQueryCache.prototype.getMatchingKeysForTargetId=function(txn,targetId){var range=IDBKeyRange.bound([targetId],[targetId+1],!1,!0),store=documentTargetStore(txn),result=documentKeySet();return store.iterate({range:range,keysOnly:!0},function(key){var path=decode$1(key[1]),docKey=new DocumentKey(path);result=result.add(docKey)}).next(function(){return result})},IndexedDbQueryCache.prototype.setGarbageCollector=function(gc){this.garbageCollector=gc},IndexedDbQueryCache.prototype.containsKey=function(txn,key){assert(null!==txn,"Persistence Transaction cannot be null for query cache containsKey");var path=encode(key.path),range=IDBKeyRange.bound([path],[immediateSuccessor(path)],!1,!0),count=0;return documentTargetStore(txn).iterate({index:DbTargetDocument.documentTargetsIndex,keysOnly:!0,range:range},function(key,_,control){count++,control.done()}).next(function(){return 0now?(error("Persistence owner-lease is in the future. Discarding.",dbOwner),!1):dbOwner.ownerId!==this.getZombiedOwnerId())},IndexedDbPersistence.prototype.scheduleOwnerLeaseRefreshes=function(){var _this=this;this.ownerLeaseRefreshHandle=setInterval(function(){var txResult=_this.runTransaction("Refresh owner timestamp",function(txn){var store=txn.store(DbOwner.store);return store.put("owner",new DbOwner(_this.ownerId,Date.now()))});txResult.catch(function(reason){error(reason),_this.stopOwnerLeaseRefreshes()})},4e3)},IndexedDbPersistence.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},IndexedDbPersistence.prototype.attachWindowUnloadHook=function(){var _this=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){_this.setZombiedOwnerId(_this.ownerId),_this.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},IndexedDbPersistence.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(assert("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},IndexedDbPersistence.prototype.getZombiedOwnerId=function(){try{var zombiedOwnerId=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return debug(LOG_TAG$3,"Zombied ownerID from LocalStorage:",zombiedOwnerId),zombiedOwnerId}catch(e){return error("Failed to get zombie owner id.",e),null}},IndexedDbPersistence.prototype.setZombiedOwnerId=function(zombieOwnerId){try{null===zombieOwnerId?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),zombieOwnerId)}catch(e){error("Failed to set zombie owner id.",e)}},IndexedDbPersistence.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},IndexedDbPersistence.prototype.generateOwnerId=function(){return AutoId.newId()},IndexedDbPersistence.MAIN_DATABASE="main",IndexedDbPersistence}(),LocalDocumentsView=function(){function LocalDocumentsView(remoteDocumentCache,mutationQueue){this.remoteDocumentCache=remoteDocumentCache,this.mutationQueue=mutationQueue}return LocalDocumentsView.prototype.getDocument=function(transaction,key){var _this=this;return this.remoteDocumentCache.getEntry(transaction,key).next(function(remoteDoc){return _this.computeLocalDocument(transaction,key,remoteDoc)})},LocalDocumentsView.prototype.getDocuments=function(transaction,keys){var _this=this,promises=[],results=maybeDocumentMap();return keys.forEach(function(key){promises.push(_this.getDocument(transaction,key).next(function(maybeDoc){maybeDoc||(maybeDoc=new NoDocument(key,SnapshotVersion.forDeletedDoc())),results=results.insert(key,maybeDoc)}))}),PersistencePromise.waitFor(promises).next(function(){return results})},LocalDocumentsView.prototype.getDocumentsMatchingQuery=function(transaction,query){return DocumentKey.isDocumentKey(query.path)?this.getDocumentsMatchingDocumentQuery(transaction,query.path):this.getDocumentsMatchingCollectionQuery(transaction,query)},LocalDocumentsView.prototype.getDocumentsMatchingDocumentQuery=function(transaction,docPath){return this.getDocument(transaction,new DocumentKey(docPath)).next(function(maybeDoc){var result=documentMap();return maybeDoc instanceof Document&&(result=result.insert(maybeDoc.key,maybeDoc)),result})},LocalDocumentsView.prototype.getDocumentsMatchingCollectionQuery=function(transaction,query){var _this=this,results;return this.remoteDocumentCache.getDocumentsMatchingQuery(transaction,query).next(function(queryResults){return _this.computeLocalDocuments(transaction,queryResults)}).next(function(promisedResults){return results=promisedResults,_this.mutationQueue.getAllMutationBatchesAffectingQuery(transaction,query)}).next(function(matchingMutationBatches){for(var matchingKeys=documentKeySet(),_i=0,matchingMutationBatches_1=matchingMutationBatches,batch;_ilastAcked,"Acknowledged batches can't be rejected."),toReject})}).next(function(){return _this.removeMutationBatch(txn,toReject)}).next(function(promisedAffectedKeys){return affectedKeys=promisedAffectedKeys,_this.mutationQueue.performConsistencyCheck(txn)}).next(function(){return _this.localDocuments.getDocuments(txn,affectedKeys)})})},LocalStore.prototype.getLastStreamToken=function(){var _this=this;return this.persistence.runTransaction("Get last stream token",function(txn){return _this.mutationQueue.getLastStreamToken(txn)})},LocalStore.prototype.setLastStreamToken=function(streamToken){var _this=this;return this.persistence.runTransaction("Set last stream token",function(txn){return _this.mutationQueue.setLastStreamToken(txn,streamToken)})},LocalStore.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},LocalStore.prototype.applyRemoteEvent=function(remoteEvent){var _this=this,documentBuffer=new RemoteDocumentChangeBuffer(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(txn){var promises=[];forEachNumber(remoteEvent.targetChanges,function(targetId,change){var queryData=_this.targetIds[targetId];if(queryData){var mapping=change.mapping;if(mapping)if(mapping instanceof ResetMapping)promises.push(_this.queryCache.removeMatchingKeysForTargetId(txn,targetId).next(function(){return _this.queryCache.addMatchingKeys(txn,mapping.documents,targetId)}));else if(mapping instanceof UpdateMapping)promises.push(_this.queryCache.removeMatchingKeys(txn,mapping.removedDocuments,targetId).next(function(){return _this.queryCache.addMatchingKeys(txn,mapping.addedDocuments,targetId)}));else return fail("Unknown mapping type: "+JSON.stringify(mapping));var resumeToken=change.resumeToken;0=version.compareTo(lastRemoteVersion)||isEmpty(this.targetIds)},LocalStore.prototype.shouldHoldBatchResult=function(version){return!this.isRemoteUpToVersion(version)||0doc.version.compareTo(ackVersion))&&(doc=batch.applyToRemoteDocument(docKey,doc,batchResult),doc?documentBuffer.addEntry(doc):assert(!remoteDoc,"Mutation batch "+batch+" applied to document "+remoteDoc+" resulted in null"))})}),promiseChain},LocalStore}(),MemoryMutationQueue=function(){function MemoryMutationQueue(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=BATCHID_UNKNOWN,this.lastStreamToken=emptyByteString(),this.garbageCollector=null,this.batchesByDocumentKey=new SortedSet(DocReference.compareByKey)}return MemoryMutationQueue.prototype.start=function(){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=BATCHID_UNKNOWN),assert(this.highestAcknowledgedBatchIdthis.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var batchIndex=this.indexOfExistingBatchId(batchId,"acknowledged"),check=this.mutationQueue[batchIndex];return assert(batchId===check.batchId,"Queue ordering failure: expected batch "+batchId+", got batch "+check.batchId),assert(!check.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=batchId,this.lastStreamToken=streamToken,PersistencePromise.resolve()},MemoryMutationQueue.prototype.getLastStreamToken=function(){return PersistencePromise.resolve(this.lastStreamToken)},MemoryMutationQueue.prototype.setLastStreamToken=function(transaction,streamToken){return this.lastStreamToken=streamToken,PersistencePromise.resolve()},MemoryMutationQueue.prototype.addMutationBatch=function(transaction,localWriteTime,mutations){assert(0!==mutations.length,"Mutation batches should not be empty");var batchId=this.nextBatchId;if(this.nextBatchId++,0rawIndex?0:rawIndex,batch;indexendIndex?endIndex=0:endIndex>=count?endIndex=count:endIndex++,PersistencePromise.resolve(this.getAllLiveMutationBatchesBeforeIndex(endIndex))},MemoryMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey=function(transaction,documentKey){var _this=this,start=new DocReference(documentKey,0),end=new DocReference(documentKey,_NumberPOSITIVE_INFINITY),result=[];return this.batchesByDocumentKey.forEachInRange([start,end],function(ref){assert(documentKey.isEqual(ref.key),"Should only iterate over a single key's batches");var batch=_this.findMutationBatch(ref.targetOrBatchId);assert(null!==batch,"Batches in the index must exist in the main table"),result.push(batch)}),PersistencePromise.resolve(result)},MemoryMutationQueue.prototype.getAllMutationBatchesAffectingQuery=function(transaction,query){var _this=this,prefix=query.path,immediateChildrenPathLength=prefix.length+1,startPath=prefix;DocumentKey.isDocumentKey(startPath)||(startPath=startPath.child(""));var start=new DocReference(new DocumentKey(startPath),0),uniqueBatchIDs=new SortedSet(primitiveComparator);this.batchesByDocumentKey.forEachWhile(function(ref){var rowKeyPath=ref.key.path;return!!prefix.isPrefixOf(rowKeyPath)&&(rowKeyPath.length===immediateChildrenPathLength&&(uniqueBatchIDs=uniqueBatchIDs.add(ref.targetOrBatchId)),!0)},start);var result=[];return uniqueBatchIDs.forEach(function(batchId){var batch=_this.findMutationBatch(batchId);null!==batch&&result.push(batch)}),PersistencePromise.resolve(result)},MemoryMutationQueue.prototype.removeMutationBatches=function(transaction,batches){var batchCount=batches.length;assert(0index||index>=this.mutationQueue.length)return null;var batch=this.mutationQueue[index];return assert(batch.batchId===batchId,"If found batch must match"),batch.isTombstone()?null:batch},MemoryMutationQueue}(),MemoryQueryCache=function(){function MemoryQueryCache(){this.queries=new ObjectMap(function(q){return q.canonicalId()}),this.lastRemoteSnapshotVersion=SnapshotVersion.MIN,this.highestTargetId=0,this.references=new ReferenceSet,this.targetCount=0}return MemoryQueryCache.prototype.start=function(){return PersistencePromise.resolve()},MemoryQueryCache.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},MemoryQueryCache.prototype.getHighestTargetId=function(){return this.highestTargetId},MemoryQueryCache.prototype.setLastRemoteSnapshotVersion=function(transaction,snapshotVersion){return this.lastRemoteSnapshotVersion=snapshotVersion,PersistencePromise.resolve()},MemoryQueryCache.prototype.saveQueryData=function(queryData){this.queries.set(queryData.query,queryData);var targetId=queryData.targetId;targetId>this.highestTargetId&&(this.highestTargetId=targetId)},MemoryQueryCache.prototype.addQueryData=function(transaction,queryData){return assert(!this.queries.has(queryData.query),"Adding a query that already exists"),this.saveQueryData(queryData),this.targetCount+=1,PersistencePromise.resolve()},MemoryQueryCache.prototype.updateQueryData=function(transaction,queryData){return assert(this.queries.has(queryData.query),"Updating a non-existent query"),this.saveQueryData(queryData),PersistencePromise.resolve()},MemoryQueryCache.prototype.removeQueryData=function(transaction,queryData){return assert(0message.indexOf("Firestore Test Simulated Error")&&setTimeout(function(){throw error$$1},0),error$$1}).then(function(result){return _this.operationInProgress=!1,result})});return this.tail=newTail,newTail},AsyncQueue.prototype.enqueueAfterDelay=function(timerId,delayMs,op){var _this=this;this.verifyNotFailed(),assert(!this.containsDelayedOperation(timerId),"Attempted to schedule multiple operations with timer id "+timerId+".");var delayedOp=DelayedOperation.createAndSchedule(this,timerId,delayMs,op,function(op){return _this.removeDelayedOperation(op)});return this.delayedOperations.push(delayedOp),delayedOp},AsyncQueue.prototype.verifyNotFailed=function(){this.failure&&fail("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},AsyncQueue.prototype.verifyOperationInProgress=function(){assert(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},AsyncQueue.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},AsyncQueue.prototype.containsDelayedOperation=function(timerId){return 0<=this.delayedOperations.findIndex(function(op){return op.timerId===timerId})},AsyncQueue.prototype.runDelayedOperationsEarly=function(lastTimerId){var _this=this;return this.drain().then(function(){assert(lastTimerId===TimerId.All||_this.containsDelayedOperation(lastTimerId),"Attempted to drain to missing operation "+lastTimerId),_this.delayedOperations.sort(function(a,b){return a.targetTimeMs-b.targetTimeMs});for(var _i=0,_a=_this.delayedOperations,op;_i<_a.length&&(op=_a[_i],op.skipDelay(),lastTimerId===TimerId.All||op.timerId!==lastTimerId);_i++);return _this.drain()})},AsyncQueue.prototype.removeDelayedOperation=function(op){var index=this.delayedOperations.indexOf(op);assert(0<=index,"Delayed operation not found."),this.delayedOperations.splice(index,1)},AsyncQueue}(),ExponentialBackoff=function(){function ExponentialBackoff(queue,timerId,initialDelayMs,backoffFactor,maxDelayMs){this.queue=queue,this.timerId=timerId,this.initialDelayMs=initialDelayMs,this.backoffFactor=backoffFactor,this.maxDelayMs=maxDelayMs,this.timerPromise=null,this.reset()}return ExponentialBackoff.prototype.reset=function(){this.currentBaseMs=0},ExponentialBackoff.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},ExponentialBackoff.prototype.backoffAndRun=function(op){this.cancel();var delayWithJitterMs=this.currentBaseMs+this.jitterDelayMs();0this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},ExponentialBackoff.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},ExponentialBackoff.prototype.jitterDelayMs=function(){return(Math.random()-0.5)*this.currentBaseMs},ExponentialBackoff}(),PersistentStreamState;(function(PersistentStreamState){PersistentStreamState[PersistentStreamState.Initial=0]="Initial",PersistentStreamState[PersistentStreamState.Auth=1]="Auth",PersistentStreamState[PersistentStreamState.Open=2]="Open",PersistentStreamState[PersistentStreamState.Error=3]="Error",PersistentStreamState[PersistentStreamState.Backoff=4]="Backoff",PersistentStreamState[PersistentStreamState.Stopped=5]="Stopped"})(PersistentStreamState||(PersistentStreamState={}));var PersistentStream=function(){function PersistentStream(queue,connectionTimerId,idleTimerId,connection,credentialsProvider){this.queue=queue,this.idleTimerId=idleTimerId,this.connection=connection,this.credentialsProvider=credentialsProvider,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new ExponentialBackoff(queue,connectionTimerId,1e3,1.5,60000),this.state=PersistentStreamState.Initial}return PersistentStream.prototype.isStarted=function(){return this.state===PersistentStreamState.Backoff||this.state===PersistentStreamState.Auth||this.state===PersistentStreamState.Open},PersistentStream.prototype.isOpen=function(){return this.state===PersistentStreamState.Open},PersistentStream.prototype.start=function(listener){return this.state===PersistentStreamState.Error?void this.performBackoff(listener):void(assert(this.state===PersistentStreamState.Initial,"Already started"),this.listener=listener,this.auth())},PersistentStream.prototype.stop=function(){this.isStarted()&&this.close(PersistentStreamState.Stopped)},PersistentStream.prototype.inhibitBackoff=function(){assert(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=PersistentStreamState.Initial,this.backoff.reset()},PersistentStream.prototype.markIdle=function(){var _this=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,60000,function(){return _this.handleIdleCloseTimer()}))},PersistentStream.prototype.sendRequest=function(msg){this.cancelIdleCheck(),this.stream.send(msg)},PersistentStream.prototype.handleIdleCloseTimer=function(){return tslib_1.__awaiter(this,void 0,void 0,function(){return tslib_1.__generator(this,function(){return this.isOpen()?[2,this.close(PersistentStreamState.Initial)]:[2]})})},PersistentStream.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},PersistentStream.prototype.close=function(finalState,error$$1){return tslib_1.__awaiter(this,void 0,void 0,function(){var listener;return tslib_1.__generator(this,function(){return assert(finalState===PersistentStreamState.Error||isNullOrUndefined(error$$1),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),finalState===PersistentStreamState.Error?error$$1&&error$$1.code===Code.RESOURCE_EXHAUSTED&&(error(error$$1.toString()),error("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()):this.backoff.reset(),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=finalState,listener=this.listener,this.listener=null,finalState===PersistentStreamState.Stopped?[2]:[2,listener.onClose(error$$1)]})})},PersistentStream.prototype.tearDown=function(){},PersistentStream.prototype.auth=function(){var _this=this;assert(this.state===PersistentStreamState.Initial,"Must be in initial state to auth"),this.state=PersistentStreamState.Auth,this.credentialsProvider.getToken(!1).then(function(token){_this.startStream(token)},function(error$$1){_this.queue.enqueue(function(){return tslib_1.__awaiter(_this,void 0,void 0,function(){var rpcError;return tslib_1.__generator(this,function(){return this.state===PersistentStreamState.Stopped?[2]:(rpcError=new FirestoreError(Code.UNKNOWN,"Fetching auth token failed: "+error$$1.message),[2,this.handleStreamClose(rpcError)])})})})})},PersistentStream.prototype.startStream=function(token){var _this=this;if(this.state!==PersistentStreamState.Stopped){assert(this.state===PersistentStreamState.Auth,"Trying to start stream in a non-auth state");var dispatchIfStillActive=function(stream,fn){_this.queue.enqueue(function(){return tslib_1.__awaiter(_this,void 0,void 0,function(){return tslib_1.__generator(this,function(){return this.stream===stream?[2,fn()]:[2]})})})};if(null!==this.listener){var currentStream_1=this.startRpc(token);this.stream=currentStream_1,this.stream.onOpen(function(){dispatchIfStillActive(currentStream_1,function(){return assert(_this.state===PersistentStreamState.Auth,"Expected stream to be in state auth, but was "+_this.state),_this.state=PersistentStreamState.Open,_this.listener.onOpen()})}),this.stream.onClose(function(error$$1){dispatchIfStillActive(currentStream_1,function(){return _this.handleStreamClose(error$$1)})}),this.stream.onMessage(function(msg){dispatchIfStillActive(currentStream_1,function(){return _this.onMessage(msg)})})}}},PersistentStream.prototype.performBackoff=function(listener){var _this=this;assert(this.state===PersistentStreamState.Error,"Should only perform backoff in an error case"),this.state=PersistentStreamState.Backoff,this.backoff.backoffAndRun(function(){return tslib_1.__awaiter(_this,void 0,void 0,function(){return tslib_1.__generator(this,function(){return this.state===PersistentStreamState.Stopped?[2]:(this.state=PersistentStreamState.Initial,this.start(listener),assert(this.isStarted(),"PersistentStream should have started"),[2])})})})},PersistentStream.prototype.handleStreamClose=function(error$$1){return assert(this.isStarted(),"Can't handle server close on non-started stream"),debug("PersistentStream","close with error: "+error$$1),this.stream=null,this.close(PersistentStreamState.Error,error$$1)},PersistentStream}(),PersistentListenStream=function(_super){function PersistentListenStream(queue,connection,credentials,serializer){var _this=_super.call(this,queue,TimerId.ListenStreamConnectionBackoff,TimerId.ListenStreamIdle,connection,credentials)||this;return _this.serializer=serializer,_this}return tslib_1.__extends(PersistentListenStream,_super),PersistentListenStream.prototype.startRpc=function(token){return this.connection.openStream("Listen",token)},PersistentListenStream.prototype.onMessage=function(watchChangeProto){this.backoff.reset();var watchChange=this.serializer.fromWatchChange(watchChangeProto),snapshot=this.serializer.versionFromListenResponse(watchChangeProto);return this.listener.onWatchChange(watchChange,snapshot)},PersistentListenStream.prototype.watch=function(queryData){var request={database:this.serializer.encodedDatabaseId,addTarget:this.serializer.toTarget(queryData)},labels=this.serializer.toListenRequestLabels(queryData);labels&&(request.labels=labels),this.sendRequest(request)},PersistentListenStream.prototype.unwatch=function(targetId){var request={};request.database=this.serializer.encodedDatabaseId,request.removeTarget=targetId,this.sendRequest(request)},PersistentListenStream}(PersistentStream),PersistentWriteStream=function(_super){function PersistentWriteStream(queue,connection,credentials,serializer){var _this=_super.call(this,queue,TimerId.WriteStreamConnectionBackoff,TimerId.WriteStreamIdle,connection,credentials)||this;return _this.serializer=serializer,_this.handshakeComplete_=!1,_this}return tslib_1.__extends(PersistentWriteStream,_super),Object.defineProperty(PersistentWriteStream.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),PersistentWriteStream.prototype.start=function(listener){this.handshakeComplete_=!1,_super.prototype.start.call(this,listener)},PersistentWriteStream.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},PersistentWriteStream.prototype.startRpc=function(token){return this.connection.openStream("Write",token)},PersistentWriteStream.prototype.onMessage=function(responseProto){if(assert(!!responseProto.streamToken,"Got a write response without a stream token"),this.lastStreamToken=responseProto.streamToken,!this.handshakeComplete_)return assert(!responseProto.writeResults||0===responseProto.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete();this.backoff.reset();var results=this.serializer.fromWriteResults(responseProto.writeResults),commitVersion=this.serializer.fromVersion(responseProto.commitTime);return this.listener.onMutationResult(commitVersion,results)},PersistentWriteStream.prototype.writeHandshake=function(){assert(this.isOpen(),"Writing handshake requires an opened stream"),assert(!this.handshakeComplete_,"Handshake already completed");var request={};request.database=this.serializer.encodedDatabaseId,this.sendRequest(request)},PersistentWriteStream.prototype.writeMutations=function(mutations){var _this=this;assert(this.isOpen(),"Writing mutations requires an opened stream"),assert(this.handshakeComplete_,"Handshake must be complete before writing mutations"),assert(0=MAX_WATCH_STREAM_FAILURES&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed "+MAX_WATCH_STREAM_FAILURES+" "+("times. Most recent error: "+error$$1.toString())),this.setAndBroadcast(OnlineState.Offline)))},OnlineStateTracker.prototype.set=function(newState){this.clearOnlineStateTimer(),this.watchStreamFailures=0,newState===OnlineState.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(newState)},OnlineStateTracker.prototype.setAndBroadcast=function(newState){newState!==this.state&&(this.state=newState,this.onlineStateHandler(newState))},OnlineStateTracker.prototype.logClientOfflineWarningIfNecessary=function(details){var message="Could not reach Cloud Firestore backend. "+details+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(error(message),this.shouldWarnClientIsOffline=!1):debug("OnlineStateTracker",message)},OnlineStateTracker.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},OnlineStateTracker}(),LOG_TAG$9="RemoteStore",RemoteStore=function(){function RemoteStore(localStore,datastore,asyncQueue,onlineStateHandler){this.localStore=localStore,this.datastore=datastore,this.pendingWrites=[],this.lastBatchSeen=BATCHID_UNKNOWN,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.onlineStateTracker=new OnlineStateTracker(asyncQueue,onlineStateHandler)}return RemoteStore.prototype.start=function(){return this.enableNetwork()},RemoteStore.prototype.isNetworkEnabled=function(){return assert(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},RemoteStore.prototype.enableNetwork=function(){var _this=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(token){return _this.writeStream.lastStreamToken=token,_this.shouldStartWatchStream()?_this.startWatchStream():_this.onlineStateTracker.set(OnlineState.Unknown),_this.fillWritePipeline()}))},RemoteStore.prototype.disableNetwork=function(){return tslib_1.__awaiter(this,void 0,void 0,function(){return tslib_1.__generator(this,function(){return this.disableNetworkInternal(),this.onlineStateTracker.set(OnlineState.Offline),[2]})})},RemoteStore.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},RemoteStore.prototype.shutdown=function(){return debug(LOG_TAG$9,"RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(OnlineState.Unknown),Promise.resolve()},RemoteStore.prototype.listen=function(queryData){assert(!contains(this.listenTargets,queryData.targetId),"listen called with duplicate targetId!"),this.listenTargets[queryData.targetId]=queryData,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(queryData)},RemoteStore.prototype.unlisten=function(targetId){assert(contains(this.listenTargets,targetId),"unlisten called without assigned target ID!"),delete this.listenTargets[targetId],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(targetId),isEmpty(this.listenTargets)&&this.watchStream.markIdle())},RemoteStore.prototype.sendWatchRequest=function(queryData){this.recordPendingTargetRequest(queryData.targetId),this.watchStream.watch(queryData)},RemoteStore.prototype.sendUnwatchRequest=function(targetId){this.recordPendingTargetRequest(targetId),this.watchStream.unwatch(targetId)},RemoteStore.prototype.recordPendingTargetRequest=function(targetId){this.pendingTargetResponses[targetId]=(this.pendingTargetResponses[targetId]||0)+1},RemoteStore.prototype.startWatchStream=function(){assert(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},RemoteStore.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!isEmpty(this.listenTargets)},RemoteStore.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},RemoteStore.prototype.onWatchStreamOpen=function(){return tslib_1.__awaiter(this,void 0,void 0,function(){var _this=this;return tslib_1.__generator(this,function(){return forEachNumber(this.listenTargets,function(targetId,queryData){_this.sendWatchRequest(queryData)}),[2]})})},RemoteStore.prototype.onWatchStreamClose=function(error$$1){return tslib_1.__awaiter(this,void 0,void 0,function(){return tslib_1.__generator(this,function(){return assert(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(error$$1&&this.onlineStateTracker.handleWatchStreamFailure(error$$1),this.startWatchStream()):this.onlineStateTracker.set(OnlineState.Unknown),[2]})})},RemoteStore.prototype.onWatchStreamChange=function(watchChange,snapshotVersion){return tslib_1.__awaiter(this,void 0,void 0,function(){var changes;return tslib_1.__generator(this,function(){return(this.onlineStateTracker.set(OnlineState.Online),watchChange instanceof WatchTargetChange&&watchChange.state===WatchTargetChangeState.Removed&&watchChange.cause)?[2,this.handleTargetError(watchChange)]:(this.accumulatedWatchChanges.push(watchChange),!snapshotVersion.isEqual(SnapshotVersion.MIN)&&0<=snapshotVersion.compareTo(this.localStore.getLastRemoteSnapshotVersion())?(changes=this.accumulatedWatchChanges,this.accumulatedWatchChanges=[],[2,this.handleWatchChangeBatch(snapshotVersion,changes)]):[2])})})},RemoteStore.prototype.handleWatchChangeBatch=function(snapshotVersion,changes){var _this=this,aggregator=new WatchChangeAggregator(snapshotVersion,this.listenTargets,this.pendingTargetResponses);aggregator.addChanges(changes);var remoteEvent=aggregator.createRemoteEvent();this.pendingTargetResponses=aggregator.pendingTargetResponses;var promises=[];return forEachNumber(aggregator.existenceFilters,function(targetId,filter){var queryData=_this.listenTargets[targetId];if(queryData){var query=queryData.query;if(!query.isDocumentQuery()){var promise=_this.localStore.remoteDocumentKeys(targetId).then(function(trackedRemote){if(remoteEvent.targetChanges[targetId]){var mapping=remoteEvent.targetChanges[targetId].mapping;null!==mapping&&(mapping instanceof UpdateMapping?trackedRemote=mapping.applyToKeySet(trackedRemote):(assert(mapping instanceof ResetMapping,"Expected either reset or update mapping but got something else: "+mapping),trackedRemote=mapping.documents))}if(trackedRemote.size!==filter.count){remoteEvent.handleExistenceFilterMismatch(targetId);var newQueryData=new QueryData(query,targetId,queryData.purpose);_this.listenTargets[targetId]=newQueryData,_this.sendUnwatchRequest(targetId);var requestQueryData=new QueryData(query,targetId,QueryPurpose.ExistenceFilterMismatch);_this.sendWatchRequest(requestQueryData)}});promises.push(promise)}else if(0===filter.count){var key=new DocumentKey(query.path),deletedDoc=new NoDocument(key,snapshotVersion);remoteEvent.addDocumentUpdate(deletedDoc)}else assert(1===filter.count,"Single document existence filter with count: "+filter.count)}}),Promise.all(promises).then(function(){return forEachNumber(remoteEvent.targetChanges,function(targetId,change){if(0() instead."),RESERVED_FIELD_REGEX=/^__.*__$/,ParsedSetData=function(){function ParsedSetData(data,fieldMask,fieldTransforms){this.data=data,this.fieldMask=fieldMask,this.fieldTransforms=fieldTransforms}return ParsedSetData.prototype.toMutations=function(key,precondition){var mutations=[];return null===this.fieldMask?mutations.push(new SetMutation(key,this.data,precondition)):mutations.push(new PatchMutation(key,this.data,this.fieldMask,precondition)),0=snapshot.docs.size,"Too many documents returned on a document query");var doc=snapshot.docs.get(_this._key);observer.next(new DocumentSnapshot(_this.firestore,_this._key,doc,snapshot.fromCache))}},error:errHandler}),internalListener=this._firestoreClient.listen(Query.atPath(this._key.path),asyncObserver,options);return function(){asyncObserver.mute(),_this._firestoreClient.unlisten(internalListener)}},DocumentReference.prototype.get=function(options){var _this=this;return validateOptionNames("DocumentReference.get",options,["source"]),options&&validateNamedOptionalPropertyEquals("DocumentReference.get","options","source",options.source,["default","server","cache"]),new Promise(function(resolve,reject){options&&"cache"===options.source?_this.firestore.ensureClientConfigured().getDocumentFromLocalCache(_this._key).then(function(doc){resolve(new DocumentSnapshot(_this.firestore,_this._key,doc,!0))},reject):_this.getViaSnapshotListener(resolve,reject,options)})},DocumentReference.prototype.getViaSnapshotListener=function(resolve,reject,options){var unlisten=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(snap){unlisten(),!snap.exists&&snap.metadata.fromCache?reject(new FirestoreError(Code.UNAVAILABLE,"Failed to get document because the client is offline.")):snap.exists&&snap.metadata.fromCache&&options&&"server"===options.source?reject(new FirestoreError(Code.UNAVAILABLE,"Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)")):resolve(snap)},error:reject})},DocumentReference}(),SnapshotMetadata=function(){function SnapshotMetadata(hasPendingWrites,fromCache){this.hasPendingWrites=hasPendingWrites,this.fromCache=fromCache}return SnapshotMetadata.prototype.isEqual=function(other){return this.hasPendingWrites===other.hasPendingWrites&&this.fromCache===other.fromCache},SnapshotMetadata}(),DocumentSnapshot=function(){function DocumentSnapshot(_firestore,_key,_document,_fromCache){this._firestore=_firestore,this._key=_key,this._document=_document,this._fromCache=_fromCache}return DocumentSnapshot.prototype.data=function(options){return validateBetweenNumberOfArgs("DocumentSnapshot.data",arguments,0,1),options=validateSnapshotOptions("DocumentSnapshot.data",options),this._document?this.convertObject(this._document.data,FieldValueOptions.fromSnapshotOptions(options,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},DocumentSnapshot.prototype.get=function(fieldPath,options){if(validateBetweenNumberOfArgs("DocumentSnapshot.get",arguments,1,2),options=validateSnapshotOptions("DocumentSnapshot.get",options),this._document){var value=this._document.data.field(fieldPathFromArgument("DocumentSnapshot.get",fieldPath));if(void 0!==value)return this.convertValue(value,FieldValueOptions.fromSnapshotOptions(options,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(DocumentSnapshot.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(DocumentSnapshot.prototype,"ref",{get:function(){return new DocumentReference(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(DocumentSnapshot.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(DocumentSnapshot.prototype,"metadata",{get:function(){return new SnapshotMetadata(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),DocumentSnapshot.prototype.isEqual=function(other){if(!(other instanceof DocumentSnapshot))throw invalidClassError("isEqual","DocumentSnapshot",1,other);return this._firestore===other._firestore&&this._fromCache===other._fromCache&&this._key.isEqual(other._key)&&(null===this._document?null===other._document:this._document.isEqual(other._document))},DocumentSnapshot.prototype.convertObject=function(data,options){var _this=this,result={};return data.forEach(function(key,value){result[key]=_this.convertValue(value,options)}),result},DocumentSnapshot.prototype.convertValue=function(value,options){if(value instanceof ObjectValue)return this.convertObject(value,options);if(value instanceof ArrayValue)return this.convertArray(value,options);if(value instanceof RefValue){var key=value.value(options),database=this._firestore.ensureClientConfigured().databaseId();return value.databaseId.isEqual(database)||error("Document "+this._key.path+" contains a document reference within a different database ("+(value.databaseId.projectId+"/"+value.databaseId.database+") which is not supported. It will be treated as a reference in the current ")+("database ("+database.projectId+"/"+database.database+") instead.")),new DocumentReference(key,this._firestore)}return value.value(options)},DocumentSnapshot.prototype.convertArray=function(data,options){var _this=this;return data.internalValue.map(function(value){return _this.convertValue(value,options)})},DocumentSnapshot}(),QueryDocumentSnapshot=function(_super){function QueryDocumentSnapshot(firestore,key,document,fromCache){return _super.call(this,firestore,key,document,fromCache)||this}return tslib_1.__extends(QueryDocumentSnapshot,_super),QueryDocumentSnapshot.prototype.data=function(options){var data=_super.prototype.data.call(this,options);return assert("object"==typeof data,"Document in a QueryDocumentSnapshot should exist"),data},QueryDocumentSnapshot}(DocumentSnapshot),Query$1=function(){function Query$$1(_query,firestore){this._query=_query,this.firestore=firestore}return Query$$1.prototype.where=function(field,opStr,value){validateExactNumberOfArgs("Query.where",arguments,3),validateArgType("Query.where","string",2,opStr),validateDefined("Query.where",3,value);var fieldPath=fieldPathFromArgument("Query.where",field),relationOp=RelationOp.fromString(opStr),fieldValue;if(fieldPath.isKeyField()){if(relationOp===RelationOp.ARRAY_CONTAINS)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof value){if(-1!==value.indexOf("/"))throw new FirestoreError(Code.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===value)throw new FirestoreError(Code.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var path=this._query.path.child(new ResourcePath([value]));assert(0==path.length%2,"Path should be a document key"),fieldValue=new RefValue(this.firestore._databaseId,new DocumentKey(path))}else if(value instanceof DocumentReference){fieldValue=new RefValue(this.firestore._databaseId,value._key)}else throw new FirestoreError(Code.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+(valueDescription(value)+"."))}else fieldValue=this.firestore._dataConverter.parseQueryValue("Query.where",value);var filter=fieldFilter(fieldPath,relationOp,fieldValue);return this.validateNewFilter(filter),new Query$$1(this._query.addFilter(filter),this.firestore)},Query$$1.prototype.orderBy=function(field,directionStr){validateBetweenNumberOfArgs("Query.orderBy",arguments,1,2),validateOptionalArgType("Query.orderBy","string",2,directionStr);var direction;if(void 0===directionStr||"asc"===directionStr)direction=Direction.ASCENDING;else if("desc"===directionStr)direction=Direction.DESCENDING;else throw new FirestoreError(Code.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+directionStr+"', expected 'asc' or 'desc'.");if(null!==this._query.startAt)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var fieldPath=fieldPathFromArgument("Query.orderBy",field),orderBy=new OrderBy(fieldPath,direction);return this.validateNewOrderBy(orderBy),new Query$$1(this._query.addOrderBy(orderBy),this.firestore)},Query$$1.prototype.limit=function(n){if(validateExactNumberOfArgs("Query.limit",arguments,1),validateArgType("Query.limit","number",1,n),0>=n)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid Query. Query limit ("+n+") is invalid. Limit must be positive.");return new Query$$1(this._query.withLimit(n),this.firestore)},Query$$1.prototype.startAt=function(docOrField){for(var fields=[],_i=1;_iorderBy.length)throw new FirestoreError(Code.INVALID_ARGUMENT,"Too many arguments provided to "+methodName+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var components=[],i=0;i, or >=) must be on the same field. But you have inequality filters on '"+existingField.toString()+"'"+(" and '"+filter.field.toString()+"'"));var firstOrderByField=this._query.getFirstOrderByField();null!==firstOrderByField&&this.validateOrderByAndInequalityMatch(filter.field,firstOrderByField)}else if(filter.op===RelationOp.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},Query$$1.prototype.validateNewOrderBy=function(orderBy){if(null===this._query.getFirstOrderByField()){var inequalityField=this._query.getInequalityFilterField();null!==inequalityField&&this.validateOrderByAndInequalityMatch(inequalityField,orderBy.field)}},Query$$1.prototype.validateOrderByAndInequalityMatch=function(inequality,orderBy){if(!orderBy.isEqual(inequality))throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+inequality.toString()+"' "+("and so you must also use '"+inequality.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() ")+("is on field '"+orderBy.toString()+"' instead."))},Query$$1}(),QuerySnapshot=function(){function QuerySnapshot(_firestore,_originalQuery,_snapshot){this._firestore=_firestore,this._originalQuery=_originalQuery,this._snapshot=_snapshot,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new SnapshotMetadata(_snapshot.hasPendingWrites,_snapshot.fromCache)}return Object.defineProperty(QuerySnapshot.prototype,"docs",{get:function(){var result=[];return this.forEach(function(doc){return result.push(doc)}),result},enumerable:!0,configurable:!0}),Object.defineProperty(QuerySnapshot.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(QuerySnapshot.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),QuerySnapshot.prototype.forEach=function(callback,thisArg){var _this=this;validateBetweenNumberOfArgs("QuerySnapshot.forEach",arguments,1,2),validateArgType("QuerySnapshot.forEach","function",1,callback),this._snapshot.docs.forEach(function(doc){callback.call(thisArg,_this.convertToDocumentImpl(doc))})},Object.defineProperty(QuerySnapshot.prototype,"query",{get:function(){return new Query$1(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),QuerySnapshot.prototype.docChanges=function(options){validateOptionNames("QuerySnapshot.docChanges",options,["includeMetadataChanges"]),options&&validateNamedOptionalType("QuerySnapshot.docChanges","boolean","includeMetadataChanges",options.includeMetadataChanges);var includeMetadataChanges=options&&options.includeMetadataChanges;if(includeMetadataChanges&&this._snapshot.excludesMetadataChanges)throw new FirestoreError(Code.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===includeMetadataChanges||(this._cachedChanges=changesFromSnapshot(this._firestore,includeMetadataChanges,this._snapshot),this._cachedChangesIncludeMetadataChanges=includeMetadataChanges),this._cachedChanges},QuerySnapshot.prototype.isEqual=function(other){if(!(other instanceof QuerySnapshot))throw invalidClassError("isEqual","QuerySnapshot",1,other);return this._firestore===other._firestore&&this._originalQuery.isEqual(other._originalQuery)&&this._snapshot.isEqual(other._snapshot)},QuerySnapshot.prototype.convertToDocumentImpl=function(doc){return new QueryDocumentSnapshot(this._firestore,doc.key,doc,this.metadata.fromCache)},QuerySnapshot}(),docChangesPropertiesToOverride=["length","forEach","map"].concat("undefined"==typeof Symbol?[]:[Symbol.iterator]);docChangesPropertiesToOverride.forEach(function(property){try{Object.defineProperty(QuerySnapshot.prototype.docChanges,property,{get:function(){return throwDocChangesMethodError()}})}catch(err){}});var CollectionReference=function(_super){function CollectionReference(path,firestore){var _this=_super.call(this,Query.atPath(path),firestore)||this;if(1!=path.length%2)throw new FirestoreError(Code.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+(path.canonicalString()+" has "+path.length));return _this}return tslib_1.__extends(CollectionReference,_super),Object.defineProperty(CollectionReference.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(CollectionReference.prototype,"parent",{get:function(){var parentPath=this._query.path.popLast();return parentPath.isEmpty()?null:new DocumentReference(new DocumentKey(parentPath),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(CollectionReference.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),CollectionReference.prototype.doc=function(pathString){if(validateBetweenNumberOfArgs("CollectionReference.doc",arguments,0,1),0===arguments.length&&(pathString=AutoId.newId()),validateArgType("CollectionReference.doc","string",1,pathString),""===pathString)throw new FirestoreError(Code.INVALID_ARGUMENT,"Document path must be a non-empty string");var path=ResourcePath.fromString(pathString);return DocumentReference.forPath(this._query.path.child(path),this.firestore)},CollectionReference.prototype.add=function(value){validateExactNumberOfArgs("CollectionReference.add",arguments,1),validateArgType("CollectionReference.add","object",1,value);var docRef=this.doc();return docRef.set(value).then(function(){return docRef})},CollectionReference}(Query$1),PublicFirestore=makeConstructorPrivate(Firestore,"Use firebase.firestore() instead."),PublicTransaction=makeConstructorPrivate(Transaction$1,"Use firebase.firestore().runTransaction() instead."),PublicWriteBatch=makeConstructorPrivate(WriteBatch,"Use firebase.firestore().batch() instead."),PublicDocumentReference=makeConstructorPrivate(DocumentReference,"Use firebase.firestore().doc() instead."),PublicDocumentSnapshot=makeConstructorPrivate(DocumentSnapshot),PublicQueryDocumentSnapshot=makeConstructorPrivate(QueryDocumentSnapshot),PublicQuery=makeConstructorPrivate(Query$1),PublicQuerySnapshot=makeConstructorPrivate(QuerySnapshot),PublicCollectionReference=makeConstructorPrivate(CollectionReference,"Use firebase.firestore().collection() instead."),firestoreNamespace={Firestore:PublicFirestore,GeoPoint:GeoPoint,Timestamp:Timestamp,Blob:PublicBlob,Transaction:PublicTransaction,WriteBatch:PublicWriteBatch,DocumentReference:PublicDocumentReference,DocumentSnapshot:PublicDocumentSnapshot,Query:PublicQuery,QueryDocumentSnapshot:PublicQueryDocumentSnapshot,QuerySnapshot:PublicQuerySnapshot,CollectionReference:PublicCollectionReference,FieldPath:FieldPath$1,FieldValue:PublicFieldValue,setLogLevel:Firestore.setLogLevel};registerFirestore(firebase),exports.registerFirestore=registerFirestore},"ew/s":function(module,exports,__webpack_require__){"use strict";(function(mod){mod(__webpack_require__("tQq4"),__webpack_require__("4e7A"))})(function(CodeMirror){function dialog(cm,text,shortText,deflt,f){cm.openDialog?cm.openDialog(text,f,{value:deflt,selectValueOnOpen:!0}):f(prompt(shortText,deflt))}function interpretLine(cm,string){var num=+string;return /^[-+]/.test(string)?cm.getCursor().line+num:num-1}CodeMirror.commands.jumpToLine=function(cm){var cur=cm.getCursor();dialog(cm,"Jump to line: (Use line:column or scroll% syntax)","Jump to line:",cur.line+1+":"+cur.ch,function(posStr){if(posStr){var match;if(match=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr))cm.setCursor(interpretLine(cm,match[1]),+match[2]);else if(match=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)){var line=Math.round(cm.lineCount()*+match[1]/100);/^[-+]/.test(match[1])&&(line=cur.line+line+1),cm.setCursor(line-1,cur.ch)}else(match=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr))&&cm.setCursor(interpretLine(cm,match[1]),cur.ch)}})},CodeMirror.keyMap["default"]["Alt-G"]="jumpToLine"})},f4vO:function(module,exports,__webpack_require__){"use strict";var assign=__webpack_require__("tbG5").assign,deflate=__webpack_require__("nFS2"),inflate=__webpack_require__("faQk"),constants=__webpack_require__("xUUw"),pako={};assign(pako,deflate,inflate,constants),module.exports=pako},fOjT:function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__("fnRj")},faQk:function(module,exports,__webpack_require__){"use strict";function Inflate(options){if(!(this instanceof Inflate))return new Inflate(options);this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},options||{});var opt=this.options;opt.raw&&0<=opt.windowBits&&16>opt.windowBits&&(opt.windowBits=-opt.windowBits,0===opt.windowBits&&(opt.windowBits=-15)),0<=opt.windowBits&&16>opt.windowBits&&!(options&&options.windowBits)&&(opt.windowBits+=32),15opt.windowBits&&0==(15&opt.windowBits)&&(opt.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;var status=zlib_inflate.inflateInit2(this.strm,opt.windowBits);if(status!==c.Z_OK)throw new Error(msg[status]);this.header=new GZheader,zlib_inflate.inflateGetHeader(this.strm,this.header)}function inflate(input,options){var inflator=new Inflate(options);if(inflator.push(input,!0),inflator.err)throw inflator.msg||msg[inflator.err];return inflator.result}var zlib_inflate=__webpack_require__("GIDK"),utils=__webpack_require__("tbG5"),strings=__webpack_require__("34Q3"),c=__webpack_require__("xUUw"),msg=__webpack_require__("gMAY"),ZStream=__webpack_require__("bdtv"),GZheader=__webpack_require__("/+WI"),toString=Object.prototype.toString;Inflate.prototype.push=function(data,mode){var strm=this.strm,chunkSize=this.options.chunkSize,dictionary=this.options.dictionary,allowBufError=!1,status,_mode,next_out_utf8,tail,utf8str,dict;if(this.ended)return!1;_mode=mode===~~mode?mode:!0===mode?c.Z_FINISH:c.Z_NO_FLUSH,strm.input="string"==typeof data?strings.binstring2buf(data):"[object ArrayBuffer]"===toString.call(data)?new Uint8Array(data):data,strm.next_in=0,strm.avail_in=strm.input.length;do{if(0===strm.avail_out&&(strm.output=new utils.Buf8(chunkSize),strm.next_out=0,strm.avail_out=chunkSize),status=zlib_inflate.inflate(strm,c.Z_NO_FLUSH),status===c.Z_NEED_DICT&&dictionary&&(dict="string"==typeof dictionary?strings.string2buf(dictionary):"[object ArrayBuffer]"===toString.call(dictionary)?new Uint8Array(dictionary):dictionary,status=zlib_inflate.inflateSetDictionary(this.strm,dict)),status===c.Z_BUF_ERROR&&!0==allowBufError&&(status=c.Z_OK,allowBufError=!1),status!==c.Z_STREAM_END&&status!==c.Z_OK)return this.onEnd(status),this.ended=!0,!1;strm.next_out&&(0===strm.avail_out||status===c.Z_STREAM_END||0===strm.avail_in&&(_mode===c.Z_FINISH||_mode===c.Z_SYNC_FLUSH))&&("string"===this.options.to?(next_out_utf8=strings.utf8border(strm.output,strm.next_out),tail=strm.next_out-next_out_utf8,utf8str=strings.buf2string(strm.output,next_out_utf8),strm.next_out=tail,strm.avail_out=chunkSize-tail,tail&&utils.arraySet(strm.output,strm.output,next_out_utf8,tail,0),this.onData(utf8str)):this.onData(utils.shrinkBuf(strm.output,strm.next_out))),0===strm.avail_in&&0===strm.avail_out&&(allowBufError=!0)}while((0recurseTimes)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;ictx.seen.indexOf(desc.value)?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1),-1n?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return args[i++]+"";case"%d":return+args[i++];case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x;}}),x=args[i];i*\/]/.test(ch)?ret(null,"select-op"):"."==ch&&stream.match(/^-?[_a-z][_a-z0-9-]*/i)?ret("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ch)?ret(null,ch):("u"==ch||"U"==ch)&&stream.match(/rl(-prefix)?\(/i)||("d"==ch||"D"==ch)&&stream.match("omain(",!0,!0)||("r"==ch||"R"==ch)&&stream.match("egexp(",!0,!0)?(stream.backUp(1),state.tokenize=tokenParenthesized,ret("property","word")):/[\w\\\-]/.test(ch)?(stream.eatWhile(/[\w\\\-]/),ret("property","word")):ret(null,null)}function tokenString(quote){return function(stream,state){for(var escaped=!1,ch;null!=(ch=stream.next());){if(ch==quote&&!escaped){")"==quote&&stream.backUp(1);break}escaped=!escaped&&"\\"==ch}return ch!=quote&&(escaped||")"==quote)||(state.tokenize=null),ret("string","string")}}function tokenParenthesized(stream,state){return stream.next(),state.tokenize=stream.match(/\s*[\"\')]/,!1)?null:tokenString(")"),ret(null,"(")}function Context(type,indent,prev){this.type=type,this.indent=indent,this.prev=prev}function pushContext(state,stream,type,indent){return state.context=new Context(type,stream.indentation()+(!1===indent?0:indentUnit),state.context),type}function popContext(state){return state.context.prev&&(state.context=state.context.prev),state.context.type}function pass(type,stream,state){return states[state.context.type](type,stream,state)}function popAndPass(type,stream,state,n){for(var i=n||1;0=maxScore&&(maxScore=score,matchedItem=item)}return maxScore>=fuzzySearchMinScore?matchedItem:null}function getScoringPart(item,key){var value=item&&"object"==typeof item?item[key]:item,m=(value||"").match(/^[\w-@]+/);return m?m[0]:value}function getUnmatchedPart(abbr,string){for(var i=0,lastPos=0;ilargestIndex&&(largestIndex=field.index)}),-1!==largestIndex&&(fieldState.index=largestIndex+1),model}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1,source;i"),comment=function(stream){var start=stream.pos;if(eatSection(stream,open,close,!0)){var result=token(stream,start);return result.type="comment",result}return null},open$1=toCharCodes(""),cdata=function(stream){var start=stream.pos;if(eatSection(stream,open$1,close$1,!0)){var result=token(stream,start);return result.type="cdata",result}return null},defaultOptions={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};exports.defaultOptions=defaultOptions,exports.match=match,exports.default=function(content,options){options=_extends({},defaultOptions,options);for(var stream="string"==typeof content?new _streamReader2.default(content):content,root=new Node(stream,"root"),empty=new Set(options.empty),special=options.special.reduce(function(map,name){return map.set(name,toCharCodes(""))},new Map),isEmpty=function(token,name){return token.selfClosing||!options.xml&&empty.has(name)},m=void 0,node=void 0,name=void 0,stack=[root];!stream.eof();)if(!(m=match(stream)))stream.next();else if(name=getName(m),"open"===m.type)node=new Node(stream,"tag",m),last(stack).addChild(node),special.has(name)?node.close=consumeSpecial(stream,special.get(name)):!isEmpty(m,name)&&stack.push(node);else if("close"===m.type){for(var i=stack.length-1;0=this.size-(this.bMin+snapOffset+this.bGutterSize)&&(offset=this.size-(this.bMin+this.bGutterSize)),adjust.call(this,offset),options.onDrag&&options.onDrag())}function calculateSizes(){var computedStyle=global.getComputedStyle(this.parent),parentSize=this.parent[clientDimension]-parseFloat(computedStyle[paddingA]||0)-parseFloat(computedStyle[paddingB]||0);this.size=this.a[getBoundingClientRect]()[dimension]+this.b[getBoundingClientRect]()[dimension]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(100*(this.size/parentSize),100),this.start=this.a[getBoundingClientRect]()[position]}function stopDragging(){var self=this,a=self.a,b=self.b;self.dragging&&options.onDragEnd&&options.onDragEnd(),self.dragging=!1,global[removeEventListener]("mouseup",self.stop),global[removeEventListener]("touchend",self.stop),global[removeEventListener]("touchcancel",self.stop),self.parent[removeEventListener]("mousemove",self.move),self.parent[removeEventListener]("touchmove",self.move),delete self.stop,delete self.move,a[removeEventListener]("selectstart",NOOP),a[removeEventListener]("dragstart",NOOP),b[removeEventListener]("selectstart",NOOP),b[removeEventListener]("dragstart",NOOP),a.style.userSelect="",a.style.webkitUserSelect="",a.style.MozUserSelect="",a.style.pointerEvents="",b.style.userSelect="",b.style.webkitUserSelect="",b.style.MozUserSelect="",b.style.pointerEvents="",self.gutter.style.cursor="",self.parent.style.cursor=""}function startDragging(e){var self=this,a=self.a,b=self.b;!self.dragging&&options.onDragStart&&options.onDragStart(),e.preventDefault(),self.dragging=!0,self.move=drag.bind(self),self.stop=stopDragging.bind(self),global[addEventListener]("mouseup",self.stop),global[addEventListener]("touchend",self.stop),global[addEventListener]("touchcancel",self.stop),self.parent[addEventListener]("mousemove",self.move),self.parent[addEventListener]("touchmove",self.move),a[addEventListener]("selectstart",NOOP),a[addEventListener]("dragstart",NOOP),b[addEventListener]("selectstart",NOOP),b[addEventListener]("dragstart",NOOP),a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",b.style.userSelect="none",b.style.webkitUserSelect="none",b.style.MozUserSelect="none",b.style.pointerEvents="none",self.gutter.style.cursor=cursor,self.parent.style.cursor=cursor,calculateSizes.call(self)}function setSizes(newSizes){newSizes.forEach(function(newSize,i){if(0opt.windowBits&&(opt.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;var status=zlib_deflate.deflateInit2(this.strm,opt.level,opt.method,opt.windowBits,opt.memLevel,opt.strategy);if(status!==Z_OK)throw new Error(msg[status]);if(opt.header&&zlib_deflate.deflateSetHeader(this.strm,opt.header),opt.dictionary){var dict;if(dict="string"==typeof opt.dictionary?strings.string2buf(opt.dictionary):"[object ArrayBuffer]"===toString.call(opt.dictionary)?new Uint8Array(opt.dictionary):opt.dictionary,status=zlib_deflate.deflateSetDictionary(this.strm,dict),status!==Z_OK)throw new Error(msg[status]);this._dict_set=!0}}function deflate(input,options){var deflator=new Deflate(options);if(deflator.push(input,!0),deflator.err)throw deflator.msg||msg[deflator.err];return deflator.result}var zlib_deflate=__webpack_require__("+BLB"),utils=__webpack_require__("tbG5"),strings=__webpack_require__("34Q3"),msg=__webpack_require__("gMAY"),ZStream=__webpack_require__("bdtv"),toString=Object.prototype.toString,Z_FINISH=4,Z_OK=0,Z_STREAM_END=1,Z_SYNC_FLUSH=2,Z_DEFAULT_COMPRESSION=-1,Z_DEFAULT_STRATEGY=0,Z_DEFLATED=8;Deflate.prototype.push=function(data,mode){var strm=this.strm,chunkSize=this.options.chunkSize,status,_mode;if(this.ended)return!1;_mode=mode===~~mode?mode:!0===mode?Z_FINISH:0,strm.input="string"==typeof data?strings.string2buf(data):"[object ArrayBuffer]"===toString.call(data)?new Uint8Array(data):data,strm.next_in=0,strm.avail_in=strm.input.length;do{if(0===strm.avail_out&&(strm.output=new utils.Buf8(chunkSize),strm.next_out=0,strm.avail_out=chunkSize),status=zlib_deflate.deflate(strm,_mode),status!==Z_STREAM_END&&status!==Z_OK)return this.onEnd(status),this.ended=!0,!1;(0===strm.avail_out||0===strm.avail_in&&(_mode===Z_FINISH||_mode===Z_SYNC_FLUSH))&&("string"===this.options.to?this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output,strm.next_out))):this.onData(utils.shrinkBuf(strm.output,strm.next_out)))}while((0i;i++)cm.execCommand("goCharRight");else if("surround"==type){for(var sels=cm.getSelections(),i=0;i"))return ret("=>","operator");if("0"==ch&&stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return ret("number","number");if(/\d/.test(ch))return stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),ret("number","number");if("/"==ch)return stream.eat("*")?(state.tokenize=tokenComment,tokenComment(stream,state)):stream.eat("/")?(stream.skipToEnd(),ret("comment","comment")):expressionAllowed(stream,state,1)?(readRegexp(stream),stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),ret("regexp","string-2")):(stream.eat("="),ret("operator","operator",stream.current()));if("`"==ch)return state.tokenize=tokenQuasi,tokenQuasi(stream,state);if("#"==ch)return stream.skipToEnd(),ret("error","error");if(isOperatorChar.test(ch))return">"==ch&&state.lexical&&">"==state.lexical.type||(stream.eat("=")?("!"==ch||"="==ch)&&stream.eat("="):/[<>*+\-]/.test(ch)&&(stream.eat(ch),">"==ch&&stream.eat(ch))),ret("operator","operator",stream.current());if(wordRE.test(ch)){stream.eatWhile(wordRE);var word=stream.current();if("."!=state.lastType){if(keywords.propertyIsEnumerable(word)){var kw=keywords[word];return ret(kw.type,kw.style,word)}if("async"==word&&stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return ret("async","keyword",word)}return ret("variable","variable",word)}}function tokenString(quote){return function(stream,state){var escaped=!1,next;if(jsonldMode&&"@"==stream.peek()&&stream.match(isJsonldKeyword))return state.tokenize=tokenBase,ret("jsonld-keyword","meta");for(;null!=(next=stream.next())&&(next!=quote||escaped);)escaped=!escaped&&"\\"==next;return escaped||(state.tokenize=tokenBase),ret("string","string")}}function tokenComment(stream,state){for(var maybeEnd=!1,ch;ch=stream.next();){if("/"==ch&&maybeEnd){state.tokenize=tokenBase;break}maybeEnd="*"==ch}return ret("comment","comment")}function tokenQuasi(stream,state){for(var escaped=!1,next;null!=(next=stream.next());){if(!escaped&&("`"==next||"$"==next&&stream.eat("{"))){state.tokenize=tokenBase;break}escaped=!escaped&&"\\"==next}return ret("quasi","string-2",stream.current())}function findFatArrow(stream,state){state.fatArrowAt&&(state.fatArrowAt=null);var arrow=stream.string.indexOf("=>",stream.start);if(!(0>arrow)){if(isTS){var m=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start,arrow));m&&(arrow=m.index)}for(var depth=0,sawSomething=!1,pos=arrow-1;0<=pos;--pos){var ch=stream.string.charAt(pos),bracket=brackets.indexOf(ch);if(0<=bracket&&3>bracket){if(!depth){++pos;break}if(0==--depth){"("==ch&&(sawSomething=!0);break}}else if(3<=bracket&&6>bracket)++depth;else if(wordRE.test(ch))sawSomething=!0;else{if(/["'\/]/.test(ch))return;if(sawSomething&&!depth){++pos;break}}}sawSomething&&!depth&&(state.fatArrowAt=pos)}}function JSLexical(indented,column,type,align,prev,info){this.indented=indented,this.column=column,this.type=type,this.prev=prev,this.info=info,null!=align&&(this.align=align)}function inScope(state,varname){for(var v=state.localVars;v;v=v.next)if(v.name==varname)return!0;for(var cx=state.context;cx;cx=cx.prev)for(var v=cx.vars;v;v=v.next)if(v.name==varname)return!0}function parseJS(state,style,type,content,stream){var cc=state.cc;for(cx.state=state,cx.stream=stream,cx.marked=null,cx.cc=cc,cx.style=style,state.lexical.hasOwnProperty("align")||(state.lexical.align=!0);;){var combinator=cc.length?cc.pop():jsonMode?expression:statement;if(combinator(type,content)){for(;cc.length&&cc[cc.length-1].lex;)cc.pop()();return cx.marked?cx.marked:"variable"==type&&inScope(state,content)?"variable-2":style}}}function pass(){for(var i=arguments.length-1;0<=i;i--)cx.cc.push(arguments[i])}function cont(){return pass.apply(null,arguments),!0}function inList(name,list){for(var v=list;v;v=v.next)if(v.name==name)return!0;return!1}function register(varname){var state=cx.state;if(cx.marked="def",state.context)if("var"==state.lexical.info&&state.context&&state.context.block){var newContext=registerVarScoped(varname,state.context);if(null!=newContext)return void(state.context=newContext)}else if(!inList(varname,state.localVars))return void(state.localVars=new Var(varname,state.localVars));parserConfig.globalVars&&!inList(varname,state.globalVars)&&(state.globalVars=new Var(varname,state.globalVars))}function registerVarScoped(varname,context){if(!context)return null;if(context.block){var inner=registerVarScoped(varname,context.prev);return inner?inner==context.prev?context:new Context(inner,context.vars,!0):null}return inList(varname,context.vars)?context:new Context(context.prev,new Var(varname,context.vars),!1)}function isModifier(name){return"public"==name||"private"==name||"protected"==name||"abstract"==name||"readonly"==name}function Context(prev,vars,block){this.prev=prev,this.vars=vars,this.block=block}function Var(name,next){this.name=name,this.next=next}function pushcontext(){cx.state.context=new Context(cx.state.context,cx.state.localVars,!1),cx.state.localVars=defaultVars}function pushblockcontext(){cx.state.context=new Context(cx.state.context,cx.state.localVars,!0),cx.state.localVars=null}function popcontext(){cx.state.localVars=cx.state.context.vars,cx.state.context=cx.state.context.prev}function pushlex(type,info){var result=function(){var state=cx.state,indent=state.indented;if("stat"==state.lexical.type)indent=state.lexical.indented;else for(var outer=state.lexical;outer&&")"==outer.type&&outer.align;outer=outer.prev)indent=outer.indented;state.lexical=new JSLexical(indent,cx.stream.column(),type,null,state.lexical,info)};return result.lex=!0,result}function poplex(){var state=cx.state;state.lexical.prev&&(")"==state.lexical.type&&(state.indented=state.lexical.indented),state.lexical=state.lexical.prev)}function expect(wanted){function exp(type){return type==wanted?cont():";"==wanted?pass():cont(exp)}return exp}function statement(type,value){return"var"==type?cont(pushlex("vardef",value),vardef,expect(";"),poplex):"keyword a"==type?cont(pushlex("form"),parenExpr,statement,poplex):"keyword b"==type?cont(pushlex("form"),statement,poplex):"keyword d"==type?cx.stream.match(/^\s*$/,!1)?cont():cont(pushlex("stat"),maybeexpression,expect(";"),poplex):"debugger"==type?cont(expect(";")):"{"==type?cont(pushlex("}"),pushblockcontext,block,poplex,popcontext):";"==type?cont():"if"==type?("else"==cx.state.lexical.info&&cx.state.cc[cx.state.cc.length-1]==poplex&&cx.state.cc.pop()(),cont(pushlex("form"),parenExpr,statement,poplex,maybeelse)):"function"==type?cont(functiondef):"for"==type?cont(pushlex("form"),forspec,statement,poplex):"class"==type||isTS&&"interface"==value?(cx.marked="keyword",cont(pushlex("form"),className,poplex)):"variable"==type?isTS&&"declare"==value?(cx.marked="keyword",cont(statement)):isTS&&("module"==value||"enum"==value||"type"==value)&&cx.stream.match(/^\s*\w/,!1)?(cx.marked="keyword","enum"==value?cont(enumdef):"type"==value?cont(typeexpr,expect("operator"),typeexpr,expect(";")):cont(pushlex("form"),pattern,expect("{"),pushlex("}"),block,poplex,poplex)):isTS&&"namespace"==value?(cx.marked="keyword",cont(pushlex("form"),expression,block,poplex)):isTS&&"abstract"==value?(cx.marked="keyword",cont(statement)):cont(pushlex("stat"),maybelabel):"switch"==type?cont(pushlex("form"),parenExpr,expect("{"),pushlex("}","switch"),pushblockcontext,block,poplex,poplex,popcontext):"case"==type?cont(expression,expect(":")):"default"==type?cont(expect(":")):"catch"==type?cont(pushlex("form"),pushcontext,maybeCatchBinding,statement,poplex,popcontext):"export"==type?cont(pushlex("stat"),afterExport,poplex):"import"==type?cont(pushlex("stat"),afterImport,poplex):"async"==type?cont(statement):"@"==value?cont(expression,statement):pass(pushlex("stat"),expression,expect(";"),poplex)}function maybeCatchBinding(type){if("("==type)return cont(funarg,expect(")"))}function expression(type,value){return expressionInner(type,value,!1)}function expressionNoComma(type,value){return expressionInner(type,value,!0)}function parenExpr(type){return"("==type?cont(pushlex(")"),expression,expect(")"),poplex):pass()}function expressionInner(type,value,noComma){if(cx.state.fatArrowAt==cx.stream.start){var body=noComma?arrowBodyNoComma:arrowBody;if("("==type)return cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,expect("=>"),body,popcontext);if("variable"==type)return pass(pushcontext,pattern,expect("=>"),body,popcontext)}var maybeop=noComma?maybeoperatorNoComma:maybeoperatorComma;return atomicTypes.hasOwnProperty(type)?cont(maybeop):"function"==type?cont(functiondef,maybeop):"class"==type||isTS&&"interface"==value?(cx.marked="keyword",cont(pushlex("form"),classExpression,poplex)):"keyword c"==type||"async"==type?cont(noComma?expressionNoComma:expression):"("==type?cont(pushlex(")"),maybeexpression,expect(")"),poplex,maybeop):"operator"==type||"spread"==type?cont(noComma?expressionNoComma:expression):"["==type?cont(pushlex("]"),arrayLiteral,poplex,maybeop):"{"==type?contCommasep(objprop,"}",null,maybeop):"quasi"==type?pass(quasi,maybeop):"new"==type?cont(maybeTarget(noComma)):"import"==type?cont(expression):cont()}function maybeexpression(type){return type.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeoperatorComma(type,value){return","==type?cont(expression):maybeoperatorNoComma(type,value,!1)}function maybeoperatorNoComma(type,value,noComma){var me=!1==noComma?maybeoperatorComma:maybeoperatorNoComma,expr=!1==noComma?expression:expressionNoComma;return"=>"==type?cont(pushcontext,noComma?arrowBodyNoComma:arrowBody,popcontext):"operator"==type?/\+\+|--/.test(value)||isTS&&"!"==value?cont(me):isTS&&"<"==value&&cx.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?cont(pushlex(">"),commasep(typeexpr,">"),poplex,me):"?"==value?cont(expression,expect(":"),expr):cont(expr):"quasi"==type?pass(quasi,me):";"==type?void 0:"("==type?contCommasep(expressionNoComma,")","call",me):"."==type?cont(property,me):"["==type?cont(pushlex("]"),maybeexpression,expect("]"),poplex,me):isTS&&"as"==value?(cx.marked="keyword",cont(typeexpr,me)):"regexp"==type?(cx.state.lastType=cx.marked="operator",cx.stream.backUp(cx.stream.pos-cx.stream.start-1),cont(expr)):void 0}function quasi(type,value){return"quasi"==type?"${"==value.slice(value.length-2)?cont(expression,continueQuasi):cont(quasi):pass()}function continueQuasi(type){if("}"==type)return cx.marked="string-2",cx.state.tokenize=tokenQuasi,cont(quasi)}function arrowBody(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expression)}function arrowBodyNoComma(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expressionNoComma)}function maybeTarget(noComma){return function(type){return"."==type?cont(noComma?targetNoComma:target):"variable"==type&&isTS?cont(maybeTypeArgs,noComma?maybeoperatorNoComma:maybeoperatorComma):pass(noComma?expressionNoComma:expression)}}function target(_,value){if("target"==value)return cx.marked="keyword",cont(maybeoperatorComma)}function targetNoComma(_,value){if("target"==value)return cx.marked="keyword",cont(maybeoperatorNoComma)}function maybelabel(type){return":"==type?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(type){if("variable"==type)return cx.marked="property",cont()}function objprop(type,value){if("async"==type)return cx.marked="property",cont(objprop);if("variable"==type||"keyword"==cx.style){if(cx.marked="property","get"==value||"set"==value)return cont(getterSetter);var m;return isTS&&cx.state.fatArrowAt==cx.stream.start&&(m=cx.stream.match(/^\s*:\s*/,!1))&&(cx.state.fatArrowAt=cx.stream.pos+m[0].length),cont(afterprop)}return"number"==type||"string"==type?(cx.marked=jsonldMode?"property":cx.style+" property",cont(afterprop)):"jsonld-keyword"==type?cont(afterprop):isTS&&isModifier(value)?(cx.marked="keyword",cont(objprop)):"["==type?cont(expression,maybetype,expect("]"),afterprop):"spread"==type?cont(expressionNoComma,afterprop):"*"==value?(cx.marked="keyword",cont(objprop)):":"==type?pass(afterprop):void 0}function getterSetter(type){return"variable"==type?(cx.marked="property",cont(functiondef)):pass(afterprop)}function afterprop(type){return":"==type?cont(expressionNoComma):"("==type?pass(functiondef):void 0}function commasep(what,end,sep){function proceed(type,value){if(sep?-1"),typeexpr):void 0}function maybeReturnType(type){if("=>"==type)return cont(typeexpr)}function typeprop(type,value){return"variable"==type||"keyword"==cx.style?(cx.marked="property",cont(typeprop)):"?"==value?cont(typeprop):":"==type?cont(typeexpr):"["==type?cont(expression,maybetype,expect("]"),typeprop):void 0}function typearg(type,value){return"variable"==type&&cx.stream.match(/^\s*[?:]/,!1)||"?"==value?cont(typearg):":"==type?cont(typeexpr):pass(typeexpr)}function afterType(type,value){return"<"==value?cont(pushlex(">"),commasep(typeexpr,">"),poplex,afterType):"|"==value||"."==type||"&"==value?cont(typeexpr):"["==type?cont(expect("]"),afterType):"extends"==value||"implements"==value?(cx.marked="keyword",cont(typeexpr)):void 0}function maybeTypeArgs(_,value){if("<"==value)return cont(pushlex(">"),commasep(typeexpr,">"),poplex,afterType)}function typeparam(){return pass(typeexpr,maybeTypeDefault)}function maybeTypeDefault(_,value){if("="==value)return cont(typeexpr)}function vardef(_,value){return"enum"==value?(cx.marked="keyword",cont(enumdef)):pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(type,value){return isTS&&isModifier(value)?(cx.marked="keyword",cont(pattern)):"variable"==type?(register(value),cont()):"spread"==type?cont(pattern):"["==type?contCommasep(pattern,"]"):"{"==type?contCommasep(proppattern,"}"):void 0}function proppattern(type,value){return"variable"!=type||cx.stream.match(/^\s*:/,!1)?("variable"==type&&(cx.marked="property"),"spread"==type?cont(pattern):"}"==type?pass():cont(expect(":"),pattern,maybeAssign)):(register(value),cont(maybeAssign))}function maybeAssign(_type,value){if("="==value)return cont(expressionNoComma)}function vardefCont(type){if(","==type)return cont(vardef)}function maybeelse(type,value){if("keyword b"==type&&"else"==value)return cont(pushlex("form","else"),statement,poplex)}function forspec(type,value){return"await"==value?cont(forspec):"("==type?cont(pushlex(")"),forspec1,expect(")"),poplex):void 0}function forspec1(type){return"var"==type?cont(vardef,expect(";"),forspec2):";"==type?cont(forspec2):"variable"==type?cont(formaybeinof):pass(expression,expect(";"),forspec2)}function formaybeinof(_type,value){return"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):cont(maybeoperatorComma,forspec2)}function forspec2(type,value){return";"==type?cont(forspec3):"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):pass(expression,expect(";"),forspec3)}function forspec3(type){")"!=type&&cont(expression)}function functiondef(type,value){return"*"==value?(cx.marked="keyword",cont(functiondef)):"variable"==type?(register(value),cont(functiondef)):"("==type?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,mayberettype,statement,popcontext):isTS&&"<"==value?cont(pushlex(">"),commasep(typeparam,">"),poplex,functiondef):void 0}function funarg(type,value){return"@"==value&&cont(expression,funarg),"spread"==type?cont(funarg):isTS&&isModifier(value)?(cx.marked="keyword",cont(funarg)):pass(pattern,maybetype,maybeAssign)}function classExpression(type,value){return"variable"==type?className(type,value):classNameAfter(type,value)}function className(type,value){if("variable"==type)return register(value),cont(classNameAfter)}function classNameAfter(type,value){return"<"==value?cont(pushlex(">"),commasep(typeparam,">"),poplex,classNameAfter):"extends"==value||"implements"==value||isTS&&","==type?("implements"==value&&(cx.marked="keyword"),cont(isTS?typeexpr:expression,classNameAfter)):"{"==type?cont(pushlex("}"),classBody,poplex):void 0}function classBody(type,value){return"async"==type||"variable"==type&&("static"==value||"get"==value||"set"==value||isTS&&isModifier(value))&&cx.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(cx.marked="keyword",cont(classBody)):"variable"==type||"keyword"==cx.style?(cx.marked="property",cont(isTS?classfield:functiondef,classBody)):"["==type?cont(expression,maybetype,expect("]"),isTS?classfield:functiondef,classBody):"*"==value?(cx.marked="keyword",cont(classBody)):";"==type?cont(classBody):"}"==type?cont():"@"==value?cont(expression,classBody):void 0}function classfield(type,value){return"?"==value?cont(classfield):":"==type?cont(typeexpr,maybeAssign):"="==value?cont(expressionNoComma):pass(functiondef)}function afterExport(type,value){return"*"==value?(cx.marked="keyword",cont(maybeFrom,expect(";"))):"default"==value?(cx.marked="keyword",cont(expression,expect(";"))):"{"==type?cont(commasep(exportField,"}"),maybeFrom,expect(";")):pass(statement)}function exportField(type,value){return"as"==value?(cx.marked="keyword",cont(expect("variable"))):"variable"==type?pass(expressionNoComma,exportField):void 0}function afterImport(type){return"string"==type?cont():"("==type?pass(expression):pass(importSpec,maybeMoreImports,maybeFrom)}function importSpec(type,value){return"{"==type?contCommasep(importSpec,"}"):("variable"==type&®ister(value),"*"==value&&(cx.marked="keyword"),cont(maybeAs))}function maybeMoreImports(type){if(","==type)return cont(importSpec,maybeMoreImports)}function maybeAs(_type,value){if("as"==value)return cx.marked="keyword",cont(importSpec)}function maybeFrom(_type,value){if("from"==value)return cx.marked="keyword",cont(expression)}function arrayLiteral(type){return"]"==type?cont():pass(commasep(expressionNoComma,"]"))}function enumdef(){return pass(pushlex("form"),pattern,expect("{"),pushlex("}"),commasep(enummember,"}"),poplex,poplex)}function enummember(){return pass(pattern,maybeAssign)}function isContinuedStatement(state,textAfter){return"operator"==state.lastType||","==state.lastType||isOperatorChar.test(textAfter.charAt(0))||/[,.]/.test(textAfter.charAt(0))}function expressionAllowed(stream,state,backUp){return state.tokenize==tokenBase&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType)||"quasi"==state.lastType&&/\{\s*$/.test(stream.string.slice(0,stream.pos-(backUp||0)))}var indentUnit=config.indentUnit,statementIndent=parserConfig.statementIndent,jsonldMode=parserConfig.jsonld,jsonMode=parserConfig.json||jsonldMode,isTS=parserConfig.typescript,wordRE=parserConfig.wordCharacters||/[\w$\xa1-\uffff]/,keywords=function(){function kw(type){return{type:type,style:"keyword"}}var A=kw("keyword a"),B=kw("keyword b"),C=kw("keyword c"),D=kw("keyword d"),operator=kw("operator"),atom={type:"atom",style:"atom"};return{if:kw("if"),while:A,with:A,else:B,do:B,try:B,finally:B,return:D,break:D,continue:D,new:kw("new"),delete:C,void:C,throw:C,debugger:kw("debugger"),var:kw("var"),const:kw("var"),let:kw("var"),function:kw("function"),catch:kw("catch"),for:kw("for"),switch:kw("switch"),case:kw("case"),default:kw("default"),in:operator,typeof:operator,instanceof:operator,true:atom,false:atom,null:atom,undefined:atom,NaN:atom,Infinity:atom,this:kw("this"),class:kw("class"),super:kw("atom"),yield:C,export:kw("export"),import:kw("import"),extends:C,await:C}}(),isOperatorChar=/[+\-*&%=<>!?|~^@]/,isJsonldKeyword=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,brackets="([{}])",atomicTypes={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},cx={state:null,column:null,marked:null,cc:null},defaultVars=new Var("this",new Var("arguments",null)),type,content;return popcontext.lex=!0,poplex.lex=!0,{startState:function(basecolumn){var state={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical((basecolumn||0)-indentUnit,0,"block",!1),localVars:parserConfig.localVars,context:parserConfig.localVars&&new Context(null,null,!1),indented:basecolumn||0};return parserConfig.globalVars&&"object"==typeof parserConfig.globalVars&&(state.globalVars=parserConfig.globalVars),state},token:function(stream,state){if(stream.sol()&&(!state.lexical.hasOwnProperty("align")&&(state.lexical.align=!1),state.indented=stream.indentation(),findFatArrow(stream,state)),state.tokenize!=tokenComment&&stream.eatSpace())return null;var style=state.tokenize(stream,state);return"comment"==type?style:(state.lastType="operator"==type&&("++"==content||"--"==content)?"incdec":type,parseJS(state,style,type,content,stream))},indent:function(state,textAfter){if(state.tokenize==tokenComment)return CodeMirror.Pass;if(state.tokenize!=tokenBase)return 0;var firstChar=textAfter&&textAfter.charAt(0),lexical=state.lexical,top;if(!/^\s*else\b/.test(textAfter))for(var i=state.cc.length-1,c;0<=i;--i)if(c=state.cc[i],c==poplex)lexical=lexical.prev;else if(c!=maybeelse)break;for(;("stat"==lexical.type||"form"==lexical.type)&&("}"==firstChar||(top=state.cc[state.cc.length-1])&&(top==maybeoperatorComma||top==maybeoperatorNoComma)&&!/^[,\.=+\-*:?[\(]/.test(textAfter));)lexical=lexical.prev;statementIndent&&")"==lexical.type&&"stat"==lexical.prev.type&&(lexical=lexical.prev);var type=lexical.type,closing=firstChar==type;return"vardef"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?lexical.info.length+1:0):"form"==type&&"{"==firstChar?lexical.indented:"form"==type?lexical.indented+indentUnit:"stat"==type?lexical.indented+(isContinuedStatement(state,textAfter)?statementIndent||indentUnit:0):"switch"!=lexical.info||closing||!1==parserConfig.doubleIndentSwitch?lexical.align?lexical.column+(closing?0:1):lexical.indented+(closing?0:indentUnit):lexical.indented+(/^(?:case|default)\b/.test(textAfter)?indentUnit:2*indentUnit)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:jsonMode?null:"/*",blockCommentEnd:jsonMode?null:"*/",blockCommentContinue:jsonMode?null:" * ",lineComment:jsonMode?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:jsonMode?"json":"javascript",jsonldMode:jsonldMode,jsonMode:jsonMode,expressionAllowed:expressionAllowed,skipExpression:function(state){var top=state.cc[state.cc.length-1];(top==expression||top==expressionNoComma)&&state.cc.pop()}}}),CodeMirror.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/x-javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},rAgE:function(module,exports,__webpack_require__){"use strict";function ZipEntries(loadOptions){this.files=[],this.loadOptions=loadOptions}var readerFor=__webpack_require__("9Uuy"),utils=__webpack_require__("dvMn"),sig=__webpack_require__("Ctqd"),ZipEntry=__webpack_require__("dFUs"),utf8=__webpack_require__("Sm7/"),support=__webpack_require__("untT");ZipEntries.prototype={checkSignature:function(expectedSignature){if(!this.reader.readAndCheckSignature(expectedSignature)){this.reader.index-=4;var signature=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+utils.pretty(signature)+", expected "+utils.pretty(expectedSignature)+")")}},isSignature:function(askedIndex,expectedSignature){var currentIndex=this.reader.index;this.reader.setIndex(askedIndex);var signature=this.reader.readString(4);return this.reader.setIndex(currentIndex),signature===expectedSignature},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var zipComment=this.reader.readData(this.zipCommentLength),decodeParamType=support.uint8array?"uint8array":"array",decodeContent=utils.transformTo(decodeParamType,zipComment);this.zipComment=this.loadOptions.decodeFileName(decodeContent)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var extraDataSize=this.zip64EndOfCentralSize-44,extraFieldId,extraFieldLength,extraFieldValue;0offset){var isGarbage=!this.isSignature(0,sig.LOCAL_FILE_HEADER);if(isGarbage)throw new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");else throw new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(offset);var endOfCentralDirOffset=offset;if(this.checkSignature(sig.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===utils.MAX_VALUE_16BITS||this.diskWithCentralDirStart===utils.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===utils.MAX_VALUE_16BITS||this.centralDirRecords===utils.MAX_VALUE_16BITS||this.centralDirSize===utils.MAX_VALUE_32BITS||this.centralDirOffset===utils.MAX_VALUE_32BITS){if(this.zip64=!0,offset=this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>offset)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(offset),this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,sig.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END),0>this.relativeOffsetEndOfZip64CentralDir))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var expectedEndOfCentralDirOffset=this.centralDirOffset+this.centralDirSize;this.zip64&&(expectedEndOfCentralDirOffset+=20,expectedEndOfCentralDirOffset+=12+this.zip64EndOfCentralSize);var extraBytes=endOfCentralDirOffset-expectedEndOfCentralDirOffset;if(0extraBytes)throw new Error("Corrupted zip: missing "+Math.abs(extraBytes)+" bytes.")},prepareReader:function(data){this.reader=readerFor(data)},load:function(data){this.prepareReader(data),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},module.exports=ZipEntries},rbVD:function(module,exports,__webpack_require__){"use strict";var _Mathmax5=Math.max;(function(mod){mod(__webpack_require__("tQq4"))})(function(CodeMirror){function Completion(cm,options){this.cm=cm,this.options=options,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var self=this;cm.on("cursorActivity",this.activityFunc=function(){self.cursorActivity()})}function parseOptions(cm,pos,options){var editor=cm.options.hintOptions,out={};for(var prop in defaultOptions)out[prop]=defaultOptions[prop];if(editor)for(var prop in editor)void 0!==editor[prop]&&(out[prop]=editor[prop]);if(options)for(var prop in options)void 0!==options[prop]&&(out[prop]=options[prop]);return out.hint.resolve&&(out.hint=out.hint.resolve(cm,pos)),out}function getText(completion){return"string"==typeof completion?completion:completion.text}function buildKeyMap(completion,handle){function addBinding(key,val){var bound;bound="string"==typeof val?baseMap.hasOwnProperty(val)?baseMap[val]:val:function(cm){return val(cm,handle)},ourMap[key]=bound}var baseMap={Up:function(){handle.moveFocus(-1)},Down:function(){handle.moveFocus(1)},PageUp:function(){handle.moveFocus(-handle.menuSize()+1,!0)},PageDown:function(){handle.moveFocus(handle.menuSize()-1,!0)},Home:function(){handle.setFocus(0)},End:function(){handle.setFocus(handle.length-1)},Enter:handle.pick,Tab:handle.pick,Esc:handle.close},custom=completion.options.customKeys,ourMap=custom?{}:baseMap;if(custom)for(var key in custom)custom.hasOwnProperty(key)&&addBinding(key,custom[key]);var extra=completion.options.extraKeys;if(extra)for(var key in extra)extra.hasOwnProperty(key)&&addBinding(key,extra[key]);return ourMap}function getHintElement(hintsElement,el){for(;el&&el!=hintsElement;){if("LI"===el.nodeName.toUpperCase()&&el.parentNode==hintsElement)return el;el=el.parentNode}}function Widget(completion,data){this.completion=completion,this.data=data,this.picked=!1;var widget=this,cm=completion.cm,hints=this.hints=document.createElement("ul");hints.className="CodeMirror-hints",this.selectedHint=data.selectedHint||0;for(var completions=data.list,i=0;ihints.clientHeight+1,startScroll=cm.getScrollInfo();if(0winH){hints.style.height=winH-5+"px",hints.style.top=(top=pos.bottom-box.top)+"px";var cursor=cm.getCursor();data.from.ch!=cursor.ch&&(pos=cm.cursorCoords(cursor),hints.style.left=(left=pos.left)+"px",box=hints.getBoundingClientRect())}}var overlapX=box.right-winW;if(0winW&&(hints.style.width=winW-5+"px",overlapX-=box.right-box.left-winW),hints.style.left=(left=pos.left-overlapX)+"px"),scrolls)for(var node=hints.firstChild;node;node=node.nextSibling)node.style.paddingRight=cm.display.nativeBarWidth+"px";if(cm.addKeyMap(this.keyMap=buildKeyMap(completion,{moveFocus:function(n,avoidWrap){widget.changeActive(widget.selectedHint+n,avoidWrap)},setFocus:function(n){widget.changeActive(n)},menuSize:function(){return widget.screenAmount()},length:completions.length,close:function(){completion.close()},pick:function(){widget.pick()},data:data})),completion.options.closeOnUnfocus){var closingOnBlur;cm.on("blur",this.onBlur=function(){closingOnBlur=setTimeout(function(){completion.close()},100)}),cm.on("focus",this.onFocus=function(){clearTimeout(closingOnBlur)})}return cm.on("scroll",this.onScroll=function(){var curScroll=cm.getScrollInfo(),editor=cm.getWrapperElement().getBoundingClientRect(),newTop=top+startScroll.top-curScroll.top,point=newTop-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return below||(point+=hints.offsetHeight),point<=editor.top||point>=editor.bottom?completion.close():void(hints.style.top=newTop+"px",hints.style.left=left+startScroll.left-curScroll.left+"px")}),CodeMirror.on(hints,"dblclick",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),widget.pick())}),CodeMirror.on(hints,"click",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),completion.options.completeOnSingleClick&&widget.pick())}),CodeMirror.on(hints,"mousedown",function(){setTimeout(function(){cm.focus()},20)}),CodeMirror.signal(data,"select",completions[this.selectedHint],hints.childNodes[this.selectedHint]),!0}function applicableHelpers(cm,helpers){if(!cm.somethingSelected())return helpers;for(var result=[],i=0;i=this.data.list.length?i=avoidWrap?this.data.list.length-1:0:0>i&&(i=avoidWrap?0:this.data.list.length-1),this.selectedHint!=i){var node=this.hints.childNodes[this.selectedHint];node&&(node.className=node.className.replace(" "+ACTIVE_HINT_ELEMENT_CLASS,"")),node=this.hints.childNodes[this.selectedHint=i],node.className+=" "+ACTIVE_HINT_ELEMENT_CLASS,node.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=node.offsetTop+node.offsetHeight-this.hints.clientHeight+3),CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],node)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},CodeMirror.registerHelper("hint","auto",{resolve:function(cm,pos){var helpers=cm.getHelpers(pos,"hint"),words;if(helpers.length){var resolved=function(cm,callback,options){function run(i){return i==app.length?callback(null):void fetchHints(app[i],cm,options,function(result){result&&0,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};CodeMirror.defineOption("hintOptions",null)})},rc1b:function(module,exports){"use strict";function isQuote(code){return code===SINGLE_QUOTE||code===DOUBLE_QUOTE}function isNumber(code){return 47code}function isAlpha(code,from,to){return from=from||65,to=to||90,code&=-33,code>=from&&code<=to}function isWhiteSpace(code){return 32===code||9===code||160===code}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1,source;i=minSize&&(mark=marker(opts.indicatorOpen))}cm.setGutterMarker(line,opts.gutter,mark),++cur})}function updateInViewport(cm){var vp=cm.getViewport(),state=cm.state.foldGutter;state&&(cm.operation(function(){updateFoldInfo(cm,vp.from,vp.to)}),state.from=vp.from,state.to=vp.to)}function onGutterClick(cm,line,gutter){var state=cm.state.foldGutter;if(state){var opts=state.options;if(gutter==opts.gutter){var folded=isFolded(cm,line);folded?folded.clear():cm.foldCode(Pos(line,0),opts.rangeFinder)}}}function onChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;state.from=state.to=0,clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){updateInViewport(cm)},opts.foldOnChangeTimeSpan||600)}}function onViewportChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){var vp=cm.getViewport();state.from==state.to||20state.to&&(updateFoldInfo(cm,state.to,vp.to),state.to=vp.to)})},opts.updateViewportTimeSpan||400)}}function onFold(cm,from){var state=cm.state.foldGutter;if(state){var line=from.line;line>=state.from&&linenextTab||nextTab>=end)return n+(end-i);n+=nextTab-i,n+=tabSize-n%tabSize,i=nextTab+1}}function indexOf(array,elt){for(var i=0;i=goal)return pos+_Mathmin6(skipped,goal-col);if(col+=nextTab-pos,col+=tabSize-col%tabSize,pos=nextTab+1,col>=goal)return pos}}function spaceStr(n){for(;spaceStrs.length<=n;)spaceStrs.push(lst(spaceStrs)+" ");return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function map(array,f){for(var out=[],i=0;idir?0to?-1:1;;){if(from==to)return from;var midF=(from+to)/2,mid=0>dir?_Mathceil(midF):_Mathfloor5(midF);if(mid==from)return pred(mid)?from:to;pred(mid)?to=mid:from=mid+dir}}function Display(place,doc,input){var d=this;this.input=input,d.scrollbarFiller=elt("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=elt("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=eltP("div",null,"CodeMirror-code"),d.selectionDiv=elt("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=elt("div",null,"CodeMirror-cursors"),d.measure=elt("div",null,"CodeMirror-measure"),d.lineMeasure=elt("div",null,"CodeMirror-measure"),d.lineSpace=eltP("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none");var lines=eltP("div",[d.lineSpace],"CodeMirror-lines");d.mover=elt("div",[lines],null,"position: relative"),d.sizer=elt("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=elt("div",null,null,"position: absolute; height: "+scrollerGap+"px; width: 1px;"),d.gutters=elt("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=elt("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=elt("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),ie&&8>ie_version&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),webkit||gecko&&mobile||(d.scroller.draggable=!0),place&&(place.appendChild?place.appendChild(d.wrapper):place(d.wrapper)),d.viewFrom=d.viewTo=doc.first,d.reportedViewFrom=d.reportedViewTo=doc.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,input.init(d)}function getLine(doc,n){if(n-=doc.first,0>n||n>=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(n=doc.first&&lcmp(a,b)?b:a}function minPos(a,b){return 0>cmp(a,b)?a:b}function clipLine(doc,n){return _Mathmax6(doc.first,_Mathmin6(n,doc.first+doc.size-1))}function _clipPos(doc,pos){if(pos.linelast?Pos(last,getLine(doc,last).text.length):clipToLen(pos,getLine(doc,pos.line).text.length)}function clipToLen(pos,linelen){var ch=pos.ch;return null==ch||ch>linelen?Pos(pos.line,linelen):0>ch?Pos(pos.line,0):pos}function clipPosArray(doc,array){for(var out=[],i=0;i=startCh:span.to>startCh);(nw||(nw=[])).push(new MarkedSpan(marker,span.from,endsAfter?null:span.to))}}return nw}function markedSpansAfter(old,endCh,isInsert){var nw;if(old)for(var i=0;i=endCh:span.to>endCh);if(endsAfter||span.from==endCh&&"bookmark"==marker.type&&(!isInsert||span.marker.insertLeft)){var startsBefore=null==span.from||(marker.inclusiveLeft?span.from<=endCh:span.fromcmp(p.to,m.from)||0dfrom)&&(mk.inclusiveLeft||dfrom)||newParts.push({from:p.from,to:m.from}),!(0compareCollapsedMarkers(found,sp.marker))&&(found=sp.marker);return found}function collapsedSpanAtStart(line){return collapsedSpanAtSide(line,!0)}function collapsedSpanAtEnd(line){return collapsedSpanAtSide(line,!1)}function collapsedSpanAround(line,ch){var sps=sawCollapsedSpans&&line.markedSpans,found;if(sps)for(var i=0,sp;ich)&&(!found||0>compareCollapsedMarkers(found,sp.marker))&&(found=sp.marker);return found}function conflictingCollapsedRange(doc,lineNo$$1,from,to,marker){var line=getLine(doc,lineNo$$1),sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var i=0,sp;i=toCmp||0>=fromCmp&&0<=toCmp)&&(0>=fromCmp&&(sp.marker.inclusiveRight&&marker.inclusiveLeft?0<=cmp(found.to,from):0=cmp(found.from,to):0>cmp(found.from,to))))return!0}}function visualLine(line){for(var merged;merged=collapsedSpanAtStart(line);)line=merged.find(-1,!0).line;return line}function visualLineEnd(line){for(var merged;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return line}function visualLineContinued(line){for(var merged,lines;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line,(lines||(lines=[])).push(line);return lines}function visualLineNo(doc,lineN){var line=getLine(doc,lineN),vis=visualLine(line);return line==vis?lineN:lineNo(vis)}function visualLineEndNo(doc,lineN){if(lineN>doc.lastLine())return lineN;var line=getLine(doc,lineN),merged;if(!lineIsHidden(doc,line))return lineN;for(;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return lineNo(line)+1}function lineIsHidden(doc,line){var sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var sp=void 0,i=0;id.maxLineLength&&(d.maxLineLength=len,d.maxLine=line)})}function iterateBidiSections(order,from,to,f){if(!order)return f(from,to,"ltr",0);for(var found=!1,i=0,part;ifrom||from==to&&part.to==from)&&(f(_Mathmax6(part.from,from),_Mathmin6(part.to,to),1==part.level?"rtl":"ltr",i),found=!0);found||f(from,to,"ltr")}function getBidiPartAt(order,ch,sticky){var found;bidiOther=null;for(var i=0,cur;ich)return i;cur.to==ch&&(cur.from!=cur.to&&"before"==sticky?found=i:bidiOther=i),cur.from==ch&&(cur.from!=cur.to&&"before"!=sticky?found=i:bidiOther=i)}return null==found?bidiOther:found}function getOrder(line,direction){var order=line.order;return null==order&&(order=line.order=bidiOrdering(line.text,direction)),order}function getHandlers(emitter,type){return emitter._handlers&&emitter._handlers[type]||noHandlers}function off(emitter,type,f){if(emitter.removeEventListener)emitter.removeEventListener(type,f,!1);else if(emitter.detachEvent)emitter.detachEvent("on"+type,f);else{var map$$1=emitter._handlers,arr=map$$1&&map$$1[type];if(arr){var index=indexOf(arr,f);-1=test.offsetWidth&&2ie_version))}var node=zwspSupported?elt("span","\u200B"):elt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return node.setAttribute("cm-text",""),node}function hasBadBidiRects(measure){if(null!=badBidiRects)return badBidiRects;var txt=removeChildrenAndAdd(measure,document.createTextNode("A\u062EA")),r0=range(txt,0,1).getBoundingClientRect(),r1=range(txt,1,2).getBoundingClientRect();return removeChildren(measure),r0&&r0.left!=r0.right&&(badBidiRects=3>r1.right-r0.right)}function hasBadZoomedRects(measure){if(null!=badZoomedRects)return badZoomedRects;var node=removeChildrenAndAdd(measure,elt("span","x")),normal=node.getBoundingClientRect(),fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=1<_Mathabs(normal.left-fromRange.left)}function defineMode(name,mode){2end&&st.splice(i,1,end,st[i+1],i_end),i+=2,at=_Mathmin6(end,i_end);if(style)if(overlay.opaque)st.splice(start,i-start,end,"overlay "+style),i=start+2;else for(;startcm.options.maxHighlightLength&©State(cm.doc.mode,context.state),result=highlightLine(cm,line,context);resetState&&(context.state=resetState),line.stateAfter=context.save(!resetState),line.styles=result.styles,result.classes?line.styleClasses=result.classes:line.styleClasses&&(line.styleClasses=null),updateFrontier===cm.doc.highlightFrontier&&(cm.doc.modeFrontier=_Mathmax6(cm.doc.modeFrontier,++cm.doc.highlightFrontier))}return line.styles}function getContextBefore(cm,n,precise){var doc=cm.doc,display=cm.display;if(!doc.mode.startState)return new Context(doc,!0,n);var start=findStartLine(cm,n,precise),saved=start>doc.first&&getLine(doc,start-1).stateAfter,context=saved?Context.fromSaved(doc,saved,start):new Context(doc,startState(doc.mode),start);return doc.iter(start,n,function(line){processLine(cm,line.text,context);var pos=context.line;line.stateAfter=pos==n-1||0==pos%5||pos>=display.viewFrom&&posi;i++){inner&&(inner[0]=innerMode(mode,state).mode);var style=mode.token(stream,state);if(stream.pos>stream.start)return style}throw new Error("Mode "+mode.name+" failed to advance stream.")}function takeToken(cm,pos,precise,asArray){var doc=cm.doc,mode=doc.mode,style;pos=_clipPos(doc,pos);var line=getLine(doc,pos.line),context=getContextBefore(cm,pos.line,precise),stream=new StringStream(line.text,cm.options.tabSize,context),tokens;for(asArray&&(tokens=[]);(asArray||stream.poscm.options.maxHighlightLength?(flattenSpans=!1,forceToEnd&&processLine(cm,text,context,stream.pos),stream.pos=text.length,style=null):style=extractLineClasses(readToken(mode,stream,context.state,inner),lineClasses),inner){var mName=inner[0].name;mName&&(style="m-"+(style?mName+" "+style:mName))}if(!flattenSpans||curStyle!=style){for(;curStartlim;--search){if(search<=doc.first)return doc.first;var line=getLine(doc,search-1),after=line.stateAfter;if(after&&(!precise||search+(after instanceof SavedContext?after.lookAhead:0)<=doc.modeFrontier))return search;var indented=countColumn(line.text,null,cm.options.tabSize);(null==minline||minindent>indented)&&(minline=search-1,minindent=indented)}return minline}function retreatFrontier(doc,n){if(doc.modeFrontier=_Mathmin6(doc.modeFrontier,n),!(doc.highlightFrontierstart;line--)if(saved=getLine(doc,line).stateAfter,saved&&(!(saved instanceof SavedContext)||line+saved.lookAheadie_version&&(mustWrap=!0),builder.pos+=text.length;else{content=document.createDocumentFragment();for(var pos=0;;){special.lastIndex=pos;var m=special.exec(text),skipped=m?m.index-pos:text.length-pos;if(skipped){var txt=document.createTextNode(displayText.slice(pos,pos+skipped));ie&&9>ie_version?content.appendChild(elt("span",[txt])):content.appendChild(txt),builder.map.push(builder.pos,builder.pos+skipped,txt),builder.col+=skipped,builder.pos+=skipped}if(!m)break;pos+=skipped+1;var txt$1=void 0;if("\t"==m[0]){var tabSize=builder.cm.options.tabSize,tabWidth=tabSize-builder.col%tabSize;txt$1=content.appendChild(elt("span",spaceStr(tabWidth),"cm-tab")),txt$1.setAttribute("role","presentation"),txt$1.setAttribute("cm-text","\t"),builder.col+=tabWidth}else"\r"==m[0]||"\n"==m[0]?(txt$1=content.appendChild(elt("span","\r"==m[0]?"\u240D":"\u2424","cm-invalidchar")),txt$1.setAttribute("cm-text",m[0]),builder.col+=1):(txt$1=builder.cm.options.specialCharPlaceholder(m[0]),txt$1.setAttribute("cm-text",m[0]),ie&&9>ie_version?content.appendChild(elt("span",[txt$1])):content.appendChild(txt$1),builder.col+=1);builder.map.push(builder.pos,builder.pos+1,txt$1),builder.pos++}}if(builder.trailingSpace=32==displayText.charCodeAt(text.length-1),style||startStyle||endStyle||mustWrap||css){var fullStyle=style||"";startStyle&&(fullStyle+=startStyle),endStyle&&(fullStyle+=endStyle);var token=elt("span",[content],fullStyle,css);return title&&(token.title=title),builder.content.appendChild(token)}builder.content.appendChild(content)}}function splitSpaces(text,trailingBefore){if(1start&&part.from<=start));i++);if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,title,css);inner(builder,text.slice(0,part.to-start),style,startStyle,null,title,css),startStyle=null,text=text.slice(part.to-start),start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&builder.map.push(builder.pos,builder.pos+size,widget),!ignoreWidget&&builder.cm.display.input.needsContentAttribute&&(!widget&&(widget=builder.content.appendChild(document.createElement("span"))),widget.setAttribute("cm-marker",marker.id)),widget&&(builder.cm.display.input.setUneditable(widget),builder.content.appendChild(widget)),builder.pos+=size,builder.trailingSpace=!1}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(!spans){for(var i$1=1;i$1pos||m.collapsed&&sp.to==pos&&sp.from==pos)?(null!=sp.to&&sp.to!=pos&&nextChange>sp.to&&(nextChange=sp.to,spanEndStyle=""),m.className&&(spanStyle+=" "+m.className),m.css&&(css=(css?css+";":"")+m.css),m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle),m.endStyle&&sp.to==nextChange&&(endStyles||(endStyles=[])).push(m.endStyle,sp.to),m.title&&!title&&(title=m.title),m.collapsed&&(!collapsed||0>compareCollapsedMarkers(collapsed.marker,m))&&(collapsed=sp)):sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from)}if(endStyles)for(var j$1=0;j$1=len)break;for(var upto=_Mathmin6(len,nextChange);;){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title,css)}if(end>=upto){text=text.slice(upto-pos),pos=upto;break}pos=end,spanStartStyle=""}text=allText.slice(at,at=styles[i++]),style=interpretTokenStyle(styles[i++],builder.cm.options)}}}function LineView(doc,line,lineN){this.line=line,this.rest=visualLineContinued(line),this.size=this.rest?lineNo(lst(this.rest))-lineN+1:1,this.node=this.text=null,this.hidden=lineIsHidden(doc,line)}function buildViewArray(cm,from,to){for(var array=[],pos=from,nextPos,view;posie_version&&(lineView.node.style.zIndex=2)),lineView.node}function updateLineBackground(cm,lineView){var cls=lineView.bgClass?lineView.bgClass+" "+(lineView.line.bgClass||""):lineView.line.bgClass;if(cls&&(cls+=" CodeMirror-linebackground"),lineView.background)cls?lineView.background.className=cls:(lineView.background.parentNode.removeChild(lineView.background),lineView.background=null);else if(cls){var wrap=ensureLineWrapped(lineView);lineView.background=wrap.insertBefore(elt("div",null,cls),wrap.firstChild),cm.display.input.setUneditable(lineView.background)}}function getLineContent(cm,lineView){var ext=cm.display.externalMeasured;return ext&&ext.line==lineView.line?(cm.display.externalMeasured=null,lineView.measure=ext.measure,ext.built):buildLineContent(cm,lineView)}function updateLineText(cm,lineView){var cls=lineView.text.className,built=getLineContent(cm,lineView);lineView.text==lineView.node&&(lineView.node=built.pre),lineView.text.parentNode.replaceChild(built.pre,lineView.text),lineView.text=built.pre,built.bgClass!=lineView.bgClass||built.textClass!=lineView.textClass?(lineView.bgClass=built.bgClass,lineView.textClass=built.textClass,updateLineClasses(cm,lineView)):cls&&(lineView.text.className=cls)}function updateLineClasses(cm,lineView){updateLineBackground(cm,lineView),lineView.line.wrapClass?ensureLineWrapped(lineView).className=lineView.line.wrapClass:lineView.node!=lineView.text&&(lineView.node.className="");var textClass=lineView.textClass?lineView.textClass+" "+(lineView.line.textClass||""):lineView.line.textClass;lineView.text.className=textClass||""}function updateLineGutter(cm,lineView,lineN,dims){if(lineView.gutter&&(lineView.node.removeChild(lineView.gutter),lineView.gutter=null),lineView.gutterBackground&&(lineView.node.removeChild(lineView.gutterBackground),lineView.gutterBackground=null),lineView.line.gutterClass){var wrap=ensureLineWrapped(lineView);lineView.gutterBackground=elt("div",null,"CodeMirror-gutter-background "+lineView.line.gutterClass,"left: "+(cm.options.fixedGutter?dims.fixedPos:-dims.gutterTotalWidth)+"px; width: "+dims.gutterTotalWidth+"px"),cm.display.input.setUneditable(lineView.gutterBackground),wrap.insertBefore(lineView.gutterBackground,lineView.text)}var markers=lineView.line.gutterMarkers;if(cm.options.lineNumbers||markers){var wrap$1=ensureLineWrapped(lineView),gutterWrap=lineView.gutter=elt("div",null,"CodeMirror-gutter-wrapper","left: "+(cm.options.fixedGutter?dims.fixedPos:-dims.gutterTotalWidth)+"px");if(cm.display.input.setUneditable(gutterWrap),wrap$1.insertBefore(gutterWrap,lineView.text),lineView.line.gutterClass&&(gutterWrap.className+=" "+lineView.line.gutterClass),!cm.options.lineNumbers||markers&&markers["CodeMirror-linenumbers"]||(lineView.lineNumber=gutterWrap.appendChild(elt("div",lineNumberFor(cm.options,lineN),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dims.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+cm.display.lineNumInnerWidth+"px"))),markers)for(var k=0;klineN)return{map:lineView.measure.maps[i$1],cache:lineView.measure.caches[i$1],before:!0}}function updateExternalMeasurement(cm,line){line=visualLine(line);var lineN=lineNo(line),view=cm.display.externalMeasured=new LineView(cm.doc,line,lineN);view.lineN=lineN;var built=view.built=buildLineContent(cm,view);return view.text=built.pre,removeChildrenAndAdd(cm.display.lineMeasure,built.pre),view}function measureChar(cm,line,ch,bias){return measureCharPrepared(cm,prepareMeasureForLine(cm,line),ch,bias)}function findViewForLine(cm,lineN){if(lineN>=cm.display.viewFrom&&lineN=ext.lineN&&lineNch)&&(end=mEnd-mStart,start=end-1,ch>=mEnd&&(collapse="right")),null!=start){if(node=map$$1[i+2],mStart==mEnd&&bias==(node.insertLeft?"left":"right")&&(collapse=bias),"left"==bias&&0==start)for(;i&&map$$1[i-2]==map$$1[i-3]&&map$$1[i-1].insertLeft;)node=map$$1[(i-=3)+2],collapse="left";if("right"==bias&&start==mEnd-mStart)for(;ii$1;i$1++){for(;start&&isExtendingChar(prepared.line.text.charAt(place.coverStart+start));)--start;for(;place.coverStart+endie_version&&0==start&&end==place.coverEnd-place.coverStart?node.parentNode.getBoundingClientRect():getUsefulRect(range(node,start,end).getClientRects(),bias),rect.left||rect.right||0==start)break;end=start,--start,collapse="right"}ie&&11>ie_version&&(rect=maybeUpdateRectForZooming(cm.display.measure,rect))}else{0ie_version&&!start&&(!rect||!rect.left&&!rect.right)){var rSpan=node.parentNode.getClientRects()[0];rect=rSpan?{left:rSpan.left,right:rSpan.left+charWidth(cm.display),top:rSpan.top,bottom:rSpan.bottom}:nullRect}for(var rtop=rect.top-prepared.rect.top,rbot=rect.bottom-prepared.rect.top,heights=prepared.view.measure.heights,i=0;i=lineObj.text.length?(ch=lineObj.text.length,sticky="before"):0>=ch&&(ch=0,sticky="after"),!order)return get("before"==sticky?ch-1:ch,"before"==sticky);var partPos=getBidiPartAt(order,ch,sticky),other=bidiOther,val=getBidi(ch,partPos,"before"==sticky);return null!=other&&(val.other=getBidi(ch,other,"before"!=sticky)),val}function estimateCoords(cm,pos){var left=0;pos=_clipPos(cm.doc,pos),cm.options.lineWrapping||(left=charWidth(cm.display)*pos.ch);var lineObj=getLine(cm.doc,pos.line),top=_heightAtLine(lineObj)+paddingTop(cm.display);return{left:left,right:left,top:top,bottom:top+lineObj.height}}function PosWithInfo(line,ch,sticky,outside,xRel){var pos=Pos(line,ch,sticky);return pos.xRel=xRel,outside&&(pos.outside=!0),pos}function _coordsChar(cm,x,y){var doc=cm.doc;if(y+=cm.display.viewOffset,0>y)return PosWithInfo(doc.first,0,null,!0,-1);var lineN=_lineAtHeight(doc,y),last=doc.first+doc.size-1;if(lineN>last)return PosWithInfo(doc.first+doc.size-1,getLine(doc,last).text.length,null,!0,1);0>x&&(x=0);for(var lineObj=getLine(doc,lineN);;){var found=coordsCharInner(cm,lineObj,lineN,x,y),collapsed=collapsedSpanAround(lineObj,found.ch+(0y},begin,end),{begin:begin,end:end}}function wrappedLineExtentChar(cm,lineObj,preparedMeasure,target){preparedMeasure||(preparedMeasure=prepareMeasureForLine(cm,lineObj));var targetTop=intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,target),"line").top;return wrappedLineExtent(cm,lineObj,preparedMeasure,targetTop)}function boxIsAfter(box,x,y,left){return!(box.bottom<=y)&&(!!(box.top>y)||(left?box.left:box.right)>x)}function coordsCharInner(cm,lineObj,lineNo$$1,x,y){y-=_heightAtLine(lineObj);var preparedMeasure=prepareMeasureForLine(cm,lineObj),widgetHeight$$1=widgetTopHeight(lineObj),begin=0,end=lineObj.text.length,ltr=!0,order=getOrder(lineObj,cm.doc.direction);if(order){var part=(cm.options.lineWrapping?coordsBidiPartWrapped:coordsBidiPart)(cm,lineObj,lineNo$$1,preparedMeasure,order,x,y);ltr=1!=part.level,begin=ltr?part.from:part.to-1,end=ltr?part.to:part.from-1}var chAround=null,boxAround=null,ch=findFirst(function(ch){var box=measureCharPrepared(cm,preparedMeasure,ch);return(box.top+=widgetHeight$$1,box.bottom+=widgetHeight$$1,!!boxIsAfter(box,x,y,!1))&&(box.top<=y&&box.left<=x&&(chAround=ch,boxAround=box),!0)},begin,end),outside=!1,baseX,sticky;if(boxAround){var atLeft=x-boxAround.left=coords.bottom}return ch=skipExtendingChars(lineObj.text,ch,1),PosWithInfo(lineNo$$1,ch,sticky,outside,x-baseX)}function coordsBidiPart(cm,lineObj,lineNo$$1,preparedMeasure,order,x,y){var index=findFirst(function(i){var part=order[i],ltr=1!=part.level;return boxIsAfter(_cursorCoords(cm,Pos(lineNo$$1,ltr?part.to:part.from,ltr?"before":"after"),"line",lineObj,preparedMeasure),x,y,!0)},0,order.length-1),part=order[index];if(0y&&(part=order[index-1])}return part}function coordsBidiPartWrapped(cm,lineObj,_lineNo,preparedMeasure,order,x,y){var ref=wrappedLineExtent(cm,lineObj,preparedMeasure,y),begin=ref.begin,end=ref.end;/\s/.test(lineObj.text.charAt(end-1))&&end--;for(var part=null,closestDist=null,i=0,p;i=end||p.to<=begin)){var ltr=1!=p.level,endX=measureCharPrepared(cm,preparedMeasure,ltr?_Mathmin6(end,p.to)-1:_Mathmax6(begin,p.from)).right,dist=endXdist)&&(part=p,closestDist=dist)}return part||(part=order[order.length-1]),part.fromend&&(part={from:part.from,to:end,level:part.level}),part}function textHeight(display){if(null!=display.cachedTextHeight)return display.cachedTextHeight;if(null==measureText){measureText=elt("pre");for(var i=0;49>i;++i)measureText.appendChild(document.createTextNode("x")),measureText.appendChild(elt("br"));measureText.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(display.measure,measureText);var height=measureText.offsetHeight/50;return 3=cm.display.viewTo)return null;if(n-=cm.display.viewFrom,0>n)return null;for(var view=cm.display.view,i=0;in)return i}function updateSelection(cm){cm.display.input.showSelection(cm.display.input.prepareSelection())}function prepareSelection(cm,primary){void 0===primary&&(primary=!0);for(var doc=cm.doc,result={},curFragment=result.cursors=document.createDocumentFragment(),selFragment=result.selection=document.createDocumentFragment(),i=0;i=cm.display.viewTo||range$$1.to().linetop&&(top=0),top=_Mathround3(top),bottom=_Mathround3(bottom),fragment.appendChild(elt("div",null,"CodeMirror-selected","position: absolute; left: "+left+"px;\n top: "+top+"px; width: "+(null==width?rightSide-left:width)+"px;\n height: "+(bottom-top)+"px"))}function drawForLine(line,fromArg,toArg){function coords(ch,bias){return _charCoords(cm,Pos(line,ch),"div",lineObj,bias)}function wrapX(pos,dir,side){var extent=wrappedLineExtentChar(cm,lineObj,null,pos),prop="ltr"==dir==("after"==side)?"left":"right",ch="after"==side?extent.begin:extent.end-(/\s/.test(lineObj.text.charAt(extent.end-1))?2:1);return coords(ch,prop)[prop]}var lineObj=getLine(doc,line),lineLen=lineObj.text.length,order=getOrder(lineObj,doc.direction),start,end;return iterateBidiSections(order,fromArg||0,null==toArg?lineLen:toArg,function(from,to,dir,i){var ltr="ltr"==dir,fromPos=coords(from,ltr?"left":"right"),toPos=coords(to-1,ltr?"right":"left"),openStart=null==fromArg&&0==from,openEnd=null==toArg&&to==lineLen,first=0==i,last=!order||i==order.length-1;if(3>=toPos.top-fromPos.top){var openLeft=(docLTR?openStart:openEnd)&&first,openRight=(docLTR?openEnd:openStart)&&last,left=openLeft?leftSide:(ltr?fromPos:toPos).left,right=openRight?rightSide:(ltr?toPos:fromPos).right;add(left,fromPos.top,right-left,fromPos.bottom)}else{var topLeft,topRight,botLeft,botRight;ltr?(topLeft=docLTR&&openStart&&first?leftSide:fromPos.left,topRight=docLTR?rightSide:wrapX(from,dir,"before"),botLeft=docLTR?leftSide:wrapX(to,dir,"after"),botRight=docLTR&&openEnd&&last?rightSide:toPos.right):(topLeft=docLTR?wrapX(from,dir,"before"):leftSide,topRight=!docLTR&&openStart&&first?rightSide:fromPos.right,botLeft=!docLTR&&openEnd&&last?leftSide:toPos.left,botRight=docLTR?wrapX(to,dir,"after"):rightSide),add(topLeft,fromPos.top,topRight-topLeft,fromPos.bottom),fromPos.bottomcmpCoords(fromPos,start))&&(start=fromPos),0>cmpCoords(toPos,start)&&(start=toPos),(!end||0>cmpCoords(fromPos,end))&&(end=fromPos),0>cmpCoords(toPos,end)&&(end=toPos)}),{start:start,end:end}}var display=cm.display,doc=cm.doc,fragment=document.createDocumentFragment(),padding=paddingH(cm.display),leftSide=padding.left,rightSide=_Mathmax6(display.sizerWidth,displayWidth(cm)-display.sizer.offsetLeft)-padding.right,docLTR="ltr"==doc.direction,sFrom=range$$1.from(),sTo=range$$1.to();if(sFrom.line==sTo.line)drawForLine(sFrom.line,sFrom.ch,sTo.ch);else{var fromLine=getLine(doc,sFrom.line),toLine=getLine(doc,sTo.line),singleVLine=visualLine(fromLine)==visualLine(toLine),leftEnd=drawForLine(sFrom.line,sFrom.ch,singleVLine?fromLine.text.length+1:null).end,rightStart=drawForLine(sTo.line,singleVLine?0:null,sTo.ch).start;singleVLine&&(leftEnd.topcm.options.cursorBlinkRate&&(display.cursorDiv.style.visibility="hidden")}}function ensureFocus(cm){cm.state.focused||(cm.display.input.focus(),onFocus(cm))}function delayBlurEvent(cm){cm.state.delayingBlurEvent=!0,setTimeout(function(){cm.state.delayingBlurEvent&&(cm.state.delayingBlurEvent=!1,onBlur(cm))},100)}function onFocus(cm,e){cm.state.delayingBlurEvent&&(cm.state.delayingBlurEvent=!1),"nocursor"==cm.options.readOnly||(!cm.state.focused&&(signal(cm,"focus",cm,e),cm.state.focused=!0,addClass(cm.display.wrapper,"CodeMirror-focused"),!cm.curOp&&cm.display.selForContextMenu!=cm.doc.sel&&(cm.display.input.reset(),webkit&&setTimeout(function(){return cm.display.input.reset(!0)},20)),cm.display.input.receivedFocus()),restartBlink(cm))}function onBlur(cm,e){cm.state.delayingBlurEvent||(cm.state.focused&&(signal(cm,"blur",cm,e),cm.state.focused=!1,rmClass(cm.display.wrapper,"CodeMirror-focused")),clearInterval(cm.display.blinker),setTimeout(function(){cm.state.focused||(cm.display.shift=!1)},150))}function updateHeightsInViewport(cm){for(var display=cm.display,prevBottom=display.lineDiv.offsetTop,i=0;iie_version){var bot=cur.node.offsetTop+cur.node.offsetHeight;height=bot-prevBottom,prevBottom=bot}else{var box=cur.node.getBoundingClientRect();height=box.bottom-box.top}var diff=cur.line.height-height;if(2>height&&(height=textHeight(display)),(.005diff)&&(updateLineHeight(cur.line,height),updateWidgetHeight(cur.line),cur.rest))for(var j=0;j=to&&(from=_lineAtHeight(doc,_heightAtLine(getLine(doc,ensureTo))-display.wrapper.clientHeight),to=ensureTo)}return{from:from,to:_Mathmax6(to,from+1)}}function alignHorizontally(cm){var display=cm.display,view=display.view;if(display.alignWidgets||display.gutters.firstChild&&cm.options.fixedGutter){for(var comp=compensateForHScroll(display)-display.scroller.scrollLeft+cm.doc.scrollLeft,gutterW=display.gutters.offsetWidth,left=comp+"px",i=0;irect.top+box.top?doScroll=!0:rect.bottom+box.top>(window.innerHeight||document.documentElement.clientHeight)&&(doScroll=!1),null!=doScroll&&!phantom){var scrollNode=elt("div","\u200B",null,"position: absolute;\n top: "+(rect.top-display.viewOffset-paddingTop(cm.display))+"px;\n height: "+(rect.bottom-rect.top+scrollGap(cm)+display.barHeight)+"px;\n left: "+rect.left+"px; width: "+_Mathmax6(2,rect.right-rect.left)+"px;");cm.display.lineSpace.appendChild(scrollNode),scrollNode.scrollIntoView(doScroll),cm.display.lineSpace.removeChild(scrollNode)}}}function scrollPosIntoView(cm,pos,end,margin){null==margin&&(margin=0);var rect;cm.options.lineWrapping||pos!=end||(pos=pos.ch?Pos(pos.line,"before"==pos.sticky?pos.ch-1:pos.ch,"after"):pos,end="before"==pos.sticky?Pos(pos.line,pos.ch+1,"before"):pos);for(var limit=0;5>limit;limit++){var changed=!1,coords=_cursorCoords(cm,pos),endCoords=end&&end!=pos?_cursorCoords(cm,end):coords;rect={left:_Mathmin6(coords.left,endCoords.left),top:_Mathmin6(coords.top,endCoords.top)-margin,right:_Mathmax6(coords.left,endCoords.left),bottom:_Mathmax6(coords.bottom,endCoords.bottom)+margin};var scrollPos=calculateScrollPos(cm,rect),startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(null!=scrollPos.scrollTop&&(updateScrollTop(cm,scrollPos.scrollTop),1<_Mathabs(cm.doc.scrollTop-startTop)&&(changed=!0)),null!=scrollPos.scrollLeft&&(setScrollLeft(cm,scrollPos.scrollLeft),1<_Mathabs(cm.doc.scrollLeft-startLeft)&&(changed=!0)),!changed)break}return rect}function scrollIntoView(cm,rect){var scrollPos=calculateScrollPos(cm,rect);null!=scrollPos.scrollTop&&updateScrollTop(cm,scrollPos.scrollTop),null!=scrollPos.scrollLeft&&setScrollLeft(cm,scrollPos.scrollLeft)}function calculateScrollPos(cm,rect){var display=cm.display,snapMargin=textHeight(cm.display);0>rect.top&&(rect.top=0);var screentop=cm.curOp&&null!=cm.curOp.scrollTop?cm.curOp.scrollTop:display.scroller.scrollTop,screen=displayHeight(cm),result={};rect.bottom-rect.top>screen&&(rect.bottom=rect.top+screen);var docBottom=cm.doc.height+paddingVert(display),atTop=rect.topdocBottom-snapMargin;if(rect.topscreentop+screen){var newTop=_Mathmin6(rect.top,(atBottom?docBottom:rect.bottom)-screen);newTop!=screentop&&(result.scrollTop=newTop)}var screenleft=cm.curOp&&null!=cm.curOp.scrollLeft?cm.curOp.scrollLeft:display.scroller.scrollLeft,screenw=displayWidth(cm)-(cm.options.fixedGutter?display.gutters.offsetWidth:0),tooWide=rect.right-rect.left>screenw;return tooWide&&(rect.right=rect.left+screenw),10>rect.left?result.scrollLeft=0:rect.leftscreenw+screenleft-3&&(result.scrollLeft=rect.right+(tooWide?0:10)-screenw),result}function addToScrollTop(cm,top){null==top||(resolveScrollToPos(cm),cm.curOp.scrollTop=(null==cm.curOp.scrollTop?cm.doc.scrollTop:cm.curOp.scrollTop)+top)}function ensureCursorVisible(cm){resolveScrollToPos(cm);var cur=cm.getCursor();cm.curOp.scrollToPos={from:cur,to:cur,margin:cm.options.cursorScrollMargin}}function scrollToCoords(cm,x,y){(null!=x||null!=y)&&resolveScrollToPos(cm),null!=x&&(cm.curOp.scrollLeft=x),null!=y&&(cm.curOp.scrollTop=y)}function scrollToRange(cm,range$$1){resolveScrollToPos(cm),cm.curOp.scrollToPos=range$$1}function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;if(range$$1){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range$$1.from),to=estimateCoords(cm,range$$1.to);scrollToCoordsRange(cm,from,to,range$$1.margin)}}function scrollToCoordsRange(cm,from,to,margin){var sPos=calculateScrollPos(cm,{left:_Mathmin6(from.left,to.left),top:_Mathmin6(from.top,to.top)-margin,right:_Mathmax6(from.right,to.right),bottom:_Mathmax6(from.bottom,to.bottom)+margin});scrollToCoords(cm,sPos.scrollLeft,sPos.scrollTop)}function updateScrollTop(cm,val){2>_Mathabs(cm.doc.scrollTop-val)||(!gecko&&updateDisplaySimple(cm,{top:val}),setScrollTop(cm,val,!0),gecko&&updateDisplaySimple(cm),startWorker(cm,100))}function setScrollTop(cm,val,forceScroll){val=_Mathmin6(cm.display.scroller.scrollHeight-cm.display.scroller.clientHeight,val),(cm.display.scroller.scrollTop!=val||forceScroll)&&(cm.doc.scrollTop=val,cm.display.scrollbars.setScrollTop(val),cm.display.scroller.scrollTop!=val&&(cm.display.scroller.scrollTop=val))}function setScrollLeft(cm,val,isScroller,forceScroll){val=_Mathmin6(val,cm.display.scroller.scrollWidth-cm.display.scroller.clientWidth),(isScroller?val==cm.doc.scrollLeft:2>_Mathabs(cm.doc.scrollLeft-val))&&!forceScroll||(cm.doc.scrollLeft=val,alignHorizontally(cm),cm.display.scroller.scrollLeft!=val&&(cm.display.scroller.scrollLeft=val),cm.display.scrollbars.setScrollLeft(val))}function measureForScrollbars(cm){var d=cm.display,gutterW=d.gutters.offsetWidth,docH=_Mathround3(cm.doc.height+paddingVert(cm.display));return{clientHeight:d.scroller.clientHeight,viewHeight:d.wrapper.clientHeight,scrollWidth:d.scroller.scrollWidth,clientWidth:d.scroller.clientWidth,viewWidth:d.wrapper.clientWidth,barLeft:cm.options.fixedGutter?gutterW:0,docHeight:docH,scrollHeight:docH+scrollGap(cm)+d.barHeight,nativeBarWidth:d.nativeBarWidth,gutterWidth:gutterW}}function updateScrollbars(cm,measure){measure||(measure=measureForScrollbars(cm));var startWidth=cm.display.barWidth,startHeight=cm.display.barHeight;updateScrollbarsInner(cm,measure);for(var i=0;4>i&&startWidth!=cm.display.barWidth||startHeight!=cm.display.barHeight;i++)startWidth!=cm.display.barWidth&&cm.options.lineWrapping&&updateHeightsInViewport(cm),updateScrollbarsInner(cm,measureForScrollbars(cm)),startWidth=cm.display.barWidth,startHeight=cm.display.barHeight}function updateScrollbarsInner(cm,measure){var d=cm.display,sizes=d.scrollbars.update(measure);d.sizer.style.paddingRight=(d.barWidth=sizes.right)+"px",d.sizer.style.paddingBottom=(d.barHeight=sizes.bottom)+"px",d.heightForcer.style.borderBottom=sizes.bottom+"px solid transparent",sizes.right&&sizes.bottom?(d.scrollbarFiller.style.display="block",d.scrollbarFiller.style.height=sizes.bottom+"px",d.scrollbarFiller.style.width=sizes.right+"px"):d.scrollbarFiller.style.display="",sizes.bottom&&cm.options.coverGutterNextToScrollbar&&cm.options.fixedGutter?(d.gutterFiller.style.display="block",d.gutterFiller.style.height=sizes.bottom+"px",d.gutterFiller.style.width=measure.gutterWidth+"px"):d.gutterFiller.style.display=""}function initScrollbars(cm){cm.display.scrollbars&&(cm.display.scrollbars.clear(),cm.display.scrollbars.addClass&&rmClass(cm.display.wrapper,cm.display.scrollbars.addClass)),cm.display.scrollbars=new scrollbarModel[cm.options.scrollbarStyle](function(node){cm.display.wrapper.insertBefore(node,cm.display.scrollbarFiller),on(node,"mousedown",function(){cm.state.focused&&setTimeout(function(){return cm.display.input.focus()},0)}),node.setAttribute("cm-not-content","true")},function(pos,axis){"horizontal"==axis?setScrollLeft(cm,pos):updateScrollTop(cm,pos)},cm),cm.display.scrollbars.addClass&&addClass(cm.display.wrapper,cm.display.scrollbars.addClass)}function _startOperation(cm){cm.curOp={cm:cm,viewChanged:!1,startHeight:cm.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++nextOpId},pushOperation(cm.curOp)}function _endOperation(cm){var op=cm.curOp;finishOperation(op,function(group){for(var i=0;i=display.viewTo)||display.maxLineChanged&&cm.options.lineWrapping,op.update=op.mustUpdate&&new DisplayUpdate(cm,op.mustUpdate&&{top:op.scrollTop,ensure:op.scrollToPos},op.forceUpdate)}function endOperation_W1(op){op.updatedDisplay=op.mustUpdate&&updateDisplayIfNeeded(op.cm,op.update)}function endOperation_R2(op){var cm=op.cm,display=cm.display;op.updatedDisplay&&updateHeightsInViewport(cm),op.barMeasure=measureForScrollbars(cm),display.maxLineChanged&&!cm.options.lineWrapping&&(op.adjustWidthTo=measureChar(cm,display.maxLine,display.maxLine.text.length).left+3,cm.display.sizerWidth=op.adjustWidthTo,op.barMeasure.scrollWidth=_Mathmax6(display.scroller.clientWidth,display.sizer.offsetLeft+op.adjustWidthTo+scrollGap(cm)+cm.display.barWidth),op.maxScrollLeft=_Mathmax6(0,display.sizer.offsetLeft+op.adjustWidthTo-displayWidth(cm))),(op.updatedDisplay||op.selectionChanged)&&(op.preparedSelection=display.input.prepareSelection())}function endOperation_W2(op){var cm=op.cm;null!=op.adjustWidthTo&&(cm.display.sizer.style.minWidth=op.adjustWidthTo+"px",op.maxScrollLeft